Commit Graph

49 Commits

Author SHA1 Message Date
Lucie Gérard 9c5fc88388 Correct license for test files
According to QUIP-18 [1], all test files 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: I26d72e8de04d4c7c57b3b7838af5d033265de5ba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-02-27 10:32:21 +01:00
Amir Masoud Abdol c2d37f9646 Retire the qt_parse_all_arguments
Task-number: QTBUG-99238
Change-Id: Ia11c9cbd7c06347319ab3674ec0cd8da0214747e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-20 16:40:42 +01:00
Lucie Gérard 1b9808737a Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: Id89ed14990804a5024183e75382cc539d4293da1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-09-07 17:01:30 +02:00
Alexandru Croitor a8431a4067 CMake: Don't use PUBLIC_LIBRARIES for tests and test helpers
Change-Id: I1cd769f85d5f82c43639d6787d98e536619249e6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-07-28 14:58:42 +02:00
Lucie Gérard 5a7b716474 Add license headers to cmake files
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: I72c89a98c42bbc9234d8495e9e503bec81d11037
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-07-08 10:41:06 +02:00
Lucie Gérard 0dc4fd240a Use SPDX license identifiers
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.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-06-11 08:05:15 +02:00
Volker Hilsheimer aee6b231d0 Fix warnings in tests after QQmlListReference change
The engine parameter is no longer used.

Pick-to: 6.3
Change-Id: Ifc630eb4803a015d41df50210bd86947f6a5a472
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-03-21 12:45:58 +01:00
Allan Sandfeld Jensen 72c3befaa2 Replace 0 pointer constants with nullptr
Replaced in most common patterns.

Change-Id: Idcaff1f2e915f29922702d3600a2e5f1e2418a7a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-10-18 12:39:28 +02:00
Fabian Kosmale 78ab4b8d8b Remove the qmake project files
Remove all qmake project files, except for examples which are used to
test that qmake continues to work.

Change-Id: Ic4abb72dc2dcd75df7a797c56056b6b3c5fe62ac
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-01-15 15:34:22 +01:00
Alexandru Croitor 08adbefa13 CMake: Regenerate projects to use new qt_internal_ API
Modify special case locations to use the new API as well.

Task-number: QTBUG-86815
Change-Id: I3b964e3baf0cc7040830156dac30358ea1152801
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-10-06 13:19:37 +02:00
Alexandru Croitor 26c5243491 Merge remote-tracking branch 'origin/dev' into wip/cmake
Conflicts:
	dependencies.yaml
	src/qml/qml/qqmlengine.cpp

Change-Id: I6a73fd1064286f4a2232de85c2ce7f80452d4641
2020-03-12 15:03:03 +01:00
Alexandru Croitor 1d4fa26a70 Regenerate qtdeclarative
Change-Id: I48d7fd306f3d1b161a8e73029282ee591b1ef612
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-02-12 17:30:34 +00:00
Ulf Hermann 789929f939 Use QTypeRevision for all versions and revisions
In many places we carry major and minor versions or revisions that are
loosely coupled to minor versions. As the Qt minor version resets now,
we need to handle these things more systematically. In particular, we
need to add a "major" part to revisions.

QTypeRevision can express the current major/minor pairs more efficiently
and can also be used to add a major version to revisions. This change
does not change the semantics, yet, but only replaces the types.

Change-Id: Ie58ba8114d7e4c6427f0f28716deee71995c0d24
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-02-03 15:22:12 +01:00
Alexandru Croitor ba494aaa24 Regenerate all projects with new CMake API version
Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-15 12:24:51 +00:00
Alexandru Croitor 91e32f86b5 Regenerate remaining tests to be in sync
Change-Id: I200c8f58ad13bc1bc78409a3ce49348584ba5b51
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-15 12:24:38 +00:00
Leander Beernaert 4e14f6e70a Add QtDeclarative Test Coverage
All tests compile and run on a developer build.

These tests are failing:
tst_qqmlsqldatabase Fails due to missing sql driver
tst_qqmlsqldatabase Fails in wip/qt6
tst_ququicklayouts Fails in wip/qt6
tst_flickableinterop Fails in wip/qt6
tst_qquickpinchandler Fails in wip/qt6
tst_qquickflickable Fails in wip/qt6
tst_qquickgridview Fails in wip/qt6
tst_qquickimage Fails due to missing jpeg plugin
tst_qquicklistview Fails in wip/qt6
tst_qquicktext Fails in wip/qt6
tst_qquickcanvasitem Fails in wip/qt6
tst_scenegraph Fails due to missing jpeg plugin
tst_TestFiltering Fails in wip/qt6

