aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Don't install .qmltypes for Qt tests, examples and toolsAlexandru Croitor2020-05-293-3/+0
| | | | | | | | | | | that don't have an explicit QT_QML_MODULE_INSTALL_DIR path specified. We don't want to pollute the Qt qml import path with these files. Task-number: QTBUG-84403 Change-Id: I768267e0e79daa8090d882c301648cce14e1a809 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate qtdeclarative/toolsAlexandru Croitor2020-05-2922-1/+22
| | | | | | | | Includes - A bunch of TARGET_DESCRIPTION Change-Id: I6acfe05187afbdd45cf7e1bf8634f1554a51c791 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix Clang 10 warning about creating copies in range-forUlf Hermann2020-05-202-3/+3
| | | | | | | | | We should not copy the loop variables. Fixes: QTBUG-83989 Pick-to: 5.15 Change-Id: Ic94710a2c08aa19656c5e1853c40b10b203bca0e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qmllint: Fix evaluation of type assertionsUlf Hermann2020-05-202-6/+4
| | | | | | | | | | Previously, type assertions were ignored. The test case didn't fail because simple type casts were automatically detected when the derived objects were instantiated and assigned to base type properties. Pick-to: 5.15 Change-Id: I437e77ff38b7d570451cf27ca84e9897b519413f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix 'as' binary operation using invalid typesMaximilian Goldstein2020-05-201-3/+3
| | | | | | | Fixes: QTBUG-81392 Change-Id: Ic83091c547a7854b7fa86b44d93c575bd7426bae Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Clean up registration of QEasingCurveUlf Hermann2020-05-191-14/+0
| | | | | | | | | | | | | | | | We don't need to register the Type enum for both QtQml and QtQuick. QtQml is enough. Removing this makes the whole manual value type registration obsolete. Furthermore, we want QEasingCurve as QML_FOREIGN as we have several classes with properties of that type. To keep it nice and tidy, we make the uppercase-named enum holder class a separate type. Unfortunately, the Type enums differ in one entry: QEasingCurve::BezierSpline is called Easing.Bezier in QML. Therefore, we need to keep the custom enum around. We can change all users in qtdeclarative to use the name from QEasingCurve, though. Change-Id: Ibbc78d8bbf8938e2a8722f8c09833a0c73394c3d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Preserve access semantics in qmltypesUlf Hermann2020-05-182-9/+37
| | | | | | | | gadget types are accessed with value semantics, object types are accessed with reference semantics, and namespaces are not accessed. Change-Id: I5eb8f132d729416f28bf94e651f877fc4a9a5c77 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Compile with latest qtbase devFabian Kosmale2020-05-161-1/+0
| | | | | | | Get rid of QTextCodec in QQmlError and qcoloroutput.cpp and etc. Change-Id: I26ab81536d12eb0587d5d9ae747f6a379a4d0b12 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Fix typoMaximilian Goldstein2020-05-141-1/+1
| | | | | Change-Id: Iec3632bdf2446d9a54397c113b648db1c4f7db6e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: fix typo in outputMitch Curtis2020-05-071-1/+1
| | | | | | Change-Id: I5442f90e58fae0ed5b132c0bbabd0161822f85b8 Pick-to: 5.15 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix qmllint crashMaximilian Goldstein2020-05-061-1/+1
| | | | | | Fixes: QTBUG-83915 Change-Id: I26731ebcec6be46602b6acc7562c65b1c9f3e43a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: warn when passing a directory to -i optionMitch Curtis2020-05-062-23/+25
| | | | | | | | | It should be a file. Change-Id: I52f4ebcf8bdd8ddd1fedd66ceffe9a060139c1d9 Fixes: QTBUG-83861 Pick-to: 5.15 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Adjust and regenerate tools projectAlexandru Croitor2020-05-043-87/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Checking for android_app scope does not make sense in subdirs projects, it's expected that it is explicitly set as CONFIG += android_app in a standalone executable project. When the config is set, instead of creating an .so file, a true Android CLI executable is created. This is seemingly a relic from a time when there existed an Android mkspec that allowed building Qt without the .so requirement. Thus remove the android_app scope. Also exchange the static scope, with a contains(CONFIG, static) scope, so that pro2cmake can deal with the condition better. Keep the qmlcachegen target commented, due to it being built in the src project. Finally regenerate the CMake project, to exclude certain apps being built by default, thus fixing failures when building a simulator_and_device iOS configuration. Task-number: QTBUG-80899 Change-Id: Ief89d85c3a238c4a002ab6d98ee2596508cf130b Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* qmllint: Add flags for toggling warningsMaximilian Goldstein2020-04-306-95/+130
| | | | | | | | Enables all warnings by default and makes it possible to toggle individual ones using command line flags. Change-Id: Ie55f32f646fd9422313977969f9f00b59ee9ad99 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Show filename in addition to line and columnFabian Kosmale2020-04-243-11/+18
| | | | | | Fixes: QTBUG-83684 Change-Id: If15a9498ae223dccfbafe88b14453a4b180247d9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Port qmlcachegen to QRegularExpressionLars Knoll2020-04-241-2/+2
| | | | | | Change-Id: I2de2cb1c04c58b750531f8f00981bcce0bd724ba Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-172-1/+13
|\ | | | | | | | | | | | | | | Conflicts: src/qmltyperegistrar/qmltypesclassdescription.cpp src/quick/items/qquickrendertarget.h Change-Id: I9e24d2252a35b8e74af89ad72af796df658167ca
| * TypeDescriptionReader: Read alias and isFlag for enumsv5.15.0-beta4Ulf Hermann2020-04-092-1/+13
| | | | | | | | | | | | Change-Id: I7af2860cf18e7cd97cf3e84065172ce582843536 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | ScopeTree: Make methods a QMultiHashUlf Hermann2020-04-152-10/+15
| | | | | | | | | | | | | | You can have multiple overloads with the same name. Change-Id: Ifffcc634e96b41f99152092b72b61dad64713b23 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-097-29/+131
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4executablecompilationunit.cpp src/qml/jsruntime/qv4executablecompilationunit_p.h src/qml/qml/qqmlobjectcreator.cpp src/qml/qml/qqmlpropertycachecreator_p.h src/qml/qml/qqmltypecompiler.cpp src/qml/qml/qqmltypedata.cpp tests/auto/qml/qmlformat/tst_qmlformat.cpp tools/qmllint/scopetree.cpp src/qml/qml/qqmlapplicationengine_p.h Adjusted tools/qmllint/findunqualified.cpp to use newer API Change-Id: Ibfb4678ca39d626d47527265e3c96e43313873d4
| * qmltyperegistrar: Use target instead of template nameMaximilian Goldstein2020-03-263-16/+52
| | | | | | | | | | | | | | | | | | Due to the fact that multiple targets may be present in the same directory we have to ensure they all get a unique qmltypes. Fixes: QTBUG-82710 Change-Id: I4d7966035644b68f7d3330a4c974369503c48bf2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * qmlformat: Fix inconsistent if statementsMaximilian Goldstein2020-03-251-4/+30
| | | | | | | | | | | | | | | | Should now produce more consistent output for if statements. Fixes: QTBUG-82261 Change-Id: I39da0c80c4aadc2c5bdef32953c34ed9f0708a9e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * qmlformat: Improve comment attachmentMaximilian Goldstein2020-03-253-5/+18
| | | | | | | | | | | | | | | | | | | | - Fixes UiPublicMember nodes having a newline between comment and first node - Implements a Front_Inline type so comments at the beginning of object definitions are handled properly Fixes: QTBUG-82259 Change-Id: I0b40290037ce88a9ffe16390d72cbf3d704db41a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * qmlformat: Add option for alternative line endingsMaximilian Goldstein2020-03-251-4/+31
| | | | | | | | | | | | | | | | | | Allows user to decide between native (default), macos (\r), unix (\n) or windows (\r\n) line endings. Fixes: QTBUG-82258 Change-Id: Ie1eb365085815cbbebbf0d026c6f72f0ef2acb9d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * qmllint: Fix typoFabian Kosmale2020-03-241-1/+1
| | | | | | | | | | | | Fixes: QTBUG-82992 Change-Id: I6cb79b5736f283f68ec0a94c4494e4ca592b16d4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Tools: Add forgotten access methodUlf Hermann2020-04-071-0/+1
| | | | | | | | | | | | Change-Id: I9307a6243fdc5bc4f4d43321b41c172082298839 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Revert "CMake: Exclude building apps when cross-compiling"Alexandru Croitor2020-04-061-7/+0
| | | | | | | | | | | | | | | | | | | | A slightly modified commit will-be relanded once a dependent change in qtbase is merged and propagated to qtdeclarative. This reverts commit e4f1c1068bccea38889ba1d66dfcecacbb9f6634. Change-Id: Ia7ca2f5f3b7d2ad2d07e380b3853aca87d779d18 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | CMake: Exclude building apps when cross-compilingAlexandru Croitor2020-04-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It would fail the iOS multi-arch build otherwise, at link time with Undefined symbols for architecture x86_64: "_adler32", referenced from: _png_icc_set_sRGB in libQt6BundledLibpng.a(png.c.o)<Paste> .... This is due to us using system zlib instead of bundled zlib. Because system zlib only has one slice of architectures (either device or simulator), we get the above linker error. Solution is not to link (build) the apps at all). This is consistent with what qmake does. Change-Id: Ief2e63a8da49f9daac4f5542e78b0f0b3d37ed93 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | qmllint: Consistently use shared pointers for ScopeTreeUlf Hermann2020-04-0110-92/+114
| | | | | | | | | | | | | | | | | | | | ScopeTree keeps a weak pointer to its parent scope and strong shared pointers to its children. Avoid passing bare pointers around, so that we cannot create multiple shared pointers independently from the same bare pointer. Change-Id: Id0faece550b1878363004d843a8fa5c1164794ae Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | TypeDescriptionReader: Read file name from qmltypesUlf Hermann2020-04-012-1/+7
| | | | | | | | | | Change-Id: Iec295b87da413a2b6c741f3d3313c54caf055fd8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Move qmllint's metatype support to tools/sharedUlf Hermann2020-04-0122-610/+762
| | | | | | | | | | | | | | | | | | We want to read qmltypes files and analyze scopes also from other tools. Furthermore, restructure the shared directory, so that each tool only includes what it needs. Change-Id: I96a2dcc8b1c5fac613592fb1867bf51fa5ef3a6e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | qmllint: Drop support for "ModuleApi"Ulf Hermann2020-03-304-55/+3
| | | | | | | | | | | | | | | | | | This is some ancient, pre-Qt5 way of describing singletons. We don't need it anymore. Change-Id: I6355acf187b8ede4298a7026229a587cd1a12f1b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-201-0/+17
|\| | | | | | | Change-Id: I6f320ea43b5837444226228c118e57c4bda8702a
| * qmllint: Break inheritance cyclesUlf Hermann2020-03-191-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | Previously we would run into infinite loops on those. Mind that qmllint will reject a file called Window.qml that imports QtQuick.Window and then instantiates a Window {}. Such a thing is bad style. Task-number: QTBUG-82817 Change-Id: I6db82ca1794c3020dcb7d7e837fe44f72bca5029 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Clean up QQmlFileSelectorUlf Hermann2020-03-191-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The global static map of file selectors is not thread safe. If you add a file selector to engine A running in thread 1, you cannot at the same time retrieve the file selector of engine B running in thread 2. Alas, we only need the static map to discern file selectors from other URL interceptors, and we only need to do this on QQmlFileSelector::get(), which we don't use. Unfortunately it is public API, though. Deprecate QQmlFileSelector::get() and add a different hack to discern the interceptors for the case that it's still called. Also remove the duplicate setExtraSelectors() method. For this to work, we also add a method to QQmlApplicationEngine that allows us to pass extra file selectors and delay the initialization of QQmlApplicationEngine's QQmlFileSelector until the first file is loaded. [ChangeLog][QML] QQmlFileSelector::get() is deprecated. You can use the new method QQmlAplicationEngine::setExtraFileSelectors() to pass extra selectors to QQmlApplicationEngine's internal QQmlFileSelector. Manually created QQmlFileSelectors should be configured immediately after creation, before they are used by the QQmlEngine. Change-Id: Ia61a93777dc910b441a03ffb42d35a2a224c0e26 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-183-23/+63
|\| | | | | | | | | | | | | Conflicts: tools/qmllint/findunqualified.cpp Change-Id: I2593b5cc0db1d14e0c944aec4b88a80f46f5b0c1
| * qmllint: Check for unknown types in JavaScript accessUlf Hermann2020-03-171-2/+19
| | | | | | | | | | | | | | | | | | There are many incomplete qmltypes files around. We should not just crash on those. Task-number: QTBUG-82817 Change-Id: Ie072b80473927570c80fb2f9ae329de711c35904 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * qmllint: Don't crash on IDs that aren't scopesUlf Hermann2020-03-171-3/+18
| | | | | | | | | | | | | | | | | | In particular, those can be qualifiers for imports, in which case we have to combine them with the next segment in order to find the type. Task-number: QTBUG-82817 Change-Id: I217a79572cd1e160dcbbcb9541c53941c81ab76c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * qmllint: Use fully qualified QML type names as superClassUlf Hermann2020-03-162-9/+11
| | | | | | | | | | | | | | | | Otherwise we miss subtleties such as Label vs. T.Label. Task-number: QTBUG-82817 Change-Id: Idc2131426b2fd96f279dab83292a348b9295d5c0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * qmllint: Add QFont to the list of unknown builtinsUlf Hermann2020-03-161-11/+17
| | | | | | | | | | | | | | | | | | And also check them when analyzing JavaScript access. Task-number: QTBUG-82817 Change-Id: I677e7883fb24ab80ff20d1998e2d7df440ef4112 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | CMake: Update Apple platform defines after rename in qtbaseTor Arne Vestbø2020-03-172-2/+2
| | | | | | | | | | Change-Id: Ia0a075e3199eab735f9b289873beeb8730ebc47e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/wip/cmake' into devAlexandru Croitor2020-03-1227-4/+1174
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: dependencies.yaml Change-Id: Ifff48b9d0e7962d481e63c49399e2d304e1011e5
| * | CMake: Regenerate and adapt to merge from devwip/cmakeAlexandru Croitor2020-03-1222-67/+108
| | | | | | | | | | | | | | | | | | Change-Id: If8daa6152a563d4309d7342414780ef75b9f5589 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
| * | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-03-1232-266/+681
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: dependencies.yaml src/qml/qml/qqmlengine.cpp Change-Id: I6a73fd1064286f4a2232de85c2ce7f80452d4641
| * \ \ Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-298-43/+142
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: dependencies.yaml Change-Id: Ie3e9dc62031a85e5e81cbdf04694b95159d49fca
| * | | | Post merge fixesLeander Beernaert2020-01-247-46/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie8aca222809f35174fb6c6488832ec3ff5432272 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2020-01-1633-2582/+3688
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I0c5b939c70bdb91ccdf7068784308416dcaa5736
| * | | | | Post Merge FixesLeander Beernaert2019-11-256-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I13bc3aef318d8b497b01c61fcca7760abd96339a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2019-11-2513-47/+83
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Change-Id: I48b9c2e4f3a75c18470c55f73f2089dc1401de54
| * | | | | | Regenerate all projects with new CMake API versionAlexandru Croitor2019-11-1524-57/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>