Skip to content

Commit

Permalink
Merge bitcoin#8793: Do not shadow in src/qt
Browse files Browse the repository at this point in the history
f839350 Do not shadow in src/qt (Pavel Janík)
  • Loading branch information
laanwj authored and codablock committed Jan 11, 2018
1 parent 17e110f commit c7a0b91
Show file tree
Hide file tree
Showing 33 changed files with 213 additions and 212 deletions.
16 changes: 8 additions & 8 deletions src/qt/addressbookpage.cpp
Expand Up @@ -22,12 +22,12 @@
#include <QMessageBox>
#include <QSortFilterProxyModel>

AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode mode, Tabs tab, QWidget *parent) :
AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode _mode, Tabs _tab, QWidget *parent) :
QDialog(parent),
ui(new Ui::AddressBookPage),
model(0),
mode(mode),
tab(tab)
mode(_mode),
tab(_tab)
{
QString theme = GUIUtil::getThemeName();
ui->setupUi(this);
Expand Down Expand Up @@ -108,14 +108,14 @@ AddressBookPage::~AddressBookPage()
delete ui;
}

void AddressBookPage::setModel(AddressTableModel *model)
void AddressBookPage::setModel(AddressTableModel *_model)
{
this->model = model;
if(!model)
this->model = _model;
if(!_model)
return;

proxyModel = new QSortFilterProxyModel(this);
proxyModel->setSourceModel(model);
proxyModel->setSourceModel(_model);
proxyModel->setDynamicSortFilter(true);
proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
Expand Down Expand Up @@ -148,7 +148,7 @@ void AddressBookPage::setModel(AddressTableModel *model)
this, SLOT(selectionChanged()));

// Select row for newly created address
connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(selectNewAddress(QModelIndex,int,int)));
connect(_model, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(selectNewAddress(QModelIndex,int,int)));

selectionChanged();
}
Expand Down
12 changes: 6 additions & 6 deletions src/qt/addresstablemodel.cpp
Expand Up @@ -32,8 +32,8 @@ struct AddressTableEntry
QString address;

AddressTableEntry() {}
AddressTableEntry(Type type, const QString &label, const QString &address):
type(type), label(label), address(address) {}
AddressTableEntry(Type _type, const QString &_label, const QString &_address):
type(_type), label(_label), address(_address) {}
};

struct AddressTableEntryLessThan
Expand Down Expand Up @@ -74,8 +74,8 @@ class AddressTablePriv
QList<AddressTableEntry> cachedAddressTable;
AddressTableModel *parent;

AddressTablePriv(CWallet *wallet, AddressTableModel *parent):
wallet(wallet), parent(parent) {}
AddressTablePriv(CWallet *_wallet, AddressTableModel *_parent):
wallet(_wallet), parent(_parent) {}

void refreshAddressTable()
{
Expand Down Expand Up @@ -165,8 +165,8 @@ class AddressTablePriv
}
};

