diff options
author | Chris Robinson <[email protected]> | 2019-08-31 21:47:58 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-08-31 21:47:58 -0700 |
commit | 5becf4bb73ffc448dbad5ba6dd9377f3c8ab8697 (patch) | |
tree | 85a8a6f99f536b79da765bed9ebfabb044632f79 /utils/alsoft-config | |
parent | 96af306b3c999e05194c0fd431dc49b2219a7649 (diff) |
Don't include version.h in mainwindow.cpp
Should help with post-commit compile times
Diffstat (limited to 'utils/alsoft-config')
-rw-r--r-- | utils/alsoft-config/CMakeLists.txt | 2 | ||||
-rw-r--r-- | utils/alsoft-config/mainwindow.cpp | 8 | ||||
-rw-r--r-- | utils/alsoft-config/verstr.cpp | 10 | ||||
-rw-r--r-- | utils/alsoft-config/verstr.h | 6 |
4 files changed, 22 insertions, 4 deletions
diff --git a/utils/alsoft-config/CMakeLists.txt b/utils/alsoft-config/CMakeLists.txt index 7996ee97..68b9e9de 100644 --- a/utils/alsoft-config/CMakeLists.txt +++ b/utils/alsoft-config/CMakeLists.txt @@ -8,6 +8,8 @@ set(alsoft-config_SRCS main.cpp mainwindow.cpp mainwindow.h + verstr.cpp + verstr.h ) set(alsoft-config_UIS mainwindow.ui) set(alsoft-config_MOCS mainwindow.h) diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp index 3b7b428a..c0c0e1e5 100644 --- a/utils/alsoft-config/mainwindow.cpp +++ b/utils/alsoft-config/mainwindow.cpp @@ -1,7 +1,7 @@ #include "config.h" -#include "version.h" +#include "mainwindow.h" #include <iostream> #include <cmath> @@ -11,8 +11,8 @@ #include <QCloseEvent> #include <QSettings> #include <QtGlobal> -#include "mainwindow.h" #include "ui_mainwindow.h" +#include "verstr.h" namespace { @@ -503,8 +503,8 @@ void MainWindow::cancelCloseAction() void MainWindow::showAboutPage() { QMessageBox::information(this, tr("About"), - tr("OpenAL Soft Configuration Utility.\nBuilt for OpenAL Soft library version ")+ - (ALSOFT_VERSION "-" ALSOFT_GIT_COMMIT_HASH " (" ALSOFT_GIT_BRANCH " branch).")); + tr("OpenAL Soft Configuration Utility.\nBuilt for OpenAL Soft library version ") + + tr(GetVersionString())); } diff --git a/utils/alsoft-config/verstr.cpp b/utils/alsoft-config/verstr.cpp new file mode 100644 index 00000000..b2fd0a17 --- /dev/null +++ b/utils/alsoft-config/verstr.cpp @@ -0,0 +1,10 @@ + +#include "verstr.h" + +#include "version.h" + + +const char *GetVersionString() +{ + return ALSOFT_VERSION "-" ALSOFT_GIT_COMMIT_HASH " (" ALSOFT_GIT_BRANCH " branch)."; +} diff --git a/utils/alsoft-config/verstr.h b/utils/alsoft-config/verstr.h new file mode 100644 index 00000000..a97f0895 --- /dev/null +++ b/utils/alsoft-config/verstr.h @@ -0,0 +1,6 @@ +#ifndef VERSTR_H +#define VERSTR_H + +const char *GetVersionString(); + +#endif /* VERSTR_H */ |