diff --git a/app/main.cpp b/app/main.cpp index fd41236..e2bb785 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -74,8 +74,10 @@ int main(int argc, char *argv[]) return 0; } + QString appVersion("1.1.0"); + if (args.contains("-v") || args.contains("--version")) { - qDebug() << "cool-retro-term 1.1.0"; + qDebug() << ("cool-retro-term " + appVersion).toStdString().c_str(); return 0; } @@ -86,6 +88,7 @@ int main(int argc, char *argv[]) } QVariant command(cmdList.empty() ? QVariant() : cmdList[0]); QVariant commandArgs(cmdList.size() <= 1 ? QVariant() : QVariant(cmdList.mid(1))); + engine.rootContext()->setContextProperty("appVersion", appVersion); engine.rootContext()->setContextProperty("defaultCmd", command); engine.rootContext()->setContextProperty("defaultCmdArgs", commandArgs); diff --git a/app/qml/ApplicationSettings.qml b/app/qml/ApplicationSettings.qml index 7ab3088..917d34a 100644 --- a/app/qml/ApplicationSettings.qml +++ b/app/qml/ApplicationSettings.qml @@ -24,7 +24,7 @@ import QtQuick.Controls 1.0 import "utils.js" as Utils QtObject{ - readonly property string version: "1.1.0" + readonly property string version: appVersion readonly property int profileVersion: 2 // STATIC CONSTANTS ////////////////////////////////////////////////////////