QPA/Windows: remove unneeded check for outdated MinGW version
Remove an unused ifdef for MinGW < 3 which is no longer needed Change-Id: Id6a647982c22a1bbf5139e85aace1f37844400a9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 126ae08601b4745dfb9a14bfa06bfa3de70078bd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
6c36e48ed8
commit
841c21d548
@ -1693,14 +1693,6 @@ static int QT_WIN_CALLBACK xpFileDialogGetExistingDirCallbackProc(HWND hwnd, UIN
|
|||||||
return dialog->existingDirCallback(hwnd, uMsg, lParam);
|
return dialog->existingDirCallback(hwnd, uMsg, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The correct declaration of the SHGetPathFromIDList symbol is
|
|
||||||
* being used in mingw-w64 as of r6215, which is a v3 snapshot. */
|
|
||||||
#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
|
|
||||||
typedef ITEMIDLIST *qt_LpItemIdList;
|
|
||||||
#else
|
|
||||||
using qt_LpItemIdList = PIDLIST_ABSOLUTE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int QWindowsXpNativeFileDialog::existingDirCallback(HWND hwnd, UINT uMsg, LPARAM lParam)
|
int QWindowsXpNativeFileDialog::existingDirCallback(HWND hwnd, UINT uMsg, LPARAM lParam)
|
||||||
{
|
{
|
||||||
switch (uMsg) {
|
switch (uMsg) {
|
||||||
@ -1714,7 +1706,7 @@ int QWindowsXpNativeFileDialog::existingDirCallback(HWND hwnd, UINT uMsg, LPARAM
|
|||||||
break;
|
break;
|
||||||
case BFFM_SELCHANGED: {
|
case BFFM_SELCHANGED: {
|
||||||
wchar_t path[MAX_PATH];
|
wchar_t path[MAX_PATH];
|
||||||
const bool ok = SHGetPathFromIDList(reinterpret_cast<qt_LpItemIdList>(lParam), path)
|
const bool ok = SHGetPathFromIDList(reinterpret_cast<PIDLIST_ABSOLUTE>(lParam), path)
|
||||||
&& path[0];
|
&& path[0];
|
||||||
SendMessage(hwnd, BFFM_ENABLEOK, ok ? 1 : 0, 1);
|
SendMessage(hwnd, BFFM_ENABLEOK, ok ? 1 : 0, 1);
|
||||||
}
|
}
|
||||||
@ -1736,7 +1728,7 @@ QList<QUrl> QWindowsXpNativeFileDialog::execExistingDir(HWND owner)
|
|||||||
bi.lpfn = xpFileDialogGetExistingDirCallbackProc;
|
bi.lpfn = xpFileDialogGetExistingDirCallbackProc;
|
||||||
bi.lParam = LPARAM(this);
|
bi.lParam = LPARAM(this);
|
||||||
QList<QUrl> selectedFiles;
|
QList<QUrl> selectedFiles;
|
||||||
if (qt_LpItemIdList pItemIDList = SHBrowseForFolder(&bi)) {
|
if (const auto pItemIDList = SHBrowseForFolder(&bi)) {
|
||||||
wchar_t path[MAX_PATH];
|
wchar_t path[MAX_PATH];
|
||||||
path[0] = 0;
|
path[0] = 0;
|
||||||
if (SHGetPathFromIDList(pItemIDList, path) && path[0])
|
if (SHGetPathFromIDList(pItemIDList, path) && path[0])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user