mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge #12928: qt: Initialize non-static class members that were previously neither initialized where defined nor in constructor
3fdc5feMake sure initialization occurs in the constructor (practicalswift)1e7813eRemove redundant initializations from the constructor (practicalswift)f131872Initialize non-static class members where they are defined (practicalswift)73bc1b7Initialize editStatus and autoCompleter. Previously not initialized where defined or in constructor. (practicalswift) Pull request description: Initialize variables previously neither defined where defined nor in constructor: * `editStatus` * `autoCompleter` Also; initialize non-static class members where they are defined in accordance with developer notes. Tree-SHA512: 84f0cb87ec8394ed7641bfa0731be2ec72e6a920e00ae206ff89e2e7c960358f603c52878311b24601a33aa7cba6ea4f9a78a8ade88112dea0f41efb08e84e25
This commit is contained in:
@@ -159,7 +159,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
AddressTableModel::AddressTableModel(WalletModel *parent) :
|
AddressTableModel::AddressTableModel(WalletModel *parent) :
|
||||||
QAbstractTableModel(parent),walletModel(parent),priv(0)
|
QAbstractTableModel(parent), walletModel(parent)
|
||||||
{
|
{
|
||||||
columns << tr("Label") << tr("Address");
|
columns << tr("Label") << tr("Address");
|
||||||
priv = new AddressTablePriv(this);
|
priv = new AddressTablePriv(this);
|
||||||
|
|||||||
@@ -83,10 +83,10 @@ public:
|
|||||||
OutputType GetDefaultAddressType() const;
|
OutputType GetDefaultAddressType() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WalletModel *walletModel;
|
WalletModel* const walletModel;
|
||||||
AddressTablePriv *priv;
|
AddressTablePriv *priv = nullptr;
|
||||||
QStringList columns;
|
QStringList columns;
|
||||||
EditStatus editStatus;
|
EditStatus editStatus = OK;
|
||||||
|
|
||||||
/** Look up address book data given an address string. */
|
/** Look up address book data given an address string. */
|
||||||
bool getAddressData(const QString &address, std::string* name, std::string* purpose) const;
|
bool getAddressData(const QString &address, std::string* name, std::string* purpose) const;
|
||||||
|
|||||||
@@ -455,12 +455,7 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
|
|||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
m_node(node),
|
m_node(node),
|
||||||
ui(new Ui::RPCConsole),
|
ui(new Ui::RPCConsole),
|
||||||
clientModel(0),
|
platformStyle(_platformStyle)
|
||||||
historyPtr(0),
|
|
||||||
platformStyle(_platformStyle),
|
|
||||||
peersTableContextMenu(0),
|
|
||||||
banTableContextMenu(0),
|
|
||||||
consoleFontSize(0)
|
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|||||||
@@ -145,18 +145,18 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
interfaces::Node& m_node;
|
interfaces::Node& m_node;
|
||||||
Ui::RPCConsole *ui;
|
Ui::RPCConsole* const ui;
|
||||||
ClientModel *clientModel;
|
ClientModel *clientModel = nullptr;
|
||||||
QStringList history;
|
QStringList history;
|
||||||
int historyPtr;
|
int historyPtr = 0;
|
||||||
QString cmdBeforeBrowsing;
|
QString cmdBeforeBrowsing;
|
||||||
QList<NodeId> cachedNodeids;
|
QList<NodeId> cachedNodeids;
|
||||||
const PlatformStyle *platformStyle;
|
const PlatformStyle* const platformStyle;
|
||||||
RPCTimerInterface *rpcTimerInterface;
|
RPCTimerInterface *rpcTimerInterface = nullptr;
|
||||||
QMenu *peersTableContextMenu;
|
QMenu *peersTableContextMenu = nullptr;
|
||||||
QMenu *banTableContextMenu;
|
QMenu *banTableContextMenu = nullptr;
|
||||||
int consoleFontSize;
|
int consoleFontSize = 0;
|
||||||
QCompleter *autoCompleter;
|
QCompleter *autoCompleter = nullptr;
|
||||||
QThread thread;
|
QThread thread;
|
||||||
QString m_last_wallet_id;
|
QString m_last_wallet_id;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user