Hrvoje Senjan 2016-03-06 09:58:13 +00:00 committed by Git OBS Bridge
parent bf2da45a63
commit e3e45c13a3
3 changed files with 1 additions and 95 deletions

View File

@ -1,82 +0,0 @@
From: David Edmundson <david@davidedmundson.co.uk>
Date: Sat, 06 Feb 2016 18:02:53 +0000
Subject: Fix crash in activities context menu
X-Git-Url: http://quickgit.kde.org/?p=kactivities.git&a=commitdiff&h=b3c8ad1ad48d65ea77724f94073909dc8ab97596
---
Fix crash in activities context menu
Currently we call deleteLater() from inside ::run which is running in a
different thread than the receiving object.
(QThread objects live in the thread that created them, not in the thread
they create)
This patch causes deleteLater to be run in the right thread.
QCoreApplication::postEvent is thread safe but it needs to be in the
right thread to work out the correct event loop level for deferred
delete events.
BUG: 351485
REVIEW: 126955
---
--- a/src/workspace/fileitemplugin/FileItemLinkingPlugin.cpp
+++ b/src/workspace/fileitemplugin/FileItemLinkingPlugin.cpp
@@ -124,7 +124,7 @@
setActions({ action });
} else if (!loaded) {
- auto loader = new FileItemLinkingPluginActionLoader(items);
+ auto loader = FileItemLinkingPluginActionLoader::create(items);
static FileItemLinkingPluginActionStaticInit init;
--- a/src/workspace/fileitemplugin/FileItemLinkingPluginActionLoader.cpp
+++ b/src/workspace/fileitemplugin/FileItemLinkingPluginActionLoader.cpp
@@ -39,6 +39,13 @@
#include <KLocalizedString>
#include "common/dbus/common.h"
+
+FileItemLinkingPluginActionLoader* FileItemLinkingPluginActionLoader::create(const KFileItemListProperties &items)
+{
+ auto l = new FileItemLinkingPluginActionLoader(items);
+ connect(l, &QThread::finished, l, &QObject::deleteLater);
+ return l;
+}
FileItemLinkingPluginActionLoader::FileItemLinkingPluginActionLoader(
const KFileItemListProperties &items)
@@ -150,8 +157,6 @@
}
emit result(actions);
-
- deleteLater();
}
Action
--- a/src/workspace/fileitemplugin/FileItemLinkingPluginActionLoader.h
+++ b/src/workspace/fileitemplugin/FileItemLinkingPluginActionLoader.h
@@ -33,8 +33,7 @@
Q_OBJECT
public:
- FileItemLinkingPluginActionLoader(const KFileItemListProperties &items);
-
+ static FileItemLinkingPluginActionLoader* create(const KFileItemListProperties &items);
void run() Q_DECL_OVERRIDE;
Action createAction(const QString &activity, bool link,
@@ -46,6 +45,7 @@
void result(const ActionList &actions);
private:
+ FileItemLinkingPluginActionLoader(const KFileItemListProperties &items);
KFileItemListProperties items;
KActivities::Consumer activities;
};

View File

@ -4,6 +4,7 @@ Sun Mar 6 09:54:26 UTC 2016 - hrvoje.senjan@gmail.com
- Update to 5.20.0 - Update to 5.20.0
* For more details please see: * For more details please see:
https://www.kde.org/announcements/kde-frameworks-5.20.0.php https://www.kde.org/announcements/kde-frameworks-5.20.0.php
- Drop upstreamed fix-crash-in-activities-context-menu.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Feb 7 05:32:00 UTC 2016 - wbauer@tmo.at Sun Feb 7 05:32:00 UTC 2016 - wbauer@tmo.at

View File

@ -16,7 +16,6 @@
# #
%bcond_without lang
%define lname libKF5Activities5 %define lname libKF5Activities5
%define _tar_path 5.20 %define _tar_path 5.20
Name: kactivities5 Name: kactivities5
@ -54,9 +53,6 @@ Kactivities provides an API for using and interacting with the Plasma Activities
%package -n %lname %package -n %lname
Summary: Library for KDE's Plasma Activities support Summary: Library for KDE's Plasma Activities support
Group: System/GUI/KDE Group: System/GUI/KDE
%if %{with lang}
Recommends: %lname-lang = %{version}
%endif
%description -n %lname %description -n %lname
Kactivities provides an API for using and interacting with the Plasma Activities Manager. Kactivities provides an API for using and interacting with the Plasma Activities Manager.
@ -80,7 +76,6 @@ Requires: cmake(Qt5Core) >= 5.3.0
Kactivities provides an API for using and interacting with the Plasma Activities Manager. Kactivities provides an API for using and interacting with the Plasma Activities Manager.
Development files. Development files.
%lang_package -n %lname
%prep %prep
%setup -q -n kactivities-%{version} %setup -q -n kactivities-%{version}
@ -92,18 +87,10 @@ Development files.
%kf5_makeinstall -C build %kf5_makeinstall -C build
%fdupes %{buildroot} %fdupes %{buildroot}
%if %{with lang}
%find_lang %{name}
%endif
%post -n %lname -p /sbin/ldconfig %post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig
%if %{with lang}
%files -n %lname-lang -f %{name}.lang
%endif
%files -n %lname %files -n %lname
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_kf5_libdir}/libKF5Activities.so.* %{_kf5_libdir}/libKF5Activities.so.*