qt: Fix compilation

This commit is contained in:
xdustinface 2020-09-24 18:02:57 +02:00 committed by pasta
parent 229ea48a5a
commit c99d1627a8
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -1155,7 +1155,7 @@ void BitcoinGUI::updatePrivateSendVisibility()
#endif #endif
// PrivateSend button is the third QToolButton, show/hide the underlying QAction // PrivateSend button is the third QToolButton, show/hide the underlying QAction
// Hiding the QToolButton itself doesn't work. // Hiding the QToolButton itself doesn't work.
appToolBar->actions()[2]->setVisible(fEnabled); qobject_cast<QToolBar*>(centralWidget()->layout()->itemAt(0)->widget())->actions()[2]->setVisible(fEnabled);
privateSendCoinsMenuAction->setVisible(fEnabled); privateSendCoinsMenuAction->setVisible(fEnabled);
showPrivateSendHelpAction->setVisible(fEnabled); showPrivateSendHelpAction->setVisible(fEnabled);
updateToolBarShortcuts(); updateToolBarShortcuts();
@ -1170,7 +1170,7 @@ void BitcoinGUI::updateToolBarShortcuts()
#endif #endif
int nKey = 0; int nKey = 0;
for (int i = 0; i < tabGroup->buttons().size(); ++i) { for (int i = 0; i < tabGroup->buttons().size(); ++i) {
if (appToolBar->actions()[i]->isVisible()) { if (qobject_cast<QToolBar*>(centralWidget()->layout()->itemAt(0)->widget())->actions()[i]->isVisible()) {
tabGroup->buttons()[i]->setShortcut(QKeySequence(modifier + Qt::Key_1 + nKey++)); tabGroup->buttons()[i]->setShortcut(QKeySequence(modifier + Qt::Key_1 + nKey++));
} else { } else {
tabGroup->buttons()[i]->setShortcut(QKeySequence()); tabGroup->buttons()[i]->setShortcut(QKeySequence());