]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiSendto.cpp
Use <cstdint> instead of <boost/cstdint.hpp>
[lyx.git] / src / frontends / qt4 / GuiSendto.cpp
index 92814f0da9dae7f3c8201aba1cd4e7533ac8741b..a42bbb472cc03bdca08c88367cb5f83039702232 100644 (file)
@@ -42,9 +42,8 @@ GuiSendTo::GuiSendTo(GuiView & lv)
 {
        setupUi(this);
 
-       connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
-       connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
-       connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
+       connect(buttonBox, SIGNAL(clicked(QAbstractButton *)),
+               this, SLOT(slotButtonBox(QAbstractButton *)));
 
        connect(formatLW, SIGNAL(itemClicked(QListWidgetItem *)),
                this, SLOT(slotFormatHighlighted(QListWidgetItem *)));
@@ -58,9 +57,9 @@ GuiSendTo::GuiSendTo(GuiView & lv)
                this, SLOT(changed_adaptor()));
 
        bc().setPolicy(ButtonPolicy::OkApplyCancelPolicy);
-       bc().setOK(okPB);
-       bc().setApply(applyPB);
-       bc().setCancel(closePB);
+       bc().setOK(buttonBox->button(QDialogButtonBox::Ok));
+       bc().setApply(buttonBox->button(QDialogButtonBox::Apply));
+       bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel));
 }
 
 
@@ -72,7 +71,7 @@ void GuiSendTo::changed_adaptor()
 
 void GuiSendTo::updateContents()
 {
-       FormatList const & all_formats = 
+       FormatList const & all_formats =
            buffer().params().exportableFormats(false);
        // Save the current selection if any
        Format const * current_format = nullptr;
@@ -102,7 +101,7 @@ void GuiSendTo::applyView()
        if (line < 0 || line > formatLW->count())
                return;
 
-       FormatList const & all_formats = 
+       FormatList const & all_formats =
            buffer().params().exportableFormats(false);
        format_ = all_formats[line];
        command_ = command;
@@ -113,7 +112,7 @@ bool GuiSendTo::isValid()
 {
        int const line = formatLW->currentRow();
 
-       if (line < 0 || line > int(formatLW->count()))
+       if (line < 0 || (line > int(formatLW->count())))
                return false;
 
        return (formatLW->selectedItems().size() > 0
@@ -143,14 +142,14 @@ void GuiSendTo::dispatchParams()
        if (!format_ || format_->name().empty())
                return;
 
-       string data = format_->name();
+       string sdata = format_->name();
        if (!command_.isEmpty())
-               data += " " + fromqstr(command_);
+               sdata += " " + fromqstr(command_);
 
        FuncCode const lfun = command_.isEmpty() ?
                LFUN_BUFFER_EXPORT : getLfun();
 
-       dispatch(FuncRequest(lfun, data));
+       dispatch(FuncRequest(lfun, sdata));
 }
 
 Dialog * createGuiSendTo(GuiView & lv) { return new GuiSendTo(lv); }