Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Qt: Use _putenv_s instead of setenv on Windows builds #10899

Merged
merged 1 commit into from Jul 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/qt/test/test_main.cpp
Expand Up @@ -59,7 +59,11 @@ int main(int argc, char *argv[])
// Prefer the "minimal" platform for the test instead of the normal default
// platform ("xcb", "windows", or "cocoa") so tests can't unintentially
// interfere with any background GUIs and don't require extra resources.
setenv("QT_QPA_PLATFORM", "minimal", 0);
#if defined(WIN32)
_putenv_s("QT_QPA_PLATFORM", "minimal");
#else
setenv("QT_QPA_PLATFORM", "minimal", 0);
#endif

// Don't remove this, it's needed to access
// QApplication:: and QCoreApplication:: in the tests
Expand Down