Commit Graph

459 Commits

Author SHA1 Message Date
Morten Sørvig 2c8faa5db5 Make tst_qmlpreview::zoom work with native DPR > 1
This test sets a QtGui scale factor, and then reads
back the DPR form QML Screen.devicePixelRatio and compares
with the expected scale factor.

However, that DPR value also includes the native DPR
as a factor. Account for this when determining the expected
zoom value.

Change-Id: I324e9554f858f2a54f92f555f5d22dd015435737
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-02-22 16:21:09 +01:00
Amir Masoud Abdol 8f7080fd09 Replace AUTO_RESOURCE_PREFIX with Qt CMake Policy in examples, tests
Every instance of AUTO_RESOURCE_PREFIX has been replaced by either
qt_standard_project_setup(REQUIRES 6.5) or with
qt_policy(SET QTP0001 NEW), mainly in tests.

In addition, I added a warning message for the case where
AUTO_RESOURCE_PREFIX is used.

Pick-to: 6.5
Task-number: QTBUG-96233
Change-Id: I323a15e9d0bb5fe6ba649365314af9fc2ad67bda
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-02-21 19:45:44 +01:00
Ulf Hermann 93956372d9 QQmlProfilerService test: Add first out-of-order event to list
Fail only after adding the event so that we can see the event in the
post-fail listing of received events. That might shed some light on what
actually happens.

Task-number: QTBUG-111008
Change-Id: I3a40ea71c35aa48ec7a827bd51513f7f678831c6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-02-14 16:05:27 +01:00
Ulf Hermann 2d44365f69 CMake: Allow omitting the version of QML modules
Also, drop all the VERSION 1.0 lines from the examples and tests. 1.0 is
actually a bad default version since it's before all the Qt versions.

[ChangeLog][QML] You can now omit the VERSION argument to
qt_add_qml_module(). This will automatically generate the highest
possible version.

Pick-to: 6.5
Task-number: QTBUG-99146
Change-Id: Ic10ec69b87c224e0e94e1785f65653815d4c778c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-01-27 19:16:39 +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
Ulf Hermann 0b508c9617 Fix a few CMake warnings
Use AUTO_RESOURCE_PREFIX and move QML modules into suitable output
directories.

Change-Id: If39218450cf8dda41547c45a9b5deaa8673915bf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-02 19:53:12 +01:00
Fabian Kosmale 1cae237329 Fix build error in top level builds
We need to set up autogen tools not onlyfor the main library but also
for the plugin.

Fixes: QTBUG-109010
Pick-to: 6.4 6.2
Change-Id: I72b64c3803eb1de5f07e8dde05b87d95bc5dc7f2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-11-29 14:46:34 +00:00
Semih Yavuz fe32f58008 Debugger: Initialize scoped context correctly
Initialize scopedContext with valid qmlContext. Otherwise debugger
crashes on attempt to lookup an object that includes a v4Function
property

Pick-to: 6.2 6.4
Fixes: QTBUG-107607
Change-Id: Iea59bdf9d379a5415abe1767f76f851978b1be3f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-11-25 15:47:00 +00:00
Ulf Hermann deda185ba9 Don't crash on QQmlGadgetPtrWrapper instances in debug service
They have the confusing property of being a QObject but having a
QMetaObject that says it's a Q_GADGET.

Pick-to: 6.4
Fixes: QTBUG-108646
Change-Id: I6df34c2004918cd89691f4b5eb4b6267dabcd7ff
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-11-22 16:33:18 +01:00
Ulf Hermann 2ba3b9cebe Clean up tst_qqmlengiendebugservice.cpp
Make sure it doesn't leak memory and use ranged for rather than foreach.

Also, make sure the individual test functions don't depend on each other
and leave all global resources in a clean state.

Change-Id: Ibce1910f26f8b3b341463bb3a758602c4c402c1a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-11-22 16:16:38 +01:00
Lucie Gérard d45925b0fd Use SPDX license identifiers
Amends commit 0dc4fd240a.
Some files were still missing.

Task-number: QTBUG-67283
Change-Id: Ibbfa76d27a59f0aae05d5f8970521a6eaca9780b
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-10-14 11:55:05 +00: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
Marc Mutz c2d490a238 Port from qAsConst() to std::as_const()
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: I601bf70f020f511019ed28731ba53b14b765dbf0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-10-07 23:38:56 +02:00
Marc Mutz 958cd3ee10 Port from container::count() and length() to size()
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:

  auto QtContainerClass = anyOf(
      expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o),
      expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o));
  makeRule(cxxMemberCallExpr(on(QtContainerClass),
                             callee(cxxMethodDecl(hasAnyName({"count", "length"),
                                                  parameterCountIs(0))))),
           changeTo(cat(access(o, cat("size"), "()"))),
           cat("use 'size()' instead of 'count()/length()'"))

