Changeset View
Changeset View
Standalone View
Standalone View
plugins/fsview/inode.cpp
Show All 14 Lines | 1 | /* This file is part of FSView. | |||
---|---|---|---|---|---|
15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
16 | Boston, MA 02110-1301, USA. | 16 | Boston, MA 02110-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | /* | 19 | /* | ||
20 | * FSView specialisaton of TreeMapItem class. | 20 | * FSView specialisaton of TreeMapItem class. | ||
21 | */ | 21 | */ | ||
22 | 22 | | |||
23 | #include <kurl.h> | | |||
24 | | ||||
25 | #include <kdebug.h> | 23 | #include <kdebug.h> | ||
26 | #include <kglobal.h> | 24 | #include <kglobal.h> | ||
27 | #include <kiconloader.h> | 25 | #include <kiconloader.h> | ||
28 | #include <KLocalizedString> | 26 | #include <KLocalizedString> | ||
29 | #include <QMimeDatabase> | 27 | #include <QMimeDatabase> | ||
30 | #include <QMimeType> | 28 | #include <QMimeType> | ||
31 | #include "inode.h" | 29 | #include "inode.h" | ||
32 | #include "scan.h" | 30 | #include "scan.h" | ||
▲ Show 20 Lines • Show All 385 Lines • ▼ Show 20 Line(s) | |||||
418 | 416 | | |||
419 | QPixmap Inode::pixmap(int i) const | 417 | QPixmap Inode::pixmap(int i) const | ||
420 | { | 418 | { | ||
421 | if (i != 0) { | 419 | if (i != 0) { | ||
422 | return QPixmap(); | 420 | return QPixmap(); | ||
423 | } | 421 | } | ||
424 | 422 | | |||
425 | if (!_mimePixmapSet) { | 423 | if (!_mimePixmapSet) { | ||
426 | KUrl u(path()); | 424 | QUrl u = QUrl::fromLocalFile(path()); | ||
dfaure: same | |||||
427 | _mimePixmap = KIconLoader::global()->loadMimeTypeIcon(KIO::iconNameForUrl(u), KIconLoader::Small); | 425 | _mimePixmap = KIconLoader::global()->loadMimeTypeIcon(KIO::iconNameForUrl(u), KIconLoader::Small); | ||
428 | _mimePixmapSet = true; | 426 | _mimePixmapSet = true; | ||
429 | } | 427 | } | ||
430 | return _mimePixmap; | 428 | return _mimePixmap; | ||
431 | } | 429 | } |
same