diff --git a/conf/dlgperformance.cpp b/conf/dlgperformance.cpp --- a/conf/dlgperformance.cpp +++ b/conf/dlgperformance.cpp @@ -13,7 +13,6 @@ #include #include -#include #include "settings_core.h" #include "ui_dlgperformancebase.h" @@ -29,8 +28,8 @@ labelFont.setBold( true ); m_dlg->descLabel->setFont( labelFont ); - m_dlg->cpuLabel->setPixmap( BarIcon( QStringLiteral("cpu"), 32 ) ); -// m_dlg->memoryLabel->setPixmap( BarIcon( "kcmmemory", 32 ) ); // TODO: enable again when proper icon is available + m_dlg->cpuLabel->setPixmap( QIcon::fromTheme( QStringLiteral("cpu") ).pixmap( 32 ) ); +// m_dlg->memoryLabel->setPixmap( QIcon::fromTheme( "kcmmemory" ).pixmap( 32 ) ); // TODO: enable again when proper icon is available m_dlg->memoryLevelGroup->setId(m_dlg->lowRadio, 0); m_dlg->memoryLevelGroup->setId(m_dlg->normalRadio, 1); diff --git a/ui/ktreeviewsearchline.cpp b/ui/ktreeviewsearchline.cpp --- a/ui/ktreeviewsearchline.cpp +++ b/ui/ktreeviewsearchline.cpp @@ -34,7 +34,6 @@ #include #include -#include #include #include diff --git a/ui/pageviewutils.cpp b/ui/pageviewutils.cpp --- a/ui/pageviewutils.cpp +++ b/ui/pageviewutils.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include // system includes @@ -258,24 +257,25 @@ // load icon (if set) m_symbol = QPixmap(); + const auto symbolSize = style()->pixelMetric(QStyle::PM_SmallIconSize); if ( icon != None ) { switch ( icon ) { case Annotation: - m_symbol = SmallIcon( QStringLiteral("draw-freehand") ); + m_symbol = QIcon::fromTheme( QStringLiteral("draw-freehand") ).pixmap( symbolSize ); break; case Find: - m_symbol = SmallIcon( QStringLiteral("zoom-original") ); + m_symbol = QIcon::fromTheme( QStringLiteral("zoom-original") ).pixmap( symbolSize ); break; case Error: - m_symbol = SmallIcon( QStringLiteral("dialog-error") ); + m_symbol = QIcon::fromTheme( QStringLiteral("dialog-error") ).pixmap( symbolSize ); break; case Warning: - m_symbol = SmallIcon( QStringLiteral("dialog-warning") ); + m_symbol = QIcon::fromTheme( QStringLiteral("dialog-warning") ).pixmap( symbolSize ); break; default: - m_symbol = SmallIcon( QStringLiteral("dialog-information") ); + m_symbol = QIcon::fromTheme( QStringLiteral("dialog-information") ).pixmap( symbolSize ); break; } diff --git a/ui/presentationwidget.cpp b/ui/presentationwidget.cpp --- a/ui/presentationwidget.cpp +++ b/ui/presentationwidget.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -1147,7 +1146,7 @@ } // draw okular logo in the four corners - QPixmap logo = DesktopIcon( QStringLiteral("okular"), 64 * dpr ); + QPixmap logo = QIcon::fromTheme( QStringLiteral("okular") ).pixmap( 64 * dpr ); logo.setDevicePixelRatio( dpr ); if ( !logo.isNull() ) { diff --git a/ui/thumbnaillist.cpp b/ui/thumbnaillist.cpp --- a/ui/thumbnaillist.cpp +++ b/ui/thumbnaillist.cpp @@ -22,7 +22,6 @@ #include #include -#include #include // local includes @@ -640,7 +639,7 @@ delete m_bookmarkOverlay; const int expectedWidth = q->viewport()->width() / 4; if ( expectedWidth > 10 ) - m_bookmarkOverlay = new QPixmap( DesktopIcon( QStringLiteral("bookmarks"), expectedWidth ) ); + m_bookmarkOverlay = new QPixmap( QIcon::fromTheme( QStringLiteral("bookmarks") ).pixmap( expectedWidth ) ); else m_bookmarkOverlay = nullptr;