From e5a98f86e9dd8a74de83d5cda21107316b2e8b5e Mon Sep 17 00:00:00 2001 From: Joshua Tzucker Date: Wed, 24 Apr 2019 08:08:17 -0700 Subject: [PATCH] some last minute tweaks before release --- DCT.pro | 1 + README.md | 4 ++++ appinfo.h | 10 ++++++++++ helpers.cpp | 5 +++++ helpers.h | 1 + main.cpp | 13 +++++++++---- qml/components/AboutPage.qml | 2 +- 7 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 appinfo.h diff --git a/DCT.pro b/DCT.pro index 5ec6953..a2c17d3 100644 --- a/DCT.pro +++ b/DCT.pro @@ -26,6 +26,7 @@ SOURCES += \ globalsettings.cpp HEADERS += \ + appinfo.h \ helpers.h \ database.h \ globalsettings.h \ diff --git a/README.md b/README.md index 1e1d928..243177b 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,10 @@ Macro | Incoming Transformation | Outgoing Transformation | What it does # Deploying I'm using windeployqt to pull in DLLs to bundle with my exe for release. however, it doesn't pull in OpenSSL although it is needed for the Cloudinary API calls. +# License +Licensed under Apache 2.0 +See LICENSE file for details. + # Notes to self: ## Stats logging ### Syntax: diff --git a/appinfo.h b/appinfo.h new file mode 100644 index 0000000..5bdc119 --- /dev/null +++ b/appinfo.h @@ -0,0 +1,10 @@ +#ifndef APPINFO_H +#define APPINFO_H + +#define APP_VERSION_STRING "0.1.0" + +#define APP_ORG_NAME "JoshuaTzucker" +#define APP_ORG_DOMAIN "joshuatz.com" +#define APP_NAME "Desktop Cloud Transform" + +#endif // APPINFO_H diff --git a/helpers.cpp b/helpers.cpp index cdac6dc..635f5ec 100644 --- a/helpers.cpp +++ b/helpers.cpp @@ -1,3 +1,4 @@ +#include "appinfo.h" #include "helpers.h" #include #include @@ -113,3 +114,7 @@ bool Helpers::getIsDebug(){ return false; #endif } + +QString Helpers::getVersionString(){ + return APP_VERSION_STRING; +} diff --git a/helpers.h b/helpers.h index a1f50d6..01e0b63 100644 --- a/helpers.h +++ b/helpers.h @@ -19,6 +19,7 @@ public slots: static QString forceEndingSlash(QString input); static QString removeBeginSlash(QString input); static bool getIsDebug(); + static QString getVersionString(); private: }; diff --git a/main.cpp b/main.cpp index d02fdf8..eb5c617 100644 --- a/main.cpp +++ b/main.cpp @@ -1,3 +1,8 @@ +/** +* Copyright (C) 2019 Joshua Tzucker +*/ + +#include "appinfo.h" #include "apis/cloudinary.h" #include "database.h" #include "globalsettings.h" @@ -20,10 +25,10 @@ int main(int argc, char *argv[]) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // Register settings config - QCoreApplication::setOrganizationName("JoshuaTzucker"); - QCoreApplication::setOrganizationDomain("joshuatz.com"); - QCoreApplication::setApplicationName("Desktop Cloud Transform"); - QCoreApplication::setApplicationVersion("0.0.1"); + QCoreApplication::setOrganizationName(APP_ORG_NAME); + QCoreApplication::setOrganizationDomain(APP_ORG_DOMAIN); + QCoreApplication::setApplicationName(APP_NAME); + QCoreApplication::setApplicationVersion(APP_VERSION_STRING); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; diff --git a/qml/components/AboutPage.qml b/qml/components/AboutPage.qml index 850524b..b69b927 100644 --- a/qml/components/AboutPage.qml +++ b/qml/components/AboutPage.qml @@ -30,7 +30,7 @@ Item { color: Qt.rgba(255/255,255/255,255/255,0.8) Text { anchors.centerIn: parent - text: "About DCT" + text: "About DCT - v" + Helpers.getVersionString() color: ThemeColors.darkPrimary font.pixelSize: 30 }