summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2016-08-24 16:27:42 +0300
committerShawn Rutledge <shawn.rutledge@qt.io>2016-08-25 07:23:58 +0000
commit3f64156e918a8cf5da1b68191a280f0daf3d954b (patch)
tree431b98583cec0188a3391768b9b9e8b2409d70d2 /tests
parentca979a2f69a36712d2bf4d3e4b5b9009c1779a50 (diff)
downloadqtbase-3f64156e918a8cf5da1b68191a280f0daf3d954b.tar.gz
QScreen manual test: show names of enum values
It's more user-friendly to show primaryOrientation LandscapeOrientation instead of primaryOrientation 2 Change-Id: Ic1659b9253cd492bef347d6840cf3cf6e6d2c94f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/qscreen/propertyfield.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/manual/qscreen/propertyfield.cpp b/tests/manual/qscreen/propertyfield.cpp
index 94a85545fb..bd78e7eef3 100644
--- a/tests/manual/qscreen/propertyfield.cpp
+++ b/tests/manual/qscreen/propertyfield.cpp
@@ -44,6 +44,9 @@ PropertyField::PropertyField(QObject* subject, const QMetaProperty& prop, QWidge
QString PropertyField::valueToString(QVariant val)
{
+ if (m_prop.isEnumType())
+ return QString::fromUtf8(m_prop.enumerator().key(val.toInt()));
+
QString text;
switch (val.type()) {
case QVariant::Double: