aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* qmlformat: Fix nested functionsMaximilian Goldstein2020-06-252-4/+15
| | | | | | Fixes: QTBUG-85035 Change-Id: I5e1cb003b7b84547e3408a086eebf3be740e6860 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlformat: Fix inline componentsMaximilian Goldstein2020-06-252-0/+44
| | | | | | Fixes: QTBUG-85189 Change-Id: I2b30595b44d14b89406b126d3d148f51f8bfbca4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmllint: Properly process qmldir imports and dependenciesUlf Hermann2020-06-242-105/+83
| | | | | | | | | | | | | | | | | | We don't want to pick the dependencies from the qmltypes files. Rather, parse them directly from the qmldir. Do process versions, too. Also, import explicitly given qmltypes files only once, and don't expose QML types from dependencies as actual types. Hide them behind an inaccessible prefix. For the inaccessible prefix to work, we need to import the C++ class names without the prefix. The prefix doesn't make sense for C++ names anyway. In addition, properly process version-less imports. Change-Id: If582ad271db35351d219332c319571a814628fe0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Discern between "auto" and versioned imports in qmldirsUlf Hermann2020-06-241-2/+2
| | | | | | | | | | | | | You can now import the latest version, a specific version, or, "auto" which is the same version as the parent module. [ChangeLog][QtQml] You can now procedurally add module imports to modules, using qmlRegisterModuleImport(). However, actual import statements in qmldir files should be preferred wherever possible. Fixes: QTBUG-84899 Change-Id: I3b32dd8b07a19d31b6538b9a6bb436840862f345 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Do not resolve URLs when assigning them to a propertyUlf Hermann2020-06-221-1/+1
| | | | | | | | | | | | | | | We don't know in advance if a URL is part of the source code and should be relative to the current element, or if it is part of the application data and should not be touched. [ChangeLog][QtQml][Important Behavior Changes] URLs are not resolved or intercepted anymore when assigning them to a "url" property. Instead they are resolved and possibly intercepted when used to access an actual resource. Fixes: QTBUG-76879 Change-Id: Iaa2385aff2c13aa71a12e57385d9afb5dc60a073 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: search methods and properties also in attached typeEvgeniy A. Dushistov2020-06-191-22/+45
| | | | | | | | | | | | | | I changed the strategy of traverse via related types. Before: traversal happens only via linked list type -> type->superClass After: traversal via binary tree formed by attachedType and superClass I use pre-order strategy, current type, then all attached types, then all super classes Fixes: QTBUG-84861 Change-Id: I4a8fce869bc541de6900514d29575174d2753f02 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlformat: Fix nested ifsMaximilian Goldstein2020-06-181-19/+21
| | | | | | Fixes: QTBUG-85077 Change-Id: Ia2fec64a389fd7355f3fcf9438408b021c5abef4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: high level item can also be listEvgeniy A. Dushistov2020-06-182-3/+11
| | | | | | | Fixes: QTBUG-84300 Change-Id: I1a9db060cdeb7c4ec10deedab5141a06245a55b2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Clean up QT_CONFIG(opengl)Paul Olav Tvete2020-06-172-13/+5
| | | | | | | | | | Accelerated graphics is now possible without OpenGL support. With this change, a Qt build with -no-opengl can still run Qt Quick with a Vulkan, Metal, or Direct3D backend. Fixes: QTBUG-84027 Change-Id: Ib63c733d28cfdf7de16b138df136fa7628e1747b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Revert "CMake: Fix failing linux static build"Alexandru Croitor2020-06-172-2/+0
| | | | | | | | | | | | | | | | This workaround is not be needed anymore because the qtbase workaround is merged and propagated to qtdeclarative. The revert is also needed to make sure we don't break no-opengl builds. The qtbase workaround is 58a7e4f0bc5e9290cc205762d51adc5806b034fd. This reverts commit b1913741148ec683637b1a8f9930a74a4c40ab0b. Task-number: QTBUG-83498 Change-Id: I22af42f4b15fc27498fb9f171be1f1f0a06a8d69 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* qmlformat: Fix trailing newline in if blocksMaximilian Goldstein2020-06-171-0/+4
| | | | | | Fixes: QTBUG-85003 Change-Id: Ie68c838c9bc1d52181a741871279bee5a8020855 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlformat: Copy string literals verbatimMaximilian Goldstein2020-06-173-5/+10
| | | | | | | | Copy string literals verbatim instead of reformatting them. Fixes: QTBUG-84599 Change-Id: I36307eb30faa586f50cf0ce2660fb4e2686a3e4a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: fix wrong warning about enum usageEvgeniy A. Dushistov2020-06-173-0/+19
| | | | | | | Fixes: QTBUG-83796 Change-Id: I635bbfd98cf7be8418b454626ba7725e92b71c2c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Port QtDeclarative from QStringRef to QStringViewKarsten Heimrich2020-06-169-22/+22
| | | | | | | | Task-number: QTBUG-84319 Change-Id: I2dcfb8a2db98282c7a1acdad1e6f4f949f26df15 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QQuickWindow: Remove (set)ClearBeforeRenderingLaszlo Agocs2020-06-161-1/+0
| | | | | | | | | | | | | | | | | | The doc update reveals that this setting has been ignored with the RHI always, and there is no plans (or ways) to support this. As the beforeRenderPassRecording() signal documents, connecting to that signal is effectively an alternative to disabling clearing the color buffer. (because it allows the application to execute custom GL or other calls after the clear but before the rest of Qt Quick's rendering) Therefore, remove the clearBeforeRendering flag from Qt 6. [ChangeLog][Qt Quick][QQuickWindow] setClearBeforeRendering() and clearBeforeRendering() are removed. Change-Id: I6a0a6f56552331923f2e07390e2f33f58c6c31e0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* qtquickcompiler: Fix compilation from different drive (Windows)Kai Koehne2020-06-161-2/+1
| | | | | | | | | | | In this case the absolute path on Windows will start with e.g. "C:/", which is not a valid file name. Therefore also convert colon to an underscore. Pick-to: 5.15 Fixes: QTBUG-84901 Change-Id: If79245a5dda5a699f3dceb8e4f08e5a206d566a3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Replace calls to deprecated QEvent accessor functionsShawn Rutledge2020-06-111-4/+4
| | | | | | | | | | | | | | | | | | | | Several event accessors were deprecated in qtbase/24e52c10deedbaef833c0e2c3ee7bee03eacc4f5. Replacements were generated by clazy using the new qevent-accessors check: $ export CLAZY_CHECKS=qevent-accessors $ export CLAZY_EXPORT_FIXES=1 $ ../qt6/configure -platform linux-clang -developer-build -debug -no-optimize-debug -opensource -confirm-license -no-pch QMAKE_CXX=clazy $ make $ cd ../../qt6/qtdeclarative $ find . -name "*.clazy.yaml" $ clang-apply-replacements . Task-number: QTBUG-20885 Task-number: QTBUG-84775 Change-Id: I1be5819506fd5039e86b4494223acbe193e6b0c9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* CMake: Fix failing linux static buildAlexandru Croitor2020-06-112-0/+2
| | | | | | | | | | | Use workaround to fix failing static builds due to wrong ordering of static libraries on the link line. This involves specifying some of the libraries in an explicitly correct order. See the bug report for more details. Task-number: QTBUG-83498 Change-Id: I2238a049bd315845df8ad8995d47dfe7e351a2c5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Deduplicate the import resolution algorithmUlf Hermann2020-06-101-83/+16
| | | | | | | We will need it in various other places, too. Change-Id: I61c55f88b66ab85448ae8fff125fe34108532fc4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove the now unneeded moc include from qmlsceneLaszlo Agocs2020-06-101-2/+0
| | | | | Change-Id: Ieb8859c3695aa005a7d66476ac398142bbf22464 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Remove openGLContextCreated signalLaszlo Agocs2020-06-102-65/+1
| | | | | | | | | | | | | | | | No reason to have this in the API in 6.0, and it's already not emitted at all in dev (because the direct OpenGL code path is now gone from the render loops) Some simple GL string printing has been removed from qml/qmlscene. This opt-in feature has not been useful in practice anyway since QSG_INFO=1 prints the same things. [ChangeLog][Qt Quick][QQuickWindow] The openGLContextCreated signal has been removed from QQuickWindow. Change-Id: Ifb647bbd1e828ebad2b775e8ce5c38723a0cda13 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* 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>