summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/CMakeSetupDialog.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2008-04-02 21:41:24 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2008-04-02 21:41:24 (GMT)
commit7ff914227d32a8cd4a13e1cbf2ff365fcf194374 (patch)
tree07ce09b53ebdd645ba59dd6f7c572ebb9c999910 /Source/QtDialog/CMakeSetupDialog.cxx
parent6292341841c17af7932d27a21404efef4c9c4b5e (diff)
downloadCMake-7ff914227d32a8cd4a13e1cbf2ff365fcf194374.zip
CMake-7ff914227d32a8cd4a13e1cbf2ff365fcf194374.tar.gz
CMake-7ff914227d32a8cd4a13e1cbf2ff365fcf194374.tar.bz2
ENH: Add debug output option to a new Options menu.
Move dev warnings option to the new Options menu. Fixes #6335.
Diffstat (limited to 'Source/QtDialog/CMakeSetupDialog.cxx')
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 421e2e8..10da23f 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -96,10 +96,16 @@ CMakeSetupDialog::CMakeSetupDialog()
this->GenerateAction = ToolsMenu->addAction(tr("&Generate"));
QObject::connect(this->GenerateAction, SIGNAL(triggered(bool)),
this, SLOT(doGenerate()));
- this->SuppressDevWarningsAction = ToolsMenu->addAction(tr("&Suppress dev Warnings (-Wno-dev)"));
- QObject::connect(this->SuppressDevWarningsAction, SIGNAL(triggered(bool)),
+
+ QMenu* OptionsMenu = this->menuBar()->addMenu(tr("&Options"));
+ QAction* supressDevWarningsAction = OptionsMenu->addAction(tr("&Suppress dev Warnings (-Wno-dev)"));
+ QObject::connect(supressDevWarningsAction, SIGNAL(triggered(bool)),
this, SLOT(doSuppressDev()));
- this->SuppressDevWarningsAction->setCheckable(true);
+ supressDevWarningsAction->setCheckable(true);
+ QAction* debugAction = OptionsMenu->addAction(tr("&Debug Output"));
+ debugAction->setCheckable(true);
+ QObject::connect(debugAction, SIGNAL(toggled(bool)),
+ this, SLOT(setDebugOutput(bool)));
QMenu* HelpMenu = this->menuBar()->addMenu(tr("&Help"));
QAction* a = HelpMenu->addAction(tr("About"));
@@ -861,4 +867,9 @@ void CMakeSetupDialog::startSearch()
this->Search->selectAll();
}
+void CMakeSetupDialog::setDebugOutput(bool flag)
+{
+ QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(),
+ "setDebugOutput", Qt::QueuedConnection, Q_ARG(bool, flag));
+}