┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-11-21 09:01:01 +0100
committerLaurent Montel <[email protected]>2018-11-21 09:01:01 +0100
commit2a96387f760104be6e01d0ae7a82d956ac8bf992 (patch)
treea726d5c9dc4cec0735fff426098a2b16b224c920 /src/kitemviews
parentcea66c1b96da9309aeef23ab70c145271c944d68 (diff)
Avoid warning when translatedtext is null
Diffstat (limited to 'src/kitemviews')
-rw-r--r--src/kitemviews/kfileitemmodel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp
index fd0a88fb6..e67255c0a 100644
--- a/src/kitemviews/kfileitemmodel.cpp
+++ b/src/kitemviews/kfileitemmodel.cpp
@@ -304,6 +304,9 @@ QString KFileItemModel::roleDescription(const QByteArray& role) const
int count = 0;
const RoleInfoMap* map = rolesInfoMap(count);
for (int i = 0; i < count; ++i) {
+ if (!map[i].roleTranslation) {
+ continue;
+ }
description.insert(map[i].role, i18nc(map[i].roleTranslationContext, map[i].roleTranslation));
}
}