From 2526df506bda99f9497e83a4e6820557a722660e Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Sun, 24 Oct 2021 13:13:12 +0800 Subject: Remove pre-Win10 code paths in QtBase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mostly a removal of dynamically loaded API. They should all exist on Windows 10 1809 (Qt6's minimum supported version). accessibility parts left untouched to make sure MinGW still compiles. Task-number: QTBUG-84432 Pick-to: 6.2 Change-Id: I7a091fc967bd6b9d18ac2de39db16e3b4b9a76ea Reviewed-by: André de la Rocha --- src/corelib/io/qprocess_win.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/corelib/io/qprocess_win.cpp') diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp index c5dce4d438..c1084d72a1 100644 --- a/src/corelib/io/qprocess_win.cpp +++ b/src/corelib/io/qprocess_win.cpp @@ -886,14 +886,6 @@ static bool startDetachedUacPrompt(const QString &programIn, const QStringList & const QString &nativeArguments, const QString &workingDir, qint64 *pid) { - typedef BOOL (WINAPI *ShellExecuteExType)(SHELLEXECUTEINFOW *); - - static const ShellExecuteExType shellExecuteEx = // XP ServicePack 1 onwards. - reinterpret_cast(QSystemLibrary::resolve(QLatin1String("shell32"), - "ShellExecuteExW")); - if (!shellExecuteEx) - return false; - const QString args = qt_create_commandline(QString(), // needs arguments only arguments, nativeArguments); SHELLEXECUTEINFOW shellExecuteExInfo; @@ -910,7 +902,7 @@ static bool startDetachedUacPrompt(const QString &programIn, const QStringList & shellExecuteExInfo.lpDirectory = reinterpret_cast(workingDir.utf16()); shellExecuteExInfo.nShow = SW_SHOWNORMAL; - if (!shellExecuteEx(&shellExecuteExInfo)) + if (!ShellExecuteExW(&shellExecuteExInfo)) return false; if (pid) *pid = qint64(GetProcessId(shellExecuteExInfo.hProcess)); -- cgit v1.2.3