diff options
author | Simo Fält <simo.falt@qt.io> | 2023-05-25 11:23:00 +0300 |
---|---|---|
committer | Simo Fält <simo.falt@qt.io> | 2023-05-25 11:23:00 +0300 |
commit | e31990ada911989dbcef3d4833f77dd054030e2c (patch) | |
tree | e08ea7c0808e1468b3c8bbd83fb189a81d8ebeb0 /sources/shiboken2/generator/shiboken2/shibokengenerator.cpp | |
parent | 40fdea15e6545292212ea6c4acc78c3b2975cbd8 (diff) | |
parent | d135bcccdb609d312993e26b466a853b8d1b3f43 (diff) |
Merge tag 'v5.15.7-lts' into tqtc/lts-5.15-opensourcev5.15.7-lts-lgpl
Qt For Python Release 5.15.7
Change-Id: I49808098e3ba42be4be438cb3536fc25672c7127
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/shibokengenerator.cpp')
-rw-r--r-- | sources/shiboken2/generator/shiboken2/shibokengenerator.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp index 0f5f09d60..42850e87d 100644 --- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp +++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp @@ -46,7 +46,6 @@ static const char AVOID_PROTECTED_HACK[] = "avoid-protected-hack"; static const char PARENT_CTOR_HEURISTIC[] = "enable-parent-ctor-heuristic"; static const char RETURN_VALUE_HEURISTIC[] = "enable-return-value-heuristic"; -static const char ENABLE_PYSIDE_EXTENSIONS[] = "enable-pyside-extensions"; static const char DISABLE_VERBOSE_ERROR_MESSAGES[] = "disable-verbose-error-messages"; static const char USE_ISNULL_AS_NB_NONZERO[] = "use-isnull-as-nb_nonzero"; static const char WRAPPER_DIAGNOSTICS[] = "wrapper-diagnostics"; @@ -2567,7 +2566,8 @@ AbstractMetaFunctionList ShibokenGenerator::getFunctionOverloads(const AbstractM Generator::OptionDescriptions ShibokenGenerator::options() const { - return OptionDescriptions() + OptionDescriptions result = Generator::options(); + result << qMakePair(QLatin1String(AVOID_PROTECTED_HACK), QLatin1String("Avoid the use of the '#define protected public' hack.")) << qMakePair(QLatin1String(DISABLE_VERBOSE_ERROR_MESSAGES), @@ -2575,9 +2575,6 @@ Generator::OptionDescriptions ShibokenGenerator::options() const "but safe few kB on the generated bindings.")) << qMakePair(QLatin1String(PARENT_CTOR_HEURISTIC), QLatin1String("Enable heuristics to detect parent relationship on constructors.")) - << qMakePair(QLatin1String(ENABLE_PYSIDE_EXTENSIONS), - QLatin1String("Enable PySide extensions, such as support for signal/slots,\n" - "use this if you are creating a binding for a Qt-based library.")) << qMakePair(QLatin1String(RETURN_VALUE_HEURISTIC), QLatin1String("Enable heuristics to detect parent relationship on return values\n" "(USE WITH CAUTION!)")) @@ -2586,14 +2583,15 @@ Generator::OptionDescriptions ShibokenGenerator::options() const "the value of boolean casts")) << qMakePair(QLatin1String(WRAPPER_DIAGNOSTICS), QLatin1String("Generate diagnostic code around wrappers")); + return result; } -bool ShibokenGenerator::handleOption(const QString &key, const QString & /* value */) +bool ShibokenGenerator::handleOption(const QString &key, const QString &value) { + if (Generator::handleOption(key, value)) + return true; if (key == QLatin1String(PARENT_CTOR_HEURISTIC)) return (m_useCtorHeuristic = true); - if (key == QLatin1String(ENABLE_PYSIDE_EXTENSIONS)) - return (m_usePySideExtensions = true); if (key == QLatin1String(RETURN_VALUE_HEURISTIC)) return (m_userReturnValueHeuristic = true); if (key == QLatin1String(DISABLE_VERBOSE_ERROR_MESSAGES)) @@ -2695,11 +2693,6 @@ bool ShibokenGenerator::useReturnValueHeuristic() const return m_userReturnValueHeuristic; } -bool ShibokenGenerator::usePySideExtensions() const -{ - return m_usePySideExtensions; -} - bool ShibokenGenerator::useIsNullAsNbNonZero() const { return m_useIsNullAsNbNonZero; |