a.k.a qt-port-to-std-compatible-api with config Scope: 'Container',
with the extended set of container classes recognized.

Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-10-07 23:38:48 +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
JiDe Zhang 90773dfbf1 Add 'override' keyword to fix build warnings
Change-Id: I8bd51da4ad27c97be78c708af33d6b1e4c1ca957
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-19 16:34:23 +08:00
Ulf Hermann 873bdb3146 Disable debugger tests on macOS/x86_64
They run into a hard to reproduce deadlock in the CI. In turn re-enable
tst_qqmljdebugjs for macOS/arm as there it doesn't happen.

Pick-to: 6.2 6.3 6.4
Task-number: QTBUG-102984
Task-number: QTBUG-101678
Change-Id: I17d483b7c44b36d17cfc2f0f31fcccd30cd4548a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-07-11 17:23:24 +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
Mitch Curtis 234afb5502 Add convenience API for making QQmlDataTest-based tests fail on warnings
After this patch, if a QQmlDataTest-derived class passes
FailOnWarningsPolicy::FailOnWarnings to the base constructor, any
non-empty warning encountered by that test will result in a test
failure.

This avoids the need to duplicate the catch-all regex in tests that
want to fail on warnings.

The goal is to gradually enable failure-on-warnings over time.

Leave comments and explicitly pass DoNotFailOnWarnings for tests that
should never fail on warnings.

Task-number: QTBUG-98718
Pick-to: 6.2 6.3 6.4
Change-Id: I4b647d93a0f28ac891c4bdb19ef74569f2918e8f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-05 14:34:37 +08:00
Sami Shalayel 33aa69529c Fix debugger crash on attach
The debugger treated QQmlGadgetPtrWrapper like normal QObjects,
which means that their metacalls where done incorrectly.
The meta system saw the QQmlGadgetPtrWrapper's metaobject,
which is actually the wrapped type, and produced a garbage
QObject* by reinterpret_casting the wrapper as the wrapped type.
The debugger was changed to recognize gadgets and to call
the read/write/resetOnGadget() methods instead of calling
QMetaProperty.read/write/reset().
Added a test with the qml example that was making the
application crash when a qml debugger was attached to it.

Fixes: QTBUG-104379
Change-Id: I7c1138fc44ee78137386dcd7da145bbaab574afc
Pick-to: 6.3 6.4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-06-30 11:13:54 +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
Ulf Hermann 29e2c7b414 QQmlDebugProcess: Crash if we cannot kill the debuggee
If the debuggee somehow manages to ignore our kill signal, the QProcess
dtor will hang. Let's rather crash in this case, so that we see when it
happens.

Task-number: QTBUG-101678
Change-Id: Idc72412925244acfdb1dfdeec07369d5fb271080
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-05-31 12:55:00 +02:00
Ulf Hermann 9dc3b0a06c tst_qqmltranslationservice: Fix order of UI languages
QLocale reversed the order of languages returned from uiLanguages()
recently. Adapt the test to this change.

Fixes: QTBUG-103026
Change-Id: I471351494bd56e48d1cf4bee3f6f27a786c5b107
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-03 01:01:30 +02:00
Ulf Hermann 3a4b6b9ba2 tst_qqmldebugtranslationservice: Avoid memory leaks
Change-Id: Ib2b7a70fa015a298362cc56bb3da2819aeedd33c
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2022-05-02 21:58:59 +02:00
Ivan Solovev ecc87ea077 Android: enable tst_qqmlenginedebugservice
The test was failing because it was using QML code that was embedded
directly in the test, so the dependencies were not detected and
deployed.

This patch moves QML code into separate files, so that qmlimportscanner
could provide all the necessary dependencies.

Fixes: QTBUG-100166
Pick-to: 6.3 6.2
Change-Id: I5581de9a4573204722ad60eaceae8d05a491eb13
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-04-29 09:47:43 +02:00
Alexandru Croitor ba67601ad3 Skip flaky hanging test on macOS in CI
The flaky test hangs and is eventually registered as a crash in
the CI.

Task-number: QTBUG-101678
Task-number: QTBUG-101972
Task-number: QTBUG-102984
Change-Id: Id12b0c7032d31c97b24b6cf88fcbf2f28be1c293
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-04-28 21:00:44 +02:00
Joerg Bornemann 73284aa3cf Fix wrong include in debugutil.cpp
Commit 8398f6990b added
    #include "debugutil.moc"
