]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiThesaurus.cpp
QDialogButtonBox for the remaining dialogs.
[lyx.git] / src / frontends / qt4 / GuiThesaurus.cpp
index 2bda2485c3a1d255e2223faab5325fff6bb7bd05..dba18368138f219b2b052d457ddb0923a731146a 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <QAbstractItemModel>
 #include <QCompleter>
+#include <QDialogButtonBox>
 #include <QHeaderView>
 #include <QLineEdit>
 #include <QPushButton>
@@ -51,8 +52,8 @@ GuiThesaurus::GuiThesaurus(GuiView & lv)
        meaningsTV->setColumnCount(1);
        meaningsTV->header()->hide();
 
-       connect(closePB, SIGNAL(clicked()),
-               this, SLOT(slotClose()));
+       connect(buttonBox, SIGNAL(clicked(QAbstractButton *)),
+               this, SLOT(slotButtonBox(QAbstractButton *)));
        connect(replaceED, SIGNAL(returnPressed()),
                this, SLOT(replaceClicked()));
        connect(replaceED, SIGNAL(textChanged(QString)),
@@ -85,7 +86,7 @@ GuiThesaurus::GuiThesaurus(GuiView & lv)
        if (entryCO->completer())
                entryCO->completer()->setCompletionMode(QCompleter::PopupCompletion);
 
-       bc().setCancel(closePB);
+       bc().setCancel(buttonBox->button(QDialogButtonBox::Close));
        bc().setApply(replacePB);
        bc().addReadOnly(replaceED);
        bc().addReadOnly(replacePB);