Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 6a76ce0b authored by Eike Hein's avatar Eike Hein

Only defer initial refresh when actually instanciated from QML.

Fixes initial refresh in Kicker, where the RUM is instanciated
internally by RootModel.

Fixes regression from 5ad6e274.

BUG:379783
parent 0a4eb37c
......@@ -26,6 +26,7 @@
#include <config-X11.h>
#include <QIcon>
#include <QtQml>
#if HAVE_X11
#include <QX11Info>
#endif
......@@ -118,6 +119,7 @@ RecentUsageModel::RecentUsageModel(QObject *parent, IncludeUsage usage, int orde
, m_ordering((Ordering)ordering)
, m_complete(false)
{
refresh();
}
RecentUsageModel::~RecentUsageModel()
......@@ -408,7 +410,7 @@ void RecentUsageModel::componentComplete()
void RecentUsageModel::refresh()
{
if (!m_complete) {
if (qmlEngine(this) && !m_complete) {
return;
}
......
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