From dee28ca330c35e84fa7aba58e1f0c7ad169a2872 Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Thu, 15 Jul 2021 12:21:49 +0200 Subject: [PATCH] repair selection change tracking forgot to emit the change signal in a number of scenarios. this then broke actually changing the order and removing items from the selection because the signal is used to forward the current selection list to the KConfigSkeleton. by not emitting the signal in all change scenarios we'd effectively never update the stringlist inside the skeleton causing noop saves. --- kcms/translations/translationsmodel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kcms/translations/translationsmodel.cpp b/kcms/translations/translationsmodel.cpp index fabb5c947..e4217a7f1 100644 --- a/kcms/translations/translationsmodel.cpp +++ b/kcms/translations/translationsmodel.cpp @@ -164,6 +164,7 @@ void TranslationsModel::move(int from, int to) // only very few languages will be selected and thus visible when a move occurs. beginResetModel(); m_selectedLanguages.move(from, to); + Q_EMIT selectedLanguagesChanged(m_selectedLanguages); endResetModel(); } @@ -180,6 +181,7 @@ void TranslationsModel::remove(const QString &languageCode) const QModelIndex modelIndex = createIndex(index, 0); m_selectedLanguages.removeAll(languageCode); + Q_EMIT selectedLanguagesChanged(m_selectedLanguages); Q_EMIT dataChanged(modelIndex, modelIndex, {IsSelected, SelectionPreference}); }