aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix build error when QML module is not present5.6Alexandru Croitor2017-05-191-0/+1
| | | | | | | | | The QML private API variable should be defined even when no QML module was found, because it is used for substitutions in signalmanager.cpp.in. Change-Id: I46dd1605d10b12836ea35441fccf6ef68a22925e Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add QSharedPointer<QQuickItemGrabResult> to the type systemAlexandru Croitor2017-05-195-0/+151
| | | | | | | | | | | | | | Also add test to check that calling QQuickItem::grabToImage() works correctly. The QSharedPointer type is added in the QtQuick typesystem file and not in QtCore to minimize the surface of issues that might come up, as well as because that's the only reasonable use case of QSharedPointer in the public API so far. Task-number: PYSIDE-454 Change-Id: Ibb7775117ffb22ab91d2ac798ae13cc9e4856587 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Collect Qt packages earlier to support QML exceptionsAlexandru Croitor2017-05-192-94/+86
| | | | | | | | | | | | | | | | When a80a6eb94433529a6d984e8ff22874f7dff48eea was introduced, collection of Qt packages was moved from the top level CMake project, to the PySide2 CMake subproject. This caused the issue that libpyside could not find the QML private API classes (due to the packages not being found in the project scope), leading to the failing test javascript_exceptions.py. This change moves the collection of the Qt packages back into the top-level project, so that the found Qt packages are propagated to all subprojects, including libpyside. Change-Id: Ieb41a51cc40b11c9f9b81143bf1dbe7d9c97da0c Reviewed-by: Christian Tismer <tismer@stackless.com>
* Properly differentiate between QML support and private API QML supportAlexandru Croitor2017-05-192-19/+27
| | | | | | | | | | | | This change introduces proper differentiation between finding the QML headers, and finding the QML private API headers. The public headers are used for proper QQuickItem subclass registration, while the the private headers are used for converting QML exceptions to Python exceptions. Task-number: PYSIDE-489 Change-Id: Ia36afcb2013a3cf489c6e9ab35917c50ddf313a6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Warn when QML private API include files could not be foundAlexandru Croitor2017-05-191-0/+1
| | | | | Change-Id: Ie52eb933239a81b2f6563d5f12c1b0bdb0156877 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add flags for TouchPointStateFriedemann Kleint2017-05-181-1/+1
| | | | | | Task-number: PYSIDE-487 Change-Id: Ia89741685b2500cfcb83e1a7982dd52dc94e5fcc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QMacPasteboardMime and qRegisterDraggedTypes() to typesystemLiang Qi2017-05-132-3/+3
| | | | | | | Task-number: PYSIDE-487 Change-Id: I56b9138e8b368754ee07965479d6c8e795fc8206 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Rewrite CMake scripts and generate includes for global.h.inChristian Tismer2017-05-094-322/+92
| | | | | | | | | | | | | The CMake files are repeating code three times, which should be avoided. Also, the global.h.in contained too many unconditional includes, which becomes relevant for the PySide 5.9 branch when missing includes are no longer ignored. Instead of maintaining an always growing list of conditionals (did that first), the needed includes are now computed by CMake, and the collected includes are appended to pyside2_global.h . Task-number: PYSIDE-507 Change-Id: I86f27d42c2d60d75ab4597e262e874c7186389c8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove fixup_headers after fixing shiboken for C++11Christian Tismer2017-05-096-171/+8
| | | | | | | | | | | | The hack for VS 2015 is replaced by a shiboken patch. This must be immediately applied after shiboken was fixed. Reason: The build would work, but Windows will not load because of missing symbols! Task-number: PYSIDE-504 Change-Id: I3ce8989632748b8967228a9993b11c599a858b91 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtGui/QRawFont: Exclude member functions with array parametersFriedemann Kleint2017-05-081-0/+3
| | | | | | | | | | | | | | Fix warnings: qt.shiboken: There's no user provided way (conversion rule, argument removal, custom code, etc) to handle the primitive argument type 'const quint32 *' in function 'QRawFont::advancesForGlyphIndexes(const quint32 * glyphIndexes, QPointF * advances, int numGlyphs) const'. qt.shiboken: There's no user provided way (conversion rule, argument removal, custom code, etc) to handle the primitive argument type 'const QChar *' in function 'QRawFont::glyphIndexesForChars(const QChar * chars, int numChars, quint32 * glyphIndexes, int * numGlyphs) const'. ... Amends 2e9f955a086fa7676c9eda60ca9e28cc03d9c5e2. Task-number: PYSIDE-487 Change-Id: I5db3ef75d80dc478783730a1c640101f90d0b65a Reviewed-by: Christian Tismer <tismer@stackless.com>
* CMakeLists.txt: find python interpreter firstDavide Pesavento2017-05-061-2/+2
| | | | | | | | CMake documentation recommends ordering find_package(PythonInterp) before find_package(PythonLibs) when both are called. Change-Id: Ic09f40b999d446146f58c1e6dab2ba920d8821a5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add support for Qt Mac Extras moduleLiang Qi2017-05-057-0/+158
| | | | | | | Task-number: PYSIDE-487 Change-Id: I26e4e2c443098b2309a1d3c954f7e80d16b86d81 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add support for Qt Win Extras moduleLiang Qi2017-05-037-0/+172
| | | | | | Task-number: PYSIDE-487 Change-Id: Ie7cb4df3900fca36b0ef4747f351ab0600d8f45c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtGui: Add more non-GL related bindingsFriedemann Kleint2017-05-039-0/+278
| | | | | | | | | | | | | | | | | | | | | Add: QBackingStore QEnterEvent QMarginsF QPageLayout QPageSize QPaintDeviceWindow QPixelFormat QPdfWriter QRasterWindow QRawFont QPaintDeviceWindow QStaticText QStyleHints Task-number: PYSIDE-487 Change-Id: I8926f55e4a5c71fc7e5b2293c4d300e305c6b56d Reviewed-by: Christian Tismer <tismer@stackless.com>
* QtMultimedia: Add further classesFriedemann Kleint2017-05-025-120/+482
| | | | | | | | | | | | | Split typesystem_multimedia.xml into typesystem_multimedia_common.xml and typesystem_multimedia_forward_declarations.xml in order to be able to implement the overloads of QCamera::setViewfinder and QMediaPlayer::setVideoOutput() taking a QVideoWidget/ QGraphicsVideoItem, respectively. Task-number: PYSIDE-349 Task-number: PYSIDE-487 Change-Id: I4b8758f3715fbf12e9f05d48da18e0c65c17f06d Reviewed-by: Christian Tismer <tismer@stackless.com>
* Check that all modules load at leastChristian Tismer2017-04-2821-19/+419
| | | | | | | | | | | | I copied the script from tests/qtconcurrent into all untested directories, to make sure that all modules have at least a test for importing. Two modules are left unsupported for now: QtWebEngine, QtDesigner Change-Id: Id719cd304e5a63d8896b9f4d14f937d36d22ac5e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Support Gentoo’s minimalism: Optional ModulesChristian Tismer2017-04-287-80/+118
| | | | | | | | | | | | | | | | | | | | | It has been reported that Gentoo is quite minimalistic and adheres strictly to Qt5’s definition of optional modules. Because I once used the Qt5 essential modules as the minimum requirement, the Gentoo maintainers had to always patch out makefiles This patch removes this restriction. But instead simply removing, I added an option “essential” to the ‘CHECK_PACKAGE_FOUND’ macro. When an essential module is omitted, the macro generates a warning that maybe not all tests are working. This way, we don’t have to check all tests at once for missing imports. Update: application_test now correctly moved. Explicit warning for essential modules. Corrections, tested with QtCore, only. Task-number: PYSIDE-502 Change-Id: I6e63c74c80173e0f4bcb5100458b37963f71e4f9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* ensure that QWebEngineView.findText existsChristian Tismer2017-04-283-1/+79
| | | | | | | | | | | | It has been reported that QWebEngineView.findText does not exist, and I could it verify on 2017-02-10 that it really doesn’t exist. Now, the situation seems to have changed. This test should prevend the function from vanishing again. Task-number: PYSIDE-474 Change-Id: I9407099d8e4aeef390d40d3913001b1121a125a3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtWidgets: Add QKeySequenceEdit, QOpenGLWidgetFriedemann Kleint2017-04-274-0/+53
| | | | | | Task-number: PYSIDE-487 Change-Id: I6e9d783c7ee33b4ac2538f0e9b7a4b54c055d2f9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* tests: add a test function for QUrl::path()Liang Qi2017-04-261-0/+4
| | | | | | Task-number: PYSIDE-338 Change-Id: Ie76a4187db17c7ea9232d2992e606135f188bc51 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Make QtConcurrent work at leastChristian Tismer2017-04-253-0/+41
| | | | | | | | For some reason, nobody checked if QtConcurrent really works. I added the missing class and added a test. Change-Id: I134697a9357424986c4a1e615f4038f9a61678ea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtCore: Add some missing classes for I/OFriedemann Kleint2017-04-245-1/+60
| | | | | | | Add QStorageInfo, QSaveFile and QTemporaryDir. Change-Id: Ice72ed52c86f9d51ca5e60ac988abc3320a51f13 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add QtMultimediaWidgetsFriedemann Kleint2017-04-249-0/+181
| | | | | | | | Add module and a simple test that shows the widgets. Task-number: PYSIDE-349 Change-Id: I0abecaa7dad03fbb1910ac049a5aed250ed80d78 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix warnings when generating bindings for QtXmlPatternsFriedemann Kleint2017-04-201-5/+8
| | | | | | | | | | | | | | Add the typedefs and fix the signatures. Fixes: signature 'QXmlName(short,short,short)' for function modification in 'QXmlName' not found. Possible candidates: QXmlName() in QXmlName, QXmlName(QXmlNamePool&,QString,QString,QString) in QXmlName, QXmlName(QXmlName) in QXmlName signature 'setNamespaceURI(short)' for function modification in 'QXmlName' not found. Possible candidates: signature 'localName()const' for function modification in 'QXmlName' not found. Possible candidates: localName(QXmlNamePool)const in QXmlName signature 'prefix()const' for function modification in 'QXmlName' not found. Possible candidates: prefix(QXmlNamePool)const in QXmlName signature 'setPrefix(short)' for function modification in 'QXmlName' not found. Possible candidates: signature 'setLocalName(short)' for function modification in 'QXmlName' not found. Possible candidates: signature 'namespaceForPrefix(short)const' for function modification in 'QXmlNodeModelIndex' not found. Possible candidates: Change-Id: I8736feb0b19208e7d4fb1c0c9d8050b3f3ae697e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update Qt enumerations in XML filesFriedemann Kleint2017-04-206-3/+33
| | | | | | | Silence most warnings about unknown enumerations in Qt up to 5.10. Change-Id: If6be55d17e032b08bd2d4538d409020934ba051a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QCommandLineParser and QCommandLineOption to typesystemLiang Qi2017-04-134-0/+62
| | | | | | Task-number: PYSIDE-487 Change-Id: Icb420b12aab87b3a96997d719d777805ac640f34 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix Inheritance of PySideChristian Tismer2017-04-132-1/+178
| | | | | | | | | | | | | | | | These are the tests for the newly inherited functions. By writing the tests, four new bugs have been found! This told me that it is necessary to write a simple script that systematically probes every generated function for basic functionality. PySide2.QtPrintSupport.QPrintPreviewDialog().open() prints a newline. Why is that? Task-number: PYSIDE-331 Change-Id: Ib6780884dfb10cf43a36006c6cabef60b1e1750f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix qstandarditemmodel_test.py not finding shiboken on macOSAlexandru Croitor2017-04-112-6/+11
| | | | | | | | | | | | | | | | | When running make test inside the build folder of PySide2, the mentioned test failed because it couldn't find shiboken2. Make sure to import the module as standalone, so the test succeeds. Also make sure to specify the proper python paths, by computing the paths to shiboken and pysidetest from the pyside build root path, rather than from pysidetest build path, because on some CMake implementations it evaluates to an empty path (probably due to the fact that ${pysidetest_BINARY_DIR} is evaluated before the pysidetest project is actually added). Change-Id: Ibe86b0d7c2c66db708bba2ffc32b02e5c3e91c79 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix Python extension suffix selection on LinuxAlexandru Croitor2017-04-112-34/+67
| | | | | | | | | | | | This allows building PySide in any configuration (debug or release) against any version of a Python interpreter (debug or release). Previously specifying --debug forced the user to use a debug version of the Python interpreter. Change-Id: Ieafcd250facd8cd231f6371882cc506496e75623 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix build QML private API headers are missingAlexandru Croitor2017-03-272-0/+4
| | | | | | | | | | | | The QML / Quick item registration code depended on the presence of the PYSIDE_QML_SUPPORT define being set, which is set only when the build system finds the QML private API headers. Make sure to use PYSIDE_QML_SUPPORT in all the relevant places. Task-number: PYSIDE-489 Change-Id: I804395bcb10f1b6827f13bd92ec764dc861c544e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix simple test case for Python3 (2)Christian Tismer2017-03-251-1/+3
| | | | | | | | This test was still using print. The last of these errors, I should have seen it earlier. Change-Id: I147ae56f3e8e8b2446c6398d325e5661525ac7dc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix simple test case for Python3Christian Tismer2017-03-241-1/+3
| | | | | | | | This test was still using print. Change-Id: I121d5b1b8895f7361862e6888a12534e941b458e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix connectNotify testsAlexandru Croitor2017-03-222-5/+11
| | | | | | | | | The connectNotify signal does not get strings as argument anymore, but rather QMetaMethod values. Thus the tests should compare agains the methodSignatures of those QMetaMethods. Change-Id: I21c236514b408f08481f1c31ee2b2e2c4aed4be8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix qscriptvalue_test.pyAlexandru Croitor2017-03-221-0/+4
| | | | | | | | The test executed an eval() statement, which tried to access a non-imported module object. Change-Id: Ib4c9ca03ef62a62ac10bf89b085ea11b8a1a94cd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Partially fix QtScriptTools/debugger_test.pyAlexandru Croitor2017-03-223-4/+13
| | | | | | | | | | | | The generated module library did not include all necessary dependent libraries (QtWdigets), which caused symbols not to be found on module import. The test still fails for now, due to an issue in QtScriptTools module itself, specifically continue an interrupted evaluation does not work. Change-Id: I5439509a3541674fed6113d1ed73135497fc7d2a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix QtMultimedia_audio testAlexandru Croitor2017-03-221-4/+4
| | | | | | | | The test was using some deprecated methods from Qt4. Fix is to use the Qt5 equivalent methods. Change-Id: Ia33747105880aa0858a37e325bc250dc598a61a3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix testQPrinterGetPageMargins testAlexandru Croitor2017-03-221-1/+4
| | | | | | | | Setting the pageMargins did not work on macOS because the provided values were smaller than the minimum allowed margins. Change-Id: I822262cbb535bb27cfefc98522ad88f1db868c4b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Include QQmlData private header for JS exception extractionAlexandru Croitor2017-03-221-0/+1
| | | | | | | | Apparently the necessary header is not always implicitly included, so make it explicit. Change-Id: I4e3a8b86139c7f9ce3cada43ee6e6827a3606fe3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QCollator and QCollatorSortKey to typesystemLiang Qi2017-03-214-0/+67
| | | | | | Task-number: PYSIDE-487 Change-Id: Ifd4ed0ce2b2e5ad55ee176826e642ae5539d51be Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix failing QML test with Qt 5.9 due to assertAlexandru Croitor2017-03-211-1/+2
| | | | | | | | | Due to an issue in unreleased Qt 5.9 (QTBUG-58837), a QML file loaded via a relative path results in an assert crash. Fix by adjusting the path to an absolute path like in other QML examples. Change-Id: Id9e794b57a65d9605018dfd6230d66782a17a254 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix pointer to temporary memory in PySide::getMetaDataFromQObjectSavin Zlobec2017-03-211-1/+2
| | | | | | | | | This caused issues when trying to retrieve signals defined in QML, apart from the fact that it caused undefined behavior. Task-number: PYSIDE-484 Change-Id: I335e30bda2e293c60f9b4dc68e19b183a75a74be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QStandardPaths and QDesktopServices to typesystemLiang Qi2017-03-218-0/+102
| | | | | | | Task-number: PYSIDE-432 Change-Id: I26e3f3a081bc95931de775ce9820bc783eed568e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add QTextDocumentWriter to typesystemLiang Qi2017-03-204-0/+50
| | | | | | Task-number: PYSIDE-177 Change-Id: If83802bd5b37e4ffa3d6a5e8f1eace28f2e68834 Reviewed-by: Christian Tismer <tismer@stackless.com>
* typesystem_core_common.xml: Specify ComponentFormattingOption flags as listFriedemann Kleint2017-03-161-1/+1
| | | | | | | The file is then valid XML. Change-Id: Ieafe62da7c08d2e1574612679cfff94d7f8c8d1b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove Python to Cpp conversion of QStringRefFriedemann Kleint2017-03-151-5/+0
| | | | | | | | | | | | | | QStringRef cannot be assigned any value. Besides the QTextStream issue, conversions of the arguments to QStringRef were generated in Sbk_QByteArray_richcompare() in qbytearray_wrapper.cpp for Qt 5.9 which caused the comparisons to fail (QtCore::qbytearray_operator_test()). Task-number: PYSIDE-332 Task-number: PYSIDE-323 Change-Id: I0460310c8eead6d7f499d95fe68c880064204caa Reviewed-by: Christian Tismer <tismer@stackless.com>
* Define Q_QDOC while we have the old parserChristian Tismer2017-03-141-0/+8
| | | | | | | | | | | | | Defining Q_QDOC enables some more modules, since it simplifies some interfaces so the shiboken parser does not reject them. This should be removed again, when we have a really good parser. The feature was a bit forgotten. We needed to decide whether Q_QDOC is to be set or not, and we decided “Yes, for Qt 5.6 we define it”. This patch realizes that decision. Change-Id: Ic2457e3e6791ded20d9e3a10778fef4f004ede43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix _utils.py.inChristian Tismer2017-03-131-2/+4
| | | | | | | | | | | | According to the issue, I corrected the dll name and added global variable references to the script, to keep them alive. Question: Do we keep it this way, or do we add internal references to the xml file? Task-number: PYSIDE-350 Change-Id: Idc8da7e11412cce1123cb2ff6e3e17d003e6dc53 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix errorhandling in ‘signalmanager.cpp.in’Christian Tismer2017-03-091-7/+11
| | | | | | | | | | | | It was reported that errorhandling in ‘signalmanager.cpp.in’ was wrong and PyErr_Restore might cause a segfault. I copied the error state into local variables in order to report the errors, before the errType and errValue variables are garbage collected. Task-number: PYSIDE-464 Change-Id: I220eb14a55c3de1ab225c0b45169ef2a76b5f599 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pysidetest: Add further missing include pathsFriedemann Kleint2017-03-081-0/+3
| | | | | | | | | The tests also needs QApplication and headers from libpyside. Amends 73d0821a56527e182c311e59623017fee5d69430 Task-number: PYSIDE-323 Change-Id: If59c88ffc57d73f4228df0c691c84265db52b841 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pysidetest: Add PySide2 include pathFriedemann Kleint2017-03-071-0/+1
| | | | | | | | | The test includes pyside_global.h which is generated from PySide2/global.h.in and in turn includes PySide2/qpytextobject.h. Task-number: PYSIDE-323 Change-Id: I48a1466bb797ea44c7c6062b2feccd8668f675c1 Reviewed-by: Christian Tismer <tismer@stackless.com>