Commit Graph

305 Commits

Author SHA1 Message Date
Lucie Gérard 336135cb91 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: I829aeda2bda017b7d5bf39795b79dbaee143cb60
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-03 13:23:45 +02:00
Joerg Bornemann 42c0c27769 Fix manual tests for the top-level build
Don't set CMAKE_AUTO* to ON, because in a top-level build AUTOMOC would
complain about a missing moc executable.  Same for uic and rcc.

Change-Id: Iaa7c8013f11cebb3dc02f2de681c608ee5ba01e0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-03 08:02:12 +02:00
Alexandru Croitor 03c93b489b CMake: Don't use PUBLIC_LIBRARIES for tests and test helpers
Change-Id: Ie8bd35a3aa6a56bfe4b3290b9c507a3ed9e61608
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-07-28 14:57:37 +02:00
Lucie Gérard 7d498a8cf5 Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I3b3112f5a36673b90fff0010f973d020886cf08d
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-13 15:58:51 +02:00
Sami Varanka bc2e34b01b Fix manual test compilation errors
Many of the manual tests were not compiling,
because many of the signals and slots had not
compatible signatures.

Pick-to: 6.4 6.3 6.2
Change-Id: Ibd881e5cca37ec666cb160c95b948e064ac09e5d
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2022-06-07 14:40:09 +03:00
Assam Boudjelthia efdb022abc Make sure qml test data is packaged as test resources
This will make sure the test data is packaged and available
on device at runtime.

Task-number: QTBUG-88846
Pick-to: 6.2 6.3
Change-Id: I9a62299243a784b5e3857ddd968a2abcdd3d6d54
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2022-05-19 07:23:09 +00:00
Tomi Korpipaa 069eb42d7f Rename the test to match the expected filename
...and pass argv+argc to qExec.

Task-number: QTBUG-102735
Change-Id: If2ef09f39d13c29f73b9b199e50b72b0e91ffe75
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-04-26 11:33:41 +00:00
Tomi Korpipaa 23e093c7bb Fix a qt-testrunner.py QEMU failure
Fixes: QTBUG-102735
Change-Id: I7e4941ffe6bec251957e6d3fe96e69cc797625b3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-04-25 13:07:03 +03:00
Pasi Petäjäjärvi 4e6deeeec0 Revert "Blacklist: test cases blacklisted in qmltest:"
This reverts commit 0b493d875d.

Reason for revert: Fixed in aec6b0075863bff181d1d3dfdf1399264de01f67

Task-number: QTBUG-101513
Change-Id: Ibf9e867bb787014d60dee1461b9c167bd158c360
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2022-04-01 08:00:48 +00:00
Pasi Petäjäjärvi dc7372156b CI: Disable tst_qmltest on QNX QEMU
QNX QEMU does not have support for hw acceleration thus missing
createPlatformOpenGLContext, which is required for the QML applications
to work.

Pick-to: 6.2 6.3
Change-Id: Ic24f96e9cdc907ae16c1a50b0f0ddf75085d807e
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2022-03-14 10:57:28 +02:00
CI Insignificant Platforms Monitor Bot 0b493d875d Blacklist: test cases blacklisted in qmltest:
- tst_customvolume::compile on qnx
 - tst_touch::compile on qnx
 - tst_themecolor::compile on qnx
 - tst_colorgradient::compile on qnx
 - tst_proxy::compile on qnx
 - tst_heightproxy::compile on qnx
 - tst_customitem::compile on qnx
 - tst_scatterseries::compile on qnx
 - tst_surfaceseries::compile on qnx
 - tst_light::compile on qnx
 - tst_surface::compile on qnx
 - tst_value::compile on qnx
 - tst_customlabel::compile on qnx
 - tst_camera::compile on qnx
 - tst_barseries::compile on qnx
 - tst_category::compile on qnx
 - tst_basic::compile on qnx
 - tst_scene::compile on qnx
 - tst_bars::compile on qnx
 - tst_logvalue::compile on qnx
 - tst_theme::compile on qnx
 - tst_scatter::compile on qnx
 - tst_input::compile on qnx

Pick-to: 6.2
Pick-to: 6.3
Task-number: QTBUG-101513
Change-Id: Ia08731ec898d02ad2196a3d21364850d9ac2dc49
Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io>
2022-03-07 16:26:38 +00:00
Tomi Korpipaa e82f53b350 Fix API review finding
Rename wireFrameColor to wireframeColor to be
consistent with other usage of wirfeframe in
QtDataVisualization.

