From 77ad7c431ae8629c6c0539378c3d864a87bcd4c8 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Mon, 14 May 2012 14:57:08 +0200 Subject: PlacesItemModel: Automatically save bookmarks Prevent that a manual call to save changed bookmarks is necessary. --- src/panels/places/placesitemmodel.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/panels/places/placesitemmodel.h') diff --git a/src/panels/places/placesitemmodel.h b/src/panels/places/placesitemmodel.h index e9604ad22..bfc845e41 100644 --- a/src/panels/places/placesitemmodel.h +++ b/src/panels/places/placesitemmodel.h @@ -34,6 +34,7 @@ class KBookmarkManager; class PlacesItem; class QAction; +class QTimer; // #define PLACESITEMMODEL_DEBUG @@ -79,8 +80,6 @@ public: void requestEject(int index); void requestTeardown(int index); - void save(); - signals: void errorMessage(const QString& message); @@ -94,9 +93,10 @@ private slots: void slotDeviceRemoved(const QString& udi); void slotStorageTeardownDone(Solid::ErrorType error, const QVariant& errorData); void removeHiddenItem(); + void saveBookmarks(); private: - void loadBookmarks(); + void loadBookmarks(); /** * Helper method for loadBookmarks(): Adds the items @@ -159,6 +159,8 @@ private: // asynchronously as in the scope of onItemChanged() // removing an item is not allowed. int m_hiddenItemToRemove; + + QTimer* m_saveBookmarksTimer; }; #endif -- cgit v1.3.1