summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/qdbusxml2cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change license for tests filesLucie Gérard2024-02-041-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* qdbusxml2cpp: Improve error reportingIevgenii Meshcheriakov2023-07-061-8/+15
| | | | | | | | | | | | | Use this format when reporting diagnostics relating to a source file: <file name>:<line>:<column>: {error|warning|note}: <message> This makes it easier to find the source elements that caused a diagnostics report. Fixes: QTBUG-2597 Change-Id: I8d8d13f7d71d1ce0c5050a0d08dddd33f9997f27 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Make qtbase tests standalone projectsAlexandru Croitor2023-07-051-0/+6
| | | | | | | | | | | | | | | | | Add the boilerplate standalone test prelude to each test, so that they can be opened with an IDE without the qt-cmake-standalone-test script, but directly with qt-cmake or cmake. Boilerplate was added using the following scripts: https://git.qt.io/alcroito/cmake_refactor Manual adjustments were made where the code was inserted in the wrong location. Task-number: QTBUG-93020 Change-Id: I77299f990692b4fe4721a9bc35071608d0d23982 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
* tests: Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-171-2/+0
| | | | | | | Pick-to: 6.5 Change-Id: I8d106554bb86ac1ec9bb7a4083de4c376bcbab1d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qdbusxml2cpp: don't emit Q_DECL_DEPRECATED for the adaptorThiago Macieira2023-02-071-3/+3
| | | | | | | | | | | | | | | The adaptor is a server-side implementation that must exist anyway and is called by the QtDBus runtime. We don't want warning on the server side because it must call those methods to implement the client API. Since we have the XML introspection saved in a class property anyway, the runtime won't be inspecting the method tags to see if Q_DECL_DEPRECATED is there, to add to the XML (which it isn't generating). Pick-to: 6.5 Change-Id: I9671dee8ceb64aa9b9cafffd17416596135d26ca Reviewed-by: David Faure <david.faure@kdab.com>
* qdbusxml2cpp: invert Q_DECL_DEPRECATED and inline in the outputThiago Macieira2023-02-071-0/+49
| | | | | | | | | | | | | | | | Commit 93dad2bf91d414a41c6e2c7db6c75171b4917d4d (6.0) changed Q_DECL_DEPRECATED to use the [[deprecated]] attribute, which must appear before inline and other keywords. To keep it next to Q_NOREPLY, I also moved the "inline" into the next string. Added missing tests for both. Pick-to: 6.2 6.4 6.5 Fixes: QTBUG-110979 Change-Id: I9671dee8ceb64aa9b9cafffd1741656e86f40453 Reviewed-by: David Faure <david.faure@kdab.com>
* tst_qdbusxml2cpp: test the old-style QDBusReply interface output tooThiago Macieira2023-02-071-1/+2
| | | | | | Pick-to: 6.2 6.4 6.5 Change-Id: I9671dee8ceb64aa9b9cafffd17416487c07f148a Reviewed-by: David Faure <david.faure@kdab.com>
* dbus: Fix path to moc file in generated qdbusxml2cppDavid Edmundson2022-12-161-2/+8
| | | | | | | | | | | | | | | | qdbusxml2cpp takes a filename to use for generated output. It may be in the form 'name.cpp' or just 'name'. For the moc file we need to convert this from a path to a name of a file in the same relative folder. It's not uncommon for this name to contain dots as sometimes a dbus interface name is used directly. For the cases where a suffix is not provided the whole name should be used. Pick-to: 6.5 Change-Id: I3bf4ae8b2b9121184c2786009e8b5abcc5e3e410 Reviewed-by: Mate Barany <mate.barany@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qdbusxml2cpp: modify the behavior of -m/--moc optionMate Barany2022-09-061-27/+88
| | | | | | | | | | | | | | | | | | | | | | | | qdbusxml2cpp has a -m/--moc option. Change and modify the behavior such that -p foo -m includes moc_foo.cpp in the generated .cpp -p :foo.cpp includes moc_foo.cpp in the generated .cpp -p foo.h:foo.cpp includes moc_foo.cpp in the generated .cpp Change the Qt6DbusMacros.cmake file accordingly. [ChangeLog][qdbusxml2cpp] The -m/--moc option now generates idiomatic moc file names (moc_base.cpp for headers, base.moc for implementation files)(was: always base.moc). Build systems using workarounds for the non-idiomatic naming of moc files used by qdbusxml2cpp in the past can now drop these workarounds for Qt versions >= 6.5. Fixes: QTBUG-103313 Change-Id: I754b1b276f130cb8645166470e1b457a676590f7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* qdbusxml2cpp: remove the old "In"-for-signal compatibility codeThiago Macieira2022-08-161-30/+104
| | | | | | | | | | | | | | | This led to an infinite recursion in case the annotation was completely missing. Instead of trying to fix that, I'm simply implementing the "### Qt6" request from c62f71722639c39f210ddbec0c4d832521b3f187 . [ChangeLog][qdbusxml2cpp] Removed the old compatibility code that accepted "In" annotations for signal argument names, introduced in Qt 5.8. Pick-to: 6.4 Fixes: QTBUG-104722 Change-Id: Ie4bb662dcb274440ab8bfffd1709bfc3daf0846d Reviewed-by: David Faure <david.faure@kdab.com>
* Add license headers to cmake filesLucie Gérard2022-08-031-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* qdbusxml2cpp: allow choosing <> over ""Mate Barany2022-07-071-0/+49
| | | | | | | | | | | | | | | | | | | | qdbusxml2cpp's -i option uses "" for the includes. However, an option to include with <> would be also desirable, since some compilers may use a different search strategy for <> than for "". Add a new command line option -I/--global-include to include the given argument using <>. The new option will be used in qtconnectivity. [ChangeLog][qdbusxml2cpp] Added command line option -I/--global-include to include header files with <> in the generated files. Fixes: QTBUG-103362 Change-Id: If8e7f8b86440bdec53f2517db1ad460912664b20 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-27/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-071-4/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Replace QtTest headers with QTestDavid Skoland2020-12-221-1/+2
| | | | | | | | | | | Complete search and replace of QtTest and QtTest/QtTest with QTest, as QtTest includes the whole module. Replace all such instances with correct header includes. See Jira task for more discussion. Fixes: QTBUG-88831 Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44 Pick-to: 6.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-231-1/+1
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Rename QLibraryInfo::location() to path()Lars Knoll2020-09-121-1/+1
| | | | | | | | As per ### Qt6 comment. Also rename the LibraryLocation enum to LibraryPath. Change-Id: I556025a19c5bcdf2ff52598eaba32269522d4128 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Regenerate tests with new qt_ prefixed APIsAlexandru Croitor2020-07-091-1/+1
| | | | | | | | Use pro2cmake with '--api-version 2' to force regenerate projects to use the new prefixed qt_foo APIs. Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Regenerate tests/auto/toolsAlexandru Croitor2019-11-121-1/+10
| | | | | | | Change-Id: I25268499ff966ebf134150accbaec7634726fe40 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Begin port of qtbase to CMakeSimon Hausmann2018-11-011-0/+1
| | | | | | | | | | | | | | | Done-by: Alexandru Croitor <alexandru.croitor@qt.io> Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-by: Kevin Funk <kevin.funk@kdab.com> Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Done-by: Simon Hausmann <simon.hausmann@qt.io> Done-by: Tobias Hunger <tobias.hunger@qt.io> Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-by: Volker Krause <volker.krause@kdab.com> Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* remove unnecessary references to $$QMAKE_CFLAGS_DBUSOswald Buddenhagen2016-10-041-1/+0
| | | | | | | | | | | it does not appear that the tests actually use these flags in any way; they don't include any (actual) d-bus headers and have no ifdefs. and the qdbus module already pulls in the flags via QMAKE_USE (in the case where they are defined at all, i.e., dbus-linked). Change-Id: Ie6bc6da7d1dd96da7b73f2d0fe45576936715874 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Unify naming of LIBS/CFLAGS for 3rd party librariesLars Knoll2016-04-071-1/+1
| | | | | | | | Most libs use QMAKE_LIBS/CFLAGS, but some have other naming conventions. Unify them into using QMAKE_LIBS/CFLAGS. Change-Id: I39b188adc1f9a223a83b294c5315c3095a9c68de Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-211-17/+12
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.Friedemann Kleint2015-09-011-1/+0
| | | | | Change-Id: I1955320e7639760b4383a53f37a506c8055933ef Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-6/+6
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* don't rely on the right qdbuscpp2xml/qdbusxml2cpp being in PATHOswald Buddenhagen2015-02-041-1/+3
| | | | | Change-Id: I50f639632dcb37c9752b41241a21c9fcd9dde0dd Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-211-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * Make QtDBus unit tests compile with runtime dbus-1 tooThiago Macieira2015-01-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | There's a change in Qt 5.4.0 that makes Qt compile with its own set of D-Bus headers, which means QT_CFLAGS_DBUS may be empty. Thus, we can't compile or link if we're using the actual libdbus-1 API to build the test. This commit makes these unit tests use the same dynamic loading mechanism. Change-Id: I56b2a7320086ef88793f6552cb54ca6224010451 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Add annotation to rename methods created by qdbusxml2cppDavid Edmundson2015-01-051-0/+10
|/ | | | | | | | | | | | | | | | | | Under DBus it is possible to have methods and signals with the same name or have methods which are reserved c++ keywords. For example the logind session interface has a signal and method both called Lock. This patch allows generated methods to use a different method name specified in the annotation that the original DBus name in the DBus interface in a similar manner to how one can rename accessors. [ChangeLog][QtDBus] Add annotation org.qtproject.QtDBus.MethodName to allow autogenerating C++ methods with different names to the original DBus method Change-Id: I08bbe77554fbdd348e93f82d45bab0d75d360c27 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-23/+23
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-011-0/+1
| | | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add unit testing for the qdbusxml2cpp toolThiago Macieira2012-04-212-0/+268
I have not added tests for warnings or other failure to input. This tests only proper output for the moment. Change-Id: Ie01fd2a78adfa57c27bf288a08cd44ae82f51241 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>