[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [plasma-framework] src/declarativeimports/calendar: [calendar] Delay the model reset until the view
From: Martin Klapetek <mklapetek () kde ! org>
Date: 2015-12-02 17:58:22
Message-ID: E1a4Bfa-0007PD-0d () scm ! kde ! org
[Download RAW message or body]
Git commit e33b486be660fded71bc1661188a0334447d993a by Martin Klapetek.
Committed on 02/12/2015 at 17:57.
Pushed by mklapetek into branch 'master'.
[calendar] Delay the model reset until the view is ready
Otherwise things will crash.
Reviewed-by: Eike Hein
BUG: 355943
M +2 -1 src/declarativeimports/calendar/daysmodel.cpp
http://commits.kde.org/plasma-framework/e33b486be660fded71bc1661188a0334447=
d993a
diff --git a/src/declarativeimports/calendar/daysmodel.cpp b/src/declarativ=
eimports/calendar/daysmodel.cpp
index a113a41..0f81b5a 100644
--- a/src/declarativeimports/calendar/daysmodel.cpp
+++ b/src/declarativeimports/calendar/daysmodel.cpp
@@ -24,6 +24,7 @@
#include <QDebug>
#include <QByteArray>
#include <QDir>
+#include <QMetaObject>
=
DaysModel::DaysModel(QObject *parent) :
QAbstractListModel(parent),
@@ -230,5 +231,5 @@ void DaysModel::setPluginsManager(QObject *manager)
connect(m_pluginsManager, &EventPluginsManager::pluginsChanged,
this, &DaysModel::update);
=
- update();
+ QMetaObject::invokeMethod(this, "update", Qt::QueuedConnection);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic