mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 07:03:08 +00:00
quicksettingsplugin: Fix improper model implementation
This commit is contained in:
parent
fff1f1959a
commit
41de61ef4c
2 changed files with 3 additions and 3 deletions
|
|
@ -205,7 +205,7 @@ void QuickSettingsModel::insertQuickSettingToModel(KPluginMetaData metaData, Qui
|
|||
}
|
||||
|
||||
if (emitInsertSignal) {
|
||||
beginInsertRows({}, insertIndex, 0);
|
||||
beginInsertRows({}, insertIndex, insertIndex);
|
||||
}
|
||||
|
||||
m_quickSettings.insert(insertIndex, quickSetting);
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ void SavedQuickSettingsModel::moveRow(int oldIndex, int newIndex)
|
|||
|
||||
void SavedQuickSettingsModel::insertRow(KPluginMetaData metaData, int index)
|
||||
{
|
||||
Q_EMIT beginInsertRows(QModelIndex(), index, index);
|
||||
beginInsertRows(QModelIndex(), index, index);
|
||||
m_data.insert(index, metaData);
|
||||
Q_EMIT endInsertRows();
|
||||
endInsertRows();
|
||||
|
||||
Q_EMIT dataUpdated(m_data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue