Browse Source

qt: define QT_NO_KEYWORDS

QT_NO_KEYWORDS prevents Qt from defining the `foreach`, `signals`,
`slots` and `emit` macros.

Avoid overlap between Qt macros and boost - for example #undef hackiness
in #6421.
pull/1/head
Wladimir J. van der Laan 7 years ago
parent
commit
d29ec6c230
  1. 2
      src/Makefile.qt.include
  2. 2
      src/qt/addressbookpage.cpp
  3. 6
      src/qt/addressbookpage.h
  4. 2
      src/qt/addresstablemodel.cpp
  5. 2
      src/qt/addresstablemodel.h
  6. 2
      src/qt/askpassphrasedialog.h
  7. 22
      src/qt/bitcoin.cpp
  8. 4
      src/qt/bitcoinamountfield.cpp
  9. 4
      src/qt/bitcoinamountfield.h
  10. 10
      src/qt/bitcoingui.cpp
  11. 8
      src/qt/bitcoingui.h
  12. 10
      src/qt/clientmodel.cpp
  13. 4
      src/qt/clientmodel.h
  14. 2
      src/qt/coincontroldialog.cpp
  15. 2
      src/qt/coincontroldialog.h
  16. 2
      src/qt/editaddressdialog.h
  17. 2
      src/qt/guiutil.h
  18. 10
      src/qt/intro.cpp
  19. 6
      src/qt/intro.h
  20. 2
      src/qt/macdockiconhandler.h
  21. 2
      src/qt/notificator.h
  22. 4
      src/qt/openuridialog.h
  23. 4
      src/qt/optionsdialog.cpp
  24. 4
      src/qt/optionsdialog.h
  25. 6
      src/qt/optionsmodel.cpp
  26. 2
      src/qt/optionsmodel.h
  27. 2
      src/qt/overviewpage.cpp
  28. 6
      src/qt/overviewpage.h
  29. 58
      src/qt/paymentserver.cpp
  30. 6
      src/qt/paymentserver.h
  31. 8
      src/qt/peertablemodel.cpp
  32. 2
      src/qt/peertablemodel.h
  33. 4
      src/qt/qvalidatedlineedit.h
  34. 2
      src/qt/qvaluecombobox.cpp
  35. 4
      src/qt/qvaluecombobox.h
  36. 2
      src/qt/receivecoinsdialog.cpp
  37. 4
      src/qt/receivecoinsdialog.h
  38. 4
      src/qt/receiverequestdialog.h
  39. 4
      src/qt/recentrequeststablemodel.cpp
  40. 2
      src/qt/recentrequeststablemodel.h
  41. 20
      src/qt/rpcconsole.cpp
  42. 6
      src/qt/rpcconsole.h
  43. 6
      src/qt/sendcoinsdialog.cpp
  44. 8
      src/qt/sendcoinsdialog.h
  45. 2
      src/qt/sendcoinsentry.cpp
  46. 6
      src/qt/sendcoinsentry.h
  47. 2
      src/qt/signverifymessagedialog.h
  48. 2
      src/qt/splashscreen.h
  49. 2
      src/qt/test/paymentservertests.cpp
  50. 4
      src/qt/test/paymentservertests.h
  51. 2
      src/qt/test/uritests.h
  52. 4
      src/qt/trafficgraphwidget.cpp
  53. 2
      src/qt/trafficgraphwidget.h
  54. 4
      src/qt/transactiondesc.cpp
  55. 10
      src/qt/transactiontablemodel.cpp
  56. 2
      src/qt/transactiontablemodel.h
  57. 4
      src/qt/transactionview.cpp
  58. 6
      src/qt/transactionview.h
  59. 2
      src/qt/utilitydialog.cpp
  60. 2
      src/qt/utilitydialog.h
  61. 2
      src/qt/walletframe.h
  62. 18
      src/qt/walletmodel.cpp
  63. 4
      src/qt/walletmodel.h
  64. 2
      src/qt/walletmodeltransaction.cpp
  65. 8
      src/qt/walletview.cpp
  66. 4
      src/qt/walletview.h

2
src/Makefile.qt.include

@ -322,7 +322,7 @@ RES_MOVIES = $(wildcard qt/res/movies/spinner-*.png) @@ -322,7 +322,7 @@ RES_MOVIES = $(wildcard qt/res/movies/spinner-*.png)
BITCOIN_RC = qt/res/bitcoin-qt-res.rc
BITCOIN_QT_INCLUDES = -I$(builddir)/qt -I$(srcdir)/qt -I$(srcdir)/qt/forms \
-I$(builddir)/qt/forms
-I$(builddir)/qt/forms -DQT_NO_KEYWORDS
qt_libbitcoinqt_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
$(QT_INCLUDES) $(QT_DBUS_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)

2
src/qt/addressbookpage.cpp

@ -254,7 +254,7 @@ void AddressBookPage::done(int retval) @@ -254,7 +254,7 @@ void AddressBookPage::done(int retval)
// Figure out which address was selected, and return it
QModelIndexList indexes = table->selectionModel()->selectedRows(AddressTableModel::Address);
foreach (const QModelIndex& index, indexes) {
Q_FOREACH (const QModelIndex& index, indexes) {
QVariant address = table->model()->data(index);
returnValue = address.toString();
}

6
src/qt/addressbookpage.h

@ -45,7 +45,7 @@ public: @@ -45,7 +45,7 @@ public:
void setModel(AddressTableModel *model);
const QString &getReturnValue() const { return returnValue; }
public slots:
public Q_SLOTS:
void done(int retval);
private:
@ -59,7 +59,7 @@ private: @@ -59,7 +59,7 @@ private:
QAction *deleteAction; // to be able to explicitly disable it
QString newAddressToSelect;
private slots:
private Q_SLOTS:
/** Delete currently selected address entry */
void on_deleteAddress_clicked();
/** Create a new address for receiving coins and / or add a new address book entry */
@ -80,7 +80,7 @@ private slots: @@ -80,7 +80,7 @@ private slots:
/** New entry/entries were added to address table */
void selectNewAddress(const QModelIndex &parent, int begin, int /*end*/);
signals:
Q_SIGNALS:
void sendCoins(QString addr);
};

2
src/qt/addresstablemodel.cpp

@ -450,5 +450,5 @@ int AddressTableModel::lookupAddress(const QString &address) const @@ -450,5 +450,5 @@ int AddressTableModel::lookupAddress(const QString &address) const
void AddressTableModel::emitDataChanged(int idx)
{
emit dataChanged(index(idx, 0, QModelIndex()), index(idx, columns.length()-1, QModelIndex()));
Q_EMIT dataChanged(index(idx, 0, QModelIndex()), index(idx, columns.length()-1, QModelIndex()));
}

2
src/qt/addresstablemodel.h

@ -84,7 +84,7 @@ private: @@ -84,7 +84,7 @@ private:
/** Notify listeners that data changed. */
void emitDataChanged(int index);
public slots:
public Q_SLOTS:
/* Update address list from core.
*/
void updateEntry(const QString &address, const QString &label, bool isMine, const QString &purpose, int status);

2
src/qt/askpassphrasedialog.h

@ -40,7 +40,7 @@ private: @@ -40,7 +40,7 @@ private:
WalletModel *model;
bool fCapsLock;
private slots:
private Q_SLOTS:
void textChanged();
protected:

22
src/qt/bitcoin.cpp

@ -169,11 +169,11 @@ class BitcoinCore: public QObject @@ -169,11 +169,11 @@ class BitcoinCore: public QObject
public:
explicit BitcoinCore();
public slots:
public Q_SLOTS:
void initialize();
void shutdown();
signals:
Q_SIGNALS:
void initializeResult(int retval);
void shutdownResult(int retval);
void runawayException(const QString &message);
@ -216,13 +216,13 @@ public: @@ -216,13 +216,13 @@ public:
/// Get window identifier of QMainWindow (BitcoinGUI)
WId getMainWinId() const;
public slots:
public Q_SLOTS:
void initializeResult(int retval);
void shutdownResult(int retval);
/// Handle runaway exceptions. Shows a message box with the problem and quits the program.
void handleRunawayException(const QString &message);
signals:
Q_SIGNALS:
void requestedInitialize();
void requestedShutdown();
void stopThread();
@ -253,7 +253,7 @@ BitcoinCore::BitcoinCore(): @@ -253,7 +253,7 @@ BitcoinCore::BitcoinCore():
void BitcoinCore::handleRunawayException(const std::exception *e)
{
PrintExceptionContinue(e, "Runaway exception");
emit runawayException(QString::fromStdString(strMiscWarning));
Q_EMIT runawayException(QString::fromStdString(strMiscWarning));
}
void BitcoinCore::initialize()
@ -269,7 +269,7 @@ void BitcoinCore::initialize() @@ -269,7 +269,7 @@ void BitcoinCore::initialize()
*/
StartDummyRPCThread();
}
emit initializeResult(rv);
Q_EMIT initializeResult(rv);
} catch (const std::exception& e) {
handleRunawayException(&e);
} catch (...) {
@ -286,7 +286,7 @@ void BitcoinCore::shutdown() @@ -286,7 +286,7 @@ void BitcoinCore::shutdown()
threadGroup.join_all();
Shutdown();
qDebug() << __func__ << ": Shutdown finished";
emit shutdownResult(1);
Q_EMIT shutdownResult(1);
} catch (const std::exception& e) {
handleRunawayException(&e);
} catch (...) {
@ -315,7 +315,7 @@ BitcoinApplication::~BitcoinApplication() @@ -315,7 +315,7 @@ BitcoinApplication::~BitcoinApplication()
if(coreThread)
{
qDebug() << __func__ << ": Stopping thread";
emit stopThread();
Q_EMIT stopThread();
coreThread->wait();
qDebug() << __func__ << ": Stopped thread";
}
@ -386,7 +386,7 @@ void BitcoinApplication::requestInitialize() @@ -386,7 +386,7 @@ void BitcoinApplication::requestInitialize()
{
qDebug() << __func__ << ": Requesting initialize";
startThread();
emit requestedInitialize();
Q_EMIT requestedInitialize();
}
void BitcoinApplication::requestShutdown()
@ -409,7 +409,7 @@ void BitcoinApplication::requestShutdown() @@ -409,7 +409,7 @@ void BitcoinApplication::requestShutdown()
ShutdownWindow::showShutdownWindow(window);
// Request shutdown from core thread
emit requestedShutdown();
Q_EMIT requestedShutdown();
}
void BitcoinApplication::initializeResult(int retval)
@ -449,7 +449,7 @@ void BitcoinApplication::initializeResult(int retval) @@ -449,7 +449,7 @@ void BitcoinApplication::initializeResult(int retval)
{
window->show();
}
emit splashFinished(window);
Q_EMIT splashFinished(window);
#ifdef ENABLE_WALLET
// Now that initialization/startup is done, process any command-line

4
src/qt/bitcoinamountfield.cpp

@ -61,7 +61,7 @@ public: @@ -61,7 +61,7 @@ public:
void setValue(const CAmount& value)
{
lineEdit()->setText(BitcoinUnits::format(currentUnit, value, false, BitcoinUnits::separatorAlways));
emit valueChanged();
Q_EMIT valueChanged();
}
void stepBy(int steps)
@ -184,7 +184,7 @@ protected: @@ -184,7 +184,7 @@ protected:
return rv;
}
signals:
Q_SIGNALS:
void valueChanged();
};

4
src/qt/bitcoinamountfield.h

@ -56,7 +56,7 @@ public: @@ -56,7 +56,7 @@ public:
*/
QWidget *setupTabChain(QWidget *prev);
signals:
Q_SIGNALS:
void valueChanged();
protected:
@ -67,7 +67,7 @@ private: @@ -67,7 +67,7 @@ private:
AmountSpinBox *amount;
QValueComboBox *unit;
private slots:
private Q_SLOTS:
void unitChanged(int idx);
};

10
src/qt/bitcoingui.cpp

