Skip to content

Commit

Permalink
[fix] global: update domaine name and version setting
Browse files Browse the repository at this point in the history
  • Loading branch information
bgallois committed Jun 25, 2020
1 parent e2d1fbc commit 6b7390a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/FastTrack.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = FastTrack
TEMPLATE = app
VERSION = 4.9.1
DEFINES += APP_VERSION=\\\"$$VERSION\\\"


unix:!macx {
DESTDIR=build
Expand Down
7 changes: 4 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ This file is part of Fast Track.
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
MainWindow w;
a.setApplicationName("Fast Track");
a.setOrganizationName("Benjamin Gallois");
a.setOrganizationDomain("fasttrack.benjamin-gallois.fr");
a.setApplicationName("FastTrack");
a.setApplicationVersion(APP_VERSION);
a.setOrganizationName("FastTrackOrg");
a.setOrganizationDomain("www.fasttrack.sh");
w.setWindowIcon(QIcon(":/assets/icon.png"));
w.show();
a.exec();
Expand Down
4 changes: 2 additions & 2 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
QDir::setCurrent(QCoreApplication::applicationDirPath());
ui->setupUi(this);
setWindowState(Qt::WindowMaximized);
setWindowTitle("FastTrack " + version);
setWindowTitle(qApp->applicationName() + " " + APP_VERSION);

// Setup style
QFile stylesheet(":/theme.qss");
Expand Down Expand Up @@ -72,7 +72,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
QByteArray message = downloadedData.mid(downloadedData.indexOf("message") + 7, downloadedData.indexOf("!message") - downloadedData.indexOf("message") - 7);
QByteArray warning = downloadedData.mid(downloadedData.indexOf("warning") + 7, downloadedData.indexOf("!warning") - downloadedData.indexOf("warning") - 7);

if (lastVersion != version) {
if (lastVersion != APP_VERSION) {
QMessageBox msgBox;
msgBox.setTextFormat(Qt::RichText);
msgBox.setText("FastTrack version " + lastVersion + " is available! <br> Please update. <br> <a href='http://www.fasttrack.sh/UserManual/docs/installation/#update'>Need help to update?</a> <br>" + message + "<br>" + warning);
Expand Down
1 change: 0 additions & 1 deletion src/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class MainWindow : public QMainWindow {
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
QByteArray version = "4.9.1";

private:
Ui::MainWindow *ui; /*!< ui file from Qt designer. */
Expand Down

0 comments on commit 6b7390a

Please sign in to comment.