diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,7 +76,6 @@ find_package(KF5GlobalAccel ${KF5_MIN_VERSION} REQUIRED) find_package(KF5GuiAddons ${KF5_MIN_VERSION} REQUIRED) find_package(KF5I18n ${KF5_MIN_VERSION} CONFIG REQUIRED) -find_package(KF5IconThemes ${KF5_MIN_VERSION} REQUIRED) find_package(KF5JobWidgets ${KF5_MIN_VERSION} REQUIRED) find_package(KF5KCMUtils ${KF5_MIN_VERSION} CONFIG REQUIRED) find_package(KF5KIO ${KF5_MIN_VERSION} CONFIG REQUIRED) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -144,7 +144,6 @@ KF5::GlobalAccel KF5::GuiAddons KF5::Holidays - KF5::IconThemes KF5::KIOWidgets KF5::Notifications KF5::TextWidgets diff --git a/src/messagewin.cpp b/src/messagewin.cpp --- a/src/messagewin.cpp +++ b/src/messagewin.cpp @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -603,7 +602,7 @@ layout->addStretch(); topLayout->addLayout(layout); QLabel* label = new QLabel(topWidget); - label->setPixmap(QIcon::fromTheme(QStringLiteral("dialog-error")).pixmap(IconSize(KIconLoader::Desktop), IconSize(KIconLoader::Desktop))); + label->setPixmap(QIcon::fromTheme(QStringLiteral("dialog-error")).pixmap(style()->pixelMetric(QStyle::PM_MessageBoxIconSize))); label->setFixedSize(label->sizeHint()); layout->addWidget(label, 0, Qt::AlignRight); QVBoxLayout* vlayout = new QVBoxLayout(); @@ -663,13 +662,11 @@ else setDeferralLimit(mEvent); // ensure that button is disabled when alarm can't be deferred any more - KIconLoader iconLoader; if (!mAudioFile.isEmpty() && (mVolume || mFadeVolume > 0)) { // Silence button to stop sound repetition - const QPixmap pixmap = iconLoader.loadIcon(QStringLiteral("media-playback-stop"), KIconLoader::MainToolbar); mSilenceButton = new PushButton(topWidget); - mSilenceButton->setIcon(pixmap); + mSilenceButton->setIcon(QIcon::fromTheme(QStringLiteral("media-playback-stop"))); grid->addWidget(mSilenceButton, 0, gridIndex++, Qt::AlignHCenter); mSilenceButton->setToolTip(i18nc("@info:tooltip", "Stop sound")); mSilenceButton->setWhatsThis(i18nc("@info:whatsthis", "Stop playing the sound")); @@ -680,19 +677,17 @@ if (mAkonadiItemId >= 0) { // KMail button - const QPixmap pixmap = iconLoader.loadIcon(QStringLiteral("internet-mail"), KIconLoader::MainToolbar); mKMailButton = new PushButton(topWidget); - mKMailButton->setIcon(pixmap); + mKMailButton->setIcon(QIcon::fromTheme(QStringLiteral("internet-mail"))); connect(mKMailButton, &QAbstractButton::clicked, this, &MessageWin::slotShowKMailMessage); grid->addWidget(mKMailButton, 0, gridIndex++, Qt::AlignHCenter); mKMailButton->setToolTip(xi18nc("@info:tooltip Locate this email in KMail", "Locate in KMail")); mKMailButton->setWhatsThis(xi18nc("@info:whatsthis", "Locate and highlight this email in KMail")); } // KAlarm button - const QPixmap pixmap = iconLoader.loadIcon(KAboutData::applicationData().componentName(), KIconLoader::MainToolbar); mKAlarmButton = new PushButton(topWidget); - mKAlarmButton->setIcon(pixmap); + mKAlarmButton->setIcon(QIcon::fromTheme(KAboutData::applicationData().componentName())); connect(mKAlarmButton, &QAbstractButton::clicked, this, &MessageWin::displayMainWindow); grid->addWidget(mKAlarmButton, 0, gridIndex++, Qt::AlignHCenter); mKAlarmButton->setToolTip(xi18nc("@info:tooltip", "Activate KAlarm")); diff --git a/src/traywindow.cpp b/src/traywindow.cpp --- a/src/traywindow.cpp +++ b/src/traywindow.cpp @@ -42,7 +42,6 @@ #include #include #include -#include #include #include