Commit Graph

31 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
Marc Mutz 5eb52b7255 Port from container::count() and length() to size() - V5
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to
handle typedefs and accesses through pointers, too:

    const std::string o = "object";

    auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); };

    auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) {
        auto exprOfDeclaredType = [&](auto decl) {
            return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o);
        };
        return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))));
    };

    auto renameMethod = [&] (ArrayRef<StringRef> classes,
                            StringRef from, StringRef to) {
        return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)),
                            callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))),
                        changeTo(cat(access(o, cat(to)), "()")),
                        cat("use '", to, "' instead of '", from, "'"));
    };

    renameMethod(<classes>, "count", "size");
    renameMethod(<classes>, "length", "size");

except that on() was replaced with a matcher that doesn't ignoreParens().

a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'.

Change-Id: I58e1b41b91c34d2e860dbb5847b3752edbfc6fc9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-10-13 00:18:35 +02: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
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 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
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
Robin Burchell ff1a728e95 tst_compilation: Add a test for compilation of a large number of types
As I'll be touching QQmlImport, it would be good to ensure it doesn't
regress. This may also be useful for future such changes (e.g. I want to
try play around with how the implicit import is handled).

Results for me on a recent dev snapshot, 2013 rmbp:

********* Start testing of tst_compilation *********
Config: Using QtTest library 5.9.0, Qt 5.9.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 8.0.0 (clang-800.0.42.1) (Apple))
PASS   : tst_compilation::initTestCase()
PASS   : tst_compilation::bigimport(10, qmldir)
RESULT : tst_compilation::bigimport():"10, qmldir":
     3.6 msecs per iteration (total: 59, iterations: 16)
PASS   : tst_compilation::bigimport(100, qmldir)
RESULT : tst_compilation::bigimport():"100, qmldir":
     54 msecs per iteration (total: 54, iterations: 1)
PASS   : tst_compilation::bigimport(1000, qmldir)
RESULT : tst_compilation::bigimport():"1000, qmldir":
     558 msecs per iteration (total: 558, iterations: 1)
PASS   : tst_compilation::bigimport(10, noqmldir)
RESULT : tst_compilation::bigimport():"10, noqmldir":
     5.0 msecs per iteration (total: 80, iterations: 16)
PASS   : tst_compilation::bigimport(100, noqmldir)
RESULT : tst_compilation::bigimport():"100, noqmldir":
     58 msecs per iteration (total: 58, iterations: 1)
PASS   : tst_compilation::bigimport(1000, noqmldir)
RESULT : tst_compilation::bigimport():"1000, noqmldir":
     558 msecs per iteration (total: 558, iterations: 1)
PASS   : tst_compilation::cleanupTestCase()
Totals: 8 passed, 0 failed, 0 skipped, 0 blacklisted, 22400ms
********* Finished testing of tst_compilation *********

Change-Id: I7159e561fb13a3c48e966d5b963dc0ef1ca783e3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-24 17:37:40 +00:00
Lars Knoll e579076bb3 Get rid of most QT_NO_FOO usages
Instead use QT_CONFIG(foo). This change actually detected a few
mis-spelled macros and invalid usages.

Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-29 10:10:27 +00:00
Andy Nichols 4f501e364e Disable BoomBlock qml compilation benchmark when building without OpenGL
The BoomBlock benchmark imports the Particles module which requires
OpenGL, so it will be skipped for -no-opengl builds.

Change-Id: I1754461f0920e85a51c5b1d5b3f5c8b2c5d26e18
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-06-07 09:18:05 +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
Robin Burchell 0b6b8c2f8e tst_compilation: Fix the horrifically broken benchmark.
Start by updating the horrifically outdated QML (re-copy from SameGame). In
addition to this, we reinstate the QVERIFY which cunningly hid the fact that the
benchmark was totally broken, and change it to a QVERIFY2, so we can easily
identify what broke if anything in the future.

Change-Id: Icaa60e0dd0b78861cdd2431af36e534d257a855d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-09-15 14:54:58 +02: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
Robin Burchell 7f2f24c136 Fix compilation of tst_compilation (:-P) benchmark.
Change-Id: I7bbf24d816a356f100d7e2c5a8e7a81218f0f54d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-12 10:49:23 +02:00
Simon Hausmann 1a97598556 Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into wip/v4
Conflicts:
	src/imports/qtquick2/plugins.qmltypes
	src/qml/debugger/qv8debugservice.cpp
	src/qml/qml/qml.pri
	src/qml/qml/qqmlcompiler.cpp
	src/qml/qml/qqmlcomponent.cpp
	src/qml/qml/qqmlcontext.cpp
	src/qml/qml/qqmldata_p.h
	src/qml/qml/qqmlengine_p.h
	src/qml/qml/qqmljavascriptexpression.cpp
	src/qml/qml/qqmlxmlhttprequest.cpp
	src/qml/qml/v4/qv4bindings.cpp
	src/qml/qml/v4/qv4irbuilder.cpp
	src/qml/qml/v4/qv4jsonobject_p.h
	src/qml/qml/v8/qqmlbuiltinfunctions.cpp
	src/qml/qml/v8/qv8bindings.cpp
	src/qml/qml/v8/qv8contextwrapper.cpp
	src/qml/qml/v8/qv8listwrapper.cpp
	src/qml/qml/v8/qv8qobjectwrapper.cpp
	src/qml/qml/v8/qv8qobjectwrapper_p.h
	src/qml/qml/v8/qv8sequencewrapper_p_p.h
	src/qml/qml/v8/qv8typewrapper.cpp
	src/qml/qml/v8/qv8valuetypewrapper.cpp
	src/qml/types/qqmldelegatemodel.cpp
	src/quick/items/context2d/qquickcanvasitem.cpp
	src/quick/items/context2d/qquickcontext2d.cpp
	sync.profile
	tests/auto/qml/qjsengine/tst_qjsengine.cpp
	tests/benchmarks/qml/animation/animation.pro
	tools/qmlprofiler/qmlprofiler.pro

Change-Id: I18a76b8a81d87523247fa03a44ca334b1a2360c9
2013-06-24 11:48: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
Simon Hausmann 891f702945 Fix compilation with built-in v4vm JS engine
Change-Id: Ieda9267e296acf6392a5461f4cfb9233a7a409a0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-15 13:03:20 +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
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