Commit Graph

48 Commits

Author SHA1 Message Date
Amir Masoud Abdol 5c23e54a0a Retire the qt_parse_all_arguments
Task-number: QTBUG-99238
Change-Id: Ia11c9cbd7c06347319ab3674ec0cd8da0214747e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit c2d37f9646)
2023-02-10 11:22:15 +00:00
Santhosh Kumar 0b7374fefa Fix performance issue with drag retrigger events for qtquick items
The items that reject drag events (specifically onEntered in DropArea)
should not be retriggered with DragEnter event until entered once again.

Fixes: QTBUG-74496
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I241a6004da6382685be89fe8a001b98dfde5c8a2
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-11-07 10:21:12 +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
Andreas Buhr 82b76e4eb5 Cleanup CMakeLists.txt files
A lot of CMakeLists.txt files defined QT_QMLTEST_DATADIR twice,
leading to a warning. This patch fixes these.

Pick-to: 6.2 6.3
Change-Id: I8b835fcddd3334f0ecac45cb72bd5763b3a5704d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-05-03 10:42:21 +02:00
Andreas Buhr 1c2ffc409a Blacklist tst_QQuickDropArea::signalOrder() on Android
Pick-to: 6.2 6.3
Task-number: QTBUG-103083
Task-number: QTBUG-101865
Change-Id: I148fd0452a7a326dc2bf47c2134c68a90f8c3517
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-05-03 10:05:28 +02:00
Sona Kurazyan 2c9c1590e6 Replace uses of deprecated _qs with _s/QStringLiteral
Task-number: QTBUG-101408
Change-Id: Ic925751b73f52d8fa5add5cacc52d6dd6ea2dc27
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-04-29 09:47:43 +02:00
Fabian Kosmale 4f50697e6c Do not rely on transitive includes in tests
Change-Id: Icb68dbecab6f675352cd58333c82fa6648025367
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-02-14 12:38:10 +01:00
Maximilian Goldstein 4a5b0ad84f qquickdeliveryagent: Fix drag events being sent in the wrong order
When a former drag event target is on a higher or the same z-level as the new target, send the QDragLeaveEvent before the QDragEnterEvent.

[ChangeLog][Quick][Fix] Now sends DragArea leave events before enter events when appropriate (QTBUG-82263)

Pick-to: 6.2
Fixes: QTBUG-82263
Change-Id: Ibe76000cbe76748ee8928e4b98a92c38eff5b59c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-12-02 23:35:23 +01:00
Fabian Kosmale 3361651224 QQuickDragEvent: Use proper types instead of QQmlV4Function
With QQmlV4Function we have no information at compile time about what
a arguments a function expects, and what it returns. Considering that
getDataAsString does not actually have an overload set, but simply
expects and returns a string, we can change to QString types. For
non-QString parameters, the engine will then transparently take care of
converting them.
The same applies to getDataAsArrayBuffer and QByteArray/ArrayBuffer.

Change-Id: I007796c3c01a6f021babd0dff2832506c7c63c30
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-05 09:00:22 +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
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
Shawn Rutledge 10ff6760ef Stabilize tst_QQuickDropArea::containsDrag_internal
It seems timing-sensitive; as usual when we have processEvents()
and then QCOMPARE, it's often better to just use QTRY_COMPARE in case
it runs slower than expected on CI VMs.

Fixes: QTBUG-88206
Change-Id: Ie6916a00e16e025c32940e6bffcabd1159480c5a
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-11-06 19:50:39 +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
Tor Arne Vestbø a5df29201f CMake: Update Apple platform defines after rename in qtbase
Change-Id: Ia0a075e3199eab735f9b289873beeb8730ebc47e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-17 10:42:00 +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
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 30917cd20c Regenerate required projects after dev -> wip/cmake merge
Change-Id: Ic5f1909731ec11b4fb6bc8823506d272c529ecfb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-14 19:01:42 +00:00
Alexandru Croitor c2f8b9535d Merge remote-tracking branch 'origin/dev' into wip/cmake
Removed dependencies.yaml because we don't use it yet in wip/cmake.
Fixed conflict in qmlcachegen.cpp.

Change-Id: Ie1060c737bee1daa85779903598e5b6d5020d922
2019-10-14 19:02:37 +02:00
Stephen D'Angelo 3fde977a81 QQuickWindow: Higher z-order items now steal drop target
Previously, an active drop target would remain the drop target until the
drag left it's area, or entered a child item that accepted a
DragEnterEvent, even if the drag entered a drop target with a globally
higher z-order from a different subtree.

When moving to an item with a higher z-order, the DragEnterEvent is
now sent to the new drop target before DragLeaveEvent is sent to the old
drop target.  There can now only be one drop target.  If an item is the
current drop target and a higher z-order child accepts the DragEnterEvent,
the parent is no longer a drop target.

Fixes: QTBUG-30305
Change-Id: I7b985d6317be70867e7727222a4cd44ace7559e6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-10-09 19:23:31 +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
Christian Ehrlicher 0d25cd5d97 QtDeclarative: replace deprecated functions
Replace the deprecated functions with it successors:
 - QProcess::finished(int) -> QProcess::finished(int, ExitStatus)
 - QDateTime::toTime_t() -> toSecsSinceEpoch()
 - QDateTime::setUtcOffset() -> setOffsetFromUtc()
 - QDateTime::utcOffset() -> offsetFromUtc()
 - QWindowSystemInterface::handleDrag/Drop(4 params) -> 6-params
 - QJSEngine::installTranslatorFunctions()
   -> installExtensions(QJSEngine::TranslationExtension)
 - QEasingCurve::cubicBezierSpline() -> toCubicSpline()