Pick-to: 6.3
Change-Id: I1ae6cd7372e46efa2a5d83856126d45355fcff60
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-02-10 11:17:48 +02:00
Joerg Bornemann b088967a24 Remove unused .qrc files
Task-number: QTBUG-94446
Change-Id: I109795238dc1c19cf0b6e242aa186c8046f13404
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2022-01-18 10:46:45 +01:00
Sami Varanka 6d31e42632 Add row colors for Bar3DSeries
Added rowColors property for Bar3DSeries.
The property can be used draw the individual
rows in the series in different colors.
Autotests and a manualtest for the property were
added also.

Fixes: QTBUG-96682
Change-Id: I5c4f778189d079206500a9289490792584eab2b9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-10-08 13:47:25 +03:00
Sami Varanka 333cf89735 Add hasSeries method to Abstract3D graph
Added a hasSeries method to Abstract3Dgraph.
The method can be used to check whether a series
has already been added to the graph. In addition,
modified cpp and qml autotests to test
the added method.

Fixes: QTBUG-96683
Change-Id: I91f70ca15b6c5fbaa7691cd17bbfc2ef460c3d37
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-09-24 12:47:37 +03:00
Sami Varanka 0cb6298a77 Fix: change signals to take values by const ref
Changed signals in declaratives to take their
arguments as const ref when suitable.

Pick-to: 6.1 6.2
Fixes: QTBUG-95941
Change-Id: I3d582422793ee2bfb4cb5251dcacd55d3d3acca9
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-09-02 11:56:50 +03:00
Sami Varanka 32209c044f Add: Support for 16-bit heightmap
Added support for 16-bit heightmap in
QHeightmapSurfaceDataProxy. In addition, added a
manual test for testing the heightmap support.

Fixes: QTBUG-74814
Change-Id: Ief028a459600680593e8859c9e7b51fb2e43203c
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-08-31 13:10:50 +03:00
Sami Varanka d01fa6654f Add: Margin between series columns in Bars3D
Added a new property to Bars3D. The property
controls the margin between the columns of
series. It can be used to show bars belonging
to same column, but different series
side by side. Also added autotest for qml and
cpp.

Fixes: QTBUG-69036
Change-Id: I3c353e9097a8be8cafc05f8f5120e4266baa4a5c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-08-24 07:25:12 +00:00
Sami Varanka c8a9cfdd34 Add: surfaceseries wireframecolor revision
Added revisioning to surfaceseries wireframecolor.

Fixes: QTBUG-95923
Change-Id: I7962418ea02185be907c38d8b7cf879f1ebd88be
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-08-20 10:00:50 +03:00
Sami Varanka a9ccf1c7a1 Fix: Nans at surfacedata row/column 0 render fail
If the first or last column or row of the data
given to surfacedataproxy contains NaN values,
the surfacedataproxy might fail to find the
limit values for the axis. Changed limitValues
function in surfacedataproxy so that if it
doesn't find min/max values from the first/last
column/row it continues from the next column/row.
Added a test to verify that the limit values are
found when first/last row contains NaN values.

Pick-to: 6.2
Change-Id: Ica3eebb1c6072656f59394814c3fa5e334f12c54
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-08-11 12:48:15 +03:00
Sami Varanka 3513884f68 Add: Colorize surfaceseries wireframe
Added color property for surfaceseries wireframe.
Modified surfaceseries cpptest and qmltest to
test the added property. In addition,
the documentation for the property was added.
Modified qmlsurface example to use the new
property.

Fixes: QTBUG-64748
Change-Id: I18f56258cdba2b3270dce7c8313cbf17e499ff39
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-08-06 08:59:55 +03:00
Tomi Korpipaa b05f048801 Fix manual test builds
Fixes: QTBUG-94256
Change-Id: I3747f1cf94925d3818f277521473cee086eb3082
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-06-08 13:59:10 +03:00
Sami Varanka ad85513d4b Fix direct rendering doesn't show anything
Rendering a graph directly to background didn't
work in Qt 6 since it uses RHI and there is
no way to not clear the color buffer
before rendering. The graph uses direct OpenGL
calls to render directly to background. Enabled
direct rendering to qml3doscilloscope example.
In addition, RenderDirectToBackground_NoClear got
deprecated.

When rendering directly to background,
using non-transparent qml item as a background
will hide the graph. This was already mentioned
in the documentation but not clearly enough.
Updated documentation for AbstractGraph3D.

