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(); void updateData();
private: private:
QFile* chargeFile; QFile* chargeFile = nullptr;
QFile* chargerConnectedFile; QFile* chargerConnectedFile = nullptr;
QFile* stateFile; QFile* stateFile = nullptr;
QFile* chargingEnabledFile; QFile* chargingEnabledFile = nullptr;
Settings* settings; Settings* settings = nullptr;
// Default values: // Default values:
int charge = 100; // 100% full int charge = 100; // 100% full

View file

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

View file

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