aboutsummaryrefslogtreecommitdiffstats
path: root/sources
Commit message (Collapse)AuthorAgeFilesLines
* shiboken: Improve handling of non-type template integer parametersFriedemann Kleint2018-09-138-18/+135
| | | | | | | | | | | | | | When trying to specify the base class template<int R, int C> QGenericMatrix of the QMatrixRxN classes, clashes of the SBK..IDX enumeration values occurred since the integers were not part of the type name. Fix that by dynamically adding dummy entries of EnumValueTypeEntry for the integer values encountered on the fly. Task-number: PYSIDE-725 Change-Id: Ie6b4489b5293e04b7c2c76861341c99b136cd558 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Merge remote-tracking branch 'origin/5.11' into devFriedemann Kleint2018-09-133-2/+37691
|\ | | | | | | Change-Id: I7f60b78b0c962e4faf3688581e7f550813d1a413
| * Update the Signature Registry After ResetChristian Tismer2018-09-133-2/+37691
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New exists_{platf}_{version}_ci.py have created, after the registry was reset in the last commit. We had a problem with differences between Linux versions which led to incompatibilities. Therefore, the platform name has been changed for Linux: We now distinguish Linux platforms by name and version by using platform.linux_distribution([:2]). Example.. "Ubuntu 16.04" becomes 'ubuntu1604'. When this checkin succeeds, we will need another last checkin. Change-Id: I98511ee6fc3273055d1990a2cf4f2c028a430455 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | shiboken: Fix warnings about unused variablesFriedemann Kleint2018-09-132-1/+1
| | | | | | | | | | | | | | | | sources/shiboken2/tests/libsample/objecttype.cpp:283:17: warning: unused variable 'fake_child' [-Wunused-variable] sources/shiboken2/ApiExtractor/doxygenparser.cpp:71:15: warning: unused variable 'numPrefixes' [-Wunused-variable] Change-Id: I409f22e1450e9ae0f3f5924cb6dd47991d12a2ad Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Add default constructible with default valuesFriedemann Kleint2018-09-132-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the check for default constructible by also checking whether the first argument has an unmodified default value, for example: explicit QSqlIndex(const QString &cursorName = QString(), const QString &name = QString()); This can be treated like default constructible, except that {} may not be used for return values. Task-number: PYSIDE-62 Change-Id: I70af2a624de54201158a4b56e51b67ef115c2fc6 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Refactor Generator::minimalConstructor(AbstractMetaClass)Friedemann Kleint2018-09-134-91/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some convenience functions returning the status of default expressions to AbstractMetaArgument. Rewrite the function to only insert suitable candidates into an ordered multimap instead of looping twice over all candidates. This unearthed a bug in the old algorithm trying to find the maximum number of arguments: When no candidates were found, maxArgs was left at 0, which caused it to assume default constructible. This triggered for the QMatrixNxN classes inheriting QGenericMatrix<int, int, Type> with (unsupported) non-type template parameters. For these, the default constructor needs to be specified now. Task-number: PYSIDE-62 Change-Id: I5ce2bed43001780553048d8af0addaba2b22410b Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Friedemann Kleint2018-09-1210-55778/+416
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devFriedemann Kleint2018-09-1210-55778/+416
| |\| | | | | | | | | | Change-Id: Ie346fe7d7ac85ce0b82806904044680713375bf0
| | * shiboken/pep384: Avoid warning by literal comparisonCristian Maureira-Fredes2018-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Even though we are certain of the comparison, better to get rid of the warnings. Change-Id: Iafa51b4c59c2315b24fc9092d18792f0c9297553 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| | * Add explanation to findChild/findChildren methodsCristian Maureira-Fredes2018-09-121-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error message when use these methods was not explaining that the first argument needed to be the parent's type. This adds a small phrase a code snippet that clarify the situation. Task-number: PYSIDE-776 Task-number: PYSIDE-691 Change-Id: I0af57d65065b6d87f195d5f42fd1140a864c5edf Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Automate Parsing COIN testresults for exists_{platf}_{version}_ci.pyChristian Tismer2018-09-102-2/+369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The extraction of exists_{platf}_{version}_ci.py has been done by editing the testresults of COIN test by hand. Since the beginning of the year, this has become tedious, because COIN now surrounds everything with time stamps. This script scans the whole website and extracts all such files. Creation of the generated python pages becomes really easy now. The initial scan takes below 30 minutes. Then it will only parse new URLs. Task-number: PYSIDE-510 Change-Id: I1273f8a77596ced16c7a3653c89736c3e1796540 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Reset the Signature Registry after the Total ScanChristian Tismer2018-09-106-55775/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After scanning the whole COIN test website, a lot of changes were found which we missed by manually inspectation. This update contains the essence of all changes which accumulated on the server. They were sorted by date, and the latest version was taken. Then, the license headers were updated, because that had been done already on the repository. Update ------ This check-in did not work on 2018-09-07. The reason was that we changed the PySide version to 5.11.2, which was not yet in my update. While re-doing the generation, I realized that we will not automatically get the 5.11.2 version, because of the "fallback". feature. To reset the existence file, we need to remove them once. After the checkin, all the files will be freshly created. I propose also to disable the "fallback" feature. In the presence of the multiple COIN testing, it is no more necessary. Change-Id: I43af314f7bd233a4190762c7204e8aecf81bfe72 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | libpyside: Fix contains()/value() antipatternFriedemann Kleint2018-09-123-13/+18
|/ / | | | | | | | | | | | | | | Use iterators instead, avoiding repeated lookups of hashes and maps. Change-Id: I3b430bdf0ceef1980baeca45849880d35538e89b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | PySide2: Silence warnings about not finding functions for modificationFriedemann Kleint2018-09-122-43/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - codecForHtml(), mightBeRichText(), convertFromPlainText() are now in qtextdocument.h - QSortFilterProxyModel: using QObject::parent; is not seen by Clang - QCoreApplication::"winEventFilter() is a left-over from Qt 4 - Member template QMetaEnum fromType() is ignored by Clang - QGraphicsScene::drawItems() is removed a few lines above the failing modification Fixes: signature 'winEventFilter(MSG*,long*)' for function modification in 'QCoreApplication' not found. signature 'fromType()' for function modification in 'QMetaEnum' not found. signature 'parent()const' for function modification in 'QSortFilterProxyModel' not found. signature 'codecForHtml(QByteArray)' (specified as 'codecForHtml(const QByteArray&)') for function modification in 'Qt' not found. signature 'mightBeRichText(QString)' (specified as 'mightBeRichText(const QString&)') for function modification in 'Qt' not found. signature 'convertFromPlainText(QString,Qt::WhiteSpaceMode)' (specified as 'convertFromPlainText(const QString&,Qt::WhiteSpaceMode)') for function modification in 'Qt' not found. signature 'drawItems(QPainter*,int,QGraphicsItem**,const QStyleOptionGraphicsItem*,QWidget*)' for function modification in 'QGraphicsScene' not found. Change-Id: I7fcae940999890b490d0793d160c722924dea6ec Reviewed-by: Christian Tismer <tismer@stackless.com>
* | libpyside: Fix deprecation warningFriedemann Kleint2018-09-121-1/+1
| | | | | | | | | | | | | | | | Expand code to fix: signalmanager.cpp:328:41: warning: 'int PySide::SignalManager::addGlobalSlotGetIndex(const char*, PyObject*)' is deprecated [-Wdeprecated-declarations] Change-Id: I5ada505b8ed9a8bd7e604633bc672109450ede6f Reviewed-by: Christian Tismer <tismer@stackless.com>
* | pysidetest: Remove old cmake policyFriedemann Kleint2018-09-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix warning: CMake Deprecation Warning at tests/pysidetest/CMakeLists.txt:7 (cmake_policy): The OLD behavior for policy CMP0020 will be removed from a future version of CMake. cmake should be smart enough to figure CMP0020 (automatic linking of qtmain.lib on Windows) out by itself. Change-Id: I3f0fb53158217be87b2c7971d84b19359998970c Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Introduce DefaultValueFriedemann Kleint2018-09-124-64/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a small class storing the return value of Generator::minimalConstructor() consisting of a type enumeration and a value, offering formatting for the use cases variable initializations, return values and constructor arguments lists. Having distinct formatting for the different use cases has some advantages: - Can use nullptr without casts (except in constructor arguments lists, where the type is needed for disambiguation). - In the previous implementation using a string, "" indicated an error; so, it was not possible to use it for default-constructors. It is now possible to handle default-constructors for initialization ("Foo f" instead of "Foo f = Foo()". - Can use {} for return values. Task-number: PYSIDE-62 Change-Id: I73229cb957d4b92b43de4cdbc3c66703f48faa61 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Line-wrap message about not find function for modificationFriedemann Kleint2018-09-122-13/+15
| | | | | | | | | | | | | | | | Put each candidate on a new line and limit the number of member functions in the output. Change-Id: Ia628e61009997b37e0f3c2129fba5ccfa29f763e Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Store null enum valuesFriedemann Kleint2018-09-124-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | If an enum has a null value, store that on the EnumTypeEntry for use in Generator::minimalConstructor() as a default value. Fully qualify scoped enum value type entries for this purpose. The value can then be used for default values instead of an ugly static_cast<EnumType>(0). Task-number: PYSIDE-62 Change-Id: I42cb2ca63fb1da6c795df630ab30bded66aac901 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Centralize most msg* functions in a separate fileFriedemann Kleint2018-09-1017-354/+590
| | | | | | | | | | | | | | | | | | This makes it easier to maintain a consistent style, unclutters the source and allows for re-using formatting helpers. Change-Id: I4f29637a22afb457f629272e2d86f14bedb36008 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Remove blanks from void returnsFriedemann Kleint2018-09-101-26/+50
| | | | | | | | | | | | | | | | Introduce a little helper class for formatting "return;" or "return value;" depending on a string. Change-Id: I6005af5496696cd83819f1ddbf3f75858b09a49b Reviewed-by: Christian Tismer <tismer@stackless.com>
* | libpyside: Change assert into a warningFriedemann Kleint2018-09-101-1/+5
| | | | | | | | | | | | | | | | | | Emit a warning instead of asserting in SignalManager::registerMetaMethodGetIndex() when source=0. Task-number: PYSIDE-800 Change-Id: Ic3c67d39ddb3d1c1f808d6434f37fbdd74868b5b Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Add bindings for 5.12Friedemann Kleint2018-09-1010-0/+179
| | | | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: Ib37efc4e480a978f920d3bc40756fe7abd59cb19 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Fix parsing of typedef typesystem entriesFriedemann Kleint2018-09-071-8/+12
| | | | | | | | | | | | | | | | | | Pop the parse stack entry for typedef entries as well which was overlooked in bfd1de3495b18c0ecc251260442a9a46009861e. Task-number: PYSIDE-725 Change-Id: If1f572076b9442ed3a434e3b6fb7b10c17def12d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | PySide2: Fix warnings about not finding function for modification in 5.12Friedemann Kleint2018-09-071-7/+1
| | | | | | | | | | | | | | | | | | (3dinput) signature 'QKeyEvent(Qt3DInput::QKeyEvent)' (specified as 'QKeyEvent(const Qt3DInput::QKeyEvent&)') for function modification in 'Qt3DInput::QKeyEvent' not found. (3dinput) signature 'QMouseEvent(Qt3DInput::QMouseEvent)' (specified as 'QMouseEvent(const Qt3DInput::QMouseEvent&)') for function modification in 'Qt3DInput::QMouseEvent' not found. (3dinput) signature 'QWheelEvent(Qt3DInput::QWheelEvent)' (specified as 'QWheelEvent(const Qt3DInput::QWheelEvent&)') for function modification in 'Qt3DInput::QWheelEvent' not found. Change-Id: I7c473e96a4b556d5f65fbb7091abf7ddb9ca47a4 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.11' into devFriedemann Kleint2018-09-0711-72/+67
|\| | | | | | | Change-Id: I81270510e3a27915781a50769bb627e666970142
| * PySide2: Fix warnings about not finding function for modificationFriedemann Kleint2018-09-073-62/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove some functions that are no longer present. In QtDataVisualization, remove a rejection that did not have any effect since the type was not qualified by namespace and qualify the modifications by namespace and resolve typedefs, amending 966fa464d1f91292c91bede88bfaf1741acdce6e. Fixes warnings: (qml) signature 'QQmlImageProviderBase()' for function modification in 'QQmlImageProviderBase' not found. (datavisualization) signature 'addAxis(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DScatter' not found. (datavisualization) signature 'releaseAxis(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DScatter' not found. (datavisualization) signature 'setAxisX(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DScatter' not found. (datavisualization) signature 'setAxisY(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DScatter' not found. (datavisualization) signature 'setAxisZ(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DScatter' not found. (datavisualization) signature 'resetArray(QScatterDataArray*)' for function modification in 'QtDataVisualization::QScatterDataProxy' not found. (datavisualization) signature 'addItem(QScatterDataItem)' (specified as 'addItem(const QScatterDataItem&)') for function modification in 'QtDataVisualization::QScatterDataProxy' not found. (datavisualization) signature 'addItems(QScatterDataArray)' (specified as 'addItems(const QScatterDataArray&)') for function modification in 'QtDataVisualization::QScatterDataProxy' not found. (datavisualization) signature 'insertItem(int,QScatterDataItem)' (specified as 'insertItem(int, const QScatterDataItem&)') for function modification in 'QtDataVisualization::QScatterDataProxy' not found. (datavisualization) signature 'insertItems(int,QScatterDataArray)' (specified as 'insertItems(int, const QScatterDataArray&)') for function modification in 'QtDataVisualization::QScatterDataProxy' not found. (datavisualization) signature 'setItem(int,const QScatterDataIteItem;)' (specified as 'setItem(int, const QScatterDataIteItem;)') for function modification in 'QtDataVisualization::QScatterDataProxy' not found. (datavisualization) signature 'setItems(int,QScatterDataArray)' (specified as 'setItems(int, const QScatterDataArray&)') for function modification in 'QtDataVisualization::QScatterDataProxy' not found. (datavisualization) signature 'addAxis(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DSurface' not found. (datavisualization) signature 'releaseAxis(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DSurface' not found. (datavisualization) signature 'setAxisX(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DSurface' not found. (datavisualization) signature 'setAxisY(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DSurface' not found. (datavisualization) signature 'setAxisZ(QValue3DAxis*)' for function modification in 'QtDataVisualization::Q3DSurface' not found. (datavisualization) signature 'QSurface3DSeries(QSurfaceDataProxy*,QObject*)' for function modification in 'QtDataVisualization::QSurface3DSeries' not found. (datavisualization) signature 'setDataProxy(QSurfaceDataProxy*)' for function modification in 'QtDataVisualization::QSurface3DSeries' not found. (datavisualization) signature 'populateCopy(QValue3DAxisFormatter&)' for function modification in 'QtDataVisualization::QValue3DAxisFormatter' not found. (datavisualization) signature 'addRow(QSurfaceDataRow*)' for function modification in 'QtDataVisualization::QSurfaceDataProxy' not found. (datavisualization) signature 'insertRow(int,QSurfaceDataRow*)' (specified as 'insertRow(int, QSurfaceDataRow*)') for function modification in 'QtDataVisualization::QSurfaceDataProxy' not found. (datavisualization) signature 'setRow(int,QSurfaceDataRow*)' (specified as 'setRow(int, QSurfaceDataRow*)') for function modification in 'QtDataVisualization::QSurfaceDataProxy' not found. (datavisualization) signature 'resetArray(QSurfaceDataArray*)' for function modification in 'QtDataVisualization::QSurfaceDataProxy' not found. (datavisualization) signature 'setDataProxy(QBarDataProxy*)' for function modification in 'QtDataVisualization::QBar3DSeries' not found. (datavisualization) signature 'setDataProxy(QBarDataProxy*)' for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'resetArray(QBarDataArray*)' for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'resetArray(QBarDataArray*,QStringList&QStringList)' (specified as 'resetArray(QBarDataArray*,const QStringList&const QStringList&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'addRow(QBarDataRow*)' for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'addRow(QBarDataRow*,QString)' (specified as 'addRow(QBarDataRow*, const QString&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'addRows(QBarDataArray&)' for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'addRows(QBarDataArray&,QString)' (specified as 'addRows(QBarDataArray&, const QString&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'insertRow(int,QBarDataRow*)' (specified as 'insertRow(int, QBarDataRow*)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'insertRow(int,QBarDataRow*,QString)' (specified as 'insertRow(int, QBarDataRow*, const QString&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'insertRows(int,QBarDataArray&)' (specified as 'insertRows(int, QBarDataArray&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'insertRows(int,QBarDataArray&,QString)' (specified as 'insertRows(int, QBarDataArray&, const QString&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'setRow(int,QBarDataRow*)' (specified as 'setRow(int, QBarDataRow*)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'setRow(int,QBarDataRow*,QString)' (specified as 'setRow(int, QBarDataRow*, const QString&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'setRows(int,QBarDataArray&)' (specified as 'setRows(int, QBarDataArray&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'setRows(int,QBarDataArray&,QString)' (specified as 'setRows(int, QBarDataArray&, const QString&)') for function modification in 'QtDataVisualization::QBarDataProxy' not found. (datavisualization) signature 'setDataProxy(QScatterDataProxy*)' for function modification in 'QtDataVisualization::QScatter3DSeries' not found. (datavisualization) signature 'addCustomItem(QCustom3DItem*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'addInputHandler(QAbstract3DInputHandler*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'addTheme(Q3DTheme*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'releaseCustomItem(QCustom3DItem*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'releaseInputHandler(QAbstract3DInputHandler*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'releaseTheme(Q3DTheme*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'setActiveInputHandler(QAbstract3DInputHandler*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'setActiveTheme(Q3DTheme*)' for function modification in 'QtDataVisualization::QAbstract3DGraph' not found. (datavisualization) signature 'addAxis(QAbstract3DAxis*)' for function modification in 'QtDataVisualization::Q3DBars' not found. (datavisualization) signature 'releaseAxis(QAbstract3DAxis*)' for function modification in 'QtDataVisualization::Q3DBars' not found. (datavisualization) signature 'setColumnAxis(QCategory3DAxis*)' for function modification in 'QtDataVisualization::Q3DBars' not found. (datavisualization) signature 'setRowAxis(QCategory3DAxis*)' for function modification in 'QtDataVisualization::Q3DBars' not found. (3drender) signature 'attenuation()const' (specified as 'attenuation() const') for function modification in 'Qt3DRender::QSpotLight' not found. Task-number: PYSIDE-487 Change-Id: I61ebc2e29aa2a04c749f5c522fb7f06e35e1b172 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * shiboken: Fix handling of dropped type entriesFriedemann Kleint2018-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When parsing the typesystem XML file, decrement variable containing the depth of dropped entries in Handler::endElement(). Otherwise, when dropping a type like <object-type name="QDtls" since="5.12"> <enum-type name="HandshakeState"/> </object-type> all subsequent entries would be droppped. Change-Id: I640a916e8c8dbddcaeaebc3859300cc2a0eb1b0c Reviewed-by: Christian Tismer <tismer@stackless.com>
| * PySide2: Add some enumerations that were overlooked beforeFriedemann Kleint2018-09-065-3/+11
| | | | | | | | | | | | Change-Id: I038ac183e70c27929837ff93b5921c2dbe00f48b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
| * Doc: Remove redundant .qdocconf files from the buildTopi Reinio2018-09-053-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | QtMultimedia, QtWebEngine modules are handled with a single .qdocconf file in Qt 5. There's no need to feed them twice to QDoc. This removes most '(qdoc): Output file already exists' warnings. Change-Id: If250c9c56f7ca54c27440badd66d9ddba704f26d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | shiboken: Initialize converter function to 0Friedemann Kleint2018-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings: QtCore/qmessagelogcontext_wrapper.cpp:265:9: warning: variable 'pythonToCpp' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized] if (!Shiboken::String::check(pyIn) && (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyIn)))) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ QtCore/qmessagelogcontext_wrapper.cpp:271:5: note: uninitialized use occurs here pythonToCpp(pyIn, &cppOut_local); ^~~~~~~~~~~ QtCore/qmessagelogcontext_wrapper.cpp:265:9: note: remove the '&&' if its condition is always true if (!Shiboken::String::check(pyIn) && (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyIn)))) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ QtCore/qmessagelogcontext_wrapper.cpp:264:32: note: initialize the variable 'pythonToCpp' to silence this warning PythonToCppFunc pythonToCpp; ^ = nullptr in generated code like: PythonToCppFunc pythonToCpp; if (!Shiboken::String::check(pyIn) && (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyIn)))) { PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'file', 'char' or convertible type expected"); return -1; } Change-Id: I4f4f454d32e1a99d26cdf19807a801d98f9256d3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Improve error messages about rejected enumsFriedemann Kleint2018-09-063-9/+77
| | | | | | | | | | | | | | | | | | | | | | Use different messages for type entry not found and conflicting types. Spell out values of anonymous enums and indicate scoped enums and associated classes. Change-Id: Id60eb70c28790019b29ebae174369e6963909587 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Add a typedef typesystem entryFriedemann Kleint2018-09-0511-10/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | The intention is be able to specify typedef std::optional<int> OptionalInt in the typesystem file and generate code for it (without having a typedef in C++). Task-number: PYSIDE-725 Change-Id: I5847a3c3f68556ac1d0ea3635f65a29caa6cb208 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Add clone() to the typesystem entry classesFriedemann Kleint2018-09-052-1/+220
| | | | | | | | | | | | | | | | | | | | This is a prerequisite for adding a typedef entry. Add copy constructors and clone() methods. Task-number: PYSIDE-725 Change-Id: I7cee679432be70e2349071f1dd62335fda564fe3 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | shiboken: Replace more character #defines by char constantsFriedemann Kleint2018-09-054-203/+240
| | | | | | | | | | | | | | | | Break up macro concatenation and streamline code. Replace PYTHON_SELF_VAR by "self" since it is not going to change. Change-Id: Ibfffd12bd44eb4dc3390b0a0a2da99e003b04bdc Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | libpyside/PyObjectWrapper: Fix clang-tidy warnings about class definitionFriedemann Kleint2018-09-052-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rearrange definition and delete move constructor and move assignment operator. This unearthed that the (default-generated) move assignment operator was used (unintendedly) in: QDataStream &operator>>(QDataStream&,PyObjectWrapper&). Factor out a reset() method (modeled after std::unique_ptr, QScopedPointer) for this. Change-Id: I48c4f9ca1353984da870bb7eb3308a9f3374d309 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | shiboken: Replace some character #defines by char constantsFriedemann Kleint2018-09-046-37/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change defines to variables where possible (not used in string literal concatenations). Remove constants only used in one file from the header. Change regular expressions to raw string literals for clarity. Replace static instance of the CONVERTTOCPP regular expressions by an accessor of ShibokenGenerator. Change PATH_SPLITTER in main.cpp define to a QChar constant. Change-Id: If6766e0467ca2c635788240414c984d60feef875 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | libpyside: Replace QLinkedList<QObject*> by QVector<QObject*> in DynamicSlotDataFriedemann Kleint2018-09-041-4/+4
| | | | | | | | | | | | Change-Id: Id7b8c7ee48a3e0017d4c66fba34dff573fc59008 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | libpyside: Replace QLinkedList<QByteArray> by QByteArrayList in MetaObjectFriedemann Kleint2018-09-041-44/+27
| | | | | | | | | | | | | | | | Remove unused list parameter from DynamicQMetaObject::createMetaData(), adapt signatures, make const where applicable and streamline code. Change-Id: I0733382b2a6a35579d3e69280d674ad8a8f1bbc6 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Fix visibility of members of the generator classesFriedemann Kleint2018-09-043-169/+172
| | | | | | | | | | | | | | | | | | | | Make visibility more restricted by moving definitions to the private/protected section. Remove virtual from Generator::moduleName() since it is not overridden. Change-Id: I6b43f9679741fa8a5c453b339d9bb4228d74c04c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.11' into devFriedemann Kleint2018-09-047-4/+21
|\| | | | | | | Change-Id: Ie8025300580981c5349b31d4846a7f659481991d
| * shiboken/doc generator: Add FunctionMask case to avoid warningCristian Maureira-Fredes2018-09-031-0/+2
| | | | | | | | | | | | Change-Id: I13226628db54479cc01aab215bb52063684f23c9 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * shiboken/other test: Add override to avoid warningCristian Maureira-Fredes2018-09-031-1/+1
| | | | | | | | | | | | Change-Id: Idcd2d5fcd2d6f5ab6e15b529e1f73c73a5ff29a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
| * libshiboken: Use empty() to check for empty containers as clang-tidy advisesFriedemann Kleint2018-08-302-3/+3
| | | | | | | | | | | | | | | | | | Using the size() method for that purpose can be expensive for standard containers. Task-number: PYSIDE-727 Change-Id: I0da34e271503384a741d856fff5e84fee67bc97f Reviewed-by: Christian Tismer <tismer@stackless.com>
| * Support for QAbstractVideoSurface in QMediaPlayerCristian Maureira-Fredes2018-08-291-0/+11
| | | | | | | | | | | | | | | | | | | | The method setVideoOutput did not have support for an QAbstractVideoSurface argument, so I included one with the same idea of the other signatures. Task-number: PYSIDE-794 Change-Id: I50c82eeb1c2c3157c21dc4eb6cff7b0c2b91f31f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * PySide2: Fix compilation with a with custom namespace specified for QtFriedemann Kleint2018-08-292-0/+4
| | | | | | | | | | | | | | | | | | | | | | Add missing QT_BEGIN/END_NAMESPACE macros. Patch as provided on bug report. Task-number: PYSIDE-635 Change-Id: I7ddb447f1aafeb8da72e7e192905bafe3809797d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | libshiboken: Replace AutoDecRef::operator= by a reset() methodFriedemann Kleint2018-08-314-22/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The operators cause compiler warnings about multiple versions and missing return types. Replace them by a reset() method (modeled after std::unique_ptr, QScopedPointer). This implies some changes in the templates. Change-Id: I21a8fb9b84ecdfecf9671fa113f1bb3c6483166f Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | libpyside: Fix clang-tidy warnings about class definitionsFriedemann Kleint2018-08-3111-37/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add override - Use = default for trivial constructors/destructors - Add Q_DISABLE_COPY where applicable - Use member initialization and remove constructors from simple structs - Use explicit where applicable (which requires adapting code snippets constructing a QVariant from PyObjectWrapper) - Fix some parameter to take a const ref or pass by value and use std::move in constructors Change-Id: I5e0d2c4ef92d20397a7daba2f8a64b507e678510 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | libshiboken: Fix clang-tidy warnings about class definitionsFriedemann Kleint2018-08-318-17/+38
| | | | | | | | | | | | | | | | | | | | | | | | - Add override - Use = default for trivial constructors/destructors - Delete copy and move constructors/assignment and move assignment operators where not needed - Use member initialization and remove constructors from simple structs - Use explicit where applicable Change-Id: Id293dd0008b05243e665347f12fd1dee3b1b70f7 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | libshiboken: Fix remaining clang-tidy warningsFriedemann Kleint2018-08-304-10/+8
| | | | | | | | | | | | | | | | | | | | - Remove else after return/continue/break; unindent code or simplify return conditions - Fix C-style casts - Comment out unused parameter Change-Id: Iea1106023829658cd1ce005fa02d0c8940504dfd Reviewed-by: Christian Tismer <tismer@stackless.com>