summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2015-02-18 11:41:50 +0100
committerOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>2015-02-25 15:24:40 +0000
commitbe4f5d55fcb7715460ab08b4e50b0468555cd065 (patch)
treec59bba293825af4030c3445d4895377e7fcf9ddc /src/corelib
parent18ab75be815ab97ab1f70be04297634b6225ab0a (diff)
QVariant: fix converting enum to string
Use QMetaEnum::valueToKey instead of valueToKeys. Change-Id: I270f0820a03aaebde94c37c011c5e9b81421b50f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qvariant.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 3dc0805dd1..b14c9ed167 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -460,7 +460,7 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
{
QMetaEnum en = metaEnumFromType(d->type);
if (en.isValid()) {
- *str = QString::fromUtf8(en.valueToKeys(qConvertToNumber(d, ok)));
+ *str = QString::fromUtf8(en.valueToKey(qConvertToNumber(d, ok)));
return *ok;
}
}
@@ -637,7 +637,7 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
{
QMetaEnum en = metaEnumFromType(d->type);
if (en.isValid()) {
- *ba = en.valueToKeys(qConvertToNumber(d, ok));
+ *ba = en.valueToKey(qConvertToNumber(d, ok));
return *ok;
}
}