summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-01-12 15:33:55 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-01-22 16:38:29 +0000
commitcec37e10d6b58e1dc180851ffc2302315991b747 (patch)
tree5da16e280e61b9ba80e9e09ce54ab5527fbd9acd
parent39ee51674db3dbafa30646836ece7ced4db14273 (diff)
don't unnecessarily use qobject_cast<>
Change-Id: I12242ae48b00fc7789009b8ddf967c21a2cf3513 Reviewed-by: Frederic Marchal <frederic.marchal@wowtechnology.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rw-r--r--src/linguist/linguist/formpreviewview.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/linguist/linguist/formpreviewview.cpp b/src/linguist/linguist/formpreviewview.cpp
index 31a736178..95d986713 100644
--- a/src/linguist/linguist/formpreviewview.cpp
+++ b/src/linguist/linguist/formpreviewview.cpp
@@ -426,9 +426,10 @@ static void highlightTarget(const TranslatableEntry &target, bool on)
case TranslatableProperty:
if (QAction *a = qobject_cast<QAction *>(target.target.object)) {
highlightAction(a, on);
- break;
+ } else if (QWidget *w = qobject_cast<QWidget *>(target.target.object)) {
+ highlightWidget(w, on);
}
- // fallthrough
+ break;
#ifndef QT_NO_TABWIDGET
case TranslatableTabPageText:
# ifndef QT_NO_TOOLTIP
@@ -447,8 +448,7 @@ static void highlightTarget(const TranslatableEntry &target, bool on)
#ifndef QT_NO_COMBOBOX
case TranslatableComboBoxItem:
#endif
- if (QWidget *w = qobject_cast<QWidget *>(target.target.object))
- highlightWidget(w, on);
+ highlightWidget(static_cast<QWidget *>(target.target.object), on);
break;
#ifndef QT_NO_LISTWIDGET
case TranslatableListWidgetItem: