mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 03:45:30 +08:00
Replace qmake variable BLACK_CONFIG with a system based on json files.
The config is loaded from json files by qmake, and we define the qmake function `swiftConfig` for checking whether a feature is enabled. This function can be directly used in `buildconfig_gen.cpp.in`, so the trick with C++ comment tokens in variables is not needed.
This commit is contained in:
@@ -13,20 +13,20 @@
|
||||
|
||||
const QDateTime &BlackConfig::CBuildConfig::getEol()
|
||||
{
|
||||
static const QString eol(\"$$BLACK_EOL\"); // config.pri
|
||||
static const QString eol(\"$$swiftConfig(endOfLife)\"); // config.pri
|
||||
static const QDateTime dt(eol.isEmpty() ? QDateTime() : QDateTime::fromString(eol, \"yyyyMMdd\"));
|
||||
return dt;
|
||||
}
|
||||
|
||||
int BlackConfig::CBuildConfig::vatsimClientId()
|
||||
{
|
||||
static const int id { $$VATSIM_CLIENT_ID };
|
||||
static const int id { $$swiftConfig(vatsim.id) };
|
||||
return id;
|
||||
}
|
||||
|
||||
const QString &BlackConfig::CBuildConfig::vatsimPrivateKey()
|
||||
{
|
||||
static const auto pk = QString { \"$$VATSIM_CLIENT_PRIVATE_KEY\" };
|
||||
static const auto pk = QString { \"$$swiftConfig(vatsim.key)\" };
|
||||
return pk;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user