Pick-to: 6.1
Fixes: QTBUG-90665
Change-Id: I53081bac382ab89573359886e4f5c4b41be8e86d
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-06-04 13:19:59 +03:00
Sami Varanka 3184afc8c9 Fix warnings in datavisualization examples
Injection of parameters into signal handlers
is deprecated. So those signal handlers using
parameters needed to be changed to use formal
parameters instead. Uncommented the theme in
qmlperf manual test. Added missing space to
qmlgradient manual test.

Pick-to: 6.1
Fixes: QTBUG-92995
Change-Id: I5999df841c077be63a9f01d71188c07574b2669e
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-05-25 07:05:50 +03:00
Joerg Bornemann 559213087d CMake: Disable usage of CMake API compatibility wrappers
Setting the QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS variable
in the project ensures we ported away from old API calls.

Task-number: QTBUG-86815
Change-Id: I657ce43f65def5a13ca14030215a8adc37690d20
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-22 21:12:42 +02:00
Sami Varanka c9768c1e24 Fix Gradients don't show
Added pointer to graph in Abstract3DController.
Controller can use that pointer to check whether
the graph is ready when receiving
a themetypeChanged signal. Added manual test
for gradients.

Pick-to: 6.1
Fixes: QTBUG-93506
Change-Id: I13df962b807feb615e3267f580ef57dd62a0b058
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-05-18 12:44:28 +03:00
Joerg Bornemann d6640b84a8 Remove left-over .pri files
Task-number: QTBUG-88742
Change-Id: I140a038ccb47433ff7fe437bfc002e580bfb21a6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-05 10:44:00 +02:00
Joerg Bornemann 1054447ba0 Remove qmake project files
Task-number: QTBUG-88742
Change-Id: I155ad8d2d37a37b71851d95028bd0a26e2d034a9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-04-30 11:50:30 +02:00
Volker Hilsheimer 430110e9a1 Fix double to float truncation warnings
QVectorND and QQuarternion operates on floats, so pass in float literals
rather than doubles.

Pick-to: 6.1
Change-Id: I6ddb6a4f0caa6e8687e718e10957b6c939a091bd
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-04-13 06:32:26 +02:00
Friedemann Kleint 106bef0493 QSurfaceDataProxy: Fix crashes adding the first row of data
Adding one row causes an assert
ASSERT failure in QList::at: "index out of range", file include/QtCore/qlist.h, line 373
since there is no first row to check the column count against.
Check for empty as well.

Pick-to: 5.15 6.1
Task-number: PYSIDE-1438
Change-Id: I225b87b764545b7a430472dc5a4b2e476a26a7ff
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-03-03 13:37:55 +01:00
Tuomo Pelkonen 9cb0e57141 Fix layout and signal handling in QML apps
Pick-to: 6.1
Task-number: QTBUG-90664
Change-Id: I181a3b3b2a1801665a0d876a837054aa10425c0d
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-02-26 05:00:30 +00:00
Tuomo Pelkonen 8461cda03d Fix quit buttons in qml examples
Task-number: QTBUG-90664
Pick-to: 6.1
Change-Id: I4b60dafeb0599e988b422a4764bac2e91b22d2ea
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-02-26 04:33:01 +00:00
Tomi Korpipaa 67f96d88bf Disable tst_qmltest on QEMU
QEMU does not have support for createPlatformOpenGLContext,
which is required for the QML applications to work.

Task-number: QTBUG-91381
Change-Id: I1c61146f889a3ffad49157f3c17cff0bcd3a01c9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-02-25 15:19:10 +02:00
Tomi Korpipaa 33d47ef27e Fix failing autotests
QSG_RHI_BACKEND needs to be forced to opengl for the
QML test like in any other QML application.
Model/height proxy tests need a bit more time for the proxy
data to stabilize, so extra QCoreApplication::processEvents()
calls were added to handle that.

Fixes: QTBUG-90710
Pick-to: 6.1
Change-Id: I594040e8d504d680ff1990147835a106cc53d922
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2021-02-10 12:49:19 +02:00
Tuomo Pelkonen d2c6249bb9 Fix build for Qt 6.1
Task-number: QTBUG-89299
Task-number: QTBUG-90926
Pick-to: 6.1
Change-Id: I49822338f94e2bdcb0ae5b29d2211127e40d58f9
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-02-10 12:49:14 +02:00
Tomi Korpipaa 587d44e807 Remove custom namespace
Fixes: QTBUG-90400
Change-Id: Ia2f1974a21112bad97724717d073d367c4413a7f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-01-28 12:26:47 +02:00
Tuomo Pelkonen e2e20c9f11 Add CMake build
Task-number: QTBUG-89299
Change-Id: I5becbf39605e566c3d32cb5e210d974df9de27da
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-01-27 13:16:44 +02:00
Tuomo Pelkonen 18a562554e Force OpenGL backend for RHI
Set QSG_RHI_BACKEND environment variable to "opengl" to force
RHI to use OpenGL backend.

Change-Id: Ie1fa0ffe466f97b1bbcc5281c49bbdf6e6d053c0
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-01-27 10:06:52 +02:00
Tuomo Pelkonen 6c2aec18ed Fix most of the QML example applications
Most of the QML examples work now as supposed to. Qmlbars still needs
fixing and is not included in this patch.

Task-number: QTBUG-89298
Change-Id: Ic8bc6511cdb00dd3db0a181b7a31b3bbc39f0556
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-01-27 10:01:58 +02:00
Tomi Korpipaa 471a6cbd07 Migrate C++ API rendering path to Qt 6
Replace QRegExp with QRegularExpression and change usage accordingly.
Replace shared QOpenGLFunctions_2_1 with our own copy. Fix header
include changes.

Task-number: QTBUG-89297
Change-Id: I6d3cf36ba9303ef62db3220816ea35f51eb26a3c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-12-14 06:57:52 +02:00
Lars Schmertmann 09e937788d Add ; to Q_UNUSED
This is required to remove the ; from the macro with Qt 6.

Task-number: QTBUG-82978
Change-Id: I66f620431011d02cb1542e8ad613dadd28fdd843
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-06-26 15:21:41 +02:00
Jarek Kobus 3c7d4de151 Use QList instead of QVector
Task-number: QTBUG-84469
Change-Id: I4dc064b70adb054ca4add2dd662e7227255ff970
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-25 10:11:51 +02:00
Edward Welbourne e82f57fc52 Convert uses of QTime as a timer to QElapsedTimer
Change-Id: I6050b5269304ac6941d3a9d057c91d439f46b63c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-06-12 18:25:48 +02:00
Friedemann Kleint 7044c0c82c Fix deprecation warnings
utils/utils.cpp:87:43: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
utils/utils.cpp:139:58: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
engine/axisrendercache.cpp:204:50: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
volumetrictest.cpp:384:32: warning: ‘int QImage::byteCount() const’ is deprecated: Use sizeInBytes [-Wdeprecated-declarations]
volumetrictest.cpp:538:32: warning: ‘int QImage::byteCount() const’ is deprecated: Use sizeInBytes [-Wdeprecated-declarations]

Change-Id: I59d0ce39584b11ec239cbdadf067c30cf37ca05a
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-02-11 12:28:44 +00:00
Thiago Macieira 190687f649 Fix build: pow() is in math.h
Change-Id: Icaa86fc7b54d4b368c0efffd14f0b2721e74f854
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2017-11-05 18:45:48 +00:00
Thiago Macieira 6867324cb0 Update to new QRandomGenerator API
Change-Id: I69f37f9304f24709a823fffd14e676c097712329
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2017-11-03 09:12:25 +00:00
Thiago Macieira 0565aadd97 Fix build: this example uses exceptions for some reason
cumulativedistributor.cpp:128:44: error: exception handling disabled, use -fexceptions to enable
     throw std::runtime_error("out of range");

Change-Id: Icaa86fc7b54d4b368c0efffd14f0b2b6258fe6f5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2017-10-25 15:42:06 +00:00
Sami Nurmenniemi d8c81e5db3 Enable tests for boot2qt
The tests for boot2qt were disabled with commit
0340120d5f. Some of them
can now be enabled since qtdeclarative fallbacks to software
renderer if OpenGL is not supported. Some tests still need
to be skipped if OpenGL is not supported.

Task-number: QTBUG-60268
Change-Id: I8019859bc88497e08599d0b5f4981b9a3ac071f3
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2017-08-11 08:34:35 +00:00
Thiago Macieira 096b9122b9 Use QRandomGenerator instead of q?rand
Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-07-04 11:45:30 +00:00
Edward Welbourne af03eef4ab Use qRadiansToDegrees() and qDegreesToRadians() more widely
These document what the arithmetic is actually doing; and save us an
ad-hoc use of an approximate value for pi while we're about it.

Task-number: QTBUG-58083
Change-Id: I82c5502af724b33ec598c5a9da76537f93a95eac
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2017-06-14 08:21:29 +00:00