diff --git a/application/src/battery.h b/application/src/battery.h index fc2cb5f..f9a759c 100644 --- a/application/src/battery.h +++ b/application/src/battery.h @@ -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 diff --git a/application/src/settings.h b/application/src/settings.h index 0299050..73f065b 100644 --- a/application/src/settings.h +++ b/application/src/settings.h @@ -67,7 +67,7 @@ public: void setNotificationHighText(QString newText); private: - QSettings *mySettings; + QSettings *mySettings = nullptr; // Default values int lowAlert = 25; diff --git a/service/src/battery.h b/service/src/battery.h index 65b183f..d3aef4a 100644 --- a/service/src/battery.h +++ b/service/src/battery.h @@ -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;