summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-01-12 15:42:19 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-01-22 16:38:43 +0000
commitd2b9b4850a5e20b126171e4418fdf1782e244c6f (patch)
treee63a96ff56a1cc81cea1ba30ba5d37c42f31f252
parentba524dc69fd9e304afba71cbf505d778e4cc92c2 (diff)
highlight combo box items by making them current
Change-Id: I6511cc5de194d3fda55adea6916f9728ffffe99b Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rw-r--r--src/linguist/linguist/formpreviewview.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/linguist/linguist/formpreviewview.cpp b/src/linguist/linguist/formpreviewview.cpp
index 1647c3cd8..2f5757b04 100644
--- a/src/linguist/linguist/formpreviewview.cpp
+++ b/src/linguist/linguist/formpreviewview.cpp
@@ -431,6 +431,11 @@ static void highlightTarget(const TranslatableEntry &target, bool on)
highlightWidget(w, on);
}
break;
+#ifndef QT_NO_COMBOBOX
+ case TranslatableComboBoxItem:
+ static_cast<QComboBox *>(target.target.object)->setCurrentIndex(target.prop.index);
+ // fallthrough
+#endif
#ifndef QT_NO_TABWIDGET
case TranslatableTabPageText:
# ifndef QT_NO_TOOLTIP
@@ -446,9 +451,6 @@ static void highlightTarget(const TranslatableEntry &target, bool on)
case TranslatableToolItemToolTip:
# endif
#endif // QT_NO_TOOLBOX
-#ifndef QT_NO_COMBOBOX
- case TranslatableComboBoxItem:
-#endif
bringToFront(static_cast<QWidget *>(target.target.object));
highlightWidget(static_cast<QWidget *>(target.target.object), on);
break;