┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/places/placesitemmodel.cpp
diff options
context:
space:
mode:
authorEmmanuel Pescosta <[email protected]>2015-02-19 20:05:55 +0100
committerEmmanuel Pescosta <[email protected]>2015-02-19 20:05:55 +0100
commitf7c85b42252c7c17255f9f56639f1e95992dfeed (patch)
tree9a19884a9315ef9a41690429cdcb6c30d3fe7567 /src/panels/places/placesitemmodel.cpp
parent4cc444b8ba1e7c5c57a9899e32f25fc2faa1df27 (diff)
Sync bookmark manager only if the change was done by the current process
Adoption of http://commits.kde.org/kdelibs/2b5c6e42fc8114c6854ce490b9cdd4356be683d9 FIXED-IN: 14.12.3 BUG: 343620 BUG: 310080 REVIEW: 122640
Diffstat (limited to 'src/panels/places/placesitemmodel.cpp')
-rw-r--r--src/panels/places/placesitemmodel.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp
index 6accdc837..46f40b65c 100644
--- a/src/panels/places/placesitemmodel.cpp
+++ b/src/panels/places/placesitemmodel.cpp
@@ -78,7 +78,6 @@ PlacesItemModel::PlacesItemModel(QObject* parent) :
m_systemBookmarksIndexes(),
m_bookmarkedItems(),
m_hiddenItemToRemove(-1),
- m_saveBookmarksTimer(0),
m_updateBookmarksTimer(0),
m_storageSetupInProgress()
{
@@ -95,11 +94,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, SIGNAL(timeout()), this, SLOT(saveBookmarks()));
-
m_updateBookmarksTimer = new QTimer(this);
m_updateBookmarksTimer->setInterval(syncBookmarksTimeout);
m_updateBookmarksTimer->setSingleShot(true);
@@ -498,8 +492,6 @@ void PlacesItemModel::onItemInserted(int index)
m_bookmarkedItems.insert(bookmarkIndex, 0);
}
- triggerBookmarksSaving();
-
#ifdef PLACESITEMMODEL_DEBUG
kDebug() << "Inserted item" << index;
showModelState();
@@ -518,8 +510,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();
@@ -549,8 +539,6 @@ void PlacesItemModel::onItemChanged(int index, const QSet<QByteArray>& changedRo
QTimer::singleShot(0, this, SLOT(hideItem()));
}
}
-
- triggerBookmarksSaving();
}
void PlacesItemModel::slotDeviceAdded(const QString& udi)
@@ -1033,20 +1021,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-" +