Skip to content

Commit

Permalink
main, .pro: Add version information
Browse files Browse the repository at this point in the history
  • Loading branch information
flopcat committed Apr 30, 2019
1 parent 52a9725 commit ec2f61b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions desktop/qt/desktopclient/desktopclient.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ DEFINES += QT_DEPRECATED_WARNINGS
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

VERSION = 0.1.0
DEFINES += VERSION_STRING=\\\"$${VERSION}\\\"

CONFIG += c++11

SOURCES += \
Expand Down
10 changes: 9 additions & 1 deletion desktop/qt/desktopclient/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "mainwindow.h"
#include "accountsdialog.h"
#include <QApplication>
#include <QCommandLineParser>
#include <QFile>
#include <QStyleFactory>

Expand All @@ -10,7 +11,14 @@ int main(int argc, char *argv[])
QCoreApplication::setOrganizationName("Flopcat");
QCoreApplication::setOrganizationDomain("desktopclient.streamlogin.flopcat");
QCoreApplication::setApplicationName("StreamLogin Desktop Client");
QGuiApplication::setWindowIcon(QIcon(":/icon-logo.svg"));
QCoreApplication::setApplicationVersion(VERSION_STRING);

QCommandLineParser parser;
parser.addHelpOption();
parser.addVersionOption();
parser.process(a);

a.setWindowIcon(QIcon(":/icon-logo.svg"));
a.setQuitOnLastWindowClosed(false);

#ifdef Q_OS_LINUX
Expand Down

0 comments on commit ec2f61b

Please sign in to comment.