aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-04-02 07:34:35 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2013-04-02 07:34:35 -0700
commitbcce45e9b012e4efc6a72dae09bc86f75086fed7 (patch)
tree931fda2f953ded014fa109b7e753c32dcd29c8a2
parente960bf461ca70f400ee8b383c4c120b9ee552c4a (diff)
parent39ee86257ca1888dcd78570ad542c02ea48a6870 (diff)
Merge pull request #2441 from Diapolo/Qt_fix_copy_context_menu
Bitcoin-Qt: fix copy via context-menu broken
-rw-r--r--src/qt/guiutil.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 06ccde3782..e56e40c20e 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -160,8 +160,10 @@ void copyEntryData(QAbstractItemView *view, int column, int role)
if(!selection.isEmpty())
{
- // Copy first item
- QApplication::clipboard()->setText(selection.at(0).data(role).toString(),QClipboard::Selection);
+ // Copy first item (global clipboard)
+ qApp->clipboard()->setText(selection.at(0).data(role).toString(), QClipboard::Clipboard);
+ // Copy first item (global mouse selection for e.g. X11 - NOP on Windows)
+ qApp->clipboard()->setText(selection.at(0).data(role).toString(), QClipboard::Selection);
}
}
@@ -213,7 +215,7 @@ QString getSaveFileName(QWidget *parent, const QString &caption,
Qt::ConnectionType blockingGUIThreadConnection()
{
- if(QThread::currentThread() != QCoreApplication::instance()->thread())
+ if(QThread::currentThread() != qApp->thread())
{
return Qt::BlockingQueuedConnection;
}
@@ -457,4 +459,3 @@ void HelpMessageBox::showOrPrint()
}
} // namespace GUIUtil
-