mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-26 19:26:59 +03:00
Adjust env variable for PDB discovery
This commit is contained in:
parent
5e952a561b
commit
b61c7b7220
1 changed files with 11 additions and 0 deletions
|
@ -118,6 +118,17 @@ int main(int argc, char *argv[])
|
|||
// Create Application
|
||||
auto app = std::make_unique<Application>(argc, argv);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// QCoreApplication::applicationDirPath() needs an Application object instantiated first
|
||||
// Let's hope that there won't be a crash before this line
|
||||
const char *envName = "_NT_SYMBOL_PATH";
|
||||
const QString envValue = qEnvironmentVariable(envName);
|
||||
if (envValue.isEmpty())
|
||||
qputenv(envName, Application::applicationDirPath().toLocal8Bit());
|
||||
else
|
||||
qputenv(envName, u"%1;%2"_qs.arg(envValue, Application::applicationDirPath()).toLocal8Bit());
|
||||
#endif
|
||||
|
||||
const QBtCommandLineParameters params = app->commandLineArgs();
|
||||
if (!params.unknownParameter.isEmpty())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue