Browse Source

Merge pull request #4563

027dcdc [Qt] Fix thin space in URI (Cozz Lovan)
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
fb21bf6951
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 2
      src/qt/coincontroldialog.cpp
  2. 2
      src/qt/guiutil.cpp
  3. 7
      src/qt/recentrequeststablemodel.cpp

2
src/qt/coincontroldialog.cpp

@ -225,7 +225,7 @@ void CoinControlDialog::showMenu(const QPoint &point)
// context menu action: copy amount // context menu action: copy amount
void CoinControlDialog::copyAmount() void CoinControlDialog::copyAmount()
{ {
GUIUtil::setClipboard(contextMenuItem->text(COLUMN_AMOUNT)); GUIUtil::setClipboard(BitcoinUnits::removeSpaces(contextMenuItem->text(COLUMN_AMOUNT)));
} }
// context menu action: copy label // context menu action: copy label

2
src/qt/guiutil.cpp

@ -187,7 +187,7 @@ QString formatBitcoinURI(const SendCoinsRecipient &info)
if (info.amount) 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++; paramCount++;
} }

7
src/qt/recentrequeststablemodel.cpp

@ -79,10 +79,17 @@ QVariant RecentRequestsTableModel::data(const QModelIndex &index, int role) cons
case Amount: case Amount:
if (rec->recipient.amount == 0 && role == Qt::DisplayRole) if (rec->recipient.amount == 0 && role == Qt::DisplayRole)
return tr("(no amount)"); return tr("(no amount)");
else if (role == Qt::EditRole)
return BitcoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), rec->recipient.amount, false, BitcoinUnits::separatorNever);
else else
return BitcoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), rec->recipient.amount); 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(); return QVariant();
} }

Loading…
Cancel
Save