CLI: Restore the original codepage on windows

* Fixes #11465
This commit is contained in:
Jonathan White committed 2024-12-21 23:43:14 -05:00
1 parent ca68031795
commit ecf2e2da5a
4 files changed
+26 -4

No files matched your search

+4 -3
View File
@@ -176,6 +176,8 @@ int main(int argc, char** argv)
return EXIT_FAILURE;
}
Utils::setDefaultTextStreams();
// Apply the configured theme before creating any GUI elements
app.applyTheme();
@@ -196,9 +198,6 @@ int main(int argc, char** argv)
mainWindow.setAllowScreenCapture(parser.isSet(allowScreenCaptureOption));
const bool pwstdin = parser.isSet(pwstdinOption);
if (!fileNames.isEmpty() && pwstdin) {
Utils::setDefaultTextStreams();
}
for (const QString& filename : fileNames) {
QString password;
if (pwstdin) {
@@ -232,5 +231,7 @@ int main(int argc, char** argv)
__lsan_disable();
#endif
Utils::resetTextStreams();
return exitCode;
}