From ba743a1725df140485f78406b4a8305ec88872363ae27645a7e0d1db05c24ab6 Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Sat, 7 Mar 2015 18:03:03 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kio?expand=0&rev=62 --- ...anager-only-if-change-was-by-process.patch | 122 ------------------ kio.changes | 2 + kio.spec | 3 - 3 files changed, 2 insertions(+), 125 deletions(-) delete mode 100644 0001-sync-bookmarkmanager-only-if-change-was-by-process.patch diff --git a/0001-sync-bookmarkmanager-only-if-change-was-by-process.patch b/0001-sync-bookmarkmanager-only-if-change-was-by-process.patch deleted file mode 100644 index 6a80e31..0000000 --- a/0001-sync-bookmarkmanager-only-if-change-was-by-process.patch +++ /dev/null @@ -1,122 +0,0 @@ -From e7e0f2d8f06e4086a1872757d779e19a06537b2a Mon Sep 17 00:00:00 2001 -From: Marco Martin -Date: Mon, 9 Feb 2015 18:18:33 +0100 -Subject: [PATCH 1/1] sync bookmarkmanager only if change was by process - -This is an attempt to fix a bug that seems quite difficult to reproduce, -It seems there is a weird race condition linked to the sync of the two files -.local/share/user-places.xbel -.local/share/kfileplaces/bookmarks.xml -causing the bug -https://bugs.kde.org/show_bug.cgi?id=343735 -all processes that are listening for changes in the bookmark manager will -try to sync their bookmarks with the shared ones (user-places.xbel) -and depending what process arrives first, some bookmarks may be lost - -The same commit will happen on kdelibs4 as well - -CCBUG:343735 -REVIEW:122459 ---- - src/filewidgets/kfileplacesmodel.cpp | 9 +++++++++ - src/filewidgets/kfileplacessharedbookmarks.cpp | 7 +------ - src/filewidgets/kfileplacessharedbookmarks_p.h | 3 ++- - 3 files changed, 12 insertions(+), 7 deletions(-) - -diff --git a/src/filewidgets/kfileplacesmodel.cpp b/src/filewidgets/kfileplacesmodel.cpp -index d8da868098ca8dd46129aa718e4dc75ebf871192..6c9201223c7576866de5f2e7ff91069e1e68bebe 100644 ---- a/src/filewidgets/kfileplacesmodel.cpp -+++ b/src/filewidgets/kfileplacesmodel.cpp -@@ -656,6 +656,8 @@ bool KFilePlacesModel::dropMimeData(const QMimeData *data, Qt::DropAction action - return false; - } - -+ d->sharedBookmarks->updateSharedBookmarks(); -+ - d->reloadAndSignal(); - - return true; -@@ -683,6 +685,8 @@ void KFilePlacesModel::addPlace(const QString &text, const QUrl &url, - d->bookmarkManager->root().moveBookmark(bookmark, item->bookmark()); - } - -+ d->sharedBookmarks->updateSharedBookmarks(); -+ - d->reloadAndSignal(); - } - -@@ -710,6 +714,8 @@ void KFilePlacesModel::editPlace(const QModelIndex &index, const QString &text, - bookmark.setIcon(iconName); - bookmark.setMetaDataItem("OnlyInApp", appName); - -+ d->sharedBookmarks->updateSharedBookmarks(); -+ - d->reloadAndSignal(); - emit dataChanged(index, index); - } -@@ -733,6 +739,7 @@ void KFilePlacesModel::removePlace(const QModelIndex &index) const - } - - d->bookmarkManager->root().deleteBookmark(bookmark); -+ d->sharedBookmarks->updateSharedBookmarks(); - d->reloadAndSignal(); - } - -@@ -752,6 +759,8 @@ void KFilePlacesModel::setPlaceHidden(const QModelIndex &index, bool hidden) - - bookmark.setMetaDataItem("IsHidden", (hidden ? "true" : "false")); - -+ d->sharedBookmarks->updateSharedBookmarks(); -+ - d->reloadAndSignal(); - emit dataChanged(index, index); - } -diff --git a/src/filewidgets/kfileplacessharedbookmarks.cpp b/src/filewidgets/kfileplacessharedbookmarks.cpp -index fbd6b5363f8229e113a6c9d49715e6ee210ab9fd..3e7ffb9348ae5996ac2ae46ddc1ef27418400152 100644 ---- a/src/filewidgets/kfileplacessharedbookmarks.cpp -+++ b/src/filewidgets/kfileplacessharedbookmarks.cpp -@@ -127,11 +127,6 @@ KFilePlacesSharedBookmarks::KFilePlacesSharedBookmarks(KBookmarkManager *mgr) - connect(m_sharedBookmarkManager, SIGNAL(bookmarksChanged(QString)), - this, SLOT(slotSharedBookmarksChanged())); - -- connect(m_placesBookmarkManager, SIGNAL(changed(QString,QString)), -- this, SLOT(slotBookmarksChanged())); -- connect(m_placesBookmarkManager, SIGNAL(bookmarksChanged(QString)), -- this, SLOT(slotBookmarksChanged())); -- - integrateSharedBookmarks(); - } - -@@ -278,7 +273,7 @@ void KFilePlacesSharedBookmarks::slotSharedBookmarksChanged() - } - } - --void KFilePlacesSharedBookmarks::slotBookmarksChanged() -+void KFilePlacesSharedBookmarks::updateSharedBookmarks() - { - //qDebug() << "places bookmarks changed"; - bool dirty = exportSharedBookmarks(); -diff --git a/src/filewidgets/kfileplacessharedbookmarks_p.h b/src/filewidgets/kfileplacessharedbookmarks_p.h -index 4c9f6a4da4ff42dc16dd148fc29c8a93b27e6a48..2f9f4b8a84bcfbb85c701adc2c2ad4f453663609 100644 ---- a/src/filewidgets/kfileplacessharedbookmarks_p.h -+++ b/src/filewidgets/kfileplacessharedbookmarks_p.h -@@ -38,6 +38,8 @@ public: - /* delete m_sharedBookmarkManager; */ - } - -+ void updateSharedBookmarks(); -+ - private: - - bool integrateSharedBookmarks(); -@@ -49,7 +51,6 @@ private: - private Q_SLOTS: - - void slotSharedBookmarksChanged(); -- void slotBookmarksChanged(); - - }; - --- -2.2.2 - diff --git a/kio.changes b/kio.changes index c96733a..c2948c7 100644 --- a/kio.changes +++ b/kio.changes @@ -4,6 +4,8 @@ Sat Mar 7 16:58:54 UTC 2015 - hrvoje.senjan@gmail.com - Update to 5.8.0 * For more details please see: https://www.kde.org/announcements/kde-frameworks-5.8.0.php +- Drop 0001-sync-bookmarkmanager-only-if-change-was-by-process.patch, + merged upstream ------------------------------------------------------------------- Sun Feb 8 18:15:28 UTC 2015 - hrvoje.senjan@gmail.com diff --git a/kio.spec b/kio.spec index ed5a652..7241cd7 100644 --- a/kio.spec +++ b/kio.spec @@ -70,8 +70,6 @@ Group: System/GUI/KDE Url: http://www.kde.org Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz Source1: baselibs.conf -# PATCH-FIX-UPSTREAM 0001-sync-bookmarkmanager-only-if-change-was-by-process.patch -Patch0: 0001-sync-bookmarkmanager-only-if-change-was-by-process.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -101,7 +99,6 @@ Development files. %lang_package %prep %setup -q -%patch0 -p1 %build %cmake_kf5 -d build