aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-10-24 15:12:57 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-10-24 15:12:57 +0200
commit349ed63038fffe8835446a2f5bbea9d090f8ad51 (patch)
tree0c176a67447c16257af2aff6f8c4371aca465325 /src
parentUpdate PKGBUILD to use meson (diff)
downloadsmolbote-349ed63038fffe8835446a2f5bbea9d090f8ad51.tar.xz
Use vcs_tag to get version information
Diffstat (limited to 'src')
-rw-r--r--src/browser.cpp3
-rw-r--r--src/main.cpp6
-rw-r--r--src/meson.build4
3 files changed, 8 insertions, 5 deletions
diff --git a/src/browser.cpp b/src/browser.cpp
index 22302ae..8ff8616 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -31,13 +31,14 @@
#include <QPluginLoader>
#include <plugininterface.h>
#include "config.h"
+#include <QVersionNumber>
Browser::Browser(int &argc, char *argv[], bool allowSecondary)
: SingleApplication(argc, argv, allowSecondary, SingleApplication::User | SingleApplication::SecondaryNotification | SingleApplication::ExcludeAppVersion)
{
setApplicationName(CONFIG_POI_NAME);
setWindowIcon(QIcon(CONFIG_POI_ICON));
- setApplicationVersion(poi_Version);
+ setApplicationVersion(QVersionNumber::fromString(QLatin1String(poi_Version)).toString());
}
Browser::~Browser()
diff --git a/src/main.cpp b/src/main.cpp
index 6ceacab..1a8dd11 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -18,6 +18,7 @@
#include <memory>
#include <QPluginLoader>
#include <plugininterface.h>
+#include <QVersionNumber>
#ifdef _WIN32
#include <cstdio>
#include <windows.h>
@@ -93,13 +94,14 @@ int main(int argc, char **argv)
// --version
if(config->exists("version")) {
- std::cout << "smolbote " << poi_Version << std::endl;
+ auto ver = QVersionNumber::fromString(QLatin1String(poi_Version));
+ std::cout << "smolbote " << ver.toString().toStdString() << std::endl;
return 0;
}
// --build
if(config->exists("build")) {
- std::cout << poi_Build;
+ std::cout << poi_Version << std::endl;
return 0;
}
diff --git a/src/meson.build b/src/meson.build
index 715e154..a977e8b 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -21,9 +21,9 @@ endif
poi = executable(get_option('poiName'), install: true,
cpp_args: ['-DQAPPLICATION_CLASS=QApplication'],
- dependencies: [dep_qt5, dep_boost, dep_SingleApplication, optdepends,
+ dependencies: [dep_qt5, dep_boost, dep_SingleApplication, dep_genheaders, optdepends,
dep_about, dep_addressbar, dep_bookmarks, dep_configuration, dep_downloads, dep_urlfilter, dep_web],
- include_directories: [include, genheader_inc],
+ include_directories: [include],
sources: ['main.cpp', poi_moc,
'browser.cpp',
'session.cpp',