Change in kio[master]: Check we're a QGuiApp before using ClipboardUpdater.

Eike Hein (Code Review) noreply at kde.org
Mon Feb 2 15:51:18 UTC 2015


Eike Hein has uploaded a new change for review.

  https://gerrit.vesnicky.cesnet.cz/r/351

Change subject: Check we're a QGuiApp before using ClipboardUpdater.
......................................................................

Check we're a QGuiApp before using ClipboardUpdater.

Matches other callsites in the file and prevents a known crash
in kio_desktop.

BUG:343443
Change-Id: Ifd0e83f6d87db6c1c5200af96e31b93636365c7c
---
M src/widgets/jobuidelegate.cpp
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.vesnicky.cesnet.cz:29418/kio refs/changes/51/351/1

diff --git a/src/widgets/jobuidelegate.cpp b/src/widgets/jobuidelegate.cpp
index 775964e..9487dc6 100644
--- a/src/widgets/jobuidelegate.cpp
+++ b/src/widgets/jobuidelegate.cpp
@@ -368,7 +368,9 @@
 
 void KIO::JobUiDelegate::updateUrlInClipboard(const QUrl &src, const QUrl &dest)
 {
-    KIO::ClipboardUpdater::update(src, dest);
+    if (qobject_cast<QGuiApplication *>(qApp) != NULL) {
+        KIO::ClipboardUpdater::update(src, dest);
+    }
 }
 
 class KIOWidgetJobUiDelegateFactory : public KIO::JobUiDelegateFactory

-- 
To view, visit https://gerrit.vesnicky.cesnet.cz/r/351
To unsubscribe, visit https://gerrit.vesnicky.cesnet.cz/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd0e83f6d87db6c1c5200af96e31b93636365c7c
Gerrit-PatchSet: 1
Gerrit-Project: kio
Gerrit-Branch: master
Gerrit-Owner: Eike Hein <hein at kde.org>
Gerrit-Reviewer: Sysadmin Testing Account <null at kde.org>


More information about the Kde-frameworks-devel mailing list