summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qfileiconprovider.cpp
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2013-07-17 10:50:00 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-23 13:06:20 (GMT)
commit88113a90f012db05e6e0b1ec60ddced02d6673fe (patch)
tree9801aba55b0b6e8719893c657ecd32fdcad3e24b /src/gui/itemviews/qfileiconprovider.cpp
parentdb13a5a2fe48da963e0c471cd88b56148aa2b65e (diff)
downloadQt-88113a90f012db05e6e0b1ec60ddced02d6673fe.zip
Qt-88113a90f012db05e6e0b1ec60ddced02d6673fe.tar.gz
Qt-88113a90f012db05e6e0b1ec60ddced02d6673fe.tar.bz2
Move the declaration of QFileIconProviderPrivate to it's own file.
Needed to backport qtbase/46685f755b01288fd53c4483cb97a22c426a57f0 to Qt4. We can't add new symbols in Qt4 to QFileIconProvider so we will make the private class a friend of the QFileDialog. Change-Id: Ic720d681da14698ecf8557e1223d82bda6b33e23 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> (cherry picked from qtbase/f4a0d6d2494d1dd41cd5b854a48b435120714d32)
Diffstat (limited to 'src/gui/itemviews/qfileiconprovider.cpp')
-rw-r--r--src/gui/itemviews/qfileiconprovider.cpp35
1 files changed, 2 insertions, 33 deletions
diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp
index e958eb3..2808226 100644
--- a/src/gui/itemviews/qfileiconprovider.cpp
+++ b/src/gui/itemviews/qfileiconprovider.cpp
@@ -40,9 +40,10 @@
****************************************************************************/
#include "qfileiconprovider.h"
+#include "qfileiconprovider_p.h"
#ifndef QT_NO_FILEICONPROVIDER
-#include <qstyle.h>
+#include <qfileinfo.h>
#include <qapplication.h>
#include <qdir.h>
#include <qpixmapcache.h>
@@ -87,38 +88,6 @@ QT_BEGIN_NAMESPACE
\value File
*/
-class QFileIconProviderPrivate
-{
- Q_DECLARE_PUBLIC(QFileIconProvider)
-
-public:
- QFileIconProviderPrivate();
- QIcon getIcon(QStyle::StandardPixmap name) const;
-#ifdef Q_WS_WIN
- QIcon getWinIcon(const QFileInfo &fi) const;
-#elif defined(Q_WS_MAC)
- QIcon getMacIcon(const QFileInfo &fi) const;
-#endif
- QFileIconProvider *q_ptr;
- const QString homePath;
-
-private:
- mutable QIcon file;
- mutable QIcon fileLink;
- mutable QIcon directory;
- mutable QIcon directoryLink;
- mutable QIcon harddisk;
- mutable QIcon floppy;
- mutable QIcon cdrom;
- mutable QIcon ram;
- mutable QIcon network;
- mutable QIcon computer;
- mutable QIcon desktop;
- mutable QIcon trashcan;
- mutable QIcon generic;
- mutable QIcon home;
-};
-
QFileIconProviderPrivate::QFileIconProviderPrivate() :
homePath(QDir::home().absolutePath())
{