mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Use putenv on Windows too
This commit is contained in:
parent
2f4f06ca8b
commit
a2067af4ea
3 changed files with 3 additions and 19 deletions
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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue