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:
parent
1197f296a4
commit
0376302fe7
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user