summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/partition/testpartition.cpp24
-rw-r--r--tests/shared/util.h4
2 files changed, 14 insertions, 14 deletions
diff --git a/tests/auto/partition/testpartition.cpp b/tests/auto/partition/testpartition.cpp
index a2d5e7f..a1a82fe 100644
--- a/tests/auto/partition/testpartition.cpp
+++ b/tests/auto/partition/testpartition.cpp
@@ -4370,18 +4370,18 @@ void TestPartition::settings()
jsondbSettings->setDebugQuery(false);
// then with environment variables
- ::setenv("JSONDB_REJECT_STALE_UPDATES", "true", true);
- ::setenv("JSONDB_DEBUG", "false", true);
- ::setenv("JSONDB_VERBOSE", "false", true);
- ::setenv("JSONDB_PERFORMANCE_LOG", "true", true);
- ::setenv("JSONDB_CACHE_SIZE", "256", true);
- ::setenv("JSONDB_COMPACT_RATE", "1500", true);
- ::setenv("JSONDB_ENFORCE_ACCESS_CONTROL", "true", true);
- ::setenv("JSONDB_TRANSACTION_SIZE", "75", true);
- ::setenv("JSONDB_VALIDATE_SCHEMAS", "true", true);
- ::setenv("JSONDB_SYNC_INTERVAL", "6000", true);
- ::setenv("JSONDB_INDEX_SYNC_INTERVAL", "17000", true);
- ::setenv("JSONDB_DEBUG_QUERY", "true", true);
+ qputenv("JSONDB_REJECT_STALE_UPDATES", "true");
+ qputenv("JSONDB_DEBUG", "false");
+ qputenv("JSONDB_VERBOSE", "false");
+ qputenv("JSONDB_PERFORMANCE_LOG", "true");
+ qputenv("JSONDB_CACHE_SIZE", "256");
+ qputenv("JSONDB_COMPACT_RATE", "1500");
+ qputenv("JSONDB_ENFORCE_ACCESS_CONTROL", "true");
+ qputenv("JSONDB_TRANSACTION_SIZE", "75");
+ qputenv("JSONDB_VALIDATE_SCHEMAS", "true");
+ qputenv("JSONDB_SYNC_INTERVAL", "6000");
+ qputenv("JSONDB_INDEX_SYNC_INTERVAL", "17000");
+ qputenv("JSONDB_DEBUG_QUERY", "true");
jsondbSettings->reload();
QVERIFY(jsondbSettings->rejectStaleUpdates());
diff --git a/tests/shared/util.h b/tests/shared/util.h
index 8e42378..8c1d3e1 100644
--- a/tests/shared/util.h
+++ b/tests/shared/util.h
@@ -119,7 +119,7 @@ inline QProcess *launchJsonDbDaemon(const char *prefix, const QString &socketNam
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert("JSONDB_SOCKET", socketName);
process->setProcessEnvironment(env);
- ::setenv("JSONDB_SOCKET", qPrintable(socketName), 1);
+ qputenv("JSONDB_SOCKET", qPrintable(socketName));
QStringList argList(args);
argList << QLatin1String("-reject-stale-updates");
@@ -169,7 +169,7 @@ inline qint64 launchJsonDbDaemonDetached(const char *prefix, const QString &sock
if (!QFile::exists(jsondb_app))
jsondb_app = QLatin1String("jsondb"); // rely on the PATH
- ::setenv("JSONDB_SOCKET", qPrintable(socketName), 1);
+ qputenv("JSONDB_SOCKET", qPrintable(socketName));
QStringList argList(args);
argList << QLatin1String("-reject-stale-updates");
argList << QLatin1String("-config-path") << QFileInfo(configfile).absolutePath().toLocal8Bit();