@ -600,7 +600,7 @@ void BitcoinGUI::openClicked() @@ -600,7 +600,7 @@ void BitcoinGUI::openClicked()
OpenURIDialog dlg(this);
if(dlg.exec())
{
emit receivedURI(dlg.getURI());
Q_EMIT receivedURI(dlg.getURI());
}
}
@ -886,9 +886,9 @@ void BitcoinGUI::dropEvent(QDropEvent *event) @@ -886,9 +886,9 @@ void BitcoinGUI::dropEvent(QDropEvent *event)
{
if(event->mimeData()->hasUrls())
{
foreach(const QUrl &uri, event->mimeData()->urls())
Q_FOREACH(const QUrl &uri, event->mimeData()->urls())
{
emit receivedURI(uri.toString());
Q_EMIT receivedURI(uri.toString());
}
}
event->acceptProposedAction();
@ -1050,7 +1050,7 @@ UnitDisplayStatusBarControl::UnitDisplayStatusBarControl() : @@ -1050,7 +1050,7 @@ UnitDisplayStatusBarControl::UnitDisplayStatusBarControl() :
QList<BitcoinUnits::Unit> units = BitcoinUnits::availableUnits();
int max_width = 0;
const QFontMetrics fm(font());
foreach (const BitcoinUnits::Unit unit, units)
Q_FOREACH (const BitcoinUnits::Unit unit, units)
{
max_width = qMax(max_width, fm.width(BitcoinUnits::name(unit)));
}
@ -1069,7 +1069,7 @@ void UnitDisplayStatusBarControl::mousePressEvent(QMouseEvent *event) @@ -1069,7 +1069,7 @@ void UnitDisplayStatusBarControl::mousePressEvent(QMouseEvent *event)
void UnitDisplayStatusBarControl::createContextMenu()
{
menu = new QMenu();
foreach(BitcoinUnits::Unit u, BitcoinUnits::availableUnits())
Q_FOREACH(BitcoinUnits::Unit u, BitcoinUnits::availableUnits())
{
QAction *menuAction = new QAction(QString(BitcoinUnits::name(u)), this);
menuAction->setData(QVariant(u));

8
src/qt/bitcoingui.h

@ -136,11 +136,11 @@ private: @@ -136,11 +136,11 @@ private:
/** Disconnect core signals from GUI client */
void unsubscribeFromCoreSignals();
signals:
Q_SIGNALS:
/** Signal raised when a URI was entered or dragged to the GUI */
void receivedURI(const QString &uri);
public slots:
public Q_SLOTS:
/** Set number of connections shown in the UI */
void setNumConnections(int count);
/** Set number of blocks and last block date shown in the UI */
@ -168,7 +168,7 @@ public slots: @@ -168,7 +168,7 @@ public slots:
void incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address, const QString& label);
#endif // ENABLE_WALLET
private slots:
private Q_SLOTS:
#ifdef ENABLE_WALLET
/** Switch to overview (home) page */
void gotoOverviewPage();
@ -232,7 +232,7 @@ private: @@ -232,7 +232,7 @@ private:
/** Creates context menu, its actions, and wires up all the relevant signals for mouse events. */
void createContextMenu();
private slots:
private Q_SLOTS:
/** When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar */
void updateDisplayUnit(int newUnits);
/** Tells underlying optionsModel to update its current display unit. */

10
src/qt/clientmodel.cpp

@ -117,15 +117,15 @@ void ClientModel::updateTimer() @@ -117,15 +117,15 @@ void ClientModel::updateTimer()
cachedReindexing = fReindex;
cachedImporting = fImporting;
emit numBlocksChanged(newNumBlocks, newBlockDate);
Q_EMIT numBlocksChanged(newNumBlocks, newBlockDate);
}
emit bytesChanged(getTotalBytesRecv(), getTotalBytesSent());
Q_EMIT bytesChanged(getTotalBytesRecv(), getTotalBytesSent());
}
void ClientModel::updateNumConnections(int numConnections)
{
emit numConnectionsChanged(numConnections);
Q_EMIT numConnectionsChanged(numConnections);
}
void ClientModel::updateAlert(const QString &hash, int status)
@ -138,11 +138,11 @@ void ClientModel::updateAlert(const QString &hash, int status) @@ -138,11 +138,11 @@ void ClientModel::updateAlert(const QString &hash, int status)
CAlert alert = CAlert::getAlertByHash(hash_256);
if(!alert.IsNull())
{
emit message(tr("Network Alert"), QString::fromStdString(alert.strStatusBar), CClientUIInterface::ICON_ERROR);
Q_EMIT message(tr("Network Alert"), QString::fromStdString(alert.strStatusBar), CClientUIInterface::ICON_ERROR);
}
}
emit alertsChanged(getStatusBarWarnings());
Q_EMIT alertsChanged(getStatusBarWarnings());
}
bool ClientModel::inInitialBlockDownload() const

4
src/qt/clientmodel.h

@ -82,7 +82,7 @@ private: @@ -82,7 +82,7 @@ private:
void subscribeToCoreSignals();
void unsubscribeFromCoreSignals();
signals:
Q_SIGNALS:
void numConnectionsChanged(int count);
void numBlocksChanged(int count, const QDateTime& blockDate);
void alertsChanged(const QString &warnings);
@ -94,7 +94,7 @@ signals: @@ -94,7 +94,7 @@ signals:
// Show progress dialog e.g. for verifychain
void showProgress(const QString &title, int nProgress);
public slots:
public Q_SLOTS:
void updateTimer();
void updateNumConnections(int numConnections);
void updateAlert(const QString &hash, int status);

2
src/qt/coincontroldialog.cpp

@ -461,7 +461,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog) @@ -461,7 +461,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
CAmount nPayAmount = 0;
bool fDust = false;
CMutableTransaction txDummy;
foreach(const CAmount &amount, CoinControlDialog::payAmounts)
Q_FOREACH(const CAmount &amount, CoinControlDialog::payAmounts)
{
nPayAmount += amount;

2
src/qt/coincontroldialog.h

@ -102,7 +102,7 @@ private: @@ -102,7 +102,7 @@ private:
return column;
}
private slots:
private Q_SLOTS:
void showMenu(const QPoint &);
void copyAmount();
void copyLabel();

2
src/qt/editaddressdialog.h

