Don't include version.h in mainwindow.cpp

Should help with post-commit compile times
This commit is contained in:
Chris Robinson 2019-08-31 21:47:58 -07:00
parent 96af306b3c
commit 5becf4bb73
4 changed files with 22 additions and 4 deletions

View File

@ -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)

View File

@ -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()));
}

View File

@ -0,0 +1,10 @@
#include "verstr.h"
#include "version.h"
const char *GetVersionString()
{
return ALSOFT_VERSION "-" ALSOFT_GIT_COMMIT_HASH " (" ALSOFT_GIT_BRANCH " branch).";
}

View File

@ -0,0 +1,6 @@
#ifndef VERSTR_H
#define VERSTR_H
const char *GetVersionString();
#endif /* VERSTR_H */