diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp --- a/src/qt/askpassphrasedialog.cpp +++ b/src/qt/askpassphrasedialog.cpp @@ -91,7 +91,9 @@ void AskPassphraseDialog::accept() { SecureString oldpass, newpass1, newpass2; - if (!model) return; + if (!model) { + return; + } oldpass.reserve(MAX_PASSPHRASE_SIZE); newpass1.reserve(MAX_PASSPHRASE_SIZE); newpass2.reserve(MAX_PASSPHRASE_SIZE); diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp --- a/src/qt/bantablemodel.cpp +++ b/src/qt/bantablemodel.cpp @@ -22,7 +22,9 @@ const CCombinedBan *pLeft = &left; const CCombinedBan *pRight = &right; - if (order == Qt::DescendingOrder) std::swap(pLeft, pRight); + if (order == Qt::DescendingOrder) { + std::swap(pLeft, pRight); + } switch (column) { case BanTableModel::Address: @@ -70,7 +72,9 @@ int size() const { return cachedBanlist.size(); } CCombinedBan *index(int idx) { - if (idx >= 0 && idx < cachedBanlist.size()) return &cachedBanlist[idx]; + if (idx >= 0 && idx < cachedBanlist.size()) { + return &cachedBanlist[idx]; + } return 0; } @@ -100,7 +104,9 @@ } QVariant BanTableModel::data(const QModelIndex &index, int role) const { - if (!index.isValid()) return QVariant(); + if (!index.isValid()) { + return QVariant(); + } CCombinedBan *rec = static_cast(index.internalPointer()); @@ -129,7 +135,9 @@ } Qt::ItemFlags BanTableModel::flags(const QModelIndex &index) const { - if (!index.isValid()) return 0; + if (!index.isValid()) { + return 0; + } Qt::ItemFlags retval = Qt::ItemIsSelectable | Qt::ItemIsEnabled; return retval; @@ -140,7 +148,9 @@ Q_UNUSED(parent); CCombinedBan *data = priv->index(row); - if (data) return createIndex(row, column, data); + if (data) { + return createIndex(row, column, data); + } return QModelIndex(); } diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -678,7 +678,9 @@ } void BitcoinGUI::removeAllWallets() { - if (!walletFrame) return; + if (!walletFrame) { + return; + } setWalletActionsEnabled(false); walletFrame->removeAllWallets(); } @@ -777,7 +779,9 @@ } void BitcoinGUI::aboutClicked() { - if (!clientModel) return; + if (!clientModel) { + return; + } HelpMessageDialog dlg(m_node, this, true); dlg.exec(); @@ -807,30 +811,42 @@ void BitcoinGUI::gotoOverviewPage() { overviewAction->setChecked(true); - if (walletFrame) walletFrame->gotoOverviewPage(); + if (walletFrame) { + walletFrame->gotoOverviewPage(); + } } void BitcoinGUI::gotoHistoryPage() { historyAction->setChecked(true); - if (walletFrame) walletFrame->gotoHistoryPage(); + if (walletFrame) { + walletFrame->gotoHistoryPage(); + } } void BitcoinGUI::gotoReceiveCoinsPage() { receiveCoinsAction->setChecked(true); - if (walletFrame) walletFrame->gotoReceiveCoinsPage(); + if (walletFrame) { + walletFrame->gotoReceiveCoinsPage(); + } } void BitcoinGUI::gotoSendCoinsPage(QString addr) { sendCoinsAction->setChecked(true); - if (walletFrame) walletFrame->gotoSendCoinsPage(addr); + if (walletFrame) { + walletFrame->gotoSendCoinsPage(addr); + } } void BitcoinGUI::gotoSignMessageTab(QString addr) { - if (walletFrame) walletFrame->gotoSignMessageTab(addr); + if (walletFrame) { + walletFrame->gotoSignMessageTab(addr); + } } void BitcoinGUI::gotoVerifyMessageTab(QString addr) { - if (walletFrame) walletFrame->gotoVerifyMessageTab(addr); + if (walletFrame) { + walletFrame->gotoVerifyMessageTab(addr); + } } #endif // ENABLE_WALLET @@ -1073,8 +1089,9 @@ // Check for buttons, use OK as default, if none was supplied QMessageBox::StandardButton buttons; if (!(buttons = (QMessageBox::StandardButton)( - style & CClientUIInterface::BTN_MASK))) + style & CClientUIInterface::BTN_MASK))) { buttons = QMessageBox::Ok; + } showNormalIfMinimized(); QMessageBox mBox(static_cast(nMBoxIcon), strTitle, @@ -1084,9 +1101,10 @@ if (ret != nullptr) { *ret = r == QMessageBox::Ok; } - } else + } else { notificator->notify(static_cast(nNotifyIcon), strTitle, message); + } } void BitcoinGUI::changeEvent(QEvent *e) { diff --git a/src/qt/csvmodelwriter.cpp b/src/qt/csvmodelwriter.cpp --- a/src/qt/csvmodelwriter.cpp +++ b/src/qt/csvmodelwriter.cpp @@ -40,7 +40,9 @@ bool CSVModelWriter::write() { QFile file(filename); - if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) return false; + if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { + return false; + } QTextStream out(&file); int numRows = 0; diff --git a/src/qt/modaloverlay.cpp b/src/qt/modaloverlay.cpp --- a/src/qt/modaloverlay.cpp +++ b/src/qt/modaloverlay.cpp @@ -35,7 +35,9 @@ if (ev->type() == QEvent::Resize) { QResizeEvent *rev = static_cast(ev); resize(rev->size()); - if (!layerIsVisible) setGeometry(0, height(), width(), height()); + if (!layerIsVisible) { + setGeometry(0, height(), width(), height()); + } } else if (ev->type() == QEvent::ChildAdded) { raise(); @@ -47,7 +49,9 @@ //! Tracks parent widget changes bool ModalOverlay::event(QEvent *ev) { if (ev->type() == QEvent::ParentAboutToChange) { - if (parent()) parent()->removeEventFilter(this); + if (parent()) { + parent()->removeEventFilter(this); + } } else if (ev->type() == QEvent::ParentChange) { if (parent()) { parent()->installEventFilter(this); @@ -123,9 +127,10 @@ QString::number(nVerificationProgress * 100, 'f', 2) + "%"); ui->progressBar->setValue(nVerificationProgress * 100); - if (!bestHeaderDate.isValid()) + if (!bestHeaderDate.isValid()) { // not syncing return; + } // estimate the number of headers left based on nPowTargetSpacing // and check if the gui is not aware of the best header (happens rarely) @@ -146,15 +151,20 @@ void ModalOverlay::toggleVisibility() { showHide(layerIsVisible, true); - if (!layerIsVisible) userClosed = true; + if (!layerIsVisible) { + userClosed = true; + } } void ModalOverlay::showHide(bool hide, bool userRequested) { if ((layerIsVisible && !hide) || (!layerIsVisible && hide) || - (!hide && userClosed && !userRequested)) + (!hide && userClosed && !userRequested)) { return; + } - if (!isVisible() && !hide) setVisible(true); + if (!isVisible() && !hide) { + setVisible(true); + } setGeometry(0, hide ? 0 : height(), width(), height()); diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -162,10 +162,14 @@ if (_model) { /* check if client restart is needed and show persistent message */ - if (_model->isRestartRequired()) showRestartWarning(true); + if (_model->isRestartRequired()) { + showRestartWarning(true); + } QString strLabel = _model->getOverriddenByCommandLine(); - if (strLabel.isEmpty()) strLabel = tr("none"); + if (strLabel.isEmpty()) { + strLabel = tr("none"); + } ui->overriddenByCommandLineLabel->setText(strLabel); mapper->setModel(_model); @@ -279,7 +283,9 @@ tr("Client will be shut down. Do you want to proceed?"), QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel); - if (btnRetVal == QMessageBox::Cancel) return; + if (btnRetVal == QMessageBox::Cancel) { + return; + } /* reset all options and close GUI */ model->Reset(); @@ -404,7 +410,9 @@ CService serv( LookupNumeric(input.toStdString().c_str(), DEFAULT_GUI_PROXY_PORT)); proxyType addrProxy = proxyType(serv, true); - if (addrProxy.IsValid()) return QValidator::Acceptable; + if (addrProxy.IsValid()) { + return QValidator::Acceptable; + } return QValidator::Invalid; } diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -523,8 +523,9 @@ proxy.setPort(curProxy.proxy.GetPort()); return true; - } else + } else { proxy.setType(QNetworkProxy::NoProxy); + } return false; } @@ -553,8 +554,9 @@ // see https://github.com/bitcoin/bitcoin/pull/8273 // force people to upgrade to the new value if they are using 100MB if (settingsVersion < 130000 && settings.contains("nDatabaseCache") && - settings.value("nDatabaseCache").toLongLong() == 100) + settings.value("nDatabaseCache").toLongLong() == 100) { settings.setValue("nDatabaseCache", (qint64)nDefaultDbCache); + } settings.setValue(strSettingsVersionKey, CLIENT_VERSION); } diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -148,7 +148,9 @@ } void OverviewPage::handleTransactionClicked(const QModelIndex &index) { - if (filter) Q_EMIT transactionClicked(filter->mapToSource(index)); + if (filter) { + Q_EMIT transactionClicked(filter->mapToSource(index)); + } } void OverviewPage::handleOutOfSyncWarningClicks() { diff --git a/src/qt/paymentrequestplus.cpp b/src/qt/paymentrequestplus.cpp --- a/src/qt/paymentrequestplus.cpp +++ b/src/qt/paymentrequestplus.cpp @@ -61,7 +61,9 @@ QString &merchant) const { merchant.clear(); - if (!IsInitialized()) return false; + if (!IsInitialized()) { + return false; + } // One day we'll support more PKI types, but just x509 for now: const EVP_MD *digestAlgorithm = nullptr; @@ -108,7 +110,9 @@ } const uint8_t *data = (const uint8_t *)certChain.certificate(i).data(); X509 *cert = d2i_X509(nullptr, &data, certChain.certificate(i).size()); - if (cert) certs.push_back(cert); + if (cert) { + certs.push_back(cert); + } } if (certs.empty()) { qWarning() << "PaymentRequestPlus::getMerchant: Payment request: empty " @@ -170,7 +174,9 @@ #if HAVE_DECL_EVP_MD_CTX_NEW EVP_MD_CTX *ctx = EVP_MD_CTX_new(); - if (!ctx) throw SSLVerifyError("Error allocating OpenSSL context."); + if (!ctx) { + throw SSLVerifyError("Error allocating OpenSSL context."); + } #else EVP_MD_CTX _ctx; EVP_MD_CTX *ctx; diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp --- a/src/qt/peertablemodel.cpp +++ b/src/qt/peertablemodel.cpp @@ -23,7 +23,9 @@ const CNodeStats *pLeft = &(left.nodeStats); const CNodeStats *pRight = &(right.nodeStats); - if (order == Qt::DescendingOrder) std::swap(pLeft, pRight); + if (order == Qt::DescendingOrder) { + std::swap(pLeft, pRight); + } switch (column) { case PeerTableModel::NetNodeId: @@ -91,8 +93,9 @@ int size() const { return cachedNodeStats.size(); } CNodeCombinedStats *index(int idx) { - if (idx >= 0 && idx < cachedNodeStats.size()) + if (idx >= 0 && idx < cachedNodeStats.size()) { return &cachedNodeStats[idx]; + } return 0; } @@ -136,7 +139,9 @@ } QVariant PeerTableModel::data(const QModelIndex &index, int role) const { - if (!index.isValid()) return QVariant(); + if (!index.isValid()) { + return QVariant(); + } CNodeCombinedStats *rec = static_cast(index.internalPointer()); @@ -181,7 +186,9 @@ } Qt::ItemFlags PeerTableModel::flags(const QModelIndex &index) const { - if (!index.isValid()) return 0; + if (!index.isValid()) { + return 0; + } Qt::ItemFlags retval = Qt::ItemIsSelectable | Qt::ItemIsEnabled; return retval; @@ -192,7 +199,9 @@ Q_UNUSED(parent); CNodeCombinedStats *data = priv->index(row); - if (data) return createIndex(row, column, data); + if (data) { + return createIndex(row, column, data); + } return QModelIndex(); } @@ -208,7 +217,9 @@ int PeerTableModel::getRowByNodeId(NodeId nodeid) { std::map::iterator it = priv->mapNodeRows.find(nodeid); - if (it == priv->mapNodeRows.end()) return -1; + if (it == priv->mapNodeRows.end()) { + return -1; + } return it->second; } diff --git a/src/qt/platformstyle.cpp b/src/qt/platformstyle.cpp --- a/src/qt/platformstyle.cpp +++ b/src/qt/platformstyle.cpp @@ -80,10 +80,11 @@ const int colorTextLightness = colorText.lightness(); QColor colorbase; if (abs(colorHighlightBg.lightness() - colorTextLightness) < - abs(colorHighlightFg.lightness() - colorTextLightness)) + abs(colorHighlightFg.lightness() - colorTextLightness)) { colorbase = colorHighlightBg; - else + } else { colorbase = colorHighlightFg; + } singleColor = colorbase; } // Determine text color @@ -91,17 +92,23 @@ } QImage PlatformStyle::SingleColorImage(const QString &filename) const { - if (!colorizeIcons) return QImage(filename); + if (!colorizeIcons) { + return QImage(filename); + } return ColorizeImage(filename, SingleColor()); } QIcon PlatformStyle::SingleColorIcon(const QString &filename) const { - if (!colorizeIcons) return QIcon(filename); + if (!colorizeIcons) { + return QIcon(filename); + } return ColorizeIcon(filename, SingleColor()); } QIcon PlatformStyle::SingleColorIcon(const QIcon &icon) const { - if (!colorizeIcons) return icon; + if (!colorizeIcons) { + return icon; + } return ColorizeIcon(icon, SingleColor()); } diff --git a/src/qt/qvalidatedlineedit.cpp b/src/qt/qvalidatedlineedit.cpp --- a/src/qt/qvalidatedlineedit.cpp +++ b/src/qt/qvalidatedlineedit.cpp @@ -72,13 +72,15 @@ QString address = text(); int pos = 0; if (checkValidator->validate(address, pos) == - QValidator::Acceptable) + QValidator::Acceptable) { setValid(true); - else + } else { setValid(false); + } } - } else + } else { setValid(false); + } Q_EMIT validationDidChange(this); } @@ -92,8 +94,9 @@ if (checkValidator) { QString address = text(); int pos = 0; - if (checkValidator->validate(address, pos) == QValidator::Acceptable) + if (checkValidator->validate(address, pos) == QValidator::Acceptable) { return true; + } } return valid; diff --git a/src/qt/recentrequeststablemodel.cpp b/src/qt/recentrequeststablemodel.cpp --- a/src/qt/recentrequeststablemodel.cpp +++ b/src/qt/recentrequeststablemodel.cpp @@ -46,7 +46,9 @@ QVariant RecentRequestsTableModel::data(const QModelIndex &index, int role) const { - if (!index.isValid() || index.row() >= list.length()) return QVariant(); + if (!index.isValid() || index.row() >= list.length()) { + return QVariant(); + } if (role == Qt::DisplayRole || role == Qt::EditRole) { const RecentRequestEntry *rec = &list[index.row()]; @@ -68,21 +70,23 @@ } case Amount: if (rec->recipient.amount == ::Amount::zero() && - role == Qt::DisplayRole) + role == Qt::DisplayRole) { return tr("(no amount requested)"); - else if (role == Qt::EditRole) + } 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); + } } } else if (role == Qt::TextAlignmentRole) { - if (index.column() == Amount) + if (index.column() == Amount) { return (int)(Qt::AlignRight | Qt::AlignVCenter); + } } return QVariant(); } @@ -166,8 +170,9 @@ ss << newEntry; if (!walletModel->saveReceiveRequest(recipient.address.toStdString(), - newEntry.id, ss.str())) + newEntry.id, ss.str())) { return; + } addNewRequest(newEntry); } @@ -181,9 +186,13 @@ ss >> entry; // should not happen - if (entry.id == 0) return; + if (entry.id == 0) { + return; + } - if (entry.id > nReceiveRequestsMaxId) nReceiveRequestsMaxId = entry.id; + if (entry.id > nReceiveRequestsMaxId) { + nReceiveRequestsMaxId = entry.id; + } addNewRequest(entry); } @@ -211,7 +220,9 @@ RecentRequestEntry &right) const { RecentRequestEntry *pLeft = &left; RecentRequestEntry *pRight = &right; - if (order == Qt::DescendingOrder) std::swap(pLeft, pRight); + if (order == Qt::DescendingOrder) { + std::swap(pLeft, pRight); + } switch (column) { case RecentRequestsTableModel::Date: diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -201,7 +201,9 @@ }; std::string strCommandTerminated = strCommand; - if (strCommandTerminated.back() != '\n') strCommandTerminated += "\n"; + if (strCommandTerminated.back() != '\n') { + strCommandTerminated += "\n"; + } for (chpos = 0; chpos < strCommandTerminated.size(); ++chpos) { char ch = strCommandTerminated[chpos]; switch (state) { @@ -871,7 +873,9 @@ QSettings settings; // don't allow an insane font size - if (newSize < FONT_RANGE.width() || newSize > FONT_RANGE.height()) return; + if (newSize < FONT_RANGE.width() || newSize > FONT_RANGE.height()) { + return; + } // temp. store the console content QString str = ui->messagesWidget->toHtml(); @@ -1084,8 +1088,9 @@ // Append command to history history.append(cmd); // Enforce maximum history size - while (history.size() > CONSOLE_HISTORY) + while (history.size() > CONSOLE_HISTORY) { history.removeFirst(); + } // Set pointer to end of history historyPtr = history.size(); @@ -1179,13 +1184,16 @@ Q_UNUSED(deselected); if (!clientModel || !clientModel->getPeerTableModel() || - selected.indexes().isEmpty()) + selected.indexes().isEmpty()) { return; + } const CNodeCombinedStats *stats = clientModel->getPeerTableModel()->getNodeStats( selected.indexes().first().row()); - if (stats) updateNodeDetail(stats); + if (stats) { + updateNodeDetail(stats); + } } void RPCConsole::peerLayoutAboutToChange() { @@ -1209,8 +1217,10 @@ bool fUnselect = false; bool fReselect = false; - if (cachedNodeids.empty()) // no node selected yet + // no node selected yet + if (cachedNodeids.empty()) { return; + } // find the currently selected row int selectedRow = -1; @@ -1251,7 +1261,9 @@ } } - if (stats) updateNodeDetail(stats); + if (stats) { + updateNodeDetail(stats); + } } void RPCConsole::updateNodeDetail(const CNodeCombinedStats *stats) { @@ -1357,12 +1369,16 @@ void RPCConsole::showPeersTableContextMenu(const QPoint &point) { QModelIndex index = ui->peerWidget->indexAt(point); - if (index.isValid()) peersTableContextMenu->exec(QCursor::pos()); + if (index.isValid()) { + peersTableContextMenu->exec(QCursor::pos()); + } } void RPCConsole::showBanTableContextMenu(const QPoint &point) { QModelIndex index = ui->banlistWidget->indexAt(point); - if (index.isValid()) banTableContextMenu->exec(QCursor::pos()); + if (index.isValid()) { + banTableContextMenu->exec(QCursor::pos()); + } } void RPCConsole::disconnectSelectedNode() { diff --git a/src/qt/signverifymessagedialog.cpp b/src/qt/signverifymessagedialog.cpp --- a/src/qt/signverifymessagedialog.cpp +++ b/src/qt/signverifymessagedialog.cpp @@ -78,12 +78,16 @@ void SignVerifyMessageDialog::showTab_SM(bool fShow) { ui->tabWidget->setCurrentIndex(0); - if (fShow) this->show(); + if (fShow) { + this->show(); + } } void SignVerifyMessageDialog::showTab_VM(bool fShow) { ui->tabWidget->setCurrentIndex(1); - if (fShow) this->show(); + if (fShow) { + this->show(); + } } void SignVerifyMessageDialog::on_addressBookButton_SM_clicked() { @@ -102,7 +106,9 @@ } void SignVerifyMessageDialog::on_signMessageButton_SM_clicked() { - if (!model) return; + if (!model) { + return; + } /* Clear old signature to ensure users don't get confused on error with an * old signature displayed */ diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -170,9 +170,12 @@ /* If the window is minimized, hide() will be ignored. */ /* Make sure we de-minimize the splashscreen window before hiding */ - if (isMinimized()) showNormal(); + if (isMinimized()) { + showNormal(); + } hide(); - deleteLater(); // No more need for this + // No more need for this + deleteLater(); } static void InitMessage(SplashScreen *splash, const std::string &message) { diff --git a/src/qt/test/paymentservertests.cpp b/src/qt/test/paymentservertests.cpp --- a/src/qt/test/paymentservertests.cpp +++ b/src/qt/test/paymentservertests.cpp @@ -208,8 +208,9 @@ QList> sendingTos = r.paymentRequest.getPayTo(); for (const std::pair &sendingTo : sendingTos) { CTxDestination dest; - if (ExtractDestination(sendingTo.first, dest)) + if (ExtractDestination(sendingTo.first, dest)) { QCOMPARE(PaymentServer::verifyAmount(sendingTo.second), false); + } } delete server; diff --git a/src/qt/trafficgraphwidget.cpp b/src/qt/trafficgraphwidget.cpp --- a/src/qt/trafficgraphwidget.cpp +++ b/src/qt/trafficgraphwidget.cpp @@ -56,7 +56,9 @@ QPainter painter(this); painter.fillRect(rect(), Qt::black); - if (fMax <= 0.0f) return; + if (fMax <= 0.0f) { + return; + } QColor axisCol(Qt::gray); int h = height() - YMARGIN * 2; @@ -89,7 +91,9 @@ int count = 1; for (float y = val; y < fMax; y += val, count++) { // don't overwrite lines drawn above - if (count % 10 == 0) continue; + if (count % 10 == 0) { + continue; + } int yy = YMARGIN + h - h * y / fMax; painter.drawLine(XMARGIN, yy, width() - XMARGIN, yy); } @@ -112,7 +116,9 @@ } void TrafficGraphWidget::updateRates() { - if (!clientModel) return; + if (!clientModel) { + return; + } quint64 bytesIn = clientModel->node().getTotalBytesRecv(), bytesOut = clientModel->node().getTotalBytesSent(); @@ -134,10 +140,14 @@ float tmax = 0.0f; for (const float f : vSamplesIn) { - if (f > tmax) tmax = f; + if (f > tmax) { + tmax = f; + } } for (const float f : vSamplesOut) { - if (f > tmax) tmax = f; + if (f > tmax) { + tmax = f; + } } fMax = tmax; update(); diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -408,7 +408,9 @@ QString label = walletModel->getAddressTableModel()->labelForAddress( QString::fromStdString(wtx->address)); - if (label.isEmpty()) return COLOR_BAREADDRESS; + if (label.isEmpty()) { + return COLOR_BAREADDRESS; + } } break; case TransactionRecord::SendToSelf: return COLOR_BAREADDRESS; diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp --- a/src/qt/utilitydialog.cpp +++ b/src/qt/utilitydialog.cpp @@ -105,7 +105,9 @@ cursor.insertText(line.trimmed() + ' '); } else if (line.size() > 0) { // Title of a group - if (cursor.currentTable()) cursor.currentTable()->appendRows(1); + if (cursor.currentTable()) { + cursor.currentTable()->appendRows(1); + } cursor.movePosition(QTextCursor::Down); cursor.insertText(line.trimmed(), bold); cursor.insertTable(1, 2, tf); @@ -154,7 +156,9 @@ } QWidget *ShutdownWindow::showShutdownWindow(BitcoinGUI *window) { - if (!window) return nullptr; + if (!window) { + return nullptr; + } // Show a simple window indicating shutdown status QWidget *shutdownWindow = new ShutdownWindow();