@ -40,7 +40,7 @@ public: @@ -40,7 +40,7 @@ public:
QString getAddress() const;
void setAddress(const QString &address);
public slots:
public Q_SLOTS:
void accept();
private:

2
src/qt/guiutil.h

@ -169,7 +169,7 @@ namespace GUIUtil @@ -169,7 +169,7 @@ namespace GUIUtil
void setViewHeaderResizeMode(int logicalIndex, QHeaderView::ResizeMode resizeMode);
void resizeColumn(int nColumnIndex, int width);
private slots:
private Q_SLOTS:
void on_sectionResized(int logicalIndex, int oldSize, int newSize);
void on_geometriesChanged();
};

10
src/qt/intro.cpp

@ -42,10 +42,10 @@ public: @@ -42,10 +42,10 @@ public:
ST_ERROR
};
public slots:
public Q_SLOTS:
void check();
signals:
Q_SIGNALS:
void reply(int status, const QString &message, quint64 available);
private:
@ -102,7 +102,7 @@ void FreespaceChecker::check() @@ -102,7 +102,7 @@ void FreespaceChecker::check()
replyStatus = ST_ERROR;
replyMessage = tr("Cannot create data directory here.");
}
emit reply(replyStatus, replyMessage, freeBytesAvailable);
Q_EMIT reply(replyStatus, replyMessage, freeBytesAvailable);
}
@ -121,7 +121,7 @@ Intro::~Intro() @@ -121,7 +121,7 @@ Intro::~Intro()
{
delete ui;
/* Ensure thread is finished before it is deleted */
emit stopThread();
Q_EMIT stopThread();
thread->wait();
}
@ -277,7 +277,7 @@ void Intro::checkPath(const QString &dataDir) @@ -277,7 +277,7 @@ void Intro::checkPath(const QString &dataDir)
if(!signalled)
{
signalled = true;
emit requestCheck();
Q_EMIT requestCheck();
}
mutex.unlock();
}

6
src/qt/intro.h

@ -43,14 +43,14 @@ public: @@ -43,14 +43,14 @@ public:
*/
static QString getDefaultDataDirectory();
signals:
Q_SIGNALS:
void requestCheck();
void stopThread();
public slots:
public Q_SLOTS:
void setStatus(int status, const QString &message, quint64 bytesAvailable);
private slots:
private Q_SLOTS:
void on_dataDirectory_textChanged(const QString &arg1);
void on_ellipsisButton_clicked();
void on_dataDirDefault_clicked();

2
src/qt/macdockiconhandler.h

@ -30,7 +30,7 @@ public: @@ -30,7 +30,7 @@ public:
static void cleanup();
void handleDockIconClickEvent();
signals:
Q_SIGNALS:
void dockIconClicked();
private:

2
src/qt/notificator.h

@ -40,7 +40,7 @@ public: @@ -40,7 +40,7 @@ public:
Critical /**< An error occurred */
};
public slots:
public Q_SLOTS:
/** Show notification message.
@param[in] cls general message class
@param[in] title title shown with message

4
src/qt/openuridialog.h

@ -21,10 +21,10 @@ public: @@ -21,10 +21,10 @@ public:
QString getURI();
protected slots:
protected Q_SLOTS:
void accept();
private slots:
private Q_SLOTS:
void on_selectFileButton_clicked();
private:

4
src/qt/optionsdialog.cpp

@ -73,7 +73,7 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) : @@ -73,7 +73,7 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
/* Display elements init */
QDir translations(":translations");
ui->lang->addItem(QString("(") + tr("default") + QString(")"), QVariant(""));
foreach(const QString &langStr, translations.entryList())
Q_FOREACH(const QString &langStr, translations.entryList())
{
QLocale locale(langStr);
@ -281,7 +281,7 @@ bool OptionsDialog::eventFilter(QObject *object, QEvent *event) @@ -281,7 +281,7 @@ bool OptionsDialog::eventFilter(QObject *object, QEvent *event)
{
if(object == ui->proxyIp)
{
emit proxyIpChecks(ui->proxyIp, ui->proxyPort->text().toInt());
Q_EMIT proxyIpChecks(ui->proxyIp, ui->proxyPort->text().toInt());
}
}
return QDialog::eventFilter(object, event);

4
src/qt/optionsdialog.h

@ -33,7 +33,7 @@ public: @@ -33,7 +33,7 @@ public:
protected:
bool eventFilter(QObject *object, QEvent *event);
private slots:
private Q_SLOTS:
/* enable OK button */
void enableOkButton();
/* disable OK button */
@ -48,7 +48,7 @@ private slots: @@ -48,7 +48,7 @@ private slots:
void clearStatusLabel();
void doProxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
signals:
Q_SIGNALS:
void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
private:

6
src/qt/optionsmodel.cpp

@ -286,7 +286,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in @@ -286,7 +286,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
case CoinControlFeatures:
fCoinControlFeatures = value.toBool();
settings.setValue("fCoinControlFeatures", fCoinControlFeatures);
emit coinControlFeaturesChanged(fCoinControlFeatures);
Q_EMIT coinControlFeaturesChanged(fCoinControlFeatures);
break;
case DatabaseCache:
if (settings.value("nDatabaseCache") != value) {
@ -311,7 +311,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in @@ -311,7 +311,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
}
}
emit dataChanged(index, index);
Q_EMIT dataChanged(index, index);
return successful;
}
@ -324,7 +324,7 @@ void OptionsModel::setDisplayUnit(const QVariant &value) @@ -324,7 +324,7 @@ void OptionsModel::setDisplayUnit(const QVariant &value)
QSettings settings;
nDisplayUnit = value.toInt();
settings.setValue("nDisplayUnit", nDisplayUnit);
emit displayUnitChanged(nDisplayUnit);
Q_EMIT displayUnitChanged(nDisplayUnit);
}
}

2
src/qt/optionsmodel.h

@ -81,7 +81,7 @@ private: @@ -81,7 +81,7 @@ private:
/// Add option to list of GUI options overridden through command line/config file
void addOverriddenOption(const std::string &option);
signals:
Q_SIGNALS:
void displayUnitChanged(int unit);
void coinControlFeaturesChanged(bool);
};

