summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-06-20 16:11:26 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-06-23 08:33:41 +0000
commita41e6e669f649973f981aaa89c8ba8ff9cedbec9 (patch)
treef93e0314e8a5286fccb92a31480167c56fffbefd
parentdfce0a8feceeb7156eba6ac5d8d3521e3009a583 (diff)
tst_qquicktext::width(): Fix GCC 7 warning about enum constant in boolean context
tst_qquicktext.cpp: In member function 'void tst_qquicktext::width()': tst_qquicktext.cpp:339:61: warning: enum constant in boolean context [-Wint-in-bool-context] metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width(); Change-Id: Ifde8fca08f16209e6b00e4c8c6ce2f823fa7a974 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--tests/auto/quick/qquicktext/tst_qquicktext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
index f741062d42..c5fa0e19fa 100644
--- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp
+++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
@@ -336,7 +336,7 @@ void tst_qquicktext::width()
metricWidth = layout.boundingRect().width();
} else {
QFontMetricsF fm(f);
- metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width();
+ metricWidth = fm.size(Qt::TextExpandTabs | Qt::TextShowMnemonic, standard.at(i)).width();
}
QString componentStr = "import QtQuick 2.0\nText { text: \"" + standard.at(i) + "\" }";