diff --git a/src/widgets/editorview.cpp b/src/widgets/editorview.cpp --- a/src/widgets/editorview.cpp +++ b/src/widgets/editorview.cpp @@ -51,7 +51,7 @@ { // To avoid having unit tests talking to akonadi // while we don't need the completion for them - if (qgetenv("ZANSHIN_UNIT_TEST_RUN").isEmpty()) + if (qEnvironmentVariableIsEmpty("ZANSHIN_UNIT_TEST_RUN")) m_delegateEdit = new KPIM::AddresseeLineEdit(this); else m_delegateEdit = new KLineEdit(this); diff --git a/tests/testlib/testsafety.h b/tests/testlib/testsafety.h --- a/tests/testlib/testsafety.h +++ b/tests/testlib/testsafety.h @@ -32,7 +32,7 @@ */ bool checkTestIsIsolated() { - if (qgetenv( "AKONADI_TESTRUNNER_PID").isEmpty()) { + if (qEnvironmentVariableIsEmpty("AKONADI_TESTRUNNER_PID")) { qCritical() << "This test must be run using ctest, in order to use the testrunner environment. Aborting, to avoid messing up your real akonadi"; return false; }