summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog
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
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')
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx17
-rw-r--r--Source/QtDialog/CMakeSetupDialog.h1
-rw-r--r--Source/QtDialog/QCMake.cxx15
-rw-r--r--Source/QtDialog/QCMake.h6
4 files changed, 36 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));
+}
diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h
index 424bb55..1ce020d 100644
--- a/Source/QtDialog/CMakeSetupDialog.h
+++ b/Source/QtDialog/CMakeSetupDialog.h
@@ -73,6 +73,7 @@ protected slots:
void selectionChanged();
void addCacheEntry();
void startSearch();
+ void setDebugOutput(bool);
protected:
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index 43db641..c10d9a6 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -362,6 +362,21 @@ void QCMake::reloadCache()
props = this->properties();
emit this->propertiesChanged(props);
}
+
+void QCMake::setDebugOutput(bool flag)
+{
+ if(flag != this->CMakeInstance->GetDebugOutput())
+ {
+ this->CMakeInstance->SetDebugOutputOn(flag);
+ emit this->debugOutputChanged(flag);
+ }
+}
+
+bool QCMake::getDebugOutput() const
+{
+ return this->CMakeInstance->GetDebugOutput();
+}
+
void QCMake::SetSuppressDevWarnings(bool value)
{
diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h
index ab7040c..89a19e9 100644
--- a/Source/QtDialog/QCMake.h
+++ b/Source/QtDialog/QCMake.h
@@ -87,6 +87,8 @@ public slots:
void deleteCache();
/// reload the cache in binary directory
void reloadCache();
+ /// set whether to do debug output
+ void setDebugOutput(bool);
public:
/// get the list of cache properties
@@ -99,6 +101,8 @@ public:
QString generator() const;
/// get the available generators
QStringList availableGenerators() const;
+ /// get whether to do debug output
+ bool getDebugOutput() const;
signals:
/// signal when properties change (during read from disk or configure process)
@@ -118,6 +122,8 @@ signals:
void outputMessage(const QString& msg);
/// signal when there is an error message
void errorMessage(const QString& msg);
+ /// signal when debug output changes
+ void debugOutputChanged(bool);
protected:
cmake* CMakeInstance;