mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 18:35:35 +08:00
* kept nornmal header buildconfig.h * kept all standard code in buildconfig.cpp * bundled all DEFINE / replaced code in buildconfig.cpp.in (small)
This commit is contained in:
@@ -10,8 +10,15 @@ contains(BLACK_CONFIG, Static) {
|
|||||||
CONFIG += staticlib
|
CONFIG += staticlib
|
||||||
}
|
}
|
||||||
|
|
||||||
buildconfig.input = buildconfig.h.in
|
buildconfig.input = buildconfig.cpp.in
|
||||||
buildconfig.output = buildconfig.h
|
CONFIG(debug, debug|release) {
|
||||||
|
buildconfig.output = $$OUT_PWD/debug/buildconfig_gen.cpp
|
||||||
|
GENERATED_SOURCES += $$OUT_PWD/debug/buildconfig_gen.cpp
|
||||||
|
|
||||||
|
} else {
|
||||||
|
buildconfig.output = $$OUT_PWD/release/buildconfig_gen.cpp
|
||||||
|
GENERATED_SOURCES += $$OUT_PWD/release/buildconfig_gen.cpp
|
||||||
|
}
|
||||||
QMAKE_SUBSTITUTES += buildconfig
|
QMAKE_SUBSTITUTES += buildconfig
|
||||||
|
|
||||||
INCLUDEPATH += ..
|
INCLUDEPATH += ..
|
||||||
@@ -31,7 +38,6 @@ TRANSLATIONS += translations/blackmisc_i18n_de.ts \
|
|||||||
translations/blackmisc_i18n_en.ts
|
translations/blackmisc_i18n_en.ts
|
||||||
|
|
||||||
HEADERS += *.h \
|
HEADERS += *.h \
|
||||||
buildconfig.h.in \
|
|
||||||
$$PWD/pq/*.h \
|
$$PWD/pq/*.h \
|
||||||
$$PWD/aviation/*.h \
|
$$PWD/aviation/*.h \
|
||||||
$$PWD/math/*.h \
|
$$PWD/math/*.h \
|
||||||
@@ -70,7 +76,7 @@ win32 {
|
|||||||
DESTDIR = $$DestRoot/lib
|
DESTDIR = $$DestRoot/lib
|
||||||
DLLDESTDIR = $$DestRoot/bin
|
DLLDESTDIR = $$DestRoot/bin
|
||||||
|
|
||||||
OTHER_FILES += $$TRANSLATIONS readme.txt
|
OTHER_FILES += $$TRANSLATIONS readme.txt buildconfig.cpp.in
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
dlltarget.path = $$PREFIX/bin
|
dlltarget.path = $$PREFIX/bin
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (C) 2013
|
/* Copyright (C) 2013
|
||||||
* swift Project Community / Contributors
|
* swift Project Community/Contributors
|
||||||
*
|
*
|
||||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||||
@@ -21,79 +21,44 @@
|
|||||||
|
|
||||||
namespace BlackMisc
|
namespace BlackMisc
|
||||||
{
|
{
|
||||||
bool CBuildConfig::isCompiledWithBlackCore()
|
|
||||||
{
|
|
||||||
#ifdef WITH_BLACKCORE
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CBuildConfig::isCompiledWithBlackSound()
|
|
||||||
{
|
|
||||||
#ifdef WITH_BLACKSOUND
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CBuildConfig::isCompiledWithBlackInput()
|
|
||||||
{
|
|
||||||
#ifdef WITH_BLACKINPUT
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CBuildConfig::isCompiledWithFs9Support()
|
|
||||||
{
|
|
||||||
#ifdef WITH_FS9
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CBuildConfig::isCompiledWithFsxSupport()
|
|
||||||
{
|
|
||||||
#ifdef WITH_FSX
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CBuildConfig::isCompiledWithP3DSupport()
|
bool CBuildConfig::isCompiledWithP3DSupport()
|
||||||
{
|
{
|
||||||
return isCompiledWithFsxSupport();
|
return CBuildConfig::isCompiledWithFsxSupport();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CBuildConfig::isCompiledWithMsFlightSimulatorSupport()
|
bool CBuildConfig::isCompiledWithMsFlightSimulatorSupport()
|
||||||
{
|
{
|
||||||
return isCompiledWithFs9Support() || isCompiledWithFsxSupport() || isCompiledWithP3DSupport();
|
return CBuildConfig::isCompiledWithFs9Support() || CBuildConfig::isCompiledWithFsxSupport() || CBuildConfig::isCompiledWithP3DSupport();
|
||||||
}
|
|
||||||
|
|
||||||
bool CBuildConfig::isCompiledWithXPlaneSupport()
|
|
||||||
{
|
|
||||||
#ifdef WITH_XPLANE
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CBuildConfig::isCompiledWithFlightSimulatorSupport()
|
bool CBuildConfig::isCompiledWithFlightSimulatorSupport()
|
||||||
{
|
{
|
||||||
return isCompiledWithFsxSupport() || isCompiledWithXPlaneSupport();
|
return CBuildConfig::isCompiledWithFsxSupport() || CBuildConfig::isCompiledWithXPlaneSupport();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CBuildConfig::isCompiledWithGui()
|
const QString &CBuildConfig::swiftGuiExecutableName()
|
||||||
{
|
{
|
||||||
#ifdef WITH_BLACKGUI
|
static const QString s("swiftguistd");
|
||||||
return true;
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString &CBuildConfig::swiftCoreExecutableName()
|
||||||
|
{
|
||||||
|
static const QString s("swiftcore");
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString &CBuildConfig::swiftDataExecutableName()
|
||||||
|
{
|
||||||
|
static const QString s("swiftdata");
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CBuildConfig::isRunningOnWindowsNtPlatform()
|
||||||
|
{
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
// QSysInfo::WindowsVersion only available on Win platforms
|
||||||
|
return (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based);
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
@@ -117,62 +82,11 @@ namespace BlackMisc
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CBuildConfig::isBetaTest()
|
|
||||||
{
|
|
||||||
#ifdef SWIFT_BETA
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CBuildConfig::canRunInDeveloperEnvironment()
|
|
||||||
{
|
|
||||||
if (isBetaTest()) { return true; }
|
|
||||||
return !isShippedVersion();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CBuildConfig::isShippedVersion()
|
|
||||||
{
|
|
||||||
#ifdef SWIFT_SHIPPED
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CBuildConfig::isRunningOnWindowsNtPlatform()
|
|
||||||
{
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
// QSysInfo::WindowsVersion only available on Win platforms
|
|
||||||
return (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based);
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
const QString &CBuildConfig::swiftGuiExecutableName()
|
|
||||||
{
|
|
||||||
static const QString s("swiftguistd");
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
const QString &CBuildConfig::swiftCoreExecutableName()
|
|
||||||
{
|
|
||||||
static const QString s("swiftcore");
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
const QString &CBuildConfig::swiftDataExecutableName()
|
|
||||||
{
|
|
||||||
static const QString s("swiftdata");
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
const QStringList &CBuildConfig::swiftTeamDefaultServers()
|
const QStringList &CBuildConfig::swiftTeamDefaultServers()
|
||||||
{
|
{
|
||||||
static const QStringList s({ "https://vatsim-germany.org:50443/mapping/public/shared",
|
static const QStringList s({ "https://vatsim-germany.org:50443/mapping/public/shared",
|
||||||
"http://ubuntu12/public/bootstrap/shared"});
|
"http://ubuntu12/public/bootstrap/shared"
|
||||||
|
});
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,6 +177,12 @@ namespace BlackMisc
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CBuildConfig::canRunInDeveloperEnvironment()
|
||||||
|
{
|
||||||
|
if (CBuildConfig::isBetaTest()) { return true; }
|
||||||
|
return !CBuildConfig::isShippedVersion();
|
||||||
|
}
|
||||||
|
|
||||||
QString getDocumentationDirectoryImpl()
|
QString getDocumentationDirectoryImpl()
|
||||||
{
|
{
|
||||||
QStringList pathes(QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation));
|
QStringList pathes(QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation));
|
||||||
@@ -287,14 +207,14 @@ namespace BlackMisc
|
|||||||
if (infoShort.isEmpty())
|
if (infoShort.isEmpty())
|
||||||
{
|
{
|
||||||
QStringList sl;
|
QStringList sl;
|
||||||
if (isCompiledWithBlackCore()) { sl << "BlackCore"; }
|
if (CBuildConfig::isCompiledWithBlackCore()) { sl << "BlackCore"; }
|
||||||
if (isCompiledWithBlackSound()) { sl << "BlackSound"; }
|
if (CBuildConfig::isCompiledWithBlackSound()) { sl << "BlackSound"; }
|
||||||
if (isCompiledWithBlackInput()) { sl << "BlackInput"; }
|
if (CBuildConfig::isCompiledWithBlackInput()) { sl << "BlackInput"; }
|
||||||
if (isCompiledWithGui()) { sl << "BlackGui"; }
|
if (CBuildConfig::isCompiledWithGui()) { sl << "BlackGui"; }
|
||||||
if (isCompiledWithFs9Support()) { sl << "FS9"; }
|
if (CBuildConfig::isCompiledWithFs9Support()) { sl << "FS9"; }
|
||||||
if (isCompiledWithFsxSupport()) { sl << "FSX"; }
|
if (CBuildConfig::isCompiledWithFsxSupport()) { sl << "FSX"; }
|
||||||
if (isCompiledWithXPlaneSupport()) { sl << "XPlane"; }
|
if (CBuildConfig::isCompiledWithXPlaneSupport()) { sl << "XPlane"; }
|
||||||
if (isCompiledWithP3DSupport()) { sl << "P3D"; }
|
if (CBuildConfig::isCompiledWithP3DSupport()) { sl << "P3D"; }
|
||||||
infoShort = sl.join(", ");
|
infoShort = sl.join(", ");
|
||||||
if (infoShort.isEmpty()) { infoShort = "<none>"; }
|
if (infoShort.isEmpty()) { infoShort = "<none>"; }
|
||||||
}
|
}
|
||||||
@@ -335,8 +255,6 @@ namespace BlackMisc
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QList<int> CVersion::getVersionParts(const QString &versionString)
|
QList<int> CVersion::getVersionParts(const QString &versionString)
|
||||||
{
|
{
|
||||||
QStringList parts = versionString.split('.');
|
QStringList parts = versionString.split('.');
|
||||||
@@ -349,7 +267,6 @@ namespace BlackMisc
|
|||||||
}
|
}
|
||||||
return partsInt;
|
return partsInt;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // ns
|
} // ns
|
||||||
|
|
||||||
//! \endcond
|
//! \endcond
|
||||||
|
|||||||
136
src/blackmisc/buildconfig.cpp.in
Normal file
136
src/blackmisc/buildconfig.cpp.in
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
/* Copyright (C) 2016
|
||||||
|
* swift project Community / Contributors
|
||||||
|
*
|
||||||
|
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||||
|
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||||
|
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||||
|
* contained in the LICENSE file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include \"blackmisc/buildconfig.h\"
|
||||||
|
#include <QString>
|
||||||
|
#include <QDateTime>
|
||||||
|
|
||||||
|
$$DEFINE_WITH_BLACKCORE#define WITH_BLACKCORE
|
||||||
|
$$DEFINE_WITH_BLACKSOUND#define WITH_BLACKSOUND
|
||||||
|
$$DEFINE_WITH_BLACKINPUT#define WITH_BLACKINPUT
|
||||||
|
$$DEFINE_WITH_BLACKGUI#define WITH_BLACKGUI
|
||||||
|
$$DEFINE_WITH_SWIFTDATA#define WITH_SWIFTDATA
|
||||||
|
$$DEFINE_WITH_SWIFTGUI#define WITH_SWIFTGUI
|
||||||
|
$$DEFINE_WITH_SWIFTCORE#define WITH_SWIFTCORE
|
||||||
|
$$DEFINE_WITH_FSX#define WITH_FSX
|
||||||
|
$$DEFINE_WITH_FS9#define WITH_FS9
|
||||||
|
$$DEFINE_WITH_XPLANE#define WITH_XPLANE
|
||||||
|
$$DEFINE_SWIFT_BETA#define SWIFT_BETA
|
||||||
|
$$DEFINE_SWIFT_SHIPPED#define SWIFT_SHIPPED
|
||||||
|
|
||||||
|
bool BlackMisc::CBuildConfig::isCompiledWithBlackCore()
|
||||||
|
{
|
||||||
|
#ifdef WITH_BLACKCORE
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BlackMisc::CBuildConfig::isCompiledWithBlackSound()
|
||||||
|
{
|
||||||
|
#ifdef WITH_BLACKSOUND
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BlackMisc::CBuildConfig::isCompiledWithBlackInput()
|
||||||
|
{
|
||||||
|
#ifdef WITH_BLACKINPUT
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BlackMisc::CBuildConfig::isCompiledWithFs9Support()
|
||||||
|
{
|
||||||
|
#ifdef WITH_FS9
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BlackMisc::CBuildConfig::isCompiledWithFsxSupport()
|
||||||
|
{
|
||||||
|
#ifdef WITH_FSX
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BlackMisc::CBuildConfig::isCompiledWithXPlaneSupport()
|
||||||
|
{
|
||||||
|
#ifdef WITH_XPLANE
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BlackMisc::CBuildConfig::isCompiledWithGui()
|
||||||
|
{
|
||||||
|
#ifdef WITH_BLACKGUI
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BlackMisc::CBuildConfig::isBetaTest()
|
||||||
|
{
|
||||||
|
#ifdef SWIFT_BETA
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BlackMisc::CBuildConfig::isShippedVersion()
|
||||||
|
{
|
||||||
|
#ifdef SWIFT_SHIPPED
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
const QDateTime &BlackMisc::CBuildConfig::getEol()
|
||||||
|
{
|
||||||
|
static const QString eol(\"$$BLACK_EOL\");
|
||||||
|
static const QDateTime dt(eol.isEmpty() ? QDateTime() : QDateTime::fromString(eol, \"yyyyMMdd\"));
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
int BlackMisc::CBuildConfig::vatsimClientId()
|
||||||
|
{
|
||||||
|
static const int id { $$VATSIM_CLIENT_ID };
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString &BlackMisc::CBuildConfig::vatsimPrivateKey()
|
||||||
|
{
|
||||||
|
static const auto pk = QString { \"$$VATSIM_CLIENT_PRIVATE_KEY\" };
|
||||||
|
return pk;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString &BlackMisc::CVersion::version()
|
||||||
|
{
|
||||||
|
static const QString version(\"$$BLACK_VERSION\");
|
||||||
|
Q_ASSERT(!version.isEmpty());
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
int BlackMisc::CVersion::versionMajor() { return $$BLACK_VER_MAJ; }
|
||||||
|
int BlackMisc::CVersion::versionMinor() { return $$BLACK_VER_MIN; }
|
||||||
|
int BlackMisc::CVersion::versionPatch() { return $$BLACK_VER_PAT; }
|
||||||
@@ -12,23 +12,10 @@
|
|||||||
#ifndef BLACKMISC_BUILDCONFIG_H
|
#ifndef BLACKMISC_BUILDCONFIG_H
|
||||||
#define BLACKMISC_BUILDCONFIG_H
|
#define BLACKMISC_BUILDCONFIG_H
|
||||||
|
|
||||||
#include \"blackmisc/blackmiscexport.h\"
|
#include "blackmisc/blackmiscexport.h"
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
|
||||||
$$DEFINE_WITH_BLACKCORE#define WITH_BLACKCORE
|
|
||||||
$$DEFINE_WITH_BLACKSOUND#define WITH_BLACKSOUND
|
|
||||||
$$DEFINE_WITH_BLACKINPUT#define WITH_BLACKINPUT
|
|
||||||
$$DEFINE_WITH_BLACKGUI#define WITH_BLACKGUI
|
|
||||||
$$DEFINE_WITH_SWIFTDATA#define WITH_SWIFTDATA
|
|
||||||
$$DEFINE_WITH_SWIFTGUI#define WITH_SWIFTGUI
|
|
||||||
$$DEFINE_WITH_SWIFTCORE#define WITH_SWIFTCORE
|
|
||||||
$$DEFINE_WITH_FSX#define WITH_FSX
|
|
||||||
$$DEFINE_WITH_FS9#define WITH_FS9
|
|
||||||
$$DEFINE_WITH_XPLANE#define WITH_XPLANE
|
|
||||||
$$DEFINE_SWIFT_BETA#define SWIFT_BETA
|
|
||||||
$$DEFINE_SWIFT_SHIPPED#define SWIFT_SHIPPED
|
|
||||||
|
|
||||||
namespace BlackMisc
|
namespace BlackMisc
|
||||||
{
|
{
|
||||||
//! Build configuration
|
//! Build configuration
|
||||||
@@ -118,29 +105,16 @@ namespace BlackMisc
|
|||||||
static const QStringList &swiftTeamDefaultServers();
|
static const QStringList &swiftTeamDefaultServers();
|
||||||
|
|
||||||
//! End of lifetime
|
//! End of lifetime
|
||||||
static const QDateTime &getEol()
|
static const QDateTime &getEol();
|
||||||
{
|
|
||||||
static const QString eol(\"$$BLACK_EOL\");
|
|
||||||
static const QDateTime dt(eol.isEmpty() ? QDateTime() : QDateTime::fromString(eol, \"yyyyMMdd\"));
|
|
||||||
return dt;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Lifetime ended?
|
//! Lifetime ended?
|
||||||
static bool isLifetimeExpired();
|
static bool isLifetimeExpired();
|
||||||
|
|
||||||
//! Vatsim client id
|
//! Vatsim client id
|
||||||
static int vatsimClientId()
|
static int vatsimClientId();
|
||||||
{
|
|
||||||
static const int id { $$VATSIM_CLIENT_ID };
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Vatsim client key
|
//! Vatsim client key
|
||||||
static const QString &vatsimPrivateKey()
|
static const QString &vatsimPrivateKey();
|
||||||
{
|
|
||||||
static const auto pk = QString { \"$$VATSIM_CLIENT_PRIVATE_KEY\" };
|
|
||||||
return pk;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Version
|
//! Version
|
||||||
@@ -148,21 +122,16 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Version info
|
//! Version info
|
||||||
static const QString &version()
|
static const QString &version();
|
||||||
{
|
|
||||||
static const QString version(\"$$BLACK_VERSION\");
|
|
||||||
Q_ASSERT(!version.isEmpty());
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Version major
|
//! Version major
|
||||||
static int versionMajor() { return $$BLACK_VER_MAJ; }
|
static int versionMajor();
|
||||||
|
|
||||||
//! Version minor
|
//! Version minor
|
||||||
static int versionMinor() { return $$BLACK_VER_MIN; }
|
static int versionMinor();
|
||||||
|
|
||||||
//! Version patch
|
//! Version patch
|
||||||
static int versionPatch() { return $$BLACK_VER_PAT; }
|
static int versionPatch();
|
||||||
|
|
||||||
//! Is the given string representing a newer version?
|
//! Is the given string representing a newer version?
|
||||||
static bool isNewerVersion(const QString &versionString);
|
static bool isNewerVersion(const QString &versionString);
|
||||||
Reference in New Issue
Block a user