Converts \a d to type \a t, which is placed in \a result.
*/
-static bool convert(const QVariant::Private *d, QVariant::Type t, void *result, bool *ok)
+static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
{
- Q_ASSERT(d->type != int(t));
+ Q_ASSERT(d->type != t);
Q_ASSERT(result);
bool dummy;
if (!ok)
ok = &dummy;
- switch (int(t)) {
+ switch (t) {
#ifndef QT_BOOTSTRAPPED
case QVariant::Url:
switch (d->type) {
return val;
T ret;
- if (!handler->convert(&d, QVariant::Type(t), &ret, ok) && ok)
+ if (!handler->convert(&d, t, &ret, ok) && ok)
*ok = false;
return ret;
}
typedef void (*f_save)(const Private *, QDataStream &);
#endif
typedef bool (*f_compare)(const Private *, const Private *);
- typedef bool (*f_convert)(const QVariant::Private *d, Type t, void *, bool *);
+ typedef bool (*f_convert)(const QVariant::Private *d, int t, void *, bool *);
typedef void (*f_debugStream)(QDebug, const QVariant &);
struct Handler {
f_construct construct;
return qcoreVariantHandler()->compare(a, b);
}
-static bool convert(const QVariant::Private *d, QVariant::Type t,
+static bool convert(const QVariant::Private *d, int t,
void *result, bool *ok)
{
switch (t) {