Change-Id: I96b4b2195887396b7a5182fce2749745380f5949
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-03-04 16:53:46 +00:00
Shawn Rutledge 499ec43937 use nullptr consistently (clang-tidy)
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.

Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).

Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-26 07:13:18 +00:00
Friedemann Kleint 9028f0abdb tst_QQuickDropArea: Pass with High DPI scaling
Apply device pixel ratio where appropriate.

Change-Id: I166604faa3f332f800822abdbbee7b8caacf2f54
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-08-02 11:23:56 +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 a719e348d2 Remove CONFIG += parallel_test.
The keyword no longer has a meaning for the new CI.

Change-Id: I699f2881e291cce02a6a608a8710638886e38daa
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-05 10:18:50 +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
Aleix Pol dad48f0e9c Makes it possible to extract all data from a QML DropArea
There's many types that aren't being covered by DropArea API, such as
images. getDataAsString is not acceptable, since fromUtf8 chokes on
reading non-utf8.
This patch introduces getDataAsArrayBuffer method that won't try to convert
the data into a QString and simply pass a QV4::ArrayBuffer, that internally
keeps a QByteArray.

Change-Id: I65411b3d365ee6c5e13effd9167156771ee08a05
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-05-23 13:52:36 +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
Aleix Pol 722c063187 Process children first when delivering drag events
[ChangeLog][QtQuick][Important Behavior Changes] Drag and Drop events
now propagate to child items before their parents.

Change-Id: I22832d707c7cb2461eaa94d659c5cc83506def8d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-06-05 03:48:39 +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
Shawn Rutledge 55f6a109e9 Renamed QQuickItem::pos property to position
Abbreviated property names are less descriptive so we don't have
many of them.  Might as well be consistent.  QWindow::pos was already
renamed.

Change-Id: Ib52673e68e7dc902b2f8942dba6b899074b2538b
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-29 16:07:44 +01:00
Alan Alpert f21e9ba6ef Remove interim compatibility measures
Also update some variables in qtdeclarative which failed to update
rootItem->contentItem.

Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d3
Reviewed-by: Alan Alpert <416365416c@gmail.com>
2012-10-16 07:24:06 +02: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
Paul Olav Tvete 49496cf881 Don't use compatibility headers
Cleaning up after the QWindowSystemInterface header change.

Change-Id: Icc2df3cfd441bf6b113602f17d9b843fbc8c75ba
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-03 21:42:19 +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
Paul Olav Tvete 5ab6ff2143 Add includes for QWindowSystemInterface
QWindowsystemInterface will no longer be a public class

Change-Id: Ibd815d377cbd553e8c3e99e99b337a9854647001
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-08-01 16:07:24 +02:00
Alan Alpert feb996e3ab QQuickCanvas renames
QQuickCanvas is now called QQuickWindow
QQuickCanvas::rootItem is now QQuickWindow::contentItem
QQuickItem::canvas is now QQuickItem::window
QQuickItem::ItemChangeData::canvas is also renamed window
QQuickCanvas::grabFrameBuffer is now QQuickWindow::grabWindow
The functions related to the color property have dropped the clear from
their names.

The first three changes have interim compatibility measures in place to
ease the transition.

Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d2
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-07-17 07:26:15 +02:00
Shawn Rutledge d3e6cffa7f Remove unneeded qpa/qwindowsysteminterface.h includes
They caused a build failure.

Change-Id: Id83623f079c80c59067a5b3fb3488ba8572ea453
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-07-13 17:01:28 +02:00
Girish Ramakrishnan 0437cef6f3 Suppress QWindowSystemInterface inclusion warnings
QWindowSystemInterface is now part of QPA API and should
be included using <qpa/*>.

Change-Id: I90c71e193d77765b4ec7b92fdbe611b387b2ae4a
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
2012-07-03 09:29:44 +02:00
Andrew den Exter 836bade876 Remove insignificant_test from DropArea test.
The test has not been failing on recent CI runs.

Task-number: QTBUG-24588
Change-Id: I9dd29bbf1a33d9fbf042693a0995dafd887c3064
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-06-22 08:18:15 +02:00
Andrew den Exter 7f626e2066 Don't deliver drag move events immediately.
Rather than delivering drag move events everytime the position of an
item changes queue up an event to process in the event loop.  This
filters out noisy intermediate positions particularly where the x and
y values are set independently and better insulates against feedback.

Change-Id: I5d787d63ed01441a9080d0daaee9db1373d5f073
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-05-25 14:44:05 +02:00
Girish Ramakrishnan 44340565e8 Adapt to _qpa file rename in qtbase.
qtbase change 36547f4eff44361f7a6acd0cff107c0e47561f93
renamed qpa headers.

Change-Id: I903b48d145837557d305366e2eb4eedd0ad32c14
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-05-08 22:38:12 +02:00
Matthew Vogt 0284817d6c Merge master <-> api_changes
Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
2012-03-05 11:39:54 +10: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