but debugutil.cpp doesn't contain anything that would produce such a
file.  This leads to a flood of AutoMoc warnings when building the QML
debugger test.

Presumably, it was meant to include moc_debugutil_p.cpp, so let's do
that.

Change-Id: I86dfe935e7a01388f6737124d9383ad53a772897
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-04-25 19:39:49 +02:00
Andreas Buhr b7fd8ab10b Fix tst_qv4debugger on Android
tst_qv4debugger::conditionalBreakPointInQml() failed on Android
because dependencies were not available.
This patch moves qml code from strings to file, thus exposing it
to the build system. This way, the build system can take care
of the dependencies.

Pick-to: 6.2 6.3
Fixes: QTBUG-102416
Task-number: QTBUG-101865
Change-Id: Icd6ef43a45642f68e749137a963ee2ebfe462bce
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-04-13 13:56:51 +02:00
Ulf Hermann 8398f6990b Eliminate extra event loops from QQmlDebugTest
Extra event loops are famously brittle, and we don't need them here. We
can just us QTest::qWaitFor().

Task-number: QTBUG-101678
Change-Id: I73837bc323c83431f487db3cac6872736635d557
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-03-24 14:33:16 +01:00
Volker Hilsheimer 9a2bbcd21b Fix warning after QString::count deprecation
Pick-to: 6.3
Change-Id: Id91980b01def84ff56212a267aca805ac7deb192
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-03-20 20:47:22 +01:00
Volker Hilsheimer 6fca2c1a6d Build tests without warnings after qtbase changes
Replace deprecated QString::count with QString::size or QString::length,
depending on context, and use qsizetype instead of int.

Pick-to: 6.3
Change-Id: Ie4c08abd2cf2ba771c23e8def72756170cc07af7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-03-18 22:56:54 +01:00
Ulf Hermann 7b8e6714e1 QQmlDebugProcess: Remove cruft
The mutex had no function I can discern as the class is not thread safe
in any way, and isn't used from multiple threads anywhere. Extra event
loops are famously brittle. We don't have to use an extra event loop
here. QTest::qWaitFor will do just fine.

Task-number: QTBUG-101678
Change-Id: If25a961312a1eeb725ff779e386b2657e0f23dd1
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-18 22:56:53 +01:00
Ulf Hermann 08d0fb39b9 DebugTranslationService: Do not show a window in the test
The test works fine with the window hidden. Trying to show it gives
problems in the CI. We also want to avoid showing windows in non-GUI
tests as far as possible.

Fixes: QTBUG-101738
Pick-to: 6.2 6.3
Change-Id: I206f74f940e6ba7ac6346c85459b896387ab85a5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-03-18 22:56:53 +01:00
Volker Hilsheimer cccca1ec0e Fix build after QJsonArray change to use QJsonValueConstRef
Follows up on qtbase:f5762cd4b3130a650044863c5be132056f05daa5.
Use auto instead of specific QJsonValue*Ref type to avoid need for
orchtestrating with dependency update.

Change-Id: Ib47d5d8ab8373562684b42a90c97634e07869328
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-02-16 14:44:39 +01:00
Assam Boudjelthia f22d884faf Disable failing declarative tests on Android
This allows us to enable testing on declarative for the module
as a whole and have some sort of test verification for the mean
time, and fix the fails over time.

Pick-to: 6.2 6.3
Task-number: QTBUG-100003
Task-number: QTBUG-100014
Task-number: QTBUG-100016
Task-number: QTBUG-100018
Task-number: QTBUG-100020
Task-number: QTBUG-100021
Task-number: QTBUG-100164
Task-number: QTBUG-100166
Task-number: QTBUG-100167
Task-number: QTBUG-100169
Task-number: QTBUG-100171
Task-number: QTBUG-100173
Task-number: QTBUG-100175
Task-number: QTBUG-100176
Task-number: QTBUG-100177
Task-number: QTBUG-100191
Task-number: QTBUG-100253
Task-number: QTBUG-100254
Task-number: QTBUG-100256
Task-number: QTBUG-100257
Task-number: QTBUG-100258
Change-Id: I85bf1501b94f04853a1ca715e35df0a56041308a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-01-31 14:41:39 +02:00
Pasi Petäjäjärvi 584c912dbb QML: Disable host debugging related tests when cross compiling
Disable tests that are meant to check debugging features using host
binaries. No point running those tests on actual targets.

