summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-11-02 17:31:12 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-06 16:15:15 +0100
commit8ef5e700b8471b865328472b52a790686507bb45 (patch)
treed75535b0ac5f8b5c6f4872ca11dc2831ec1e4561 /src/corelib
parent417cf3fc535ef18e7895cb863235cc33e36669f9 (diff)
QMetaType: Fix conversion between module types.
Change-Id: I7215b4599c3f0459139b32b6571f0a9e60182ee9 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qvariant.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 5754af42ac..816c34a14d 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -2974,7 +2974,8 @@ bool QVariant::convert(int targetTypeId)
}
bool isOk = true;
- if (!handlerManager[d.type]->convert(&oldValue.d, targetTypeId, data(), &isOk))
+ int converterType = std::max(oldValue.userType(), targetTypeId);
+ if (!handlerManager[converterType]->convert(&oldValue.d, targetTypeId, data(), &isOk))
isOk = false;
d.is_null = !isOk;
return isOk;