From e80218413e7fe71f59b302c76f5a20d17db86474 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Michal=20Mal=C3=BD?= <madcatxster@prifuk.cz>
Date: Fri, 26 Jul 2013 10:41:25 +0200
Subject: [PATCH] Add version ID and generate version string.

---
 globals.h | 5 +++++
 main.cpp  | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/globals.h b/globals.h
index 2ee051a..0f7483d 100644
--- 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 };
 
diff --git a/main.cpp b/main.cpp
index afc9b84..8dd2256 100644
--- 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);
 
-- 
2.43.5