Change-Id: I4b9d69c118e23c095cb72ad5a67653fc30943bb1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-08-14 14:01:58 +00:00
Alexandru Croitor 4fff2bb14e Fix QQml_setParent_noEvent not to print undefined behavior errors
When building Qt with -fsanitize undefined, the usage of
QQml_setParent_noEvent caused the following error message:
"qqmlglobal_p.h:233:5: runtime error: downcast of address
0x60300061bf10 which does not point to an object of type
'QQmlGraphics_DerivedObject'".

Instead of casting to the referred type, use QObjectPrivate::get to
access the d_ptr.

Change-Id: I2f2224bdb20a8d2e35a3291961378231f03c4ba2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-12-18 12:02:39 +00:00
Simon Hausmann 43a615e309 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/qml/compiler/qqmltypecompiler.cpp
	src/qml/jsruntime/qv4qmlcontext.cpp
	src/qml/jsruntime/qv4qobjectwrapper.cpp
	src/qml/qml/qqmlcustomparser.cpp
	src/qml/qml/qqmlimport.cpp
	src/qml/qml/qqmlimport_p.h
	src/qml/qml/qqmlmetatype.cpp
	src/qml/qml/qqmlmetatype_p.h
	src/qml/qml/qqmltypenamecache.cpp
	src/qml/qml/qqmltypenamecache_p.h
	src/qml/qml/qqmltypewrapper.cpp
	src/qml/qml/qqmltypewrapper_p.h
	src/qml/qml/qqmlvmemetaobject.cpp
	src/qml/util/qqmladaptormodel.cpp

Change-Id: Ic959d03e6f9c328fb02710d9abbb0f27cddde131
2017-08-18 11:46:11 +02:00
Lars Knoll 49a11e8820 Use QQmlType by value
QQmlType is now refcounted, and we need to use it by
value, to control it's lifetime properly. This is
required, so we can clean up the QQmlMetaTypeData
cache on engine destruction and with trimComponentCache()

Task-number: QTBUG-61536
Change-Id: If86391c86ea20a646ded7c9925d8f743f628fb91
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-08-02 16:32:43 +00:00
Robin Burchell f64fb98a28 dynamic_cast -> qobject_cast for QObjectDerived*
We cannot use dynamic_cast in Qt.

Change-Id: Ia6aeeb2439ca8c24239dce7cff55a0c18860e43e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-02-14 18:10:22 +00:00
Liang Qi 9044800083 Merge remote-tracking branch 'origin/5.7' into 5.8
The renderers added in 5.8 had to be adapted to the changed profiling
macros from 5.6.

Conflicts:
	src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp
	src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp
	src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp
	src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp
	src/quick/util/qquickprofiler_p.h
	tests/auto/qml/qjsengine/tst_qjsengine.cpp
	tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp

Change-Id: Icb370b7c95aab12589ad73881ac6d178759a5c6b
2016-11-28 12:24:13 +01:00
Liang Qi cc1c3d0e2b Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/qml/compiler/qv4ssa.cpp
	src/qml/qml/v8/qqmlbuiltinfunctions.cpp
	src/quick/util/qquickprofiler_p.h

Change-Id: I11a89c2a166115d6697adfba09928805643e709e
2016-11-25 23:35:34 +01:00
Erik Verbruggen 5718dac919 QML: Fix memory leak in a benchmark
Change-Id: I64b671243a107c518da2000e2ffd964f441af037
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-11-16 14:36:38 +00:00
Erik Verbruggen 835eac4ea0 QML: Change C++ benchmark to reflect QML benchmark
The QQmlListReference will build a property cache entry, but it won't
assign it to an engine when none is available (meaning: it would create
the entry every time a QQmlListReference is created). QML won't do that,
because it (obviously) has an engine available.

Change-Id: I46eeaf3dffcb690902dd3d78be48c8509be6e84d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-16 14:36:00 +00:00
Liang Qi 7e609f6d10 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	src/qml/compiler/qqmltypecompiler.cpp
	src/qml/compiler/qv4isel_moth.cpp
	src/qml/compiler/qv4ssa_p.h
	src/qml/qml/qqmlobjectcreator.cpp

