┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodel.cpp
diff options
context:
space:
mode:
authorEmmanuel Pescosta <[email protected]>2012-08-24 23:58:49 +0200
committerEmmanuel Pescosta <[email protected]>2012-08-24 23:58:49 +0200
commit4e9ebb4b01440c9e4b0e4f54b2600400473f315b (patch)
treeda35b3ea7f459a0c811d2ebdd0dfbfe49e819348 /src/kitemviews/kfileitemmodel.cpp
parent23ce8df1c8163a94bbbf584cbe44a6ebd22b2c3a (diff)
parent09775ec745e825d248c982396ad36a9bd63aa255 (diff)
Merge branch 'KDE/4.9' of git://anongit.kde.org/kde-baseapps into KDE/4.9
Diffstat (limited to 'src/kitemviews/kfileitemmodel.cpp')
-rw-r--r--src/kitemviews/kfileitemmodel.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp
index 1bf9e65d4..6936af431 100644
--- a/src/kitemviews/kfileitemmodel.cpp
+++ b/src/kitemviews/kfileitemmodel.cpp
@@ -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);
- info.group = i18nc(map[i].groupTranslationContext, map[i].groupTranslation);
+ if (map[i].groupTranslation) {
+ info.group = i18nc(map[i].groupTranslationContext, map[i].groupTranslation);
+ } else {
+ // For top level roles, groupTranslation is 0. We must make sure that
+ // info.group is an empty string then because the code that generates
+ // menus tries to put the actions into sub menus otherwise.
+ info.group = QString();
+ }
info.requiresNepomuk = map[i].requiresNepomuk;
info.requiresIndexer = map[i].requiresIndexer;
rolesInfo.append(info);