From 5512fa1224f755fe98a4e9dfdfe4c75ed06cd04e Mon Sep 17 00:00:00 2001 From: Eike Hein Date: Tue, 16 May 2017 21:43:29 +0900 Subject: [PATCH] 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 5ad6e274b7790. BUG:379783 --- recentusagemodel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recentusagemodel.cpp b/recentusagemodel.cpp index 5b8304852..0bab03e71 100644 --- a/recentusagemodel.cpp +++ b/recentusagemodel.cpp @@ -26,6 +26,7 @@ #include #include +#include #if HAVE_X11 #include #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; }