Use putenv on Windows too

This commit is contained in:
Christophe Dumez 2010-06-23 12:44:23 +00:00
parent 2f4f06ca8b
commit a2067af4ea
3 changed files with 3 additions and 19 deletions

View file

@ -271,13 +271,9 @@ int main(int argc, char *argv[]){
}
#endif
// Set environment variable
#if defined(Q_WS_WIN) && !defined(MINGW)
if(SetEnvironmentVariableA("QBITTORRENT", VERSION)) {
#else
if(putenv((char*)"QBITTORRENT="VERSION)) {
#endif
std::cerr << "Couldn't set environment variable...\n";
}
if(putenv((char*)"QBITTORRENT="VERSION)) {
std::cerr << "Couldn't set environment variable...\n";
}
#ifndef DISABLE_GUI
useStyle(app, settings.value("Preferences/General/Style", "").toString());