]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiErrorList.cpp
QDialogButtonBox for the remaining dialogs.
[lyx.git] / src / frontends / qt4 / GuiErrorList.cpp
index 0907c6164b968e0ae6817b798d147f21779f76a0..0b625ccd519bf5ad2a73fca67919a165d0973b5e 100644 (file)
@@ -52,18 +52,18 @@ string const guiErrorType(string const & s)
        return s;
 }
 
-} // namespace anon
+} // namespace
 
 namespace lyx {
 namespace frontend {
 
 GuiErrorList::GuiErrorList(GuiView & lv)
-       : GuiDialog(lv, "errorlist", qt_("Error List")), from_master_(false)
+       : GuiDialog(lv, "errorlist", qt_("Error List")), buf_(0), from_master_(false)
 {
        setupUi(this);
 
-       connect(closePB, SIGNAL(clicked()),
-               this, SLOT(slotClose()));
+       connect(buttonBox, SIGNAL(clicked(QAbstractButton *)),
+                       this, SLOT(slotButtonBox(QAbstractButton *)));
        connect(viewLogPB, SIGNAL(clicked()),
                this, SLOT(viewLog()));
        connect(showAnywayPB, SIGNAL(clicked()),
@@ -72,7 +72,7 @@ GuiErrorList::GuiErrorList(GuiView & lv)
                this, SLOT(select()));
 
        bc().setPolicy(ButtonPolicy::OkCancelPolicy);
-       bc().setCancel(closePB);
+       bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel));
 }
 
 
@@ -142,17 +142,17 @@ ErrorList const & GuiErrorList::errorList() const
 }
 
 
-bool GuiErrorList::initialiseParams(string const & data)
+bool GuiErrorList::initialiseParams(string const & sdata)
 {
-       from_master_ = prefixIs(data, "from_master|");
-       string error_type = data;
+       from_master_ = prefixIs(sdata, "from_master|");
+       string error_type = sdata;
        if (from_master_)
-               error_type = split(data, '|');
+               error_type = split(sdata, '|');
        error_type_ = error_type;
        buf_ = from_master_ ?
                bufferview()->buffer().masterBuffer()
                : &bufferview()->buffer();
-       name_ = bformat(_("%1$s Errors (%2$s)"), 
+       name_ = bformat(_("%1$s Errors (%2$s)"),
                                _(guiErrorType(error_type)),
                                    from_utf8(buf_->absFileName()));
        paramsToDialog();