You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pidlist_absolute.patch 2.1KB

12345678910111213141516171819202122232425262728293031323334353637
  1. diff -dur old/qtbase/src/plugins/platforms/windows/qwindowscontext.h new/qtbase/src/plugins/platforms/windows/qwindowscontext.h
  2. --- old/qtbase/src/plugins/platforms/windows/qwindowscontext.h
  3. +++ new/qtbase/src/plugins/platforms/windows/qwindowscontext.h
  4. @@ -136,10 +136,18 @@
  5. inline void init();
  6. typedef HRESULT (WINAPI *SHCreateItemFromParsingName)(PCWSTR, IBindCtx *, const GUID&, void **);
  7. +#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
  8. + typedef HRESULT (WINAPI *SHGetKnownFolderIDList)(const GUID &, DWORD, HANDLE, ITEMIDLIST **);
  9. +#else
  10. typedef HRESULT (WINAPI *SHGetKnownFolderIDList)(const GUID &, DWORD, HANDLE, PIDLIST_ABSOLUTE *);
  11. +#endif
  12. typedef HRESULT (WINAPI *SHGetStockIconInfo)(int , int , _SHSTOCKICONINFO *);
  13. typedef HRESULT (WINAPI *SHGetImageList)(int, REFIID , void **);
  14. +#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
  15. + typedef HRESULT (WINAPI *SHCreateItemFromIDList)(const ITEMIDLIST *, REFIID, void **);
  16. +#else
  17. typedef HRESULT (WINAPI *SHCreateItemFromIDList)(PCIDLIST_ABSOLUTE, REFIID, void **);
  18. +#endif
  19. SHCreateItemFromParsingName sHCreateItemFromParsingName;
  20. SHGetKnownFolderIDList sHGetKnownFolderIDList;
  21. diff -dur old/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp new/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
  22. --- old/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
  23. +++ new/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
  24. @@ -1016,7 +1016,11 @@
  25. qWarning() << __FUNCTION__ << ": Invalid CLSID: " << url.path();
  26. return Q_NULLPTR;
  27. }
  28. +#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
  29. + ITEMIDLIST *idList;
  30. +#else
  31. PIDLIST_ABSOLUTE idList;
  32. +#endif
  33. HRESULT hr = QWindowsContext::shell32dll.sHGetKnownFolderIDList(uuid, 0, 0, &idList);
  34. if (FAILED(hr)) {
  35. qErrnoWarning("%s: SHGetKnownFolderIDList(%s)) failed", __FUNCTION__, qPrintable(url.toString()));