[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdevelop
From:       Adam Treat <treat () kde ! org>
Date:       2006-08-03 16:30:02
Message-ID: 1154622602.286217.1206.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 569361 by treat:

Cleaning up documentcontroller a bit more


 M  +3 -0      kdevelop.kdev4  
 M  +7 -26     lib/kdevdocumentcontroller.cpp  
 M  +4 -8      lib/kdevdocumentcontroller.h  


--- trunk/KDE/kdevelop/kdevelop.kdev4 #569360:569361
@@ -3,3 +3,6 @@
 Importer=KDevGenericImporter
 PrimaryLanguage=C++
 Project Management=KDevProjectManager
+
+[KFileDialog Settings]
+KFileIconView_ViewMode=LargeRows
--- trunk/KDE/kdevelop/lib/kdevdocumentcontroller.cpp #569360:569361
@@ -471,48 +471,29 @@
              this, SLOT( slotNewStatus( KTextEditor::Document* ) ) );
 }
 
-void KDevDocumentController::slotSave()
+void KDevDocumentController::saveActiveDocument()
 {
-//     kDebug( 9000 ) << k_funcinfo << endl;
-
     if ( activeReadWrite() )
         saveDocument( activeDocument() );
 }
 
-void KDevDocumentController::slotReload()
+void KDevDocumentController::reloadActiveDocument()
 {
-//     kDebug( 9000 ) << k_funcinfo << endl;
-
     if ( activeReadWrite() )
         reloadDocument( activeDocument() );
 }
 
-void KDevDocumentController::slotCloseWindow()
+void KDevDocumentController::closeActiveDocument()
 {
     closeDocument( activeDocument() );
 }
 
-void KDevDocumentController::slotCloseAllWindows()
+void KDevDocumentController::closeAllExceptActiveDocument()
 {
-    closeAllDocuments();
-}
-
-void KDevDocumentController::slotCloseOtherWindows()
-{
     if ( activeReadOnly() )
         closeAllOthers( activeDocument() );
 }
 
-void KDevDocumentController::slotSaveAllDocuments()
-{
-    saveAllDocuments();
-}
-
-void KDevDocumentController::slotRevertAllDocuments()
-{
-    reloadAllDocuments();
-}
-
 void KDevDocumentController::slotOpenDocument()
 {
     KEncodingFileDialog::Result result =
@@ -906,14 +887,14 @@
     m_openRecentAction->loadEntries( KDevConfig::localProject(), "RecentDocuments" );
 
     m_saveAllDocumentsAction = new KAction( i18n( "Save Al&l" ), ac, "file_save_all" );
-    connect( m_saveAllDocumentsAction, SIGNAL( triggered( bool ) ), SLOT( slotSaveAllDocuments() ) );
+    connect( m_saveAllDocumentsAction, SIGNAL( triggered( bool ) ), SLOT( saveAllDocuments() ) );
     m_saveAllDocumentsAction->setToolTip( i18n( "Save all modified files" ) );
     m_saveAllDocumentsAction->setWhatsThis( i18n( "<b>Save all</b><p>Saves all "
             "modified files." ) );
     m_saveAllDocumentsAction->setEnabled( false );
 
     m_revertAllDocumentsAction = new KAction( i18n( "Rever&t All" ), ac, "file_revert_all" );
-    connect( m_revertAllDocumentsAction, SIGNAL( toggled( bool ) ), SLOT( slotRevertAllDocuments() ) );
+    connect( m_revertAllDocumentsAction, SIGNAL( toggled( bool ) ), SLOT( reloadAllDocuments() ) );
     m_revertAllDocumentsAction->setToolTip( i18n( "Revert all changes" ) );
     m_revertAllDocumentsAction->setWhatsThis( i18n( "<b>Revert all</b>"
             "<p>Reverts all changes in opened files. Prompts to save changes so"
@@ -928,7 +909,7 @@
     m_closeWindowAction->setEnabled( false );
 
     m_closeAllWindowsAction = new KAction( i18n( "Close All" ), ac, "file_close_all" );
-    connect( m_closeAllWindowsAction, SIGNAL( toggled( bool ) ), SLOT( slotCloseAllWindows() ) );
+    connect( m_closeAllWindowsAction, SIGNAL( toggled( bool ) ), SLOT( closeAllDocuments() ) );
     m_closeAllWindowsAction->setToolTip( i18n( "Close all files" ) );
     m_closeAllWindowsAction->setWhatsThis( i18n( "<b>Close all</b><p>Close all "
             "opened files." ) );
--- trunk/KDE/kdevelop/lib/kdevdocumentcontroller.h #569360:569361
@@ -169,11 +169,10 @@
     Q_SCRIPTABLE bool closeAllDocuments();
 
     //FIXME figure out if these need to be public and/or use friend classes/document them
-    void slotSave();
-    void slotReload();
-    void slotCloseWindow();
-    void slotCloseAllWindows();
-    void slotCloseOtherWindows();
+    void saveActiveDocument();
+    void reloadActiveDocument();
+    void closeActiveDocument();
+    void closeAllExceptActiveDocument();
 
 Q_SIGNALS:
     /**Emitted when the document is given focus or activated.*/
@@ -203,9 +202,6 @@
     void openingDocument( const QString &document );
 
 private Q_SLOTS:
-    void slotSaveAllDocuments();
-    void slotRevertAllDocuments();
-
     void slotOpenDocument();
     void slotOpenRecent( const KUrl& );
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic