C++98 compatibility: Variable initialization in SqlEngine class.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 2 Oct 2017 20:21:35 +0000 (22:21 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 2 Oct 2017 21:03:50 +0000 (23:03 +0200)
src/sql/sqlengine.cpp
src/sql/sqlengine.h

index 5a5c09b..c156476 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <QDebug>
 
-SqlEngine::SqlEngine(QObject *aParent): QObject(aParent) {
+SqlEngine::SqlEngine(QObject *aParent): QObject(aParent), DATE_FORMAT("yyyy-MM-dd"), TIME_FORMAT("hh:mm") {
 #if QT_VERSION >= 0x050000
     QDir dbPath(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
 #else
index 137c070..71c7777 100644 (file)
@@ -28,8 +28,8 @@
 class SqlEngine : public QObject {
     Q_OBJECT
     public:
-        const QString DATE_FORMAT = "yyyy-MM-dd";
-        const QString TIME_FORMAT = "hh:mm";
+        const QString DATE_FORMAT; // "yyyy-MM-dd"
+        const QString TIME_FORMAT; // "hh:mm"
 
         QString dbFilename; ///< database filename including path
         QSqlDatabase db; ///< this may be private one day...