]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiProgressView.cpp
QDialogButtonBox for the remaining dialogs.
[lyx.git] / src / frontends / qt4 / GuiProgressView.cpp
index 454148f7a824fea2f642b3839dc9072052bc6816..486fdaf54ecd7552281f0c41476864b27db213e1 100644 (file)
@@ -24,6 +24,8 @@
 #include "support/convert.h"
 #include "support/debug.h"
 
+#include <algorithm>
+
 #include <QCheckBox>
 #include <QDebug>
 #include <QSettings>
@@ -56,10 +58,10 @@ bool DebugSorter(DebugMap const & a, DebugMap const & b)
 {
        return a.second < b.second;
 }
-}
+} // namespace
 
 
-GuiProgressView::GuiProgressView(GuiView & parent, Qt::DockWidgetArea area, 
+GuiProgressView::GuiProgressView(GuiView & parent, Qt::DockWidgetArea area,
        Qt::WindowFlags flags)
        : DockView(parent, "progress", qt_("Progress/Debug Messages"), area, flags)
 {
@@ -112,7 +114,7 @@ GuiProgressView::GuiProgressView(GuiView & parent, Qt::DockWidgetArea area,
        connect(widget_->debugMessagesTW,
                SIGNAL(itemActivated(QTreeWidgetItem *, int)),
                this, SLOT(debugMessageActivated(QTreeWidgetItem *, int)));
-  
+
        GuiProgress * progress =
                dynamic_cast<GuiProgress *>(ProgressInterface::instance());
 
@@ -150,7 +152,7 @@ void GuiProgressView::debugMessageActivated(QTreeWidgetItem * item, int)
 
 void GuiProgressView::levelChanged()
 {
-       int level = Debug::NONE;
+       unsigned int level = Debug::NONE;
        QTreeWidgetItemIterator it(widget_->debugMessagesTW);
        while (*it) {
                if ((*it)->text(1) == qt_("Yes"))
@@ -163,7 +165,7 @@ void GuiProgressView::levelChanged()
 
 void GuiProgressView::debugSelectionChanged()
 {
-       int level = Debug::NONE;
+       Debug::Type level = Debug::NONE;
        if (widget_->debugAnyRB->isChecked())
                level = Debug::ANY;
        else if (widget_->debugSelectedRB->isChecked()) {
@@ -178,7 +180,7 @@ void GuiProgressView::debugSelectionChanged()
                ++it;
        }
        widget_->debugMessagesTW->setEnabled(false);
-       dispatch(FuncRequest(LFUN_DEBUG_LEVEL_SET, convert<string>(level)));
+       dispatch(FuncRequest(LFUN_DEBUG_LEVEL_SET, convert<string>((int)level)));
 }
 
 
@@ -193,6 +195,10 @@ void GuiProgressView::clearText()
 
 void GuiProgressView::appendLyXErrText(QString const & text)
 {
+       // Skip verbose messages meant for the terminal
+       if (text.startsWith("\nRunning:"))
+               return;
+
        widget_->outTE->moveCursor(QTextCursor::End);
        widget_->outTE->insertPlainText(text);
        widget_->outTE->ensureCursorVisible();
@@ -226,10 +232,9 @@ void GuiProgressView::appendText(QString const & text)
 }
 
 
-void GuiProgressView::saveSession() const
+void GuiProgressView::saveSession(QSettings & settings) const
 {
-       Dialog::saveSession();
-       QSettings settings;
+       Dialog::saveSession(settings);
        settings.setValue(
                sessionKey() + "/autoclear", widget_->autoClearCB->isChecked());
        settings.setValue(