aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-07-20 08:34:18 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-07-20 08:35:03 +0200
commitfb21bf695199f523ea1843877a3684dc23325d6b (patch)
tree3dbdc4ba88c1246affcc06525c31776b252dd567
parentff1fe669d41814a4e0406243d1c081725006a735 (diff)
parent027dcdc792e006ea90afe90b7373ba5a111bd9bc (diff)
Merge pull request #4563
027dcdc [Qt] Fix thin space in URI (Cozz Lovan)
-rw-r--r--src/qt/coincontroldialog.cpp2
-rw-r--r--src/qt/guiutil.cpp2
-rw-r--r--src/qt/recentrequeststablemodel.cpp7
3 files changed, 9 insertions, 2 deletions
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index b4ddda3eaa..7b30f8de09 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -225,7 +225,7 @@ void CoinControlDialog::showMenu(const QPoint &point)
// context menu action: copy amount
void CoinControlDialog::copyAmount()
{
- GUIUtil::setClipboard(contextMenuItem->text(COLUMN_AMOUNT));
+ GUIUtil::setClipboard(BitcoinUnits::removeSpaces(contextMenuItem->text(COLUMN_AMOUNT)));
}
// context menu action: copy label
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 60a131df7e..33a50a078d 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -187,7 +187,7 @@ QString formatBitcoinURI(const SendCoinsRecipient &info)
if (info.amount)
{
- ret += QString("?amount=%1").arg(BitcoinUnits::format(BitcoinUnits::BTC, info.amount));
+ ret += QString("?amount=%1").arg(BitcoinUnits::format(BitcoinUnits::BTC, info.amount, false, BitcoinUnits::separatorNever));
paramCount++;
}
diff --git a/src/qt/recentrequeststablemodel.cpp b/src/qt/recentrequeststablemodel.cpp
index b5a998f9f5..9e3976644e 100644
--- a/src/qt/recentrequeststablemodel.cpp
+++ b/src/qt/recentrequeststablemodel.cpp
@@ -79,10 +79,17 @@ QVariant RecentRequestsTableModel::data(const QModelIndex &index, int role) cons
case Amount:
if (rec->recipient.amount == 0 && role == Qt::DisplayRole)
return tr("(no amount)");
+ else if (role == Qt::EditRole)
+ return BitcoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), rec->recipient.amount, false, BitcoinUnits::separatorNever);
else
return BitcoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), rec->recipient.amount);
}
}
+ else if (role == Qt::TextAlignmentRole)
+ {
+ if (index.column() == Amount)
+ return (int)(Qt::AlignRight|Qt::AlignVCenter);
+ }
return QVariant();
}