Skip to content

Commit

Permalink
fix: can't reset oldEnv.
Browse files Browse the repository at this point in the history
as title.
  • Loading branch information
18202781743 authored and deepin-bot[bot] committed Jan 23, 2025
1 parent 2e20b79 commit 8ee4488
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/loader/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,10 @@ int main(int argc, char *argv[], char *envp[])
setproctitle((QStringLiteral("tray plugin: ") + pluginGroupName).toStdString().c_str());
qunsetenv("QT_SCALE_FACTOR");
for (auto iter = oldEnvs.begin(); iter != oldEnvs.end(); iter++) {
const QByteArray env(iter.key());
if (env.isEmpty()) {
qunsetenv(env);
if (iter.value().isEmpty()) {
qunsetenv(iter.key());
} else {
qputenv(env, iter.value());
qputenv(iter.key(), iter.value());
}
}
return app.exec();
Expand Down

0 comments on commit 8ee4488

Please sign in to comment.