Commit 5177df3e authored by Volker Krause's avatar Volker Krause
Browse files

Port away from deprecated BarIcon method

Reviewers: mlaurent

Reviewed By: mlaurent

Subscribers: kde-pim

Tags: #kde_pim

Maniphest Tasks: T11654

Differential Revision: https://phabricator.kde.org/D24782
parent b6600475
...@@ -38,7 +38,6 @@ set(AKONADI_VERSION "5.12.40") ...@@ -38,7 +38,6 @@ set(AKONADI_VERSION "5.12.40")
find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED) find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test UiTools PrintSupport) find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test UiTools PrintSupport)
find_package(KF5I18n ${KF5_MIN_VERSION} CONFIG REQUIRED) find_package(KF5I18n ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5IconThemes ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5GuiAddons ${KF5_MIN_VERSION} CONFIG REQUIRED) find_package(KF5GuiAddons ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5KIO ${KF5_MIN_VERSION} CONFIG REQUIRED) find_package(KF5KIO ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED) find_package(KF5Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED)
......
...@@ -67,7 +67,6 @@ PRIVATE ...@@ -67,7 +67,6 @@ PRIVATE
KF5::I18n KF5::I18n
KF5::Completion KF5::Completion
KF5::KIOWidgets KF5::KIOWidgets
KF5::IconThemes
KF5::GuiAddons KF5::GuiAddons
KF5::AkonadiWidgets KF5::AkonadiWidgets
KF5::Holidays KF5::Holidays
......
...@@ -56,9 +56,9 @@ ...@@ -56,9 +56,9 @@
#include <KMessageBox> #include <KMessageBox>
#include <KIO/FileCopyJob> #include <KIO/FileCopyJob>
#include <KIconLoader>
#include <KLocalizedString> #include <KLocalizedString>
#include <QApplication>
#include <QUrl> #include <QUrl>
#include <QAbstractItemModel> #include <QAbstractItemModel>
#include <QDrag> #include <QDrag>
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
#include <QUrlQuery> #include <QUrlQuery>
#include <QRegularExpression> #include <QRegularExpression>
#include <QTimeZone> #include <QTimeZone>
#include <QStyle>
#include "calendarsupport_debug.h" #include "calendarsupport_debug.h"
...@@ -271,9 +272,9 @@ QDrag *CalendarSupport::createDrag(const Akonadi::Item::List &items, QWidget *pa ...@@ -271,9 +272,9 @@ QDrag *CalendarSupport::createDrag(const Akonadi::Item::List &items, QWidget *pa
const QByteArray common = findMostCommonType(items); const QByteArray common = findMostCommonType(items);
if (common == "Event") { if (common == "Event") {
drag->setPixmap(BarIcon(QStringLiteral("view-calendar-day"))); drag->setPixmap(QIcon::fromTheme(QStringLiteral("view-calendar-day")).pixmap(qApp->style()->pixelMetric(QStyle::PM_ToolBarIconSize)));
} else if (common == "Todo") { } else if (common == "Todo") {
drag->setPixmap(BarIcon(QStringLiteral("view-calendar-tasks"))); drag->setPixmap(QIcon::fromTheme(QStringLiteral("view-calendar-tasks")).pixmap(qApp->style()->pixelMetric(QStyle::PM_ToolBarIconSize)));
} }
return drag.release(); return drag.release();
......
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