summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qvariant_p.h
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>2012-02-24 14:27:01 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-27 13:19:00 +0100
commit6df396286a3221d12e810c0aaa71c4aa68db3331 (patch)
tree2e3fa744863a46fba7171fc582ae15bd57652745 /src/corelib/kernel/qvariant_p.h
parent184c9e346e298bbda2cc8f30e2f318c1c11e4b13 (diff)
Simplify QMetaTypeSwitcher.
We do not need to distinguish between different types in the switcher. Before this patch it was not possible to overload DelegateObject::delegate with a pointer type. Now it is fixed. Change-Id: Icd73a53e73e5e66b1b6f6407ba4e0f79e584d930 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/kernel/qvariant_p.h')
-rw-r--r--src/corelib/kernel/qvariant_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/kernel/qvariant_p.h b/src/corelib/kernel/qvariant_p.h
index 708a427860..a754bc4363 100644
--- a/src/corelib/kernel/qvariant_p.h
+++ b/src/corelib/kernel/qvariant_p.h
@@ -188,7 +188,7 @@ public:
}
bool delegate(const void*) { return true; }
-
+ bool delegate(const QMetaTypeSwitcher::NotBuiltinType*) { return false; }
protected:
const QVariant::Private *m_a;
const QVariant::Private *m_b;
@@ -282,6 +282,7 @@ public:
}
// we need that as sizof(void) is undefined and it is needed in HasIsNullMethod
bool delegate(const void *) { return m_d->is_null; }
+ bool delegate(const QMetaTypeSwitcher::NotBuiltinType *) { return m_d->is_null; }
protected:
const QVariant::Private *m_d;
};