Pick-to: 6.2 6.3
Change-Id: If020dfa00410668a305013254617fd50a0a01175
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-29 11:36:02 +00: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
Tim Jenssen dd96e919c1 Qmldebugtranslator: report elide issues correctly inside layouts
Task-number: QTBUG-96991
Pick-to: 6.2
Change-Id: I911044893fb6eac54c6fb8f2b236f422bd04a7ae
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-10-12 19:14:47 +02:00
Tuomo Pelkonen 1a5a092d38 Fix debug translation service missing errors
Debug translation service did not provide missing translations
correctly and didn't send any elide warnings

Pick-to: 6.2
Task-number: QTBUG-96527
Change-Id: I3f5c5aeae0866a8e8c6b5302136a097f1ca7abc4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-09-30 08:20:05 +03:00
Ulf Hermann b3fe31a0ff Fix scoping of JavaScript function names
Function declarations add their name to the outer scope, but not the
inner scope. Function expressions add their name to the inner scope,
unless the name is actually picked from the outer scope rather than
given after the function token.

We don't add the name to any scope in the case of functions declared in
QML elements because the QML element will receive the function as
appropriately named, and typed, property. It is always better to use
that one than to use a JavaScript local.

This causes some additional ecmascript tests to pass.

Pick-to: 6.2
Fixes: QTBUG-96625
Change-Id: I0b8ee98917d102a99fb6b9bd918037c71867a4a5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-09-29 13:39:41 +02:00
Mitch Curtis e310dadef7 Consolidate test helpers into private libraries
Previously each test would include and build sources from the shared
folder. Now we make those sources a library, build it once, then have
each test link to it instead.

We also take the opportunity to move some helpers that qtquickcontrols2
had added into the quicktestutils library where it makes sense, and
for the helpers that don't make sense to be there, move them into
quickcontrolstestutils.

We add the libraries to src/ so that they are internal modules built as
part of Qt, rather than tests. That way we can use them in a standalone
test outside of qtdeclarative.

Task-number: QTBUG-95621
Pick-to: 6.2
Change-Id: I0a2ab3976fdbff2e4414df7bdc0808f16453b80a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-09-13 21:17:04 +02:00
Tuomo Pelkonen 1a85f78413 Add all qml debug translation fixes and functionalities from 5.15
* Add current state name in the protocol
* Get style name in correct format
* Get correct root item after changing new file

Task-number: QTBUG-96052
Pick-to: 6.2
Change-Id: I5a7b9e29ec83e6258505cedbd55edf376386f783
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-09-08 07:48:55 +03:00
Volker Hilsheimer 0e5c18bdf3 Fix compiler warnings
Use explicit reference type QJsonValueRef when looping over a QJsonArray.

tst_qqmldebugjs.cpp:1070:30: warning: loop variable 'scope' is always a
copy because the range of type 'const QJsonArray' does not return a
reference [-Wrange-loop-analysis]
             for (const auto &scope : scopes) {
                                          ^
note: use non-reference type 'QJsonValueRef

Change-Id: Ib9ff6329d8ca9431eb7bd5a190093f09c7bf003d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-06-24 14:49:57 +02:00
Craig Scott 63a601dc29 CMake: Remove unneeded *.pro and .prev_CMakeLists.txt files
The .pro files corresponding to the .prev_CMakeLists.txt files
have already been removed.

Change-Id: I254eafe4c7de1a516e33bd9cb3d9879e73fa83b4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-05-19 10:46:06 +10:00
Ulf Hermann 051dd3178b V4 Debugger: Collect locals also from block scopes
Block scopes can contain "const" and "let" members.

Fixes: QTBUG-92224
Pick-to: 5.15 6.1
Change-Id: Ie13d7d573e2759c510e1ea48c6edc68a095f40a0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-05-04 22:07:06 +02:00
Andreas Buhr 53c4271826 Fix warning about override in tst_qqmldebugtranslationservice
Change-Id: I77187b62a428dd075d9cbddbc80b5fb5bf42eebd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-05-04 12:00:43 +02:00
Ulf Hermann f33852ef67 QV4 Debugger: Show some diagnostics on malformed JS
Change-Id: If99b9cec87f0817fd4ff710e651b55bb96257b17
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-05-04 08:29:18 +02:00
Ulf Hermann 7f12cf3346 V4 debugger: Properly count break points
We cannot just take the number of active breakpoints as ID for the next
one. It's possible to remove breakpoints after all.

Fixes: QTBUG-93404
Pick-to: 5.15 6.1
Change-Id: Icde7a8e47c740e930f2313ffd9034b00033a54aa
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-05-04 08:28:57 +02:00
Samuli Piippo 70e1d5234a tst_qqmlpreview: translation file was already removed
Ammend 784c624413 and remove installation
of translation file that was removed.

Change-Id: I59b4a2babb77c1f66195c9480cd78b1261ca8bf2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-04-30 16:17:41 +03:00