summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Follow up on meta object version bump in qtbaseVolker Hilsheimer2023-04-051-2/+17
| | | | | | | | | | | | | | | | | | | After b83de5f9a43b094bbb77b3aeea77983ea508a2b0 in qtbase, moc generates complete type information for enum types. ActiveQt declares enums from type libraries (i.e. on namespace level) also in the metaobject of each generated class (as we can't inherit the namespace meta object from each QAxObject class). But those enum types don't really exist on C++ level. So moc generates incorrectly qualified enum types. Augment the post-processing code to detect whether a type that is actually in the namespace is used as if it was in the class, and replace the qualifier. Bump the metaobject revision. Change-Id: I4d28abaa47a5fa3db70737d006b8e1becf8a51e3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-094-34/+6
| | | | | | Pick-to: 6.5 Change-Id: I1e1a376363224b88354da3e30fcea877f0e82f41 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Port from <cctype> toupper() to QtMiscUtils::toAsciiUpper()Marc Mutz2022-12-231-1/+3
| | | | | | | | | | | | | | | | The C toupper function is locale-dependent. Given the right locale (Türkiye, e.g.), toupper(i) is either - İ (LATIN CAPITAL LETTER I WITH DOT ABOVE; if representable) or - i (unchanged; if it isn't) Both results are wrong for the use-cases at hand. Task-number: QTBUG-109235 Pick-to: 6.5 6.4 6.2 5.15 Change-Id: Ia9726f0079c5f2625d97a341836b3d4505db6be1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
* Extend TestCon with AppContainer sandboxingFredrik Orderud2022-12-153-3/+142
| | | | | | | | | | | | | TestCon already support starting OLE controls in a "regular" separate process and in a low integrity level (low IL) process. This commit will extend QAxWidget::setClassContext and the impersonation support to also allow starting OLE controls in a AppContainer-isolated process for enhanced security sandboxing. Pick-to: 6.5 Task-number: QTBUG-109184 Change-Id: I525e99ba6934025710bbc97fba0045d0358413b7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Introduce security sandboxing factoryFredrik Orderud2022-12-153-42/+67
| | | | | | | | | | | Encapsulate the LowIntegrity sandboxing impl. behind a Sandboxing interface with a factory function. Done to make room for upcoming AppContainer sandboxing support. Pick-to: 6.5 Task-number: QTBUG-109184 Change-Id: Iaca3b8ba37d317b9cdcde0d194ba13c8beef110b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move low integrity level sandboxing to a new impl. fileFredrik Orderud2022-12-144-49/+67
| | | | | | | | | Done to clean up and make room for upcoming AppContainer isolation sandboxing. Pick-to: 6.5 Task-number: QTBUG-109184 Change-Id: I6ad77ed9a51f11ba134052d96e8ea4614fe2de11 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-061-1/+1
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I7d7d21564161807692941b12085686711583d556 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Don't use PUBLIC_LIBRARIESKai Köhne2022-09-283-3/+3
| | | | | | | | | | | | | | Fixes configure time warnings like CMake Warning at qtbase/cmake/QtToolHelpers.cmake:81 (message): qt_internal_add_tool's PUBLIC_LIBRARIES option is deprecated, and will be removed in a future Qt version. Use the LIBRARIES option instead. Call Stack (most recent call first): qtactiveqt/tools/dumpdoc/CMakeLists.txt:11 (qt_internal_add_tool) Change-Id: Ibbd00183cafe6ac8b5c1dd4b30c5cc1948b65b7d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix warning from deprecated QColor::setNamedColor APIVolker Hilsheimer2022-09-081-2/+1
| | | | | | | | | Use QColor::fromColor instead to create an initialized color, and make it const. Pick-to: 6.4 Change-Id: I838859562dedb079c9fc0bcfe63a50f630c197b8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* dumpcpp: Acknowledge moc revision changeOliver Wolff2022-08-311-1/+1
| | | | | Change-Id: Ifb28a88f108710b7d6a7d862f43b8e4fc2c630d9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-234-4/+4
| | | | | | | Task-number: QTBUG-105718 Change-Id: I7cf0f0a98984e5ec6c1edb30f6ba979305c344f4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-074-0/+12
| | | | | | | | | | | | 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: I07739807abcf7d8f305bb17cfdc6edefba49a2b1 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Postprocess moc output to fully qualify typesVolker Hilsheimer2022-06-211-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | If a property is declared with a type that is also the name of a member function, then the generated code will result in conflicts and compile errors. For instance, a property "AddressEntry" might be of type "AddressEntry*" and have a getter "AddressEntry", where the type lives in the same namespace as the current class. This is reproducible with the qutlook example, which doesn't build. This issue can also be provoked by valid C++ code, but since moc has no information about which types are classes or enums, or in which namespace they live in, we cannot do anything about that problem (yet). However, dumpcpp has information about which namespace a type live in, so we can postprocess the moc output and fix the problematic code by fully qualifying the types used with the namespace they were generated in. This slows down dumpcpp runs quite a bit, but those are infrequent as the type library typically doesn't change. Fixes: QTBUG-100145 Pick-to: 6.4 6.3 Change-Id: Id9b4656cb1ff2c319e0b87bd22b7e9399e7c410d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* dumpcpp: Completely specify enums from referenced typelibsFriedemann Kleint2022-06-211-16/+11
| | | | | | | | | | Forward-declaring enums causes problems with the moc-generated code. Introduce a variable to qaxbase storing the preformatted value string. Task-number: QTBUG-100145 Pick-to: 6.4 6.3 Change-Id: I500353d9788e3ea20bf1cc64172ca1b640976e5e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* dumpcpp: Do not generate constructors with C#-only classesFriedemann Kleint2022-06-161-0/+11
| | | | | | | | | Add a hard-coded exclusion list. Pick-to: 6.4 6.3 Fixes: QTBUG-100332 Change-Id: I009e202349e5f1fae13bc481e998fb494d7f997c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-1025-680/+60
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Ibdefc58cad3b83d0d117fc333de76ccb5177a621 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* dumpcpp: Modernize the generated codeFriedemann Kleint2022-05-171-6/+6
| | | | | | | | | | | Use nullptr and reinterpret_cast. Remove unused qax_pointer variable. Task-number: QTBUG-100145 Pick-to: 6.3 Change-Id: Icfe7cb5365b4679846bcd6bdd5cc478685910a34 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Port from container.count()/int to container.size()/qsizetypeMarc Mutz2022-03-164-14/+14
| | | | | | | | | | This change is driven by the deprecation of (some) container count() in favor of size(), so the int/qsizetype fixes are limited to the vicinity of count()/size() replacements. Pick-to: 6.3 Change-Id: If6606c9d4aec9bd1cf361efe8ffdf349ac031e79 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Replace container.count() with !isEmpty()Marc Mutz2022-03-162-2/+2
| | | | | | | Pick-to: 6.3 Change-Id: Ie4c28aae4d706db1e6170acaec6d1702cb69d1c5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove unused .qrc fileJoerg Bornemann2022-01-181-7/+0
| | | | | | | Task-number: QTBUG-94446 Change-Id: Icde4e967199f10f73612454561e2a4a19df88a5f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Add -controlname option to dumpcppJonas Kvinge2021-10-121-8/+24
| | | | | | | | This option will use the control name instead of the UUID for setControl() in the generated cpp file. Change-Id: Ib100a53647a3c514bb6fa012268a821c70061079 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Skip unnecessary commands when cross-building toolsJoerg Bornemann2021-10-052-0/+2
| | | | | | | | | | | Call qt_internal_return_unless_building_tools() directly after qt_internal_add_tool() to avoid having to special-case code for when this function only creates imported targets in cross-builds. Task-number: QTBUG-85084 Change-Id: I04b1f313828d611143c252a5f515f678298de91b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* testcon: Use qt_internal_add_app()Li Xinwei2021-07-151-2/+1
| | | | | | | | | testcon is a user facing app. Pick-to: 6.2 Task-number: QTBUG-88414 Change-Id: I46d1c94145024972e4bb2946e3b0218be0910c8c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove High DPI scaling attributesFriedemann Kleint2021-07-151-5/+0
| | | | | | | | | They no longer have any effect and cause warnings and errors. Pick-to: 6.2 Change-Id: Ibeb25186d92a0755a06193f34892ac0d64314e2e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix UIC warningKai Köhne2021-06-011-1/+0
| | | | | | | | | | qtactiveqt\tools\testcon\mainwindow.ui: Warning: action `actionGroupLogging' not declared Amends 7f6d41e35091 Pick-to: 6.1 Change-Id: I25b96631017f01c48f3d80e9a372bb7bf3e3dffb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove QMake project filesAlexey Edelev2021-04-127-136/+0
| | | | | | | | | | Remove the .pro/.pri project files and the associated .prev_CMakeLists.txt files. Task-number: QTBUG-78167 Pick-to: 6.1 Change-Id: I8dea2d3efccf8bae6a4b41779dccfaf5f9f83222 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* dumpcpp: Acknowledge metaobject revision changeFabian Kosmale2021-04-011-1/+1
| | | | | | Fixes: QTBUG-92351 Change-Id: Icc647f57840f7c2d86403bc0a5029f3b9fe4ef5a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix crash in dumpcpp-generated codeFriedemann Kleint2021-03-153-24/+15
| | | | | | | | | | | QWidget/QObject were generated as base classes for the generated class, which is no longer correct after the introduction of the QAxBaseWidget/Object classes. Pass the correct base QMetaObject and simplify the code since there is always a base class now. Pick-to: 6.1 Change-Id: I822f2de4ce65785cd45dc3b4adf1923efae556be Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Re-generate the CMake project filesAlexey Edelev2021-03-126-5/+105
| | | | | Change-Id: Icdfe81a51b626034bd86bf143eb1fe108603d148 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix warnings about deprecated QVariant::TypeFriedemann Kleint2020-10-301-8/+8
| | | | | Change-Id: I377e524edaf686d1a77e24f3dcb8f94476004b43 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* dumpcpp: Check 64 bit registry keys for 64bit buildsFriedemann Kleint2020-09-151-3/+14
| | | | | | | | | Add a check depending on pointer size. Pick-to: 5.15 Fixes: QTBUG-86666 Change-Id: I6bb39e94e677e9f9c72b15949e7b463e1f4776d2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix QMetaType/QVariant-related deprecationsFriedemann Kleint2020-09-071-7/+7
| | | | | | | | - Refactor code to use ints for metatype id Change-Id: I0a88f19ade25b1f8bb5a5138c602a71cf1f7282a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* dumpcpp: Adapt to QMetaType changesFriedemann Kleint2020-09-071-38/+5
| | | | | | | | | - Fix qRegisterMetaType() signature - Remove the generation of the QMetaTypeFunctionHelper specialization Change-Id: I844b495557e4935ca4ab54f9ac47e24adb158f72 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Bump dependency version and fix compile errorsFriedemann Kleint2020-08-191-1/+1
| | | | | | | | - Adapt to QMetaType/QVariant changes - Adapt to QIODeviceBase Change-Id: I7cb6b9b0bbc68954c839c2026e3984fd7f913ef9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-06-241-1/+1
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: Ie1081f1a8a35e1ae7f57697dafee066969463967 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-233-5/+5
| | | | | | Task-number: QTBUG-84469 Change-Id: I822b48d0f5568ad271b148a3e2058d59097f0154 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Some minor fixes to build against latest Qt dev branchKarsten Heimrich2020-06-101-1/+1
| | | | | Change-Id: Ice7a1064c95fcb6a73904fdc188c9b0363f17150 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove hard-coded QMetaObject dataFriedemann Kleint2020-05-283-11/+9
| | | | | | | | | | | | | Introduce QAxBaseObject and QAxBaseWidget providing the static properties and signals of QAxObject and QAxWidget. Rename the QAxBase methods to be called from the metacall implementations of QAxObject and QAxWidget. Add "classContext" as a real property on this occasion. Change-Id: Ia4f4e45e091e2d575ed9e6b2dd212139a1146300 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix deprecated/removed codeFriedemann Kleint2020-05-201-2/+2
| | | | | | | | | - Port away from QDesktopWidget - Use QFontMetrics::horizontalAdvance() instead of width() Pick-to: 5.15 Change-Id: I5d721fa574356a27e414545d6b9b2d28d400080b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Initial port to cmakeFriedemann Kleint2020-05-124-0/+104
| | | | | | | | Port the 2 main libraries, examples and tests. Task-number: QTBUG-78167 Change-Id: I0d00c9fa352a96dcd0e1f42d52e6f15680abd9ed Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Restructure the librariesFriedemann Kleint2020-05-065-8/+10
| | | | | | | | | | | | | | | | | | | | | | | Establish QtAxContainer and QtAxServer as proper modules. Add QtAxBase as a static helper lib containing qaxtypefunctions.cpp and qaxutils.cpp from the shared directory. qaxtypes.cpp remains in the shared directory as it is used by both modules with differing defines. The VARIANT <-> QVariant conversion is exposed via QAxBasePrivate for testcon. Add activeqt as a header-only module modeled after platformheaders. This makes it easier for the cmake conversion tools. Task-number: QTBUG-78167 Task-number: QTBUG-27776 Change-Id: I3e7956ea91f2177b8c2596402908351b4d99c510 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* testcon: Fix build after removal of QLayout::setMargin()Friedemann Kleint2020-04-181-1/+1
| | | | | Change-Id: If36f3576952dad987847903b81d0c64da4fdc40e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* dumpcpp: Use moc to generate metaobject codeFriedemann Kleint2020-04-084-486/+386
| | | | | | | | | | | | | | | | dumpcpp contained an old version of moc code, which is now out of date. Write out the interface as C++ code and run the real moc on it to generate this. Some modifications are required. Remove some asserts that checked on an empty meta object created in the fallback path of QAxBasePrivate::metaObject() which was removed by 0bcdc74f55574e1a45bef8728bd5093cf1acfc33. Task-number: QTBUG-82945 Change-Id: Ide58bae1440331ea4d5da0fcc74b41f49f09599a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* testcon: Remove QActionGroup from main formFriedemann Kleint2020-03-301-39/+31
| | | | | | | | QActionGroup support of Qt Designer was dropped in Qt 4. The group in question is also not exclusive, so, it does not make sense. Change-Id: I8927c730bab9071fd05de4207f4727c5d1bf4922 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-03-302-3/+3
|\ | | | | | | Change-Id: If239a0087c615b25a088eb60561ff7e019ea316c
| * testcon: Adapt to renamed signal of QComboBoxFriedemann Kleint2020-03-302-3/+3
| | | | | | | | | | | | Task-number: QTBUG-80906 Change-Id: Id18ae4adea182291ccd8b367e055afb894c97bb5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Fix Qt6 buildAlexandru Croitor2019-12-191-218/+218
| | | | | | | | | | | | | | Change-Id: Iaaa644cfe6777b0ffbe3fb5850fb58b323715fd2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 62ed66bce6e6602d82f9474a8589a7dabd7bc9ca) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix build of QtActiveQt after moc string data changesSimon Hausmann2020-01-131-12/+4
| | | | | | | | | | | | | | | | | | | | Commit e58b44d557b859b7b55869f1e137aa1bc8968307 in qtbase changes the meta-object to store string data as an array of offsets and length into the char array instead of a synthetic QByteArrayData (in the old format). This is a port to the new data structure. Change-Id: Ieacfdab69d799f954d9351f8424284b1e6633698 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-196-26/+27
|\ \ | |/ | | | | Change-Id: I1e014608bc0a7b07a37a18d43dc3ecc7eb281321
| * Reduce QList usageFriedemann Kleint2019-11-146-26/+27
| | | | | | | | | | | | | | | | Prepare for migration to Qt 6 by using QVector where possible. Otherwise, use auto or typedefs like QVariantList. Change-Id: I6d385efe1a45a0519cf4bb06a1f6d1ea869e890e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>