From kde-commits Sat Jun 11 05:33:14 2011 From: Giorgos Kylafas Date: Sat, 11 Jun 2011 05:33:14 +0000 To: kde-commits Subject: KDE/kdemultimedia/juk Message-Id: <20110611053314.0C0AAAC7BC () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=130777045009365 SVN commit 1236077 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(). M +2 -4 juk.cpp --- trunk/KDE/kdemultimedia/juk/juk.cpp #1236076:1236077 @@ -486,8 +486,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; } @@ -545,10 +547,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()