mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Use putenv on Windows too
This commit is contained in:
10
src/main.cpp
10
src/main.cpp
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user