2
src/qt/overviewpage.cpp

@ -142,7 +142,7 @@ OverviewPage::OverviewPage(QWidget *parent) : @@ -142,7 +142,7 @@ OverviewPage::OverviewPage(QWidget *parent) :
void OverviewPage::handleTransactionClicked(const QModelIndex &index)
{
if(filter)
emit transactionClicked(filter->mapToSource(index));
Q_EMIT transactionClicked(filter->mapToSource(index));
}
OverviewPage::~OverviewPage()

6
src/qt/overviewpage.h

@ -35,11 +35,11 @@ public: @@ -35,11 +35,11 @@ public:
void setWalletModel(WalletModel *walletModel);
void showOutOfSyncWarning(bool fShow);
public slots:
public Q_SLOTS:
void setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance,
const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance);
signals:
Q_SIGNALS:
void transactionClicked(const QModelIndex &index);
private:
@ -56,7 +56,7 @@ private: @@ -56,7 +56,7 @@ private:
TxViewDelegate *txdelegate;
TransactionFilterProxy *filter;
private slots:
private Q_SLOTS:
void updateDisplayUnit();
void handleTransactionClicked(const QModelIndex &index);
void updateAlerts(const QString &warnings);

58
src/qt/paymentserver.cpp

@ -148,7 +148,7 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store) @@ -148,7 +148,7 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
int nRootCerts = 0;
const QDateTime currentTime = QDateTime::currentDateTime();
foreach (const QSslCertificate& cert, certList) {
Q_FOREACH (const QSslCertificate& cert, certList) {
// Don't log NULL certificates
if (cert.isNull())
continue;
@ -201,7 +201,7 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store) @@ -201,7 +201,7 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
// when uiReady() is called.
//
// Warning: ipcSendCommandLine() is called early in init,
// so don't use "emit message()", but "QMessageBox::"!
// so don't use "Q_EMIT message()", but "QMessageBox::"!
//
void PaymentServer::ipcParseCommandLine(int argc, char* argv[])
{
@ -269,7 +269,7 @@ void PaymentServer::ipcParseCommandLine(int argc, char* argv[]) @@ -269,7 +269,7 @@ void PaymentServer::ipcParseCommandLine(int argc, char* argv[])
bool PaymentServer::ipcSendCommandLine()
{
bool fResult = false;
foreach (const QString& r, savedPaymentRequests)
Q_FOREACH (const QString& r, savedPaymentRequests)
{
QLocalSocket* socket = new QLocalSocket();
socket->connectToServer(ipcServerName(), QIODevice::WriteOnly);
@ -326,7 +326,7 @@ PaymentServer::PaymentServer(QObject* parent, bool startLocalServer) : @@ -326,7 +326,7 @@ PaymentServer::PaymentServer(QObject* parent, bool startLocalServer) :
uriServer = new QLocalServer(this);
if (!uriServer->listen(name)) {
// constructor is called early in init, so don't use "emit message()" here
// constructor is called early in init, so don't use "Q_EMIT message()" here
QMessageBox::critical(0, tr("Payment request error"),
tr("Cannot start bitcoin: click-to-pay handler"));
}
@ -394,7 +394,7 @@ void PaymentServer::uiReady() @@ -394,7 +394,7 @@ void PaymentServer::uiReady()
initNetManager();
saveURIs = false;
foreach (const QString& s, savedPaymentRequests)
Q_FOREACH (const QString& s, savedPaymentRequests)
{
handleURIOrFile(s);
}
@ -431,7 +431,7 @@ void PaymentServer::handleURIOrFile(const QString& s) @@ -431,7 +431,7 @@ void PaymentServer::handleURIOrFile(const QString& s)
else
{
qWarning() << "PaymentServer::handleURIOrFile: Invalid URL: " << fetchUrl;
emit message(tr("URI handling"),
Q_EMIT message(tr("URI handling"),
tr("Payment request fetch URL is invalid: %1").arg(fetchUrl.toString()),
CClientUIInterface::ICON_WARNING);
}
@ -445,14 +445,14 @@ void PaymentServer::handleURIOrFile(const QString& s) @@ -445,14 +445,14 @@ void PaymentServer::handleURIOrFile(const QString& s)
{
CBitcoinAddress address(recipient.address.toStdString());
if (!address.IsValid()) {
emit message(tr("URI handling"), tr("Invalid payment address %1").arg(recipient.address),
Q_EMIT message(tr("URI handling"), tr("Invalid payment address %1").arg(recipient.address),
CClientUIInterface::MSG_ERROR);
}
else
emit receivedPaymentRequest(recipient);
Q_EMIT receivedPaymentRequest(recipient);
}
else
emit message(tr("URI handling"),
Q_EMIT message(tr("URI handling"),
tr("URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters."),
CClientUIInterface::ICON_WARNING);
@ -466,12 +466,12 @@ void PaymentServer::handleURIOrFile(const QString& s) @@ -466,12 +466,12 @@ void PaymentServer::handleURIOrFile(const QString& s)
SendCoinsRecipient recipient;
if (!readPaymentRequestFromFile(s, request))
{
emit message(tr("Payment request file handling"),
Q_EMIT message(tr("Payment request file handling"),
tr("Payment request file cannot be read! This can be caused by an invalid payment request file."),
CClientUIInterface::ICON_WARNING);
}
else if (processPaymentRequest(request, recipient))
emit receivedPaymentRequest(recipient);
Q_EMIT receivedPaymentRequest(recipient);
return;
}
@ -500,7 +500,7 @@ void PaymentServer::handleURIConnection() @@ -500,7 +500,7 @@ void PaymentServer::handleURIConnection()
//
// Warning: readPaymentRequestFromFile() is used in ipcSendCommandLine()
// so don't use "emit message()", but "QMessageBox::"!
// so don't use "Q_EMIT message()", but "QMessageBox::"!
//
bool PaymentServer::readPaymentRequestFromFile(const QString& filename, PaymentRequestPlus& request)
{
@ -533,7 +533,7 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen @@ -533,7 +533,7 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen
if (request.IsInitialized()) {
// Payment request network matches client network?
if (!verifyNetwork(request.getDetails())) {
emit message(tr("Payment request rejected"), tr("Payment request network doesn't match client network."),
Q_EMIT message(tr("Payment request rejected"), tr("Payment request network doesn't match client network."),
CClientUIInterface::MSG_ERROR);
return false;
@ -542,13 +542,13 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen @@ -542,13 +542,13 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen
// Make sure any payment requests involved are still valid.
// This is re-checked just before sending coins in WalletModel::sendCoins().
if (verifyExpired(request.getDetails())) {
emit message(tr("Payment request rejected"), tr("Payment request expired."),
Q_EMIT message(tr("Payment request rejected"), tr("Payment request expired."),
CClientUIInterface::MSG_ERROR);
return false;
}
} else {
emit message(tr("Payment request error"), tr("Payment request is not initialized."),
Q_EMIT message(tr("Payment request error"), tr("Payment request is not initialized."),
CClientUIInterface::MSG_ERROR);
return false;
@ -562,7 +562,7 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen @@ -562,7 +562,7 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen
QList<std::pair<CScript, CAmount> > sendingTos = request.getPayTo();
QStringList addresses;
foreach(const PAIRTYPE(CScript, CAmount)& sendingTo, sendingTos) {
Q_FOREACH(const PAIRTYPE(CScript, CAmount)& sendingTo, sendingTos) {
// Extract and check destination addresses
CTxDestination dest;
if (ExtractDestination(sendingTo.first, dest)) {
@ -573,7 +573,7 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen @@ -573,7 +573,7 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen
// Unauthenticated payment requests to custom bitcoin addresses are not supported
// (there is no good way to tell the user where they are paying in a way they'd
// have a chance of understanding).
emit message(tr("Payment request rejected"),
Q_EMIT message(tr("Payment request rejected"),
tr("Unverified payment requests to custom payment scripts are unsupported."),
CClientUIInterface::MSG_ERROR);
return false;
@ -583,14 +583,14 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen @@ -583,14 +583,14 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen
// but CAmount is defined as int64_t. Because of that we need to verify that amounts are in a valid range
// and no overflow has happened.
if (!verifyAmount(sendingTo.second)) {
emit message(tr("Payment request rejected"), tr("Invalid payment request."), CClientUIInterface::MSG_ERROR);
Q_EMIT message(tr("Payment request rejected"), tr("Invalid payment request."), CClientUIInterface::MSG_ERROR);
return false;
}
// Extract and check amounts
CTxOut txOut(sendingTo.second, sendingTo.first);
if (txOut.IsDust(::minRelayTxFee)) {
emit message(tr("Payment request error"), tr("Requested payment amount of %1 is too small (considered dust).")
Q_EMIT message(tr("Payment request error"), tr("Requested payment amount of %1 is too small (considered dust).")
.arg(BitcoinUnits::formatWithUnit(optionsModel->getDisplayUnit(), sendingTo.second)),
CClientUIInterface::MSG_ERROR);
@ -600,7 +600,7 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen @@ -600,7 +600,7 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen
recipient.amount += sendingTo.second;
// Also verify that the final amount is still in a valid range after adding additional amounts.
if (!verifyAmount(recipient.amount)) {
emit message(tr("Payment request rejected"), tr("Invalid payment request."), CClientUIInterface::MSG_ERROR);
Q_EMIT message(tr("Payment request rejected"), tr("Invalid payment request."), CClientUIInterface::MSG_ERROR);
return false;
}
}
@ -694,7 +694,7 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply) @@ -694,7 +694,7 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply)
.arg(BIP70_MAX_PAYMENTREQUEST_SIZE);
qWarning() << QString("PaymentServer::%1:").arg(__func__) << msg;
emit message(tr("Payment request DoS protection"), msg, CClientUIInterface::MSG_ERROR);
Q_EMIT message(tr("Payment request DoS protection"), msg, CClientUIInterface::MSG_ERROR);
return;
}
@ -704,7 +704,7 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply) @@ -704,7 +704,7 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply)
.arg(reply->errorString());
qWarning() << "PaymentServer::netRequestFinished: " << msg;
emit message(tr("Payment request error"), msg, CClientUIInterface::MSG_ERROR);
Q_EMIT message(tr("Payment request error"), msg, CClientUIInterface::MSG_ERROR);
return;
}
@ -718,12 +718,12 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply) @@ -718,12 +718,12 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply)
if (!request.parse(data))
{
qWarning() << "PaymentServer::netRequestFinished: Error parsing payment request";
emit message(tr("Payment request error"),
Q_EMIT message(tr("Payment request error"),
tr("Payment request cannot be parsed!"),
CClientUIInterface::MSG_ERROR);
}
else if (processPaymentRequest(request, recipient))
emit receivedPaymentRequest(recipient);
Q_EMIT receivedPaymentRequest(recipient);
return;
}
@ -736,11 +736,11 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply) @@ -736,11 +736,11 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply)
.arg(reply->request().url().toString());
qWarning() << "PaymentServer::netRequestFinished: " << msg;
emit message(tr("Payment request error"), msg, CClientUIInterface::MSG_ERROR);
Q_EMIT message(tr("Payment request error"), msg, CClientUIInterface::MSG_ERROR);
}
else
{
emit receivedPaymentACK(GUIUtil::HtmlEscape(paymentACK.memo()));
Q_EMIT receivedPaymentACK(GUIUtil::HtmlEscape(paymentACK.memo()));
}
}
}
@ -750,11 +750,11 @@ void PaymentServer::reportSslErrors(QNetworkReply* reply, const QList<QSslError> @@ -750,11 +750,11 @@ void PaymentServer::reportSslErrors(QNetworkReply* reply, const QList<QSslError>
Q_UNUSED(reply);
QString errString;
foreach (const QSslError& err, errs) {
Q_FOREACH (const QSslError& err, errs) {
qWarning() << "PaymentServer::reportSslErrors: " << err;
errString += err.errorString() + "\n";
}
emit message(tr("Network request error"), errString, CClientUIInterface::MSG_ERROR);
Q_EMIT message(tr("Network request error"), errString, CClientUIInterface::MSG_ERROR);
}
void PaymentServer::setOptionsModel(OptionsModel *optionsModel)
@ -765,7 +765,7 @@ void PaymentServer::setOptionsModel(OptionsModel *optionsModel) @@ -765,7 +765,7 @@ void PaymentServer::setOptionsModel(OptionsModel *optionsModel)
void PaymentServer::handlePaymentACK(const QString& paymentACKMsg)
{
// currently we don't futher process or store the paymentACK message
emit message(tr("Payment acknowledged"), paymentACKMsg, CClientUIInterface::ICON_INFORMATION | CClientUIInterface::MODAL);
Q_EMIT message(tr("Payment acknowledged"), paymentACKMsg, CClientUIInterface::ICON_INFORMATION | CClientUIInterface::MODAL);
}
bool PaymentServer::verifyNetwork(const payments::PaymentDetails& requestDetails)

6
src/qt/paymentserver.h

@ -98,7 +98,7 @@ public: @@ -98,7 +98,7 @@ public:
// Verify the payment request amount is valid
static bool verifyAmount(const CAmount& requestAmount);
signals:
Q_SIGNALS:
// Fired when a valid payment request is received
void receivedPaymentRequest(SendCoinsRecipient);
@ -108,7 +108,7 @@ signals: @@ -108,7 +108,7 @@ signals:
// Fired when a message should be reported to the user
void message(const QString &title, const QString &message, unsigned int style);
public slots:
public Q_SLOTS:
// Signal this when the main window's UI is ready
// to display payment requests to the user
void uiReady();
@ -119,7 +119,7 @@ public slots: @@ -119,7 +119,7 @@ public slots:
// Handle an incoming URI, URI with local file scheme or file
void handleURIOrFile(const QString& s);
private slots:
private Q_SLOTS:
void handleURIConnection();
void netRequestFinished(QNetworkReply*);
void reportSslErrors(QNetworkReply*, const QList<QSslError> &);

8
src/qt/peertablemodel.cpp

@ -63,7 +63,7 @@ public: @@ -63,7 +63,7 @@ public:
#if QT_VERSION >= 0x040700
cachedNodeStats.reserve(vNodes.size());
#endif
foreach (CNode* pnode, vNodes)
Q_FOREACH (CNode* pnode, vNodes)
{
CNodeCombinedStats stats;
stats.nodeStateStats.nMisbehavior = 0;
@ -92,7 +92,7 @@ public: @@ -92,7 +92,7 @@ public:
// build index map
mapNodeRows.clear();
int row = 0;
foreach (const CNodeCombinedStats& stats, cachedNodeStats)
Q_FOREACH (const CNodeCombinedStats& stats, cachedNodeStats)
mapNodeRows.insert(std::pair<NodeId, int>(stats.nodeStats.nodeid, row++));
}
@ -220,9 +220,9 @@ const CNodeCombinedStats *PeerTableModel::getNodeStats(int idx) @@ -220,9 +220,9 @@ const CNodeCombinedStats *PeerTableModel::getNodeStats(int idx)
void PeerTableModel::refresh()
{
emit layoutAboutToBeChanged();
Q_EMIT layoutAboutToBeChanged();
priv->refreshPeers();
emit layoutChanged();
Q_EMIT layoutChanged();
}
int PeerTableModel::getRowByNodeId(NodeId nodeid)

2
src/qt/peertablemodel.h

@ -68,7 +68,7 @@ public: @@ -68,7 +68,7 @@ public:
void sort(int column, Qt::SortOrder order);
/*@}*/
public slots:
public Q_SLOTS:
void refresh();
private:

4
src/qt/qvalidatedlineedit.h

@ -27,11 +27,11 @@ private: @@ -27,11 +27,11 @@ private:
bool valid;
const QValidator *checkValidator;
public slots:
public Q_SLOTS:
void setValid(bool valid);
void setEnabled(bool enabled);
private slots:
private Q_SLOTS:
void markValid();
void checkValidity();
};

2
src/qt/qvaluecombobox.cpp

@ -27,5 +27,5 @@ void QValueComboBox::setRole(int role) @@ -27,5 +27,5 @@ void QValueComboBox::setRole(int role)
void QValueComboBox::handleSelectionChanged(int idx)
{
emit valueChanged();
Q_EMIT valueChanged();
}

4
src/qt/qvaluecombobox.h

@ -24,13 +24,13 @@ public: @@ -24,13 +24,13 @@ public:
/** Specify model role to use as ordinal value (defaults to Qt::UserRole) */
void setRole(int role);
signals:
Q_SIGNALS:
void valueChanged();
private:
int role;
private slots:
private Q_SLOTS:
void handleSelectionChanged(int idx);
};

2
src/qt/receivecoinsdialog.cpp

@ -185,7 +185,7 @@ void ReceiveCoinsDialog::on_showRequestButton_clicked() @@ -185,7 +185,7 @@ void ReceiveCoinsDialog::on_showRequestButton_clicked()
return;
QModelIndexList selection = ui->recentRequestsView->selectionModel()->selectedRows();
foreach (const QModelIndex& index, selection) {
Q_FOREACH (const QModelIndex& index, selection) {
on_recentRequestsView_doubleClicked(index);
}
}

4
src/qt/receivecoinsdialog.h

@ -44,7 +44,7 @@ public: @@ -44,7 +44,7 @@ public:
void setModel(WalletModel *model);
public slots:
public Q_SLOTS:
void clear();
void reject();
void accept();
@ -60,7 +60,7 @@ private: @@ -60,7 +60,7 @@ private:
void copyColumnToClipboard(int column);
virtual void resizeEvent(QResizeEvent *event);
private slots:
private Q_SLOTS:
void on_receiveButton_clicked();
void on_showRequestButton_clicked();
void on_removeRequestButton_clicked();

4
src/qt/receiverequestdialog.h

@ -32,7 +32,7 @@ public: @@ -32,7 +32,7 @@ public:
explicit QRImageWidget(QWidget *parent = 0);
QImage exportImage();
public slots:
public Q_SLOTS:
void saveImage();
void copyImage();
@ -55,7 +55,7 @@ public: @@ -55,7 +55,7 @@ public:
void setModel(OptionsModel *model);
void setInfo(const SendCoinsRecipient &info);
private slots:
private Q_SLOTS:
void on_btnCopyURI_clicked();
void on_btnCopyAddress_clicked();

4
src/qt/recentrequeststablemodel.cpp

@ -119,7 +119,7 @@ QVariant RecentRequestsTableModel::headerData(int section, Qt::Orientation orien @@ -119,7 +119,7 @@ QVariant RecentRequestsTableModel::headerData(int section, Qt::Orientation orien
void RecentRequestsTableModel::updateAmountColumnTitle()
{
columns[Amount] = getAmountTitle();
emit headerDataChanged(Qt::Horizontal,Amount,Amount);
Q_EMIT headerDataChanged(Qt::Horizontal,Amount,Amount);
}
/** Gets title for amount column including current display unit if optionsModel reference available. */
@ -214,7 +214,7 @@ void RecentRequestsTableModel::addNewRequest(RecentRequestEntry &recipient) @@ -214,7 +214,7 @@ void RecentRequestsTableModel::addNewRequest(RecentRequestEntry &recipient)
void RecentRequestsTableModel::sort(int column, Qt::SortOrder order)
{
qSort(list.begin(), list.end(), RecentRequestEntryLessThan(column, order));
emit dataChanged(index(0, 0, QModelIndex()), index(list.size() - 1, NUMBER_OF_COLUMNS - 1, QModelIndex()));
Q_EMIT dataChanged(index(0, 0, QModelIndex()), index(list.size() - 1, NUMBER_OF_COLUMNS - 1, QModelIndex()));
}
void RecentRequestsTableModel::updateDisplayUnit()

2
src/qt/recentrequeststablemodel.h

@ -89,7 +89,7 @@ public: @@ -89,7 +89,7 @@ public:
void addNewRequest(const std::string &recipient);
void addNewRequest(RecentRequestEntry &recipient);
public slots:
public Q_SLOTS:
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
void updateDisplayUnit();

20
src/qt/rpcconsole.cpp

@ -60,10 +60,10 @@ class RPCExecutor : public QObject @@ -60,10 +60,10 @@ class RPCExecutor : public QObject
{
Q_OBJECT
public slots:
public Q_SLOTS:
void request(const QString &command);
signals:
Q_SIGNALS:
void reply(int category, const QString &command);
};
@ -95,7 +95,7 @@ bool parseCommandLine(std::vector<std::string> &args, const std::string &strComm @@ -95,7 +95,7 @@ bool parseCommandLine(std::vector<std::string> &args, const std::string &strComm
STATE_ESCAPE_DOUBLEQUOTED
} state = STATE_EATING_SPACES;
std::string curarg;
foreach(char ch, strCommand)
Q_FOREACH(char ch, strCommand)
{
switch(state)
{
@ -158,7 +158,7 @@ void RPCExecutor::request(const QString &command) @@ -158,7 +158,7 @@ void RPCExecutor::request(const QString &command)
std::vector<std::string> args;
if(!parseCommandLine(args, command.toStdString()))
{
emit reply(RPCConsole::CMD_ERROR, QString("Parse error: unbalanced ' or \""));
Q_EMIT reply(RPCConsole::CMD_ERROR, QString("Parse error: unbalanced ' or \""));
return;
}
if(args.empty())
@ -180,7 +180,7 @@ void RPCExecutor::request(const QString &command) @@ -180,7 +180,7 @@ void RPCExecutor::request(const QString &command)
else
strPrint = result.write(2);
emit reply(RPCConsole::CMD_REPLY, QString::fromStdString(strPrint));
Q_EMIT reply(RPCConsole::CMD_REPLY, QString::fromStdString(strPrint));
}
catch (UniValue& objError)
{
@ -188,16 +188,16 @@ void RPCExecutor::request(const QString &command) @@ -188,16 +188,16 @@ void RPCExecutor::request(const QString &command)
{
int code = find_value(objError, "code").get_int();
std::string message = find_value(objError, "message").get_str();
emit reply(RPCConsole::CMD_ERROR, QString::fromStdString(message) + " (code " + QString::number(code) + ")");
Q_EMIT reply(RPCConsole::CMD_ERROR, QString::fromStdString(message) + " (code " + QString::number(code) + ")");
}
catch (const std::runtime_error&) // raised when converting to invalid type, i.e. missing code or message
{ // Show raw JSON object
emit reply(RPCConsole::CMD_ERROR, QString::fromStdString(objError.write()));
Q_EMIT reply(RPCConsole::CMD_ERROR, QString::fromStdString(objError.write()));
}
}
catch (const std::exception& e)
{
emit reply(RPCConsole::CMD_ERROR, QString("Error: ") + QString::fromStdString(e.what()));
Q_EMIT reply(RPCConsole::CMD_ERROR, QString("Error: ") + QString::fromStdString(e.what()));
}
}
@ -245,7 +245,7 @@ RPCConsole::RPCConsole(QWidget *parent) : @@ -245,7 +245,7 @@ RPCConsole::RPCConsole(QWidget *parent) :
RPCConsole::~RPCConsole()
{
GUIUtil::saveWindowGeometry("nRPCConsoleWindow", this);
emit stopExecutor();
Q_EMIT stopExecutor();
delete ui;
}
@ -431,7 +431,7 @@ void RPCConsole::on_lineEdit_returnPressed() @@ -431,7 +431,7 @@ void RPCConsole::on_lineEdit_returnPressed()
if(!cmd.isEmpty())
{
message(CMD_REQUEST, cmd);
emit cmdRequest(cmd);
Q_EMIT cmdRequest(cmd);
// Remove command, if already in history
history.removeOne(cmd);
// Append command to history

6
src/qt/rpcconsole.h

@ -46,7 +46,7 @@ protected: @@ -46,7 +46,7 @@ protected:
virtual bool eventFilter(QObject* obj, QEvent *event);
void keyPressEvent(QKeyEvent *);
private slots:
private Q_SLOTS:
void on_lineEdit_returnPressed();
void on_tabWidget_