Commit 168d0511 authored by Frank Reininghaus's avatar Frank Reininghaus

Fix regression that caused "(I18N_EMPTY_MESSAGE)" sub menus in menus

For top-level roles like "Name" and "Size", the group translation is 0.
In that case, the "group" member of the corresponding RoleInfo struct
must be an empty string. This is expected by the code which generates
Dolphin's menus, which group the top-level roles into a sub menu with
the name "(I18N_EMPTY_MESSAGE)" otherwise. This is a recent regression
caused by 199fabba.

Thanks to Christoph Feck for investigating this issue!

CCBUG: 305228
parent 78dd4c9c
......@@ -561,7 +561,14 @@ QList<KFileItemModel::RoleInfo> KFileItemModel::rolesInformation()
RoleInfo info;
info.role = map[i].role;
info.translation = i18nc(map[i].roleTranslationContext, map[i].roleTranslation); = i18nc(map[i].groupTranslationContext, map[i].groupTranslation);
if (map[i].groupTranslation) { = i18nc(map[i].groupTranslationContext, map[i].groupTranslation);
} else {
// For top level roles, groupTranslation is 0. We must make sure that
// is an empty string then because the code that generates
// menus tries to put the actions into sub menus otherwise. = QString();
info.requiresNepomuk = map[i].requiresNepomuk;
info.requiresIndexer = map[i].requiresIndexer;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment