1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Fix more incorrect HINSTANCE casts

This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-11-18 02:09:04 +01:00
parent 1197f296a4
commit 0376302fe7
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -393,13 +393,13 @@ void AutoUpdater::installLocalUpdate()
// Workaround QTBUG-7645 // Workaround QTBUG-7645
// QProcess fails silently when elevation is required instead of showing a UAC prompt on Win7/Vista // QProcess fails silently when elevation is required instead of showing a UAC prompt on Win7/Vista
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
HINSTANCE result = (int)::ShellExecuteA(0, "open", updaterBin.toUtf8().constData(), 0, 0, SW_SHOWNORMAL); HINSTANCE result = ::ShellExecuteA(0, "open", updaterBin.toUtf8().constData(), 0, 0, SW_SHOWNORMAL);
if (SE_ERR_ACCESSDENIED == result) if (result == (HINSTANCE)SE_ERR_ACCESSDENIED)
{ {
// Requesting elevation // Requesting elevation
result = (int)::ShellExecuteA(0, "runas", updaterBin.toUtf8().constData(), 0, 0, SW_SHOWNORMAL); result = ::ShellExecuteA(0, "runas", updaterBin.toUtf8().constData(), 0, 0, SW_SHOWNORMAL);
} }
if (result <= 32) if (result <= (HINSTANCE)32)
{ {
goto fail; goto fail;
} }