Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 8f31e67

Browse files
committed
win32: remove useless error checking
Signed-off-by: Yuhang Zhao <[email protected]>
1 parent e162345 commit 8f31e67

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/core/utils_win.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -558,14 +558,6 @@ void Utils::showSystemMenu(const WId windowId, const QPoint &pos, const bool sel
558558
SetMenuDefaultItem(hMenu, SC_CLOSE, FALSE);
559559
const int result = TrackPopupMenu(hMenu, (TPM_RETURNCMD | (QGuiApplication::isRightToLeft()
560560
? TPM_RIGHTALIGN : TPM_LEFTALIGN)), pos.x(), pos.y(), 0, hWnd, nullptr);
561-
// TrackPopupMenu returns 0: the user cancelled the menu, or some error occurred.
562-
if (result == 0) {
563-
const DWORD dwError = GetLastError();
564-
if (dwError != ERROR_SUCCESS) {
565-
qWarning() << __getSystemErrorMessage(kTrackPopupMenu, dwError);
566-
}
567-
return;
568-
}
569561
if (PostMessageW(hWnd, WM_SYSCOMMAND, result, 0) == FALSE) {
570562
qWarning() << getSystemErrorMessage(kPostMessageW);
571563
}

0 commit comments

Comments
 (0)