-
Notifications
You must be signed in to change notification settings - Fork 667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows: Block system shutdown until we are properly shutdown #9227
Conversation
4c7bb92
to
989d2a8
Compare
We now block for up to 5s, if we take longer we might get killed by the system. We could also use ShutdownBlockReasonCreate |
989d2a8
to
2136bee
Compare
2136bee
to
c8e3468
Compare
@@ -2,6 +2,10 @@ include(ECMAddAppIcon) | |||
|
|||
find_package(Qt5 REQUIRED COMPONENTS Widgets) | |||
|
|||
#if (WIN32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is an optional dependency, consider introducing a CMake variable allowing users to opt into adding it. Could also be used in the code to opt into setting that icon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't consider it optional.
Optional dependencies never solved an issue, optional Qt modules certainly never did that.
OC_ASSERT(RegisterClass(&wc)); | ||
|
||
auto window = CreateWindowW(wc.lpszClassName, L"watcher", WS_OVERLAPPED, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, nullptr, nullptr, wc.hInstance, nullptr); | ||
OC_ASSERT_X(window, Utility::formatWinError(GetLastError()).toUtf8().constData()); | ||
auto watcherWindow = CreateWindowW(wc.lpszClassName, reinterpret_cast<const wchar_t *>(Theme::instance()->appNameGUI().utf16()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need the app name more than once. Might be easier to create a variable for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Different scopes, and the lambda can't capture anything.
c8e3468
to
a6c5a85
Compare
Kudos, SonarCloud Quality Gate passed! |
No description provided.