[calendar] Delay the model reset until the view is ready

Otherwise things will crash.

Reviewed-by: Eike Hein
BUG: 355943
This commit is contained in:
Martin Klapetek 2015-12-02 12:57:47 -05:00
parent faca537924
commit e33b486be6

View File

@ -24,6 +24,7 @@
#include <QDebug> #include <QDebug>
#include <QByteArray> #include <QByteArray>
#include <QDir> #include <QDir>
#include <QMetaObject>
DaysModel::DaysModel(QObject *parent) : DaysModel::DaysModel(QObject *parent) :
QAbstractListModel(parent), QAbstractListModel(parent),
@ -230,5 +231,5 @@ void DaysModel::setPluginsManager(QObject *manager)
connect(m_pluginsManager, &EventPluginsManager::pluginsChanged, connect(m_pluginsManager, &EventPluginsManager::pluginsChanged,
this, &DaysModel::update); this, &DaysModel::update);
update(); QMetaObject::invokeMethod(this, "update", Qt::QueuedConnection);
} }