Qt 4.8
Macros | Functions
qfileiconprovider.cpp File Reference
#include "qfileiconprovider.h"
#include "qfileiconprovider_p.h"
#include <qfileinfo.h>
#include <qapplication.h>
#include <qdir.h>
#include <qpixmapcache.h>
#include <qt_windows.h>
#include <commctrl.h>
#include <objbase.h>
#include <private/qfunctions_p.h>
#include <private/qguiplatformplugin_p.h>
#include <private/qgtkstyle_p.h>
#include <private/qt_x11_p.h>

Go to the source code of this file.

Macros

#define _WIN32_IE   0x0500
 
#define SHGFI_ADDOVERLAYS   0x000000020
 
#define SHGFI_OVERLAYINDEX   0x000000040
 

Functions

static bool isCacheable (const QFileInfo &fi)
 

Macro Definition Documentation

◆ _WIN32_IE

#define _WIN32_IE   0x0500

Definition at line 51 of file qfileiconprovider.cpp.

◆ SHGFI_ADDOVERLAYS

#define SHGFI_ADDOVERLAYS   0x000000020

Definition at line 68 of file qfileiconprovider.cpp.

Referenced by QFileIconProviderPrivate::getWinIcon().

◆ SHGFI_OVERLAYINDEX

#define SHGFI_OVERLAYINDEX   0x000000040

Definition at line 69 of file qfileiconprovider.cpp.

Referenced by QFileIconProviderPrivate::getWinIcon().

Function Documentation

◆ isCacheable()

static bool isCacheable ( const QFileInfo fi)
static

Definition at line 209 of file qfileiconprovider.cpp.

Referenced by QFileIconProviderPrivate::getWinIcon().

210 {
211  if (!fi.isFile())
212  return false;
213 
214  // On windows it's faster to just look at the file extensions. QTBUG-13182
215  const QString fileExtension = fi.suffix();
216  return fileExtension.compare(QLatin1String("exe"), Qt::CaseInsensitive) &&
217  fileExtension.compare(QLatin1String("lnk"), Qt::CaseInsensitive) &&
218  fileExtension.compare(QLatin1String("ico"), Qt::CaseInsensitive);
219 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
Definition: qstring.h:83
int compare(const QString &s) const
Definition: qstring.cpp:5037
QString suffix() const
Returns the suffix of the file.
Definition: qfileinfo.cpp:834
bool isFile() const
Returns true if this object points to a file or to a symbolic link to a file.
Definition: qfileinfo.cpp:971