Commit 79deddaf authored by Daniel Teske's avatar Daniel Teske

ResourceModel::changeLang(): Prevent duplicated prefixes

Do the same check as changePrefix

Change-Id: I8edf6641295c9c38fbcc70fc5610dba275547b8a
Reviewed-by: default avatarJarek Kobus <>
Reviewed-by: default avatarhjk <>
parent d4de9185
......@@ -1027,6 +1027,10 @@ void ResourceModel::changeLang(const QModelIndex &model_idx, const QString &lang
if (m_resource_file.lang(prefix_idx) == lang)
if (m_resource_file.contains(m_resource_file.prefix(prefix_idx), lang))
m_resource_file.replaceLang(prefix_idx, lang);
emit dataChanged(prefix_model_idx, prefix_model_idx);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment