224 static int defaultFolderIIcon = -1;
241 const bool cacheableDirIcon = fileInfo.isDir() && !fileInfo.isRoot();
260 unsigned long val = 0;
271 flags |= SHGFI_USEFILEATTRIBUTES;
272 val = SHGetFileInfo(L
"dummy",
273 FILE_ATTRIBUTE_DIRECTORY, &info,
274 sizeof(SHFILEINFO), flags | SHGFI_SMALLICON);
277 0, &
info,
sizeof(SHFILEINFO), flags | SHGFI_SMALLICON);
281 if (val && info.hIcon) {
282 if (fileInfo.isDir() && !fileInfo.isRoot()) {
284 defaultFolderIIcon = info.iIcon;
292 DestroyIcon(info.hIcon);
308 qWarning(
"QFileIconProviderPrivate::getWinIcon() no small icon found");
311 DestroyIcon(info.hIcon);
316 0, &
info,
sizeof(SHFILEINFO), flags | SHGFI_LARGEICON);
318 if (val && info.hIcon) {
319 if (fileInfo.isDir() && !fileInfo.isRoot()) {
334 qWarning(
"QFileIconProviderPrivate::getWinIcon() no large icon found");
336 DestroyIcon(info.hIcon);
static bool isCacheable(const QFileInfo &fi)
static mach_timebase_info_data_t info
void addPixmap(const QPixmap &pixmap, Mode mode=Normal, State state=Off)
Adds pixmap to the icon, as a specialization for mode and state.
#define SHGFI_OVERLAYINDEX
static QPixmap fromWinHICON(HICON hicon)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
static QPixmap * find(const QString &key)
bool useCustomDirectoryIcons
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Q_CORE_EXPORT void qWarning(const char *,...)
#define SHGFI_ADDOVERLAYS
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
static bool insert(const QString &key, const QPixmap &pixmap)
Inserts a copy of the pixmap pixmap associated with the key into the cache.
The QPixmap class is an off-screen image representation that can be used as a paint device...
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
static QString toNativeSeparators(const QString &pathName)
Returns pathName with the '/' separators converted to separators that are appropriate for the underly...
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
The QIcon class provides scalable icons in different modes and states.