diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index bbb46ca14c..7fbe8fa8bf 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -67,6 +67,9 @@ AddressBookPage::AddressBookPage(Mode _mode, Tabs _tab, QWidget* parent) : ui->setupUi(this); ui->showAddressQRCode->setIcon(QIcon()); +#ifndef USE_QRCODE + ui->showAddressQRCode->setEnabled(false); +#endif switch(mode) { @@ -110,6 +113,9 @@ AddressBookPage::AddressBookPage(Mode _mode, Tabs _tab, QWidget* parent) : QAction *editAction = new QAction(tr("&Edit"), this); QAction *showAddressQRCodeAction = new QAction(tr("&Show address QR code"), this); deleteAction = new QAction(ui->deleteAddress->text(), this); +#ifndef USE_QRCODE + showAddressQRCodeAction->setEnabled(false); +#endif // Build context menu contextMenu = new QMenu(this); @@ -269,13 +275,17 @@ void AddressBookPage::selectionChanged() break; } ui->copyAddress->setEnabled(true); +#ifdef USE_QRCODE ui->showAddressQRCode->setEnabled(true); +#endif } else { ui->deleteAddress->setEnabled(false); ui->copyAddress->setEnabled(false); +#ifdef USE_QRCODE ui->showAddressQRCode->setEnabled(false); +#endif } } diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index 2bd5e4dee7..bbfa3d2c30 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -157,6 +157,9 @@ transactionView(nullptr), abandonAction(nullptr), columnResizingFixer(nullptr) QAction *editLabelAction = new QAction(tr("Edit address label"), this); QAction *showDetailsAction = new QAction(tr("Show transaction details"), this); QAction *showAddressQRCodeAction = new QAction(tr("Show address QR code"), this); +#ifndef USE_QRCODE + showAddressQRCodeAction->setEnabled(false); +#endif contextMenu = new QMenu(this); contextMenu->setObjectName("contextMenu");