]> Devoid-pointer.net GitWeb - FFBChecker.git/commitdiff
Add version ID and generate version string.
authorMichal Malý <madcatxster@prifuk.cz>
Fri, 26 Jul 2013 08:41:25 +0000 (10:41 +0200)
committerMichal Malý <madcatxster@prifuk.cz>
Fri, 26 Jul 2013 08:41:25 +0000 (10:41 +0200)
globals.h
main.cpp

index 2ee051afa166617fb4905b102f0e377722c09d9f..0f7483dc0151384c3d5c8609e60921f482038c95 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -1,6 +1,11 @@
 #ifndef GLOBALS_H
 #define GLOBALS_H
 
+#define APP_NAME "FFBChecker"
+static const int APP_VERSION_MAJOR(0);
+static const int APP_VERSION_MINOR(1);
+static const char APP_VERSION_REL('a');
+
 enum class FFBEffectTypes { NONE, CONSTANT, PERIODIC, RAMP, SPRING, FRICTION, DAMPER, RUMBLE, INERTIA };
 enum class PeriodicWaveforms { NONE, SQUARE, TRIANGLE, SINE, SAW_UP, SAW_DOWN };
 
index afc9b84fa4b92d85b86857a40c9e6c2393ef9422..8dd2256eef6af356c1dd649e466fa0de9d649db8 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -1,10 +1,14 @@
 #include "deviceprober.h"
 #include "mainwindow.h"
 #include <QtWidgets/QApplication>
+#include <QDebug>
 
 int main(int argc, char** argv)
 {
   QApplication myApp(argc, argv);
+  const QString VERSION_STRING = QString(APP_NAME) + " " + QString::number(APP_VERSION_MAJOR) + "." + QString::number(APP_VERSION_MINOR) +
+                                 QString(APP_VERSION_REL);
+  qDebug() << VERSION_STRING;
   std::shared_ptr<DeviceProber> prober(new DeviceProber);
   MainWindow* mWin = new MainWindow(prober);