summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJamey Hicks <jamey.hicks@nokia.com>2012-09-27 16:31:27 -0400
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-14 16:21:06 +0200
commitb1ad1c0274a5518a067b77c0cac2a4bb504742d7 (patch)
tree4c2cdf70a4b8ad3b9727398b16e3ee45edc4b358 /tests
parente46079fa02c92d19d360af072362345c1341260d (diff)
use qputenv instead of ::setenv
Change-Id: I9d24e1d0d0d15da8f4f3995d12ff5b5e793aef12 Reviewed-by: Kevin Simons <kevin.b.simons@gmail.com>
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();