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

List:       kde-commits
Subject:    branches/KDE/4.6/kdemultimedia/juk
From:       Giorgos Kylafas <gekylafas () gmail ! com>
Date:       2011-06-11 5:34:10
Message-ID: 20110611053410.996CFAC7BC () svn ! kde ! org
[Download RAW message or body]

SVN commit 1236078 by kylafas:

juk: save the collection list cache no matter how the app exits.

Cache::save() was called from JuK::slotQuit(), which was triggered only
by "File->Quit". So, the cache was not saved when closing the window or
right-clicking the system tray and selecting "Quit",

JuK::queryExit() is called in every case, so put Cache::save() there.
Besides, according to KMainWindow's documentation, "a typical usage of
queryExit() is to write configuration data back".

While at it, remove saveConfig() from slotQuit(), since it is already
being called from queryExit().

This is a backport of r1236077 from trunk to branch 4.6 (KDE SC 4.6.5).

 M  +2 -4      juk.cpp  


--- branches/KDE/4.6/kdemultimedia/juk/juk.cpp #1236077:1236078
@@ -465,8 +465,10 @@
     // supposed to do end of execution destruction yet anyways, use
     // slotAboutToQuit for that.
 
+    // Save configuration data.
     m_startDocked = !isVisible();
     saveConfig();
+    Cache::instance()->save();
 
     return true;
 }
@@ -524,10 +526,6 @@
     }
     else
         QTimer::singleShot(0, this, SLOT(slotPlaybackStopped()));
-
-    // Get these started since they don't involve deleting any running objects.
-    Cache::instance()->save();
-    saveConfig();
 }
 
 void JuK::slotPlaybackStopped()
[prev in list] [next in list] [prev in thread] [next in thread] 

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