aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-11-17 10:18:58 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2013-11-17 10:18:58 +0100
commitaf6e093f062548d850b6eb510240aeb1ff24e2a3 (patch)
treea12917a3c18aa43b7456c5b0ac99cf0e1ff7681d
parent3443adecf100181c6e668f2e7a09bf2cfd794621 (diff)
parent79fac3f427da4ac3376b5c3a8a638ad579da8594 (diff)
Merge pull request #3268
79fac3f [Qt] use GUIUtil::setClipboard() where possible (Philip Kaufmann)
-rw-r--r--src/qt/guiutil.cpp6
-rw-r--r--src/qt/receiverequestdialog.cpp11
-rw-r--r--src/qt/signverifymessagedialog.cpp6
3 files changed, 8 insertions, 15 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index bbb3714dfe..2ce09b479e 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -221,10 +221,8 @@ void copyEntryData(QAbstractItemView *view, int column, int role)
if(!selection.isEmpty())
{
- // Copy first item (global clipboard)
- QApplication::clipboard()->setText(selection.at(0).data(role).toString(), QClipboard::Clipboard);
- // Copy first item (global mouse selection for e.g. X11 - NOP on Windows)
- QApplication::clipboard()->setText(selection.at(0).data(role).toString(), QClipboard::Selection);
+ // Copy first item
+ setClipboard(selection.at(0).data(role).toString());
}
}
diff --git a/src/qt/receiverequestdialog.cpp b/src/qt/receiverequestdialog.cpp
index a8a1beee6e..7e92715df8 100644
--- a/src/qt/receiverequestdialog.cpp
+++ b/src/qt/receiverequestdialog.cpp
@@ -11,11 +11,11 @@
#include "optionsmodel.h"
#include "walletmodel.h"
-#include <QPixmap>
#include <QClipboard>
-#include <QMouseEvent>
#include <QDrag>
#include <QMimeData>
+#include <QMouseEvent>
+#include <QPixmap>
#if QT_VERSION < 0x050000
#include <QUrl>
#endif
@@ -177,13 +177,10 @@ void ReceiveRequestDialog::update()
void ReceiveRequestDialog::on_btnCopyURI_clicked()
{
- QString uri = GUIUtil::formatBitcoinURI(info);
- QApplication::clipboard()->setText(uri, QClipboard::Clipboard);
- QApplication::clipboard()->setText(uri, QClipboard::Selection);
+ GUIUtil::setClipboard(GUIUtil::formatBitcoinURI(info));
}
void ReceiveRequestDialog::on_btnCopyAddress_clicked()
{
- QApplication::clipboard()->setText(info.address, QClipboard::Clipboard);
- QApplication::clipboard()->setText(info.address, QClipboard::Selection);
+ GUIUtil::setClipboard(info.address);
}
diff --git a/src/qt/signverifymessagedialog.cpp b/src/qt/signverifymessagedialog.cpp
index 0fa51cb92a..e319f5075a 100644
--- a/src/qt/signverifymessagedialog.cpp
+++ b/src/qt/signverifymessagedialog.cpp
@@ -25,8 +25,7 @@ SignVerifyMessageDialog::SignVerifyMessageDialog(QWidget *parent) :
{
ui->setupUi(this);
-#if (QT_VERSION >= 0x040700)
- /* Do not move this to the XML file, Qt before 4.7 will choke on it */
+#if QT_VERSION >= 0x040700
ui->addressIn_SM->setPlaceholderText(tr("Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"));
ui->signatureOut_SM->setPlaceholderText(tr("Click \"Sign Message\" to generate signature"));
@@ -73,7 +72,6 @@ void SignVerifyMessageDialog::setAddress_VM(const QString &address)
void SignVerifyMessageDialog::showTab_SM(bool fShow)
{
ui->tabWidget->setCurrentIndex(0);
-
if (fShow)
this->show();
}
@@ -164,7 +162,7 @@ void SignVerifyMessageDialog::on_signMessageButton_SM_clicked()
void SignVerifyMessageDialog::on_copySignatureButton_SM_clicked()
{
- QApplication::clipboard()->setText(ui->signatureOut_SM->text());
+ GUIUtil::setClipboard(ui->signatureOut_SM->text());
}
void SignVerifyMessageDialog::on_clearButton_SM_clicked()