Commit f25a4e3e authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Replace KIconloader with QIcon::fromTheme

Reviewers: #frameworks, #kde_telepathy, akulichalexandr

Reviewed By: #kde_telepathy, akulichalexandr

Differential Revision: https://phabricator.kde.org/D25723
parent 5b5945d6
......@@ -38,7 +38,6 @@ target_link_libraries(ktp-send-file
KF5::CoreAddons
KF5::I18n
KF5::KIOWidgets
KF5::IconThemes
)
install(TARGETS ktp-send-file ${INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -25,7 +25,6 @@
#include <KPixmapSequence>
#include <KPixmapSequenceOverlayPainter>
#include <KLocalizedString>
#include <KIconLoader>
#include <KIO/PreviewJob>
#include <QPushButton>
......@@ -84,7 +83,7 @@ MainWindow::MainWindow(const QList<QUrl> &urls, QWidget *parent) :
connect(job, SIGNAL(failed(KFileItem)),
this, SLOT(onPreviewFailed(KFileItem)));
} else {
ui->filePreview->setPixmap(QPixmap(DesktopIcon("dialog-information.png", 128)));
ui->filePreview->setPixmap(QIcon::fromTheme(QStringLiteral("dialog-information.png")).pixmap(128));
m_busyOverlay->stop();
}
......@@ -198,6 +197,6 @@ void MainWindow::onPreviewLoaded(const KFileItem& item, const QPixmap& preview)
void MainWindow::onPreviewFailed(const KFileItem& item)
{
qWarning() << "Loading thumb failed" << item.name();
ui->filePreview->setPixmap(KIconLoader::global()->loadIcon(item.iconName(), KIconLoader::Desktop, 128));
ui->filePreview->setPixmap(QIcon::fromTheme(item.iconName()).pixmap(128));
m_busyOverlay->stop();
}
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