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

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/actions
From:       Laurent Montel <montel () kde ! org>
Date:       2009-04-15 13:51:19
Message-ID: 1239803479.480058.16432.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 954195 by mlaurent:

Inform when we clear list of recent file.
So when we store info in specific config file
we can save it in this files as in kmail


 M  +7 -1      krecentfilesaction.cpp  
 M  +10 -2     krecentfilesaction.h  


--- trunk/KDE/kdelibs/kdeui/actions/krecentfilesaction.cpp #954194:954195
@@ -206,6 +206,12 @@
 
 void KRecentFilesAction::clear()
 {
+    clearEntries();
+    emit recentListClear();
+}
+
+void KRecentFilesAction::clearEntries()
+{
     Q_D(KRecentFilesAction);
     KSelectAction::clear();
     d->m_shortNames.clear();
@@ -218,7 +224,7 @@
 void KRecentFilesAction::loadEntries( const KConfigGroup& _config)
 {
     Q_D(KRecentFilesAction);
-    clear();
+    clearEntries();
 
     QString     key;
     QString     value;
--- trunk/KDE/kdelibs/kdeui/actions/krecentfilesaction.h #954194:954195
@@ -169,12 +169,20 @@
    */
   void urlSelected( const KUrl& url );
 
+  /**
+   *  This signal gets emitted when the user clear list. 
+   *  So when user store url in specific config file it can saveEntry.
+   *  @since 4.3
+   */ 
+  void recentListClear();
+
 private:
-
+    //Internal
+    void clearEntries();
     // Don't warn about the virtual overload. As the comment of the other
     // addAction() says, addAction( QAction* ) should not be used.
     using KSelectAction::addAction;
-
+    
     Q_PRIVATE_SLOT( d_func(), void _k_urlSelected(QAction*) )
 };
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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