AddressTableModel::AddressTableModel(CWallet *wallet, WalletModel *parent) :
QAbstractTableModel(parent),walletModel(parent),wallet(wallet),priv(0)
AddressTableModel::AddressTableModel(CWallet *_wallet, WalletModel *parent) :
QAbstractTableModel(parent),walletModel(parent),wallet(_wallet),priv(0)
{
columns << tr("Label") << tr("Address");
priv = new AddressTablePriv(wallet, this);
Expand Down
8 changes: 4 additions & 4 deletions src/qt/askpassphrasedialog.cpp
Expand Up @@ -19,10 +19,10 @@
#include <QMessageBox>
#include <QPushButton>

AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
AskPassphraseDialog::AskPassphraseDialog(Mode _mode, QWidget *parent) :
QDialog(parent),
ui(new Ui::AskPassphraseDialog),
mode(mode),
mode(_mode),
model(0),
fCapsLock(false)
{
Expand Down Expand Up @@ -85,9 +85,9 @@ AskPassphraseDialog::~AskPassphraseDialog()
delete ui;
}

void AskPassphraseDialog::setModel(WalletModel *model)
void AskPassphraseDialog::setModel(WalletModel *_model)
{
this->model = model;
this->model = _model;
}

void AskPassphraseDialog::accept()
Expand Down
49 changes: 25 additions & 24 deletions src/qt/bitcoingui.cpp
Expand Up @@ -79,7 +79,7 @@ const std::string BitcoinGUI::DEFAULT_UIPLATFORM =

const QString BitcoinGUI::DEFAULT_WALLET = "~Default";

BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent) :
BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *networkStyle, QWidget *parent) :
QMainWindow(parent),
enableWallet(false),
clientModel(0),
Expand Down Expand Up @@ -125,7 +125,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n
modalOverlay(0),
prevBlocks(0),
spinnerFrame(0),
platformStyle(platformStyle)
platformStyle(_platformStyle)
{
/* Open CSS when configured */
this->setStyleSheet(GUIUtil::loadStyleSheet());
Expand Down Expand Up @@ -159,13 +159,13 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n
setUnifiedTitleAndToolBarOnMac(true);
#endif

rpcConsole = new RPCConsole(platformStyle, 0);
rpcConsole = new RPCConsole(_platformStyle, 0);
helpMessageDialog = new HelpMessageDialog(this, HelpMessageDialog::cmdline);
#ifdef ENABLE_WALLET
if(enableWallet)
{
/** Create wallet frame*/
walletFrame = new WalletFrame(platformStyle, this);
walletFrame = new WalletFrame(_platformStyle, this);
} else
#endif // ENABLE_WALLET
{
Expand Down Expand Up @@ -585,10 +585,10 @@ void BitcoinGUI::createToolBars()
#endif // ENABLE_WALLET
}

void BitcoinGUI::setClientModel(ClientModel *clientModel)
void BitcoinGUI::setClientModel(ClientModel *_clientModel)
{
this->clientModel = clientModel;
if(clientModel)
this->clientModel = _clientModel;
if(_clientModel)
{
// Create system tray menu (or setup the dock menu) that late to prevent users from calling actions,
// while the client has not yet fully loaded
Expand Down Expand Up @@ -616,31 +616,32 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)

// Keep up to date with client
updateNetworkState();
connect(clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
connect(clientModel, SIGNAL(networkActiveChanged(bool)), this, SLOT(setNetworkActive(bool)));
setNumConnections(_clientModel->getNumConnections());
connect(_clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
connect(_clientModel, SIGNAL(networkActiveChanged(bool)), this, SLOT(setNetworkActive(bool)));

modalOverlay->setKnownBestHeight(clientModel->getHeaderTipHeight(), QDateTime::fromTime_t(clientModel->getHeaderTipTime()));
setNumBlocks(clientModel->getNumBlocks(), clientModel->getLastBlockDate(), clientModel->getVerificationProgress(NULL), false);
connect(clientModel, SIGNAL(numBlocksChanged(int,QDateTime,double,bool)), this, SLOT(setNumBlocks(int,QDateTime,double,bool)));
modalOverlay->setKnownBestHeight(_clientModel->getHeaderTipHeight(), QDateTime::fromTime_t(_clientModel->getHeaderTipTime()));
setNumBlocks(_clientModel->getNumBlocks(), _clientModel->getLastBlockDate(), _clientModel->getVerificationProgress(NULL), false);
connect(_clientModel, SIGNAL(numBlocksChanged(int,QDateTime,double,bool)), this, SLOT(setNumBlocks(int,QDateTime,double,bool)));

connect(clientModel, SIGNAL(additionalDataSyncProgressChanged(double)), this, SLOT(setAdditionalDataSyncProgress(double)));
connect(_clientModel, SIGNAL(additionalDataSyncProgressChanged(double)), this, SLOT(setAdditionalDataSyncProgress(double)));

// Receive and report messages from client model
connect(clientModel, SIGNAL(message(QString,QString,unsigned int)), this, SLOT(message(QString,QString,unsigned int)));
connect(_clientModel, SIGNAL(message(QString,QString,unsigned int)), this, SLOT(message(QString,QString,unsigned int)));

// Show progress dialog
connect(clientModel, SIGNAL(showProgress(QString,int)), this, SLOT(showProgress(QString,int)));
connect(_clientModel, SIGNAL(showProgress(QString,int)), this, SLOT(showProgress(QString,int)));

rpcConsole->setClientModel(clientModel);
rpcConsole->setClientModel(_clientModel);
#ifdef ENABLE_WALLET
if(walletFrame)
{
walletFrame->setClientModel(clientModel);
walletFrame->setClientModel(_clientModel);
}
#endif // ENABLE_WALLET
unitDisplayControl->setOptionsModel(clientModel->getOptionsModel());
unitDisplayControl->setOptionsModel(_clientModel->getOptionsModel());

OptionsModel* optionsModel = clientModel->getOptionsModel();
OptionsModel* optionsModel = _clientModel->getOptionsModel();
if(optionsModel)
{
// be aware of the tray icon disable state change reported by the OptionsModel object.
Expand Down Expand Up @@ -1507,17 +1508,17 @@ void UnitDisplayStatusBarControl::createContextMenu()
}

/** Lets the control know about the Options Model (and its signals) */
void UnitDisplayStatusBarControl::setOptionsModel(OptionsModel *optionsModel)
void UnitDisplayStatusBarControl::setOptionsModel(OptionsModel *_optionsModel)
{
if (optionsModel)
if (_optionsModel)
{
this->optionsModel = optionsModel;
this->optionsModel = _optionsModel;

// be aware of a display unit change reported by the OptionsModel object.
connect(optionsModel,SIGNAL(displayUnitChanged(int)),this,SLOT(updateDisplayUnit(int)));
connect(_optionsModel,SIGNAL(displayUnitChanged(int)),this,SLOT(updateDisplayUnit(int)));

// initialize the display units label with the current value in the model.
updateDisplayUnit(optionsModel->getDisplayUnit());
updateDisplayUnit(_optionsModel->getDisplayUnit());
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/qt/clientmodel.cpp
Expand Up @@ -34,9 +34,9 @@ static const int64_t nClientStartupTime = GetTime();
static int64_t nLastHeaderTipUpdateNotification = 0;
static int64_t nLastBlockTipUpdateNotification = 0;

ClientModel::ClientModel(OptionsModel *optionsModel, QObject *parent) :
ClientModel::ClientModel(OptionsModel *_optionsModel, QObject *parent) :
QObject(parent),
optionsModel(optionsModel),
optionsModel(_optionsModel),
peerTableModel(0),
cachedMasternodeCountString(""),
banTableModel(0),
Expand Down
12 changes: 6 additions & 6 deletions src/qt/coincontroldialog.cpp
Expand Up @@ -39,11 +39,11 @@ QList<CAmount> CoinControlDialog::payAmounts;
CCoinControl* CoinControlDialog::coinControl = new CCoinControl();
bool CoinControlDialog::fSubtractFeeFromAmount = false;

CoinControlDialog::CoinControlDialog(const PlatformStyle *platformStyle, QWidget *parent) :
CoinControlDialog::CoinControlDialog(const PlatformStyle *_platformStyle, QWidget *parent) :
QDialog(parent),
ui(new Ui::CoinControlDialog),
model(0),
platformStyle(platformStyle)
platformStyle(_platformStyle)
{
ui->setupUi(this);

Expand Down Expand Up @@ -163,15 +163,15 @@ CoinControlDialog::~CoinControlDialog()
delete ui;
}

void CoinControlDialog::setModel(WalletModel *model)
void CoinControlDialog::setModel(WalletModel *_model)
{
this->model = model;
this->model = _model;

if(model && model->getOptionsModel() && model->getAddressTableModel())
if(_model && _model->getOptionsModel() && _model->getAddressTableModel())
{
updateView();
updateLabelLocked();
CoinControlDialog::updateLabels(model, this);
CoinControlDialog::updateLabels(_model, this);
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/qt/csvmodelwriter.cpp
Expand Up @@ -8,15 +8,15 @@
#include <QFile>
#include <QTextStream>

CSVModelWriter::CSVModelWriter(const QString &filename, QObject *parent) :
CSVModelWriter::CSVModelWriter(const QString &_filename, QObject *parent) :
QObject(parent),
filename(filename), model(0)
filename(_filename), model(0)
{
}

void CSVModelWriter::setModel(const QAbstractItemModel *model)
void CSVModelWriter::setModel(const QAbstractItemModel *_model)
{
this->model = model;
this->model = _model;
}

void CSVModelWriter::addColumn(const QString &title, int column, int role)
Expand Down
18 changes: 9 additions & 9 deletions src/qt/editaddressdialog.cpp
Expand Up @@ -12,11 +12,11 @@
#include <QDataWidgetMapper>
#include <QMessageBox>

EditAddressDialog::EditAddressDialog(Mode mode, QWidget *parent) :
EditAddressDialog::EditAddressDialog(Mode _mode, QWidget *parent) :
QDialog(parent),
ui(new Ui::EditAddressDialog),
mapper(0),
mode(mode),
mode(_mode),
model(0)
{
ui->setupUi(this);
Expand Down Expand Up @@ -50,13 +50,13 @@ EditAddressDialog::~EditAddressDialog()
delete ui;
}

void EditAddressDialog::setModel(AddressTableModel *model)
void EditAddressDialog::setModel(AddressTableModel *_model)
{
this->model = model;
if(!model)
this->model = _model;
if(!_model)
return;

mapper->setModel(model);
mapper->setModel(_model);
mapper->addMapping(ui->labelEdit, AddressTableModel::Label);
mapper->addMapping(ui->addressEdit, AddressTableModel::Address);
}
Expand Down Expand Up @@ -138,8 +138,8 @@ QString EditAddressDialog::getAddress() const
return address;
}

void EditAddressDialog::setAddress(const QString &address)
void EditAddressDialog::setAddress(const QString &_address)
{
this->address = address;
ui->addressEdit->setText(address);
this->address = _address;
ui->addressEdit->setText(_address);
}
4 changes: 2 additions & 2 deletions src/qt/guiutil.cpp
Expand Up @@ -501,9 +501,9 @@ void SubstituteFonts(const QString& language)
#endif
}

ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) :
ToolTipToRichTextFilter::ToolTipToRichTextFilter(int _size_threshold, QObject *parent) :
QObject(parent),
size_threshold(size_threshold)
size_threshold(_size_threshold)
{

}
Expand Down
4 changes: 2 additions & 2 deletions src/qt/intro.cpp
Expand Up @@ -64,9 +64,9 @@ public Q_SLOTS:

#include "intro.moc"

FreespaceChecker::FreespaceChecker(Intro *intro)
FreespaceChecker::FreespaceChecker(Intro *_intro)
{
this->intro = intro;
this->intro = _intro;
}

void FreespaceChecker::check()
Expand Down
6 changes: 3 additions & 3 deletions src/qt/networkstyle.cpp
Expand Up @@ -62,9 +62,9 @@ void NetworkStyle::rotateColors(QImage& img, const int iconColorHueShift, const
}

// titleAddText needs to be const char* for tr()
NetworkStyle::NetworkStyle(const QString &appName, const int iconColorHueShift, const int iconColorSaturationReduction, const char *titleAddText):
appName(appName),
titleAddText(qApp->translate("SplashScreen", titleAddText))
NetworkStyle::NetworkStyle(const QString &_appName, const int iconColorHueShift, const int iconColorSaturationReduction, const char *_titleAddText):
appName(_appName),
titleAddText(qApp->translate("SplashScreen", _titleAddText))
{
// Allow for separate UI settings for testnets
QApplication::setApplicationName(appName);
Expand Down
12 changes: 6 additions & 6 deletions src/qt/notificator.cpp
Expand Up @@ -33,17 +33,17 @@
const int FREEDESKTOP_NOTIFICATION_ICON_SIZE = 128;
#endif

Notificator::Notificator(const QString &programName, QSystemTrayIcon *trayicon, QWidget *parent) :
QObject(parent),
parent(parent),
programName(programName),
Notificator::Notificator(const QString &_programName, QSystemTrayIcon *_trayIcon, QWidget *_parent) :
QObject(_parent),
parent(_parent),
programName(_programName),
mode(None),
trayIcon(trayicon)
trayIcon(_trayIcon)
#ifdef USE_DBUS
,interface(0)
#endif
{
if(trayicon && trayicon->supportsMessages())
if(_trayIcon && _trayIcon->supportsMessages())
{
mode = QSystemTray;
}
Expand Down

0 comments on commit c7a0b91

Please sign in to comment.