diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2016-08-24 16:27:42 +0300 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-08-25 07:23:58 +0000 |
commit | 3f64156e918a8cf5da1b68191a280f0daf3d954b (patch) | |
tree | 431b98583cec0188a3391768b9b9e8b2409d70d2 /tests | |
parent | ca979a2f69a36712d2bf4d3e4b5b9009c1779a50 (diff) | |
download | qtbase-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.cpp | 3 |
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: |