mirror of
https://github.com/feather-wallet/feather.git
synced 2024-11-16 17:27:38 +00:00
Fix misc compiler warnings
This commit is contained in:
parent
f948a71e73
commit
b9995c44ec
42 changed files with 63 additions and 66 deletions
|
@ -45,8 +45,8 @@ private slots:
|
|||
private:
|
||||
QString getBuySellUrl(bool buy, const QString ¤cyCode, const QString &countryCode="", const QString &paymentMethod="", const QString &amount = "", int page = 0);
|
||||
|
||||
QString m_baseUrl;
|
||||
UtilsNetworking *m_network;
|
||||
QString m_baseUrl;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -145,7 +145,6 @@ void AppContext::onCreateTransaction(const QString &address, quint64 amount, con
|
|||
return;
|
||||
}
|
||||
|
||||
auto balance = this->currentWallet->balance();
|
||||
auto unlocked_balance = this->currentWallet->unlockedBalance();
|
||||
if(!all && amount > unlocked_balance) {
|
||||
emit createTransactionError("Not enough money to spend");
|
||||
|
@ -549,7 +548,7 @@ void AppContext::donateBeg() {
|
|||
config()->set(Config::donateBeg, donationCounter);
|
||||
}
|
||||
|
||||
AppContext::~AppContext() {}
|
||||
AppContext::~AppContext() = default;
|
||||
|
||||
// ############################################## LIBWALLET QT #########################################################
|
||||
|
||||
|
|
|
@ -56,9 +56,9 @@ private:
|
|||
Ui::CoinsWidget *ui;
|
||||
|
||||
QMenu *m_contextMenu;
|
||||
QMenu *m_headerMenu;
|
||||
QMenu *m_copyMenu;
|
||||
QAction *m_showSpentAction;
|
||||
QMenu *m_headerMenu;
|
||||
QAction *m_freezeOutputAction;
|
||||
QAction *m_freezeAllSelectedAction;
|
||||
QAction *m_thawOutputAction;
|
||||
|
|
|
@ -34,6 +34,8 @@ signals:
|
|||
private:
|
||||
void setStatus(const QString &msg, bool success = false);
|
||||
|
||||
Ui::UpdateDialog *ui;
|
||||
|
||||
QString m_version;
|
||||
QString m_downloadUrl;
|
||||
QString m_hash;
|
||||
|
@ -44,8 +46,6 @@ private:
|
|||
std::string m_updateZipArchive;
|
||||
|
||||
QNetworkReply *m_reply = nullptr;
|
||||
|
||||
Ui::UpdateDialog *ui;
|
||||
};
|
||||
|
||||
#endif //FEATHER_UPDATEDIALOG_H
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
WalletCacheDebugDialog::WalletCacheDebugDialog(AppContext *ctx, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, m_ctx(ctx)
|
||||
, ui(new Ui::WalletCacheDebugDialog)
|
||||
, m_ctx(ctx)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ public:
|
|||
~AboutDialog() override;
|
||||
|
||||
private:
|
||||
QStringListModel *m_model;
|
||||
Ui::AboutDialog *ui;
|
||||
QStringListModel *m_model;
|
||||
};
|
||||
|
||||
#endif // ABOUT_H
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
BroadcastTxDialog::BroadcastTxDialog(QWidget *parent, AppContext *ctx, const QString &transactionHex)
|
||||
: QDialog(parent)
|
||||
, m_ctx(ctx)
|
||||
, ui(new Ui::BroadcastTxDialog)
|
||||
, m_ctx(ctx)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ private slots:
|
|||
|
||||
private:
|
||||
Ui::BroadcastTxDialog *ui;
|
||||
UtilsNetworking *m_network;
|
||||
AppContext *m_ctx;
|
||||
UtilsNetworking *m_network;
|
||||
DaemonRpc *m_rpc;
|
||||
};
|
||||
|
||||
|
|
|
@ -25,10 +25,10 @@ private:
|
|||
void copyToClipboad();
|
||||
void updateInfo();
|
||||
|
||||
QTimer m_updateTimer;
|
||||
Ui::DebugInfoDialog *ui;
|
||||
AppContext *m_ctx;
|
||||
|
||||
Ui::DebugInfoDialog *ui;
|
||||
QTimer m_updateTimer;
|
||||
};
|
||||
|
||||
#endif //FEATHER_DEBUGINFODIALOG_H
|
||||
|
|
|
@ -32,8 +32,8 @@ signals:
|
|||
void rejected();
|
||||
|
||||
private:
|
||||
AppContext *m_ctx;
|
||||
Ui::RestoreDialog *ui;
|
||||
AppContext *m_ctx;
|
||||
};
|
||||
|
||||
#endif // RESTOREDIALOG_H
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
SignVerifyDialog::SignVerifyDialog(Wallet *wallet, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, m_wallet(wallet)
|
||||
, ui(new Ui::SignVerifyDialog)
|
||||
, m_wallet(wallet)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
|
@ -35,9 +35,9 @@ private:
|
|||
|
||||
Ui::TransactionInfoDialog *ui;
|
||||
|
||||
TxProofDialog *m_txProofDialog;
|
||||
TransactionInfo *m_txInfo;
|
||||
Wallet *m_wallet;
|
||||
TransactionInfo *m_txInfo;
|
||||
TxProofDialog *m_txProofDialog;
|
||||
QString m_txKey;
|
||||
QString m_txid;
|
||||
QTimer m_updateTimer;
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
TxImportDialog::TxImportDialog(QWidget *parent, AppContext *ctx)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::TxImportDialog)
|
||||
, m_ctx(ctx)
|
||||
, m_loadTimer(new QTimer(this))
|
||||
, ui(new Ui::TxImportDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->resp->hide();
|
||||
|
|
|
@ -27,8 +27,9 @@ private slots:
|
|||
|
||||
private:
|
||||
Ui::TxImportDialog *ui;
|
||||
UtilsNetworking *m_network;
|
||||
AppContext *m_ctx;
|
||||
|
||||
UtilsNetworking *m_network;
|
||||
DaemonRpc *m_rpc;
|
||||
QTimer *m_loadTimer;
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
VerifyProofDialog::VerifyProofDialog(Wallet *wallet, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, m_wallet(wallet)
|
||||
, ui(new Ui::VerifyProofDialog)
|
||||
, m_wallet(wallet)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
|
@ -31,11 +31,11 @@ private:
|
|||
void checkFormattedProof();
|
||||
void proofStatus(bool success, const QString &message);
|
||||
|
||||
QPixmap m_success;
|
||||
QPixmap m_failure;
|
||||
|
||||
Ui::VerifyProofDialog *ui;
|
||||
Wallet *m_wallet;
|
||||
|
||||
QPixmap m_success;
|
||||
QPixmap m_failure;
|
||||
};
|
||||
|
||||
#endif //FEATHER_VERIFYPROOFDIALOG_H
|
||||
|
|
|
@ -455,9 +455,9 @@ bool WalletManager::clearWalletCache(const QString &wallet_path) const
|
|||
|
||||
WalletManager::WalletManager(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_currentWallet(nullptr)
|
||||
, m_passphraseReceiver(nullptr)
|
||||
, m_scheduler(this)
|
||||
, m_currentWallet(nullptr)
|
||||
{
|
||||
m_pimpl = Monero::WalletManagerFactory::getWalletManager();
|
||||
}
|
||||
|
|
|
@ -94,7 +94,6 @@ if (AttachConsole(ATTACH_PARENT_PROCESS)) {
|
|||
}
|
||||
|
||||
const QStringList args = parser.positionalArguments();
|
||||
bool localTor = parser.isSet(useLocalTorOption);
|
||||
bool stagenet = parser.isSet(stagenetOption);
|
||||
bool testnet = parser.isSet(testnetOption);
|
||||
bool quiet = parser.isSet(quietModeOption);
|
||||
|
@ -167,6 +166,6 @@ if (AttachConsole(ATTACH_PARENT_PROCESS)) {
|
|||
qInstallMessageHandler(Utils::applicationLogHandler);
|
||||
qRegisterMetaType<QVector<QString>>();
|
||||
|
||||
auto *mainWindow = new MainWindow(ctx);
|
||||
new MainWindow(ctx);
|
||||
return QApplication::exec();
|
||||
}
|
||||
|
|
|
@ -636,8 +636,6 @@ void MainWindow::onBalanceUpdated(quint64 balance, quint64 spendable) {
|
|||
qDebug() << Q_FUNC_INFO;
|
||||
bool hide = config()->get(Config::hideBalance).toBool();
|
||||
|
||||
int amountPrecision = config()->get(Config::amountPrecision).toInt();
|
||||
|
||||
QString balance_str = WalletManager::displayAmount(spendable);
|
||||
balance_str.remove(QRegExp("0+$"));
|
||||
|
||||
|
|
|
@ -181,8 +181,6 @@ private:
|
|||
void startupWarning();
|
||||
bool autoOpenWallet();
|
||||
|
||||
AppContext *m_ctx;
|
||||
|
||||
static MainWindow * pMainWindow;
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void cleanupBeforeClose();
|
||||
|
@ -210,6 +208,8 @@ private:
|
|||
WalletWizard *createWizard(WalletWizard::Page startPage);
|
||||
|
||||
Ui::MainWindow *ui;
|
||||
AppContext *m_ctx;
|
||||
|
||||
Settings *m_windowSettings = nullptr;
|
||||
CalcWindow *m_windowCalc = nullptr;
|
||||
RestoreDialog *m_restoreDialog = nullptr;
|
||||
|
|
|
@ -32,9 +32,9 @@ public:
|
|||
|
||||
private:
|
||||
QList<FeatherNode> m_nodes;
|
||||
int m_nodeSource;
|
||||
QIcon m_offline;
|
||||
QIcon m_online;
|
||||
int m_nodeSource;
|
||||
};
|
||||
|
||||
#endif //FEATHER_NODEMODEL_H
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
#include "SubaddressProxyModel.h"
|
||||
|
||||
SubaddressProxyModel::SubaddressProxyModel(QObject *parent, Subaddress *subaddress, bool hidePrimary)
|
||||
: QSortFilterProxyModel(parent),
|
||||
m_searchRegExp(""),
|
||||
m_searchCaseSensitiveRegExp(""),
|
||||
m_subaddress(subaddress),
|
||||
m_hidePrimary(hidePrimary)
|
||||
: QSortFilterProxyModel(parent)
|
||||
, m_subaddress(subaddress)
|
||||
, m_searchRegExp("")
|
||||
, m_searchCaseSensitiveRegExp("")
|
||||
, m_hidePrimary(hidePrimary)
|
||||
{
|
||||
m_searchRegExp.setCaseSensitivity(Qt::CaseInsensitive);
|
||||
m_searchRegExp.setPatternSyntax(QRegExp::FixedString);
|
||||
|
|
|
@ -146,6 +146,7 @@ void ReceiveWidget::setSearchFilter(const QString &filter) {
|
|||
|
||||
void ReceiveWidget::showHeaderMenu(const QPoint& position)
|
||||
{
|
||||
Q_UNUSED(position);
|
||||
m_showFullAddressesAction->setChecked(m_model->isShowFullAddresses());
|
||||
m_headerMenu->exec(QCursor::pos());
|
||||
}
|
||||
|
|
|
@ -16,6 +16,8 @@ enum SeedType {
|
|||
struct FeatherSeed {
|
||||
// TODO: this is spaghetti, needs refactor
|
||||
|
||||
NetworkType::Type netType;
|
||||
|
||||
QString coin;
|
||||
QString language;
|
||||
SeedType seedType;
|
||||
|
@ -24,8 +26,6 @@ struct FeatherSeed {
|
|||
QString spendKey;
|
||||
QString correction;
|
||||
|
||||
NetworkType::Type netType;
|
||||
|
||||
time_t time;
|
||||
int restoreHeight = 0;
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ private:
|
|||
std::string m_word;
|
||||
strategy m_currentStrategy;
|
||||
|
||||
int iword = 0;
|
||||
int ichar = 0;
|
||||
size_t iword = 0;
|
||||
size_t ichar = 0;
|
||||
};
|
||||
|
||||
#endif //FEATHER_BRUTE_H
|
||||
|
|
|
@ -5,16 +5,14 @@
|
|||
|
||||
#include "nodes.h"
|
||||
#include "utils/utils.h"
|
||||
#include "utils/WebsocketClient.h"
|
||||
#include "appcontext.h"
|
||||
|
||||
|
||||
Nodes::Nodes(AppContext *ctx, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ctx(ctx)
|
||||
, m_connection(FeatherNode())
|
||||
, modelWebsocket(new NodeModel(NodeSource::websocket, this))
|
||||
, modelCustom(new NodeModel(NodeSource::custom, this))
|
||||
, m_ctx(ctx)
|
||||
, m_connection(FeatherNode())
|
||||
{
|
||||
this->loadConfig();
|
||||
connect(m_ctx, &AppContext::walletRefreshed, this, &Nodes::onWalletRefreshed);
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
#include "txfiathistory.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
TxFiatHistory::TxFiatHistory(int genesis_timestamp, const QString &configDirectory, QObject *parent) :
|
||||
QObject(parent),
|
||||
m_genesis_timestamp(genesis_timestamp),
|
||||
m_configDirectory(configDirectory) {
|
||||
TxFiatHistory::TxFiatHistory(int genesis_timestamp, const QString &configDirectory, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_genesis_timestamp(genesis_timestamp)
|
||||
, m_configDirectory(configDirectory)
|
||||
{
|
||||
m_databasePath = QString("%1/fiatHistory.db").arg(configDirectory);
|
||||
this->loadDatabase();
|
||||
}
|
||||
|
@ -70,7 +71,7 @@ void TxFiatHistory::onUpdateDatabase() {
|
|||
}
|
||||
|
||||
// keep local fiatTxHistory database up to date, loop for missing dates
|
||||
for(year; year != yearCurrent + 1; year += 1){
|
||||
for(; year != yearCurrent + 1; year += 1){
|
||||
for(int month = 1; month != 13; month++) {
|
||||
if(year == yearCurrent && month == now.month() && now.day() == 1) break;
|
||||
QDateTime _now;
|
||||
|
|
|
@ -23,11 +23,11 @@ signals:
|
|||
private:
|
||||
void loadDatabase();
|
||||
void writeDatabase();
|
||||
int m_genesis_timestamp;
|
||||
QString m_databasePath;
|
||||
QString m_configDirectory;
|
||||
bool m_initialized = false;
|
||||
QMap<QString, double> m_database;
|
||||
int m_genesis_timestamp;
|
||||
};
|
||||
|
||||
#endif //FEATHER_TXFIATHISTORY_H
|
||||
|
|
|
@ -142,7 +142,7 @@ void Utils::desktopNotify(const QString &title, const QString &message, int dura
|
|||
QString stderr = process.readAllStandardError();
|
||||
#elif defined(Q_OS_MACOS)
|
||||
QProcess process;
|
||||
// @TODO: need to escape special chars with \
|
||||
// @TODO: need to escape special chars with "\"
|
||||
process.start("osascript", macos);
|
||||
process.waitForFinished(-1);
|
||||
QString stdout = process.readAllStandardOutput();
|
||||
|
|
|
@ -6,10 +6,9 @@
|
|||
#include <QApplication>
|
||||
|
||||
CCSProgressDelegate::CCSProgressDelegate(CCSModel *model, QWidget *parent)
|
||||
: m_model(model)
|
||||
, QStyledItemDelegate(parent)
|
||||
: QStyledItemDelegate(parent)
|
||||
, m_model(model)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CCSProgressDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
||||
|
|
|
@ -29,10 +29,10 @@ public slots:
|
|||
|
||||
private:
|
||||
Ui::TickerWidget *ui;
|
||||
AppContext *m_ctx;
|
||||
QString m_symbol;
|
||||
bool m_convertBalance;
|
||||
bool m_hidePercent;
|
||||
AppContext *m_ctx;
|
||||
};
|
||||
|
||||
#endif // TICKERWIDGET_H
|
||||
|
|
|
@ -50,11 +50,11 @@ signals:
|
|||
private:
|
||||
void showContextMenu(const QPoint &pos);
|
||||
|
||||
AppContext *m_ctx;
|
||||
Ui::XMRigWidget *ui;
|
||||
AppContext *m_ctx;
|
||||
XmRig * m_XMRig;
|
||||
QStandardItemModel *m_model;
|
||||
QMenu *m_contextMenu;
|
||||
XmRig * m_XMRig;
|
||||
|
||||
int m_threads;
|
||||
QStringList m_urls;
|
||||
|
|
|
@ -28,8 +28,8 @@ public:
|
|||
bool isComplete() const override;
|
||||
|
||||
private:
|
||||
AppContext *m_ctx;
|
||||
Ui::PageHardwareDevice *ui;
|
||||
AppContext *m_ctx;
|
||||
WizardFields *m_fields;
|
||||
};
|
||||
|
||||
|
|
|
@ -28,9 +28,9 @@ signals:
|
|||
void enableDarkMode(bool enable);
|
||||
|
||||
private:
|
||||
Ui::PageMenu *ui;
|
||||
AppContext *m_ctx;
|
||||
WalletKeysFilesModel *m_walletKeysFilesModel;
|
||||
Ui::PageMenu *ui;
|
||||
WizardFields *m_fields;
|
||||
};
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ public:
|
|||
bool isComplete() const override;
|
||||
|
||||
private:
|
||||
AppContext *m_ctx;
|
||||
Ui::PageNetwork *ui;
|
||||
AppContext *m_ctx;
|
||||
};
|
||||
|
||||
#endif //FEATHER_WIZARDNETWORK_H
|
||||
|
|
|
@ -26,8 +26,8 @@ signals:
|
|||
void initialNetworkConfigured();
|
||||
|
||||
private:
|
||||
AppContext *m_ctx;
|
||||
Ui::PageNetworkTor *ui;
|
||||
AppContext *m_ctx;
|
||||
};
|
||||
|
||||
#endif //FEATHER_PAGENETWORKTOR_H
|
||||
|
|
|
@ -31,10 +31,10 @@ signals:
|
|||
private:
|
||||
void updatePath();
|
||||
|
||||
Ui::PageOpenWallet *ui;
|
||||
AppContext *m_ctx;
|
||||
WalletKeysFilesModel *m_walletKeysFilesModel;
|
||||
WalletKeysFilesProxyModel *m_keysProxy;
|
||||
Ui::PageOpenWallet *ui;
|
||||
QStandardItemModel *m_model;
|
||||
};
|
||||
|
||||
|
|
|
@ -29,9 +29,10 @@ signals:
|
|||
void createWallet();
|
||||
|
||||
private:
|
||||
Ui::PageSetPassword *ui;
|
||||
|
||||
AppContext *m_ctx;
|
||||
WizardFields *m_fields;
|
||||
Ui::PageSetPassword *ui;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -33,9 +33,9 @@ private:
|
|||
void showScanWarning(const QDateTime &date);
|
||||
void showWalletAgeWarning(const QDateTime &date);
|
||||
|
||||
Ui::PageSetRestoreHeight *ui;
|
||||
AppContext *m_ctx;
|
||||
WizardFields *m_fields;
|
||||
Ui::PageSetRestoreHeight *ui;
|
||||
};
|
||||
|
||||
#endif //FEATHER_PAGESETRESTOREHEIGHT_H
|
||||
|
|
|
@ -34,8 +34,8 @@ private:
|
|||
bool walletPathExists(const QString &walletName);
|
||||
bool validateWidgets();
|
||||
|
||||
AppContext *m_ctx;
|
||||
Ui::PageWalletFile *ui;
|
||||
AppContext *m_ctx;
|
||||
WizardFields *m_fields;
|
||||
bool m_validated;
|
||||
};
|
||||
|
|
|
@ -27,9 +27,9 @@ public:
|
|||
int nextId() const override;
|
||||
|
||||
private:
|
||||
Ui::PageWalletRestoreKeys *ui;
|
||||
AppContext *m_ctx;
|
||||
WizardFields *m_fields;
|
||||
Ui::PageWalletRestoreKeys *ui;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -50,8 +50,8 @@ private:
|
|||
|
||||
void onSeedTypeToggled();
|
||||
|
||||
AppContext *m_ctx;
|
||||
Ui::PageWalletRestoreSeed *ui;
|
||||
AppContext *m_ctx;
|
||||
WizardFields *m_fields;
|
||||
|
||||
seedType m_tevador;
|
||||
|
|
Loading…
Reference in a new issue