summaryrefslogtreecommitdiffstats
path: root/tools/linguist
diff options
context:
space:
mode:
Diffstat (limited to 'tools/linguist')
-rw-r--r--tools/linguist/linguist/messageeditor.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/linguist/linguist/messageeditor.cpp b/tools/linguist/linguist/messageeditor.cpp
index 616bb26..a7cc636 100644
--- a/tools/linguist/linguist/messageeditor.cpp
+++ b/tools/linguist/linguist/messageeditor.cpp
@@ -407,10 +407,12 @@ QTextEdit *MessageEditor::activeTranslation() const
{
if (m_currentNumerus < 0)
return 0;
- foreach (QTextEdit *te, m_editors[m_currentModel].transTexts[m_currentNumerus]->getEditors())
+ const QList<FormatTextEdit *> &editors =
+ m_editors[m_currentModel].transTexts[m_currentNumerus]->getEditors();
+ foreach (QTextEdit *te, editors)
if (te->hasFocus())
return te;
- return 0; // This cannot happen
+ return editors.first();
}
QTextEdit *MessageEditor::activeOr1stTranslation() const