2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Fix warnings on Windows

This commit is contained in:
Ilya Fedin
2024-07-03 22:55:10 +04:00
committed by John Preston
parent 8d0d9bb0bd
commit aa140b2919
6 changed files with 16 additions and 24 deletions

View File

@@ -98,7 +98,6 @@ BOOL CALLBACK FindToActivate(HWND hwnd, LPARAM lParam) {
return TRUE;
}
// Found a Top-Level window.
auto level = 0;
if (WindowIdFromHWND(hwnd) == request->windowId) {
request->result = hwnd;
request->resultLevel = 3;
@@ -310,8 +309,8 @@ void psDoFixPrevious() {
if (oldKeyRes2 == ERROR_SUCCESS) RegCloseKey(oldKey2);
if (existNew1 || existNew2) {
const auto deleteKeyRes1 = existOld1 ? RegDeleteKey(HKEY_LOCAL_MACHINE, oldKeyStr1.c_str()) : ERROR_SUCCESS;
const auto deleteKeyRes2 = existOld2 ? RegDeleteKey(HKEY_LOCAL_MACHINE, oldKeyStr2.c_str()) : ERROR_SUCCESS;
if (existOld1) RegDeleteKey(HKEY_LOCAL_MACHINE, oldKeyStr1.c_str());
if (existOld2) RegDeleteKey(HKEY_LOCAL_MACHINE, oldKeyStr2.c_str());
}
QString userDesktopLnk, commonDesktopLnk;
@@ -326,7 +325,7 @@ void psDoFixPrevious() {
}
QFile userDesktopFile(userDesktopLnk), commonDesktopFile(commonDesktopLnk);
if (QFile::exists(userDesktopLnk) && QFile::exists(commonDesktopLnk) && userDesktopLnk != commonDesktopLnk) {
bool removed = QFile::remove(commonDesktopLnk);
QFile::remove(commonDesktopLnk);
}
} catch (...) {
}