Fix more startup crashes

This commit is contained in:
Matti Viljanen 2020-04-26 18:20:54 +03:00
parent 30653a1c11
commit 71f8f93223
No known key found for this signature in database
GPG key ID: CF32A1495158F888
3 changed files with 11 additions and 11 deletions

View file

@ -50,11 +50,11 @@ public slots:
void updateData();
private:
QFile* chargeFile;
QFile* chargerConnectedFile;
QFile* stateFile;
QFile* chargingEnabledFile;
Settings* settings;
QFile* chargeFile = nullptr;
QFile* chargerConnectedFile = nullptr;
QFile* stateFile = nullptr;
QFile* chargingEnabledFile = nullptr;
Settings* settings = nullptr;
// Default values:
int charge = 100; // 100% full

View file

@ -67,7 +67,7 @@ public:
void setNotificationHighText(QString newText);
private:
QSettings *mySettings;
QSettings *mySettings = nullptr;
// Default values
int lowAlert = 25;

View file

@ -53,11 +53,11 @@ public slots:
void shutdown();
private:
QFile* chargeFile;
QFile* chargerConnectedFile;
QFile* stateFile;
QFile* chargingEnabledFile = Q_NULLPTR;
Settings* settings;
QFile *chargeFile = nullptr;
QFile *chargerConnectedFile = nullptr;
QFile *stateFile = nullptr;
QFile *chargingEnabledFile = nullptr;
Settings *settings = nullptr;
QTimer *updateTimer = nullptr;
QTimer *notifyTimer = nullptr;
Notification *notification = nullptr;