diff options
| author | Andrew Chow <[email protected]> | 2019-09-08 00:24:47 -0400 |
|---|---|---|
| committer | Andrew Chow <[email protected]> | 2019-09-08 16:40:53 -0400 |
| commit | ad52f054f67374dc46e0096d1e2f593d6372a2df (patch) | |
| tree | b13e7e5a136b828d3e050bd7518ef91bfba08ba0 /src/qt | |
| parent | HTML escape address labels in more dialogs and notifications (diff) | |
| download | discoin-ad52f054f67374dc46e0096d1e2f593d6372a2df.tar.xz discoin-ad52f054f67374dc46e0096d1e2f593d6372a2df.zip | |
Escape ampersands (&) in wallet names in Open Wallet menu
Diffstat (limited to 'src/qt')
| -rw-r--r-- | src/qt/bitcoingui.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index c4960b38d..a1e42bb56 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -375,6 +375,8 @@ void BitcoinGUI::createActions() for (const std::pair<const std::string, bool>& i : m_wallet_controller->listWalletDir()) { const std::string& path = i.first; QString name = path.empty() ? QString("["+tr("default wallet")+"]") : QString::fromStdString(path); + // Menu items remove single &. Single & are shown when && is in the string, but only the first occurrence. So replace only the first & with && + name.replace(name.indexOf(QChar('&')), 1, QString("&&")); QAction* action = m_open_wallet_menu->addAction(name); if (i.second) { |