Commit b5247dd5 authored by Bhushan Shah's avatar Bhushan Shah 📱
Browse files

Adapt version to PlaMo Gear 21.05

parent 19ea3c5e
......@@ -22,6 +22,7 @@
# $END_LICENSE$
project(Kalk)
set(PROJECT_VERSION "21.05")
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)
......@@ -69,6 +70,11 @@ include(KDEInstallDirs)
include(KDECMakeSettings)
include(ECMPoQmTools)
include(KDECompilerSettings NO_POLICY_SCOPE)
ecm_setup_version(${PROJECT_VERSION}
VARIABLE_PREFIX KALK
VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/version.h
)
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui QuickControls2 Widgets)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Config
......
......@@ -56,6 +56,7 @@ target_link_libraries(kalk
KF5::CoreAddons
kalklib
knumber)
target_include_directories(kalk PRIVATE ${CMAKE_BINARY_DIR})
target_include_directories(kalklib PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/mathengine)
......
......@@ -7,6 +7,8 @@
#include <QDebug>
#include <QObject>
#include <QQmlApplicationEngine>
#include <QCommandLineParser>
#include <QCommandLineOption>
#include <QQmlContext>
#include <KAboutData>
......@@ -17,21 +19,27 @@
#include "mathengine.h"
#include "inputmanager.h"
#include "unitmodel.h"
#include "version.h"
int main(int argc, char *argv[])
{
QCommandLineParser parser;
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
QQmlApplicationEngine engine;
KLocalizedString::setApplicationDomain("kalk");
parser.addVersionOption();
engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
engine.rootContext()->setContextProperty("historyManager", HistoryManager::inst());
engine.rootContext()->setContextProperty("inputManager", InputManager::inst());
engine.rootContext()->setContextProperty("unitModel", UnitModel::inst());
KAboutData aboutData("kalk", i18n("Calculator"), "0.1", i18n("Calculator in Kirigami"), KAboutLicense::GPL, i18n("© 2020 KDE Community"));
KAboutData aboutData("kalk", i18n("Calculator"), QStringLiteral(KALK_VERSION_STRING), i18n("Calculator in Kirigami"), KAboutLicense::GPL, i18n("© 2020 KDE Community"));
KAboutData::setApplicationData(aboutData);
parser.process(app);
#ifdef QT_DEBUG
engine.rootContext()->setContextProperty(QStringLiteral("debug"), true);
#else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment