PluginModel: Do not call begin/end resetModel in constructor

This is only needed if we update the data afterward
This commit is contained in:
Alexander Lohnau 2023-07-21 12:54:54 +03:00 committed by Albert Vaca Cintora
parent 98040c3ffe
commit e894f7c000

View file

@ -16,10 +16,7 @@ PluginModel::PluginModel(QObject *parent)
{ {
connect(this, &QAbstractItemModel::rowsInserted, this, &PluginModel::rowsChanged); connect(this, &QAbstractItemModel::rowsInserted, this, &PluginModel::rowsChanged);
connect(this, &QAbstractItemModel::rowsRemoved, this, &PluginModel::rowsChanged); connect(this, &QAbstractItemModel::rowsRemoved, this, &PluginModel::rowsChanged);
beginResetModel();
m_plugins = KPluginMetaData::findPlugins(QStringLiteral("kdeconnect/")); m_plugins = KPluginMetaData::findPlugins(QStringLiteral("kdeconnect/"));
endResetModel();
} }
PluginModel::~PluginModel() PluginModel::~PluginModel()