Quick fix for qclipboard / dbus lockup issue
This commit is contained in:
committed by
borgmanJeremy
parent
f18f186b46
commit
d72d1e6ad9
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user