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:
@@ -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 (...) {
|
||||
}
|
||||
|
Reference in New Issue
Block a user