summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/linguist/linguist/messagemodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linguist/linguist/messagemodel.cpp b/src/linguist/linguist/messagemodel.cpp
index ecaf2109b..bb9bd947a 100644
--- a/src/linguist/linguist/messagemodel.cpp
+++ b/src/linguist/linguist/messagemodel.cpp
@@ -275,8 +275,8 @@ bool DataModel::load(const QString &fileName, bool *langGuessed, QWidget *parent
if (lang.isEmpty()) {
lang = QFileInfo(fileName).baseName();
int pos = lang.indexOf(QLatin1Char('_'));
- if (pos != -1 && pos + 3 == lang.length())
- lang = fileName.mid(pos + 1);
+ if (pos != -1)
+ lang.remove(0, pos + 1);
else
lang.clear();
*langGuessed = true;