diff options
author | Kent Hansen <khansen@trolltech.com> | 2008-10-10 15:54:18 +0200 |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2008-10-10 15:54:18 +0200 |
commit | 09303b317ebb5ec951098088d8ec4e6fb18560e9 (patch) | |
tree | 679c422ceea059c22a119560f462d03deb967686 | |
parent | c8dae3540bc5487e3ba89fb59ea31d701d62e5c2 (diff) |
Fixes: overload resolution for functions with QVariant arguments
Details: checking for isVariant() is useless; what we want to do is just skip the test
for the QVariant argument, since it effectively means "any value is accepted"
-rw-r--r-- | generator/classgenerator.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/generator/classgenerator.cpp b/generator/classgenerator.cpp index 4ffae45..aafd56e 100644 --- a/generator/classgenerator.cpp +++ b/generator/classgenerator.cpp @@ -240,6 +240,8 @@ static void writeArgumentTypeTests(QTextStream &stream, const AbstractMetaFuncti QString scriptArg = QString::fromLatin1("context->argument(%0)").arg(i); if (argType && isSequenceType(argType)) { stream << scriptArg << ".isArray()"; + } else if (typeName == "QVariant") { + stream << "true"; } else { QString tester = builtinTypeTesterFunction(typeName); if (!tester.isEmpty()) { |