diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-04-02 11:16:54 +0200 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-04-02 15:20:35 +0200 |
commit | 39ee86257ca1888dcd78570ad542c02ea48a6870 (patch) | |
tree | 449683b05bf62df360cad9d8540487e532fabce3 /src/qt | |
parent | cf4d976f0e210ac2e5982f5386cd0e4c0a5a0455 (diff) |
Bitcoin-Qt: fix copy via context-menu broken
- as QClipboard::Selection isn't available on Windows ensure that the
correct mode is called, but sill allow selection for e.g. X11
- start conversion from QCoreApplication::instance() to qApp in
guiutil.cpp (I intend to harmonize this all over the source with my Qt5
compatibility pull)
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/guiutil.cpp | 9 |
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 - |