Fix build with Windows SDKs pre 7.0.

Check whether the IShellLibrary interface exists.

Task-number: QTBUG-29447

Change-Id: I93fc54a1e6d5c090f7c1768c756571ba57a7b2d2
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
bb10
Friedemann Kleint 2013-03-13 10:19:21 +01:00 committed by The Qt Project
parent 75614792fa
commit bad1918cb4
1 changed files with 3 additions and 3 deletions

View File

@ -1004,7 +1004,7 @@ void QWindowsNativeFileDialogBase::setMode(QFileDialogOptions::FileMode mode, QF
qErrnoWarning("%s: SetOptions() failed", __FUNCTION__);
}
#ifndef Q_OS_WINCE
#if !defined(Q_OS_WINCE) && defined(__IShellLibrary_INTERFACE_DEFINED__) // Windows SDK 7
// Helper for "Libraries": collections of folders appearing from Windows 7
// on, visible in the file dialogs.
@ -1057,7 +1057,7 @@ QString QWindowsNativeFileDialogBase::libraryItemDefaultSaveFolder(IShellItem *i
return result;
}
#else // !Q_OS_WINCE
#else // !Q_OS_WINCE && __IShellLibrary_INTERFACE_DEFINED__
QStringList QWindowsNativeFileDialogBase::libraryItemPaths(IShellItem *)
{
@ -1069,7 +1069,7 @@ QString QWindowsNativeFileDialogBase::libraryDefaultSaveFolder(IShellItem *)
return QString();
}
#endif // Q_OS_WINCE
#endif // Q_OS_WINCE || !__IShellLibrary_INTERFACE_DEFINED__
QString QWindowsNativeFileDialogBase::itemPath(IShellItem *item)
{