diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-03-12 02:51:56 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-03-12 02:51:56 (GMT) |
commit | 420725077cc9326d5b8c610f2770994a177eed15 (patch) | |
tree | 955bf582c6b9d25475b1c98a98a0ba49b587f2d9 /Source/QtDialog/CMakeSetupDialog.cxx | |
parent | fc26c1459caa61c79b9076e3ca85905e45bbcbc9 (diff) | |
download | CMake-420725077cc9326d5b8c610f2770994a177eed15.zip CMake-420725077cc9326d5b8c610f2770994a177eed15.tar.gz CMake-420725077cc9326d5b8c610f2770994a177eed15.tar.bz2 |
ENH: add ability to suppress dev warnings to gui code
Diffstat (limited to 'Source/QtDialog/CMakeSetupDialog.cxx')
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 4ac1d5c..81a1e5a 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -59,6 +59,7 @@ void QCMakeThread::run() CMakeSetupDialog::CMakeSetupDialog() : ExitAfterGenerate(true), CacheModified(false), CurrentState(Interrupting) { + this->SuppressDevWarnings = false; // create the GUI QSettings settings; settings.beginGroup("Settings/StartPath"); @@ -95,8 +96,11 @@ 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")); + QObject::connect(this->SuppressDevWarningsAction, SIGNAL(triggered(bool)), + this, SLOT(doSuppressDev())); + this->SuppressDevWarningsAction->setCheckable(true); - QMenu* HelpMenu = this->menuBar()->addMenu(tr("&Help")); QAction* a = HelpMenu->addAction(tr("About")); QObject::connect(a, SIGNAL(triggered(bool)), @@ -304,6 +308,14 @@ void CMakeSetupDialog::finishGenerate(int err) } } +#include <iostream> +void CMakeSetupDialog::doSuppressDev() +{ + this->SuppressDevWarnings = !this->SuppressDevWarnings; + this->CMakeThread->cmakeInstance()-> + SetSuppressDevWarnings(this->SuppressDevWarnings); +} + void CMakeSetupDialog::doGenerate() { if(this->CurrentState == Generating) |