Add more versions to --version #5592
authorChristian Kamm <mail@ckamm.de>
Fri, 10 Mar 2017 14:32:25 +0000 (15:32 +0100)
committerckamm <mail@ckamm.de>
Tue, 14 Mar 2017 15:13:52 +0000 (16:13 +0100)
* Add git revision, if available
* Add SSL runtime version
* Add compile-time Qt version

src/gui/application.cpp

index d8c8b6fd4d34c8c07e3d56908e6736b20cb03f19..843f8bd0c8ebe477a72e0ccfe7e2276a5dcf0419 100644 (file)
@@ -37,6 +37,7 @@
 #include "updater/ocupdater.h"
 #include "excludedfiles.h"
 #include "owncloudsetupwizard.h"
+#include "version.h"
 
 #include "config.h"
 
@@ -52,6 +53,8 @@
 #include <QMenu>
 #include <QMessageBox>
 
+#include <openssl/crypto.h>
+
 class QSocket;
 
 namespace OCC {
@@ -508,7 +511,13 @@ void Application::showVersion()
     stream << _theme->appName().toLatin1().constData()
            << QLatin1String(" version ")
            << _theme->version().toLatin1().constData() << endl;
-    stream << "Using Qt " << qVersion() << endl;
+#ifdef GIT_SHA1
+    stream << "Git revision " << GIT_SHA1 << endl;
+#endif
+    stream << "Using Qt " << qVersion() << ", built against Qt " << QT_VERSION_STR << endl;
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+    stream << "Using '" << QSslSocket::sslLibraryVersionString() << "'" << endl;
+#endif
 
     displayHelpText(helpText);
 }