Commit 8685328f authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Port from KIconLoader::loadIcon to QIcon::fromTheme

parent 3bae1281
......@@ -76,8 +76,7 @@ struct SaveBarPrivate
// Icon
QLabel* iconLabel = new QLabel;
QPixmap pix = KIconLoader::global()->loadIcon(
"dialog-warning", KIconLoader::Dialog, KIconLoader::SizeSmall);
QPixmap pix = QIcon::fromTheme(QStringLiteral("dialog-warning")).pixmap(KIconLoader::SizeSmall);
iconLabel->setPixmap(pix);
// Text label
......
......@@ -133,10 +133,9 @@ struct ThumbnailPagePrivate : public Ui_ThumbnailPage
void setupIcons()
{
const KIconLoader::Group group = KIconLoader::NoGroup;
const int size = KIconLoader::SizeHuge;
mSrcIconLabel->setPixmap(KIconLoader::global()->loadIcon("camera-photo", group, size));
mDstIconLabel->setPixmap(KIconLoader::global()->loadIcon("computer", group, size));
mSrcIconLabel->setPixmap(QIcon::fromTheme(QStringLiteral("camera-photo")).pixmap(size));
mDstIconLabel->setPixmap(QIcon::fromTheme(QStringLiteral("computer")).pixmap(size));
}
void setupSrcUrlWidgets()
......
......@@ -617,7 +617,7 @@ void ThumbnailView::setBrokenThumbnail(const KFileItem& item)
// Special case for videos because our kde install may come without
// support for video thumbnails so we show the mimetype icon instead of
// a broken image icon
const QPixmap pix = KIconLoader::global()->loadIcon(item.iconName(), KIconLoader::Desktop, d->mThumbnailSize.height());
const QPixmap pix = QIcon::fromTheme(item.iconName()).pixmap(d->mThumbnailSize.height());
thumbnail.initAsIcon(pix);
} else if (kind == MimeTypeUtils::KIND_DIR) {
// Special case for folders because ThumbnailProvider does not return a
......@@ -656,7 +656,7 @@ QPixmap ThumbnailView::thumbnailForIndex(const QModelIndex& index, QSize* fullSi
if (kind == MimeTypeUtils::KIND_ARCHIVE || kind == MimeTypeUtils::KIND_DIR) {
int groupSize = ThumbnailGroup::pixelSize(ThumbnailGroup::fromPixelSize(d->mThumbnailSize.height()));
if (thumbnail.mGroupPix.isNull() || thumbnail.mGroupPix.height() < groupSize) {
const QPixmap pix = KIconLoader::global()->loadIcon(item.iconName(), KIconLoader::Desktop, d->mThumbnailSize.height());
const QPixmap pix = QIcon::fromTheme(item.iconName()).pixmap(d->mThumbnailSize.height());
thumbnail.initAsIcon(pix);
if (kind == MimeTypeUtils::KIND_ARCHIVE) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment