Fix misc compiler warnings

This commit is contained in:
tobtoht
2021-05-10 15:20:33 +02:00
parent f948a71e73
commit b9995c44ec
42 changed files with 63 additions and 66 deletions
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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
+2 -4
View File
@@ -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);
+6 -5
View File
@@ -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;
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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();