From d72d1e6ad94e0a096d1ed5eab3dd81f930ee0baa Mon Sep 17 00:00:00 2001 From: Jeremy Borgman Date: Sun, 13 Sep 2020 10:06:05 -0500 Subject: [PATCH] Quick fix for qclipboard / dbus lockup issue --- src/utils/screenshotsaver.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/screenshotsaver.cpp b/src/utils/screenshotsaver.cpp index 59470793..ca5d0f61 100644 --- a/src/utils/screenshotsaver.cpp +++ b/src/utils/screenshotsaver.cpp @@ -27,6 +27,8 @@ ScreenshotSaver::ScreenshotSaver() {} +// TODO: If data is saved to the clipboard before the notification is sent via +// dbus, the application freezes. void ScreenshotSaver::saveToClipboard(const QPixmap& capture) { @@ -35,15 +37,15 @@ ScreenshotSaver::saveToClipboard(const QPixmap& capture) // clipboard. if ((ConfigHandler().saveAfterCopyValue()) && (!ConfigHandler().saveAfterCopyPathValue().isEmpty())) { - QApplication::clipboard()->setPixmap(capture); saveToFilesystem(capture, ConfigHandler().saveAfterCopyPathValue(), QObject::tr("Capture saved to clipboard. ")); + QApplication::clipboard()->setPixmap(capture); } // Otherwise only save to clipboard else { - QApplication::clipboard()->setPixmap(capture); SystemNotification().sendMessage(QObject::tr("Capture saved to clipboard")); + QApplication::clipboard()->setPixmap(capture); } }