Introduce QT_NO_WINCE_SHELLSDK for WEC builds.
ShellSDK isn't always available in WEC2013 and sadly the define that should tell us if it is isn't enough as the headers would be in the SDK but the lib doesn't need to have the symbols. Change-Id: Iccd11eafd0dbd22ee421c9a08f05bfc2fc5bdd49 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
parent
2839e8d010
commit
683d817ada
@ -407,7 +407,7 @@ static QString readLink(const QFileSystemEntry &link)
|
||||
Q_UNUSED(link);
|
||||
return QString();
|
||||
#endif // QT_NO_LIBRARY
|
||||
#else
|
||||
#elif !defined(QT_NO_WINCE_SHELLSDK)
|
||||
wchar_t target[MAX_PATH];
|
||||
QString result;
|
||||
if (SHGetShortcutTarget((wchar_t*)QFileInfo(link.filePath()).absoluteFilePath().replace(QLatin1Char('/'),QLatin1Char('\\')).utf16(), target, MAX_PATH)) {
|
||||
@ -418,6 +418,9 @@ static QString readLink(const QFileSystemEntry &link)
|
||||
result.remove(result.size()-1,1);
|
||||
}
|
||||
return result;
|
||||
#else // QT_NO_WINCE_SHELLSDK
|
||||
Q_UNUSED(link);
|
||||
return QString();
|
||||
#endif // Q_OS_WINCE
|
||||
}
|
||||
|
||||
|
@ -711,7 +711,7 @@ bool QFSFileEngine::link(const QString &newName)
|
||||
Q_UNUSED(newName);
|
||||
return false;
|
||||
#endif // QT_NO_LIBRARY
|
||||
#elif defined(Q_OS_WINCE)
|
||||
#elif defined(Q_OS_WINCE) && !defined(QT_NO_WINCE_SHELLSDK)
|
||||
QString linkName = newName;
|
||||
linkName.replace(QLatin1Char('/'), QLatin1Char('\\'));
|
||||
if (!linkName.endsWith(QLatin1String(".lnk")))
|
||||
@ -724,7 +724,7 @@ bool QFSFileEngine::link(const QString &newName)
|
||||
if (!ret)
|
||||
setError(QFile::RenameError, qt_error_string());
|
||||
return ret;
|
||||
#else // Q_OS_WINCE
|
||||
#else // Q_OS_WINCE && !QT_NO_WINCE_SHELLSDK
|
||||
Q_UNUSED(newName);
|
||||
Q_UNIMPLEMENTED();
|
||||
return false;
|
||||
|
@ -720,6 +720,7 @@ QPixmap QWindowsTheme::fileIconPixmap(const QFileInfo &fileInfo, const QSizeF &s
|
||||
iconSize|SHGFI_SYSICONINDEX;
|
||||
#endif // Q_OS_WINCE
|
||||
unsigned long val = 0;
|
||||
#if !defined(QT_NO_WINCE_SHELLSDK)
|
||||
if (cacheableDirIcon && useDefaultFolderIcon) {
|
||||
flags |= SHGFI_USEFILEATTRIBUTES;
|
||||
val = SHGetFileInfo(L"dummy",
|
||||
@ -729,6 +730,7 @@ QPixmap QWindowsTheme::fileIconPixmap(const QFileInfo &fileInfo, const QSizeF &s
|
||||
val = SHGetFileInfo(reinterpret_cast<const wchar_t *>(filePath.utf16()), 0,
|
||||
&info, sizeof(SHFILEINFO), flags);
|
||||
}
|
||||
#endif // !QT_NO_WINCE_SHELLSDK
|
||||
|
||||
// Even if GetFileInfo returns a valid result, hIcon can be empty in some cases
|
||||
if (val && info.hIcon) {
|
||||
|
Loading…
Reference in New Issue
Block a user