Avoid using qEnvironmentVariable() for compat with Qt < 5.10

This commit is contained in:
Martchus 2020-07-29 11:49:02 +02:00
parent 65a532d80c
commit 4757b0a8b7
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ set(META_APP_DESCRIPTION
"Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models")
set(META_VERSION_MAJOR 6)
set(META_VERSION_MINOR 2)
set(META_VERSION_PATCH 0)
set(META_VERSION_PATCH 1)
set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH})
project(${META_PROJECT_NAME})

View File

@ -57,7 +57,7 @@ void DBusNotificationTests::smokeTest()
*/
void DBusNotificationTests::semiAutomaticTest()
{
const auto envValue = qEnvironmentVariable(PROJECT_VARNAME_UPPER "_ENABLE_SEMI_AUTOMATIC_NOTIFICATION_TESTS");
const auto envValue = qgetenv(PROJECT_VARNAME_UPPER "_ENABLE_SEMI_AUTOMATIC_NOTIFICATION_TESTS");
auto envValueIsInt = false;
if (envValue.isEmpty() || (envValue.toInt(&envValueIsInt) == 0 && envValueIsInt)) {
QSKIP("Set the environment variable " PROJECT_VARNAME_UPPER "_ENABLE_SEMI_AUTOMATIC_NOTIFICATION_TESTS to run "