diff options
| author | Emmanuel Pescosta <[email protected]> | 2015-02-19 20:34:35 +0100 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2015-02-19 20:34:35 +0100 |
| commit | 8679115552ec65ccfc6cbc1db68414d80e3a081b (patch) | |
| tree | 0d458ead5d254932fa5707ec8ca74cd2a5dd1ecc /src/panels/places/placesitemmodel.cpp | |
| parent | 9221362ceaf695b02b316f88cbf27e1ba96c89db (diff) | |
| parent | 1ef5434572d0289a160589395b8b80cd800bc195 (diff) | |
Merge branch 'master' into frameworks
Diffstat (limited to 'src/panels/places/placesitemmodel.cpp')
| -rw-r--r-- | src/panels/places/placesitemmodel.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index 0f5854656..0a8fe9cb3 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -80,7 +80,6 @@ PlacesItemModel::PlacesItemModel(QObject* parent) : m_systemBookmarksIndexes(), m_bookmarkedItems(), m_hiddenItemToRemove(-1), - m_saveBookmarksTimer(0), m_updateBookmarksTimer(0), m_storageSetupInProgress() { @@ -97,11 +96,6 @@ PlacesItemModel::PlacesItemModel(QObject* parent) : const int syncBookmarksTimeout = 100; - m_saveBookmarksTimer = new QTimer(this); - m_saveBookmarksTimer->setInterval(syncBookmarksTimeout); - m_saveBookmarksTimer->setSingleShot(true); - connect(m_saveBookmarksTimer, &QTimer::timeout, this, &PlacesItemModel::saveBookmarks); - m_updateBookmarksTimer = new QTimer(this); m_updateBookmarksTimer->setInterval(syncBookmarksTimeout); m_updateBookmarksTimer->setSingleShot(true); @@ -501,8 +495,6 @@ void PlacesItemModel::onItemInserted(int index) m_bookmarkedItems.insert(bookmarkIndex, 0); } - triggerBookmarksSaving(); - #ifdef PLACESITEMMODEL_DEBUG kDebug() << "Inserted item" << index; showModelState(); @@ -521,8 +513,6 @@ void PlacesItemModel::onItemRemoved(int index, KStandardItem* removedItem) Q_ASSERT(!m_bookmarkedItems[boomarkIndex]); m_bookmarkedItems.removeAt(boomarkIndex); - triggerBookmarksSaving(); - #ifdef PLACESITEMMODEL_DEBUG kDebug() << "Removed item" << index; showModelState(); @@ -552,8 +542,6 @@ void PlacesItemModel::onItemChanged(int index, const QSet<QByteArray>& changedRo QTimer::singleShot(0, this, SLOT(hideItem())); } } - - triggerBookmarksSaving(); } void PlacesItemModel::slotDeviceAdded(const QString& udi) @@ -1035,20 +1023,12 @@ void PlacesItemModel::hideItem(int index) // bookmark should still be remembered, so readd it again: m_bookmarkManager->root().addBookmark(hiddenBookmark); m_bookmarkManager->root().moveBookmark(hiddenBookmark, previousBookmark); - triggerBookmarksSaving(); } m_bookmarkedItems.insert(newIndex, hiddenItem); } } -void PlacesItemModel::triggerBookmarksSaving() -{ - if (m_saveBookmarksTimer) { - m_saveBookmarksTimer->start(); - } -} - QString PlacesItemModel::internalMimeType() const { return "application/x-dolphinplacesmodel-" + |
