[Cmake-commits] [cmake-commits] clinton committed CMakeSetupDialog.cxx 1.44 1.45 CMakeSetupDialog.h 1.22 1.23 QCMake.cxx 1.21 1.22 QCMake.h 1.9 1.10

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Apr 2 17:41:27 EDT 2008


Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv22564

Modified Files:
	CMakeSetupDialog.cxx CMakeSetupDialog.h QCMake.cxx QCMake.h 
Log Message:

ENH:  Add debug output option to a new Options menu.
      Move dev warnings option to the new Options menu.
      Fixes #6335.



Index: CMakeSetupDialog.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -C 2 -d -r1.22 -r1.23
*** CMakeSetupDialog.h	2 Apr 2008 18:01:37 -0000	1.22
--- CMakeSetupDialog.h	2 Apr 2008 21:41:24 -0000	1.23
***************
*** 74,77 ****
--- 74,78 ----
    void addCacheEntry();
    void startSearch();
+   void setDebugOutput(bool);
  
  protected:

Index: QCMake.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMake.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C 2 -d -r1.9 -r1.10
*** QCMake.h	12 Mar 2008 02:51:56 -0000	1.9
--- QCMake.h	2 Apr 2008 21:41:24 -0000	1.10
***************
*** 88,91 ****
--- 88,93 ----
    /// reload the cache in binary directory
    void reloadCache();
+   /// set whether to do debug output
+   void setDebugOutput(bool);
  
  public:
***************
*** 100,103 ****
--- 102,107 ----
    /// get the available generators
    QStringList availableGenerators() const;
+   /// get whether to do debug output
+   bool getDebugOutput() const;
  
  signals:
***************
*** 119,122 ****
--- 123,128 ----
    /// signal when there is an error message
    void errorMessage(const QString& msg);
+   /// signal when debug output changes
+   void debugOutputChanged(bool);
  
  protected:

Index: QCMake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMake.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -C 2 -d -r1.21 -r1.22
*** QCMake.cxx	12 Mar 2008 02:51:56 -0000	1.21
--- QCMake.cxx	2 Apr 2008 21:41:24 -0000	1.22
***************
*** 363,366 ****
--- 363,381 ----
    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)

Index: CMakeSetupDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.cxx,v
retrieving revision 1.44
retrieving revision 1.45
diff -C 2 -d -r1.44 -r1.45
*** CMakeSetupDialog.cxx	2 Apr 2008 18:01:37 -0000	1.44
--- CMakeSetupDialog.cxx	2 Apr 2008 21:41:24 -0000	1.45
***************
*** 97,104 ****
    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)), 
                     this, SLOT(doSuppressDev()));
!   this->SuppressDevWarningsAction->setCheckable(true);
    
    QMenu* HelpMenu = this->menuBar()->addMenu(tr("&Help"));
--- 97,110 ----
    QObject::connect(this->GenerateAction, SIGNAL(triggered(bool)), 
                     this, SLOT(doGenerate()));
!   
!   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()));
!   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"));
***************
*** 862,864 ****
--- 868,875 ----
  }
  
+ void CMakeSetupDialog::setDebugOutput(bool flag)
+ {
+   QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(),
+     "setDebugOutput", Qt::QueuedConnection, Q_ARG(bool, flag));
+ }
  



More information about the Cmake-commits mailing list