Refactor TypeRejection to use one regular expression for
the class name and one for the various strings to be matched
depending on the match type enumeration instead of 4 fixed
string fields.
Task-number: PYSIDE-516
Change-Id: Ifb945e3be39fbedfd802c4d32de7de443cf53f49
Reviewed-by: Alexandru Croitor <email address hidden>
In AbstractMetaBuilderPrivate::traverseFunction(), store the
unmodified signature with return type before resolving typedefs for
the messages. Extend the error messages about parameters and output
them to qWarning() and rejection logs consistently.
So:
Unmatched argument type
- QOpenGLExtraFunctions::glIsSync(GLsync) -> GLboolean
becomes:
Unmatched argument type
- GLboolean QOpenGLExtraFunctions::glIsSync(GLsync): unmatched type 'GLsync' in parameter #1 "sync"
Task-number: PYSIDE-516
Change-Id: Ifd680af1cd6d403d9b73ba3e40d06abe274cf359
Reviewed-by: Alexandru Croitor <email address hidden>
Generate #error when a minimal constructor could not be found
The occurred in 3 places, one of which generated #error and the
others used qFatal(). Change it to always generate #error with
a bit of context to make it possible to detect the source of
of the problem.
Change-Id: Icd93b1beec908b57fa72457d6ec1e16a15e5ff14
Reviewed-by: Christian Tismer <email address hidden>
For a long time, headergenerator.cpp did only generate destructors,
when the following condition was set:
if (!avoidProtectedHack() || !metaClass->hasPrivateDestructor()) {
// generate destructor
}
The condition does not work for C++11.
When trying to remove the protected hack, I remembered that
I used an ugly CMake trick to make VS 2015 work. This hack
provided exactly the missing destructors.
I tried very hard to make this hack into a patch for Linux and
macOS, too. Unfortunately, when built without the protected hack,
Clang enforces a destructor declaration, but then the linker reports
an unresolved symbol. I have found no way to circumvent this.
Conclusion: Unless we find a way to make Clang work correctly,
we have to leave the protected hack as-is on macOS.
But then, the whole effort of hack removal makes no more sense.
Fortunately, the ugly work-around on Windows is gone, now.
So this change involves shiboken and PySide, and probably the one
will not work without the other.