homescreens/default: Ensure application load is overridden

Fixes #206
This commit is contained in:
Devin Lin 2022-06-24 14:21:32 -04:00
parent 9f1b76c4cf
commit d0291cb211
4 changed files with 5 additions and 5 deletions

View file

@ -63,7 +63,7 @@ QHash<int, QByteArray> ApplicationListModel::roleNames() const
void ApplicationListModel::sycocaDbChanged() void ApplicationListModel::sycocaDbChanged()
{ {
loadApplications(); load();
} }
void ApplicationListModel::windowCreated(KWayland::Client::PlasmaWindow *window) void ApplicationListModel::windowCreated(KWayland::Client::PlasmaWindow *window)
@ -93,7 +93,7 @@ void ApplicationListModel::windowCreated(KWayland::Client::PlasmaWindow *window)
} }
} }
void ApplicationListModel::loadApplications() void ApplicationListModel::load()
{ {
auto cfg = KSharedConfig::openConfig(QStringLiteral("applications-blacklistrc")); auto cfg = KSharedConfig::openConfig(QStringLiteral("applications-blacklistrc"));
auto blgroup = KConfigGroup(cfg, QStringLiteral("Applications")); auto blgroup = KConfigGroup(cfg, QStringLiteral("Applications"));

View file

@ -58,7 +58,7 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE; QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
Q_INVOKABLE virtual void loadApplications(); Q_INVOKABLE virtual void load();
Q_INVOKABLE void runApplication(const QString &storageId); Q_INVOKABLE void runApplication(const QString &storageId);
Q_INVOKABLE void setMinimizedDelegate(int row, QQuickItem *delegate); Q_INVOKABLE void setMinimizedDelegate(int row, QQuickItem *delegate);

View file

@ -33,7 +33,7 @@ public:
QString uniqueToStorageId(const QString &uniqueId) const; QString uniqueToStorageId(const QString &uniqueId) const;
void loadSettings(); void loadSettings();
Q_INVOKABLE void load(); Q_INVOKABLE void load() override;
int count(); int count();
int favoriteCount(); int favoriteCount();

View file

@ -33,7 +33,7 @@ MobileShell.HomeScreen {
property bool componentComplete: false property bool componentComplete: false
Component.onCompleted: { Component.onCompleted: {
HomeScreenLib.ApplicationListModel.loadApplications(); HomeScreenLib.ApplicationListModel.load();
HomeScreenLib.DesktopModel.load(); HomeScreenLib.DesktopModel.load();
// ensure the gestures work immediately on load // ensure the gestures work immediately on load