Browse Source

Adjust env variable for PDB discovery

adaptive-webui-19844
sledgehammer999 2 years ago
parent
commit
b61c7b7220
No known key found for this signature in database
GPG Key ID: 6E4A2D025B7CC9A2
  1. 11
      src/app/main.cpp

11
src/app/main.cpp

@ -118,6 +118,17 @@ int main(int argc, char *argv[]) @@ -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…
Cancel
Save