Change-Id: I8bb7fe773d657f908f20ee5e72c2b9bd643f6260
2016-08-17 10:57:38 +02:00
Liang Qi d54d28981c Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/qml/compiler/qv4isel_moth.cpp
	src/qml/compiler/qv4ssa_p.h
	tests/benchmarks/qml/qqmlimage/qqmlimage.pro
	tests/benchmarks/qml/qqmlimage/tst_qqmlimage.cpp

Change-Id: Iad11ce7fdf0c6d200fdebc16a94081bd8069a87a
2016-08-13 00:41:58 +02:00
Robin Burchell e0e591fb80 tst_creation: Remove tst_creation::elements
There is no real sense in testing what boils down to operator new/delete plus a
little PLT overhead. For one thing, the allocator is too variant to test at such
a level. For another, it's not representative of any real-world scenario.

Change-Id: Ib455bb00839ff4e25099977059759a7b328db306
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-08-05 09:38:50 +00:00
Robin Burchell 3631c77ff0 tst_creation: Remove qobject_alloc benchmark
This is literally just testing operator new and delete, with a little PLT
overhead. It is not useful as a result (not a real-world scenario, and obscenely
variant thanks to allocators not being predictable in behavior).

Change-Id: I42f758c503b37ff880fc4f0e38c220d0638356e9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-08-05 09:38:44 +00:00
Robin Burchell f2d174012b tst_creation: Remove redundant widgets dependency
Absolutely no need for this.

Change-Id: I06ca2dab157fecf2c585b9f863d9893cd4ce7300
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-08-05 09:38:41 +00:00
Liang Qi 8ae479a8ea Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	src/qml/jsruntime/qv4engine_p.h
	src/qml/jsruntime/qv4runtime_p.h
	src/qml/qml/qqmldelayedcallqueue.cpp
	src/qml/qml/qqmlvaluetypewrapper.cpp
	src/qml/qml/qqmlvmemetaobject.cpp
	src/qml/qml/v8/qv8engine_p.h
	tests/auto/quick/qquicktext/tst_qquicktext.cpp

Change-Id: I3f0608c7beb88088cbbef4d0db59920f56deaea9
2016-05-24 14:00:39 +02:00
Liang Qi 63ec33e79c Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp
	src/qml/jsruntime/qv4engine.cpp
	src/qml/jsruntime/qv4engine_p.h

Change-Id: I89ffccd699bee675732758d039e22224b275d60d
2016-05-19 20:41:34 +02:00
Liang Qi ae745746a6 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	src/qml/jsapi/qjsengine.cpp
	src/qml/qml/qqmlengine_p.h
	src/quick/items/qquickanchors.cpp
	src/quick/items/qquickanimatedimage_p_p.h
	src/quick/items/qquickitem_p.h
	tests/auto/qml/qqmlecmascript/testtypes.h
	tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
	tests/benchmarks/qml/creation/tst_creation.cpp

Change-Id: I65861e32f16e8a04c7090a90231627e1ebf6ba6f
2016-05-13 08:28:27 +02:00
Erik Verbruggen c6c0d730b7 QML: Remove internal field padding from QQuickAnchorPrivate.
Don't store QQuickAnchorLine, but store both fields separately in
QQuickAnchorPrivate. This prevents padding of QQuickAnchorLine, saving
48 bytes on x86_64 (or any platform where structs are 8-byte aligned).

On x86_64, this also removes ~180 instructions for each QQuickAnchor
creation/removal, and speeds up the constructor by 25%.

While in the neighborhood, do a drive-by change and merge
QQuickAnchorLine::AnchorLine and QQuickAnchors::Anchor by removing the
former.

Change-Id: I50ab6252b1903f5f1a075174e6185c3048a8f8ec
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-05-10 08:17:00 +00:00
Simon Hausmann 65e642f13d Make it possible to call some benchmark functions directly
Some benchmarks - such as "elements" - rely on QQmlMetaType::qmlTypeNames(),
which is implicitly populated when other benchmarks import for example QtQuick.
However when calling them directly, the benchmark data set is much smaller.
Therefore let's add QtQuick to the "base" set that is always available.

Change-Id: I4b3696a426854195deb1c31ad24d80427da7b340
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-05-09 08:14:53 +00:00
Liang Qi da374438be Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/quick/items/qquickimagebase.cpp
	src/imports/layouts/plugin.cpp

Change-Id: I5f48474df4034a1347ec74795c85d369a55b6b21
2016-04-27 08:47:35 +02:00
Erik Verbruggen c71e40b2bd QML: Access QQuickItemPrivate data (like x/y/etc) directly.
This saves ~5% in QQuickAnchorsPrivate::itemGeometryChanged on x86_64.

Change-Id: Iccf782521e9c8523c41c6f2e6d87fad401762a9e
Reviewed-by: Michael Brasser <michael.brasser@live.com>
2016-04-21 15:04:36 +00:00
Erik Verbruggen f6fee09942 QML: When available, use QQmlAccessors to read properties.
When a property is read from a QObject or the QML scope object, and we
can statically resolve the type to qreal/QObject/int/bool/QString, and
the property has an accessor declared for it, then use that accessor to
do the read.

This collapses the path of e.g.:
  Runtime::getQmlScopeObjectProperty
    -> QObjectWrapper::getProperty
      -> QObjectWrapper::getProperty
        -> LoadProperty
          -> QQmlAccessor::read
(all of which do various checks for all the stuff mentioned above) to:
  Runtime::accessQmlScopeObjectQRealProperty
    -> QQmlAccessor::read
which is a simple 4-line function, and doesn't need to do any check.

According to valgrind, this saves 170 instructions on x86 for the
simple binding:

Item {
    width: height
}

Change-Id: I0761d01e8f1a3c13ecbffe2d8e0317ce9c0a4db0
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-04-12 15:17:04 +00:00
Liang Qi 68ba8fe3cc Merge remote-tracking branch 'origin/5.6' into 5.7
This change also fixes the build of two benchmarks, tst_affectors
and tst_emission.

Conflicts:
	src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro
	src/qml/qml/ftw/qhashfield_p.h
	tests/benchmarks/particles/affectors/tst_affectors.cpp
	tests/benchmarks/particles/emission/tst_emission.cpp
	tests/benchmarks/qml/pointers/pointers.pro
	tests/benchmarks/qml/pointers/tst_pointers.cpp
	tests/benchmarks/qml/qmltime/qmltime.pro
	tests/benchmarks/qml/qquickwindow/qquickwindow.pro

Change-Id: I595309d1e183c18371cb9b07af6e4681059de3b2
2016-04-08 13:03:25 +02:00
Simon Hausmann 1a52f28bdf Add benchmarks to the "make benchmark" targets that are known to work
The qjsengine benchmark is one exception that is omitted because it crashes currently.

Change-Id: Ic93344dc864d0d6427d85faa12a2753126be808e
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-03-17 13:22:44 +00:00
Jani Heikkinen 38ec3bd755 Updated license headers
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: I04760a0801837cfc516d1c7c02d4f503f6bb70b6
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-20 11:46:25 +00:00
Friedemann Kleint 7ea2bb8764 Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.
Change-Id: I691b8ddff60b5f16f06d32b379c76e87f44f84a9
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-09-03 19:23:46 +00:00
Jani Heikkinen c5796292ad Update copyright headers
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.

Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
2015-02-12 10:28:11 +00:00
Jani Heikkinen e7ceacda70 Update license headers and add new licenses
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL

Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-08-25 11:28:46 +02:00
Peter Varga cd4820fbbe Fix compilation of QML benchmarks
Change-Id: I2d612108ec8d69a0a9318cd26f6adcbb74f34138
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-06 09:31:33 +02:00
Sergio Ahumada 83deab8d1b Update copyright year in Digia's license headers
Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-10 19:52:37 +01:00
Iikka Eklund 46010aa7a2 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-09-23 08:22:24 +02:00
Thiago Macieira 8dabc28e4e Set the Qt API level to compatibility mode in all tests.
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: I6988c2360e9d88916311374a0c910bfc5b607439
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-01 23:33:39 +02:00
Adriano Rezende b1439a30be Add more benchmark tests for Item
Change-Id: I603df39d75a5eddb02a39ab08755991a0655ff19
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-05-14 03:03:39 +02:00
Matthew Vogt b855240b78 Rename QDeclarative symbols to QQuick and QQml
Symbols beginning with QDeclarative are already exported
by the quick1 module.

Users can apply the bin/rename-qtdeclarative-symbols.sh
script to modify client code using the previous names of the
renamed symbols.

Task-number: QTBUG-23737
Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-24 04:51:31 +01:00