aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 8efa009460..427eb95a84 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -599,7 +599,7 @@ void BitcoinGUI::createTrayIconMenu()
#else
// Note: On Mac, the dock icon is used to provide the tray's functionality.
MacDockIconHandler *dockIconHandler = MacDockIconHandler::instance();
- dockIconHandler->setMainWindow((QMainWindow *)this);
+ dockIconHandler->setMainWindow(static_cast<QMainWindow*>(this));
trayIconMenu = dockIconHandler->dockMenu();
#endif
@@ -922,13 +922,14 @@ void BitcoinGUI::message(const QString &title, const QString &message, unsigned
buttons = QMessageBox::Ok;
showNormalIfMinimized();
- QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle, message, buttons, this);
+ QMessageBox mBox(static_cast<QMessageBox::Icon>(nMBoxIcon), strTitle, message, buttons, this);
+ mBox.setTextFormat(Qt::PlainText);
int r = mBox.exec();
if (ret != nullptr)
*ret = r == QMessageBox::Ok;
}
else
- notificator->notify((Notificator::Class)nNotifyIcon, strTitle, message);
+ notificator->notify(static_cast<Notificator::Class>(nNotifyIcon), strTitle, message);
}
void BitcoinGUI::changeEvent(QEvent *e)
@@ -1206,7 +1207,7 @@ UnitDisplayStatusBarControl::UnitDisplayStatusBarControl(const PlatformStyle *pl
const QFontMetrics fm(font());
for (const BitcoinUnits::Unit unit : units)
{
- max_width = qMax(max_width, fm.width(BitcoinUnits::name(unit)));
+ max_width = qMax(max_width, fm.width(BitcoinUnits::longName(unit)));
}
setMinimumSize(max_width, 0);
setAlignment(Qt::AlignRight | Qt::AlignVCenter);
@@ -1225,7 +1226,7 @@ void UnitDisplayStatusBarControl::createContextMenu()
menu = new QMenu(this);
for (BitcoinUnits::Unit u : BitcoinUnits::availableUnits())
{
- QAction *menuAction = new QAction(QString(BitcoinUnits::name(u)), this);
+ QAction *menuAction = new QAction(QString(BitcoinUnits::longName(u)), this);
menuAction->setData(QVariant(u));
menu->addAction(menuAction);
}
@@ -1250,7 +1251,7 @@ void UnitDisplayStatusBarControl::setOptionsModel(OptionsModel *_optionsModel)
/** When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar */
void UnitDisplayStatusBarControl::updateDisplayUnit(int newUnits)
{
- setText(BitcoinUnits::name(newUnits));
+ setText(BitcoinUnits::longName(newUnits));
}
/** Shows context menu with Display Unit options by the mouse coordinates */