diff options
Diffstat (limited to 'sources')
7 files changed, 21 insertions, 4 deletions
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml index 309cce420..1744a5927 100644 --- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml +++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml @@ -4312,6 +4312,7 @@ s1.addTransition(button.clicked, s1h)</code> </add-function> <inject-code class="native" position="beginning"> + QT_BEGIN_NAMESPACE extern bool qRegisterResourceData(int, const unsigned char *, @@ -4323,6 +4324,7 @@ s1.addTransition(button.clicked, s1h)</code> const unsigned char *, const unsigned char *, const unsigned char *); + QT_END_NAMESPACE </inject-code> <add-function signature="qRegisterResourceData(int,PyBytes,PyBytes,PyBytes)" return-type="bool"> <inject-code class="target" position="beginning"> diff --git a/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml b/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml index 5486fb157..6fe90ccb9 100644 --- a/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml +++ b/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml @@ -302,6 +302,17 @@ %END_ALLOW_THREADS </inject-code> </modify-function> + <modify-function signature="setVideoOutput(QAbstractVideoSurface*)"> + <modify-argument index="1"> + <replace-type modified-type="QObject *" /> + </modify-argument> + <inject-code class="target" position="beginning"> + %BEGIN_ALLOW_THREADS + QObject* upcastedArg = %CONVERTTOCPP[QObject*](%PYARG_1); + %CPPSELF.%FUNCTION_NAME(reinterpret_cast< %ARG1_TYPE >(upcastedArg)); + %END_ALLOW_THREADS + </inject-code> + </modify-function> </object-type> <object-type name="QMediaPlayerControl"/> <object-type name="QMediaPlaylist"> diff --git a/sources/pyside2/libpyside/pyside.cpp b/sources/pyside2/libpyside/pyside.cpp index b70743cee..367a1adc2 100644 --- a/sources/pyside2/libpyside/pyside.cpp +++ b/sources/pyside2/libpyside/pyside.cpp @@ -72,8 +72,10 @@ static QStack<PySide::CleanupFunction> cleanupFunctionList; static void* qobjectNextAddr; +QT_BEGIN_NAMESPACE extern bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); +QT_END_NAMESPACE namespace PySide { diff --git a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp index b492ea49f..9a69c21b1 100644 --- a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp +++ b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp @@ -267,6 +267,8 @@ static const char *linkKeyWord(QtXmlToSphinx::LinkContext::Type type) return ":ref:"; case QtXmlToSphinx::LinkContext::External: break; + case QtXmlToSphinx::LinkContext::FunctionMask: + break; } return ""; } diff --git a/sources/shiboken2/libshiboken/basewrapper.cpp b/sources/shiboken2/libshiboken/basewrapper.cpp index 9eb686ed0..81830952a 100644 --- a/sources/shiboken2/libshiboken/basewrapper.cpp +++ b/sources/shiboken2/libshiboken/basewrapper.cpp @@ -1502,7 +1502,7 @@ std::string info(SbkObject* self) s << String::toCString(parent) << "\n"; } - if (self->d->parentInfo && self->d->parentInfo->children.size()) { + if (self->d->parentInfo && !self->d->parentInfo->children.empty()) { s << "children.......... "; for (SbkObject *sbkChild : self->d->parentInfo->children) { Shiboken::AutoDecRef child(PyObject_Str(reinterpret_cast<PyObject *>(sbkChild))); @@ -1511,7 +1511,7 @@ std::string info(SbkObject* self) s << '\n'; } - if (self->d->referredObjects && self->d->referredObjects->size()) { + if (self->d->referredObjects && !self->d->referredObjects->empty()) { Shiboken::RefCountMap& map = *self->d->referredObjects; s << "referred objects.. "; std::string lastKey; diff --git a/sources/shiboken2/libshiboken/bindingmanager.cpp b/sources/shiboken2/libshiboken/bindingmanager.cpp index 4053b87f9..82c5bd65f 100644 --- a/sources/shiboken2/libshiboken/bindingmanager.cpp +++ b/sources/shiboken2/libshiboken/bindingmanager.cpp @@ -191,7 +191,7 @@ BindingManager::~BindingManager() while (!m_d->wrapperMapper.empty()) { Object::destroy(m_d->wrapperMapper.begin()->second, const_cast<void*>(m_d->wrapperMapper.begin()->first)); } - assert(m_d->wrapperMapper.size() == 0); + assert(m_d->wrapperMapper.empty()); } delete m_d; } diff --git a/sources/shiboken2/tests/libother/otherderived.h b/sources/shiboken2/tests/libother/otherderived.h index dfb219e1d..72e1e2302 100644 --- a/sources/shiboken2/tests/libother/otherderived.h +++ b/sources/shiboken2/tests/libother/otherderived.h @@ -55,7 +55,7 @@ public: // factory method static Abstract* createObject(); - void hideFunction(HideType*) {} + void hideFunction(HideType*) override {} protected: inline const char* getClassName() { return className(); } |