From 06363095785614b75a50bd42bc59f9e98cd856dd Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Fri, 13 May 2022 08:32:52 +0200 Subject: [PATCH] databaseChanged is deprecated => in code we export "apps" by default => we can port it. now all compile fine in qt6 --- .../mobileshell/homescreen/applicationlistmodel.cpp | 8 ++------ components/mobileshell/homescreen/applicationlistmodel.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/components/mobileshell/homescreen/applicationlistmodel.cpp b/components/mobileshell/homescreen/applicationlistmodel.cpp index 3be02683..22b3db91 100644 --- a/components/mobileshell/homescreen/applicationlistmodel.cpp +++ b/components/mobileshell/homescreen/applicationlistmodel.cpp @@ -37,7 +37,7 @@ constexpr int MAX_FAVOURITES = 5; ApplicationListModel::ApplicationListModel(QObject *parent) : QAbstractListModel(parent) { - connect(KSycoca::self(), qOverload(&KSycoca::databaseChanged), this, &ApplicationListModel::sycocaDbChanged); + connect(KSycoca::self(), &KSycoca::databaseChanged, this, &ApplicationListModel::sycocaDbChanged); connect(WindowUtil::instance(), &WindowUtil::windowCreated, this, &ApplicationListModel::windowCreated); @@ -83,12 +83,8 @@ QHash ApplicationListModel::roleNames() const {ApplicationUniqueIdRole, QByteArrayLiteral("applicationUniqueId")}}; } -void ApplicationListModel::sycocaDbChanged(const QStringList &changes) +void ApplicationListModel::sycocaDbChanged() { - if (!changes.contains(QStringLiteral("apps")) && !changes.contains(QStringLiteral("xdgdata-apps"))) { - return; - } - m_applicationList.clear(); loadApplications(); diff --git a/components/mobileshell/homescreen/applicationlistmodel.h b/components/mobileshell/homescreen/applicationlistmodel.h index 45bf619f..9e1c04f3 100644 --- a/components/mobileshell/homescreen/applicationlistmodel.h +++ b/components/mobileshell/homescreen/applicationlistmodel.h @@ -113,7 +113,7 @@ public: Q_INVOKABLE void unsetMinimizedDelegate(int row, QQuickItem *delegate); public Q_SLOTS: - void sycocaDbChanged(const QStringList &change); + void sycocaDbChanged(); void windowCreated(KWayland::Client::PlasmaWindow *window); Q_SIGNALS: