[Cmake-commits] [cmake-commits] hoffman committed CMakeSetupDialog.cxx 1.38 1.39 CMakeSetupDialog.h 1.20 1.21 QCMake.cxx 1.20 1.21 QCMake.h 1.8 1.9
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Mar 11 22:51:58 EDT 2008
Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv27938/Source/QtDialog
Modified Files:
CMakeSetupDialog.cxx CMakeSetupDialog.h QCMake.cxx QCMake.h
Log Message:
ENH: add ability to suppress dev warnings to gui code
Index: CMakeSetupDialog.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -C 2 -d -r1.20 -r1.21
*** CMakeSetupDialog.h 14 Feb 2008 23:18:10 -0000 1.20
--- CMakeSetupDialog.h 12 Mar 2008 02:51:56 -0000 1.21
***************
*** 45,48 ****
--- 45,49 ----
void doConfigure();
void doGenerate();
+ void doSuppressDev();
void doHelp();
void doAbout();
***************
*** 86,89 ****
--- 87,91 ----
bool ExitAfterGenerate;
bool CacheModified;
+ bool SuppressDevWarnings;
QAction* ReloadCacheAction;
QAction* DeleteCacheAction;
***************
*** 91,94 ****
--- 93,97 ----
QAction* ConfigureAction;
QAction* GenerateAction;
+ QAction* SuppressDevWarningsAction;
State CurrentState;
Index: QCMake.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMake.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C 2 -d -r1.8 -r1.9
*** QCMake.h 9 Nov 2007 20:18:49 -0000 1.8
--- QCMake.h 12 Mar 2008 02:51:56 -0000 1.9
***************
*** 66,70 ****
QCMake(QObject* p=0);
~QCMake();
!
public slots:
/// load the cache file in a directory
--- 66,70 ----
QCMake(QObject* p=0);
~QCMake();
! void SetSuppressDevWarnings(bool value);
public slots:
/// load the cache file in a directory
***************
*** 126,130 ****
static void errorCallback(const char* msg, const char* title,
bool&, void* cd);
!
QString SourceDirectory;
QString BinaryDirectory;
--- 126,130 ----
static void errorCallback(const char* msg, const char* title,
bool&, void* cd);
! bool SuppressDevWarnings;
QString SourceDirectory;
QString BinaryDirectory;
Index: QCMake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMake.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -C 2 -d -r1.20 -r1.21
*** QCMake.cxx 16 Feb 2008 18:05:03 -0000 1.20
--- QCMake.cxx 12 Mar 2008 02:51:56 -0000 1.21
***************
*** 29,32 ****
--- 29,33 ----
: QObject(p)
{
+ this->SuppressDevWarnings = false;
qRegisterMetaType<QCMakeCacheProperty>();
qRegisterMetaType<QCMakeCachePropertyList>();
***************
*** 108,111 ****
--- 109,113 ----
}
}
+
QCMakeCachePropertyList props = this->properties();
emit this->propertiesChanged(props);
***************
*** 144,147 ****
--- 146,150 ----
this->CMakeInstance->CreateGlobalGenerator(this->Generator.toAscii().data()));
this->CMakeInstance->LoadCache();
+ this->CMakeInstance->SetSuppressDevWarnings(this->SuppressDevWarnings);
this->CMakeInstance->PreLoadCMakeFiles();
***************
*** 361,362 ****
--- 364,369 ----
}
+ void QCMake::SetSuppressDevWarnings(bool value)
+ {
+ this->SuppressDevWarnings = value;
+ }
Index: CMakeSetupDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.cxx,v
retrieving revision 1.38
retrieving revision 1.39
diff -C 2 -d -r1.38 -r1.39
*** CMakeSetupDialog.cxx 7 Mar 2008 16:50:11 -0000 1.38
--- CMakeSetupDialog.cxx 12 Mar 2008 02:51:56 -0000 1.39
***************
*** 60,63 ****
--- 60,64 ----
: ExitAfterGenerate(true), CacheModified(false), CurrentState(Interrupting)
{
+ this->SuppressDevWarnings = false;
// create the GUI
QSettings settings;
***************
*** 96,101 ****
QObject::connect(this->GenerateAction, SIGNAL(triggered(bool)),
this, SLOT(doGenerate()));
-
QMenu* HelpMenu = this->menuBar()->addMenu(tr("&Help"));
QAction* a = HelpMenu->addAction(tr("About"));
--- 97,105 ----
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"));
***************
*** 305,308 ****
--- 309,320 ----
}
+ #include <iostream>
+ void CMakeSetupDialog::doSuppressDev()
+ {
+ this->SuppressDevWarnings = !this->SuppressDevWarnings;
+ this->CMakeThread->cmakeInstance()->
+ SetSuppressDevWarnings(this->SuppressDevWarnings);
+ }
+
void CMakeSetupDialog::doGenerate()
{
More information about the Cmake-commits
mailing list