[Cmake-commits] [cmake-commits] hoffman committed CMakeSetupDialog.cxx 1.45 1.46 CMakeSetupDialog.h 1.23 1.24 QMacInstallDialog.cxx 1.1 1.2

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Apr 3 16:18:39 EDT 2008


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

Modified Files:
	CMakeSetupDialog.cxx CMakeSetupDialog.h QMacInstallDialog.cxx 
Log Message:
ENH: add ability to create symlinks for command line on mac from gui


Index: CMakeSetupDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.cxx,v
retrieving revision 1.45
retrieving revision 1.46
diff -C 2 -d -r1.45 -r1.46
*** CMakeSetupDialog.cxx	2 Apr 2008 21:41:24 -0000	1.45
--- CMakeSetupDialog.cxx	3 Apr 2008 20:18:37 -0000	1.46
***************
*** 32,35 ****
--- 32,36 ----
  #include <QUrl>
  #include <QShortcut>
+ #include <QMacInstallDialog.h>
  
  #include "QCMake.h"
***************
*** 97,105 ****
    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"));
--- 98,112 ----
    QObject::connect(this->GenerateAction, SIGNAL(triggered(bool)), 
                     this, SLOT(doGenerate()));
! #if defined(__APPLE__)
!   this->InstallForCommandLineAction 
!     = ToolsMenu->addAction(tr("&Install For Command Line Use"));
!   QObject::connect(this->InstallForCommandLineAction, SIGNAL(triggered(bool)), 
!                    this, SLOT(doInstallForCommandLine()));
! #endif  
    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"));
***************
*** 107,111 ****
    QObject::connect(debugAction, SIGNAL(toggled(bool)), 
                     this, SLOT(setDebugOutput(bool)));
!   
    QMenu* HelpMenu = this->menuBar()->addMenu(tr("&Help"));
    QAction* a = HelpMenu->addAction(tr("About"));
--- 114,118 ----
    QObject::connect(debugAction, SIGNAL(toggled(bool)), 
                     this, SLOT(setDebugOutput(bool)));
! 
    QMenu* HelpMenu = this->menuBar()->addMenu(tr("&Help"));
    QAction* a = HelpMenu->addAction(tr("About"));
***************
*** 326,329 ****
--- 333,342 ----
  }
  
+ void CMakeSetupDialog::doInstallForCommandLine()
+ {
+   QMacInstallDialog setupdialog(0);
+   setupdialog.exec();
+ }
+ 
  void CMakeSetupDialog::doGenerate()
  {

Index: QMacInstallDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QMacInstallDialog.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** QMacInstallDialog.cxx	19 Feb 2008 19:06:10 -0000	1.1
--- QMacInstallDialog.cxx	3 Apr 2008 20:18:37 -0000	1.2
***************
*** 47,50 ****
--- 47,56 ----
      std::cout << "ln -s [" << file << "] [";
      std::cout << newName << "]\n";
+     // Remove the old files
+     if(cmSystemTools::FileExists(newName.c_str()))
+       {
+       std::cout << "rm [" << newName << "]\n";
+       cmSystemTools::RemoveFile(newName.c_str());
+       }
      cmSystemTools::CreateSymlink(file.c_str(),
                                   newName.c_str());

Index: CMakeSetupDialog.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -C 2 -d -r1.23 -r1.24
*** CMakeSetupDialog.h	2 Apr 2008 21:41:24 -0000	1.23
--- CMakeSetupDialog.h	3 Apr 2008 20:18:37 -0000	1.24
***************
*** 46,49 ****
--- 46,50 ----
    void doGenerate();
    void doSuppressDev();
+   void doInstallForCommandLine();
    void doHelp();
    void doAbout();
***************
*** 95,98 ****
--- 96,100 ----
    QAction* GenerateAction;
    QAction* SuppressDevWarningsAction;
+   QAction* InstallForCommandLineAction;
    State CurrentState;
  



More information about the Cmake-commits mailing list