diff ui/tests/nsstest.cpp @ 326:ad28f6b60e6b

Fix nsstest build for windows
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 07 Apr 2014 14:50:08 +0000
parents 2fd69803d219
children 1e6d1eab8395
line wrap: on
line diff
--- a/ui/tests/nsstest.cpp	Mon Apr 07 13:40:54 2014 +0000
+++ b/ui/tests/nsstest.cpp	Mon Apr 07 14:50:08 2014 +0000
@@ -72,7 +72,12 @@
     fakeFirefoxDir = QDir(fakeHome.path() + "/.mozilla/firefox");
     fakeThunderbirdDir = QDir(fakeHome.path() + "/.thunderbird");
 #else
-    QVERIFY(!setenv ("APPDATA", fakeHome.path().toLocal8Bit().constData(), 1));
+    {
+        char buf[fakeHome.path().toLocal8Bit().size() + 9];
+        snprintf(buf, fakeHome.path().toLocal8Bit().size() + 9,
+                "APPDATA=%s",fakeHome.path().toLocal8Bit().constData());
+        QVERIFY(_putenv (buf) != -1);
+    }
     fakeFirefoxDir = QDir(fakeHome.path() + "/Mozilla/firefox");
     fakeThunderbirdDir = QDir(fakeHome.path() + "/Thunderbird");
 #endif

http://wald.intevation.org/projects/trustbridge/