[simple versioning] #465
+6
-1
@@ -36,6 +36,10 @@ int main(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
|
app.setApplicationName("cool-retro-term");
|
||||||
|
app.setApplicationVersion("1.0.1");
|
||||||
|
|
||||||
// set application attributes
|
// set application attributes
|
||||||
// Has no effects, see https://bugreports.qt.io/browse/QTBUG-51293
|
// Has no effects, see https://bugreports.qt.io/browse/QTBUG-51293
|
||||||
// app.setAttribute(Qt::AA_MacDontSwapCtrlAndMeta, true);
|
// app.setAttribute(Qt::AA_MacDontSwapCtrlAndMeta, true);
|
||||||
@@ -67,7 +71,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (args.contains("-v") || args.contains("--version")) {
|
if (args.contains("-v") || args.contains("--version")) {
|
||||||
qDebug() << "cool-retro-term 1.0.1";
|
qDebug().noquote() << app.applicationName() << app.applicationVersion();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,6 +89,7 @@ int main(int argc, char *argv[])
|
|||||||
engine.rootContext()->setContextProperty("fileIO", &fileIO);
|
engine.rootContext()->setContextProperty("fileIO", &fileIO);
|
||||||
|
|
||||||
engine.rootContext()->setContextProperty("devicePixelRatio", app.devicePixelRatio());
|
engine.rootContext()->setContextProperty("devicePixelRatio", app.devicePixelRatio());
|
||||||
|
engine.rootContext()->setContextProperty("applicationVersion", app.applicationVersion());
|
||||||
|
|
||||||
// Manage import paths for Linux and OSX.
|
// Manage import paths for Linux and OSX.
|
||||||
QStringList importPathList = engine.importPathList();
|
QStringList importPathList = engine.importPathList();
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ Window{
|
|||||||
Text{
|
Text{
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: appSettings.version + "\n" +
|
text: applicationVersion + "\n" +
|
||||||
qsTr("Author: ") + "Filippo Scognamiglio\n" +
|
qsTr("Author: ") + "Filippo Scognamiglio\n" +
|
||||||
qsTr("Email: ") + "flscogna@gmail.com\n" +
|
qsTr("Email: ") + "flscogna@gmail.com\n" +
|
||||||
qsTr("Source: ") + "https://github.com/Swordfish90/cool-retro-term\n"
|
qsTr("Source: ") + "https://github.com/Swordfish90/cool-retro-term\n"
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import QtQuick.Controls 1.0
|
|||||||
import "utils.js" as Utils
|
import "utils.js" as Utils
|
||||||
|
|
||||||
QtObject{
|
QtObject{
|
||||||
property string version: "1.0.1"
|
|
||||||
|
|
||||||
// STATIC CONSTANTS ////////////////////////////////////////////////////////
|
// STATIC CONSTANTS ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user