Commit Graph

556 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
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
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
Alexandru Croitor b9abfbd76d Switch examples to build as isolated sub-builds part 2
qt_examples_build_begin needs the EXTERNAL_BUILD flag
to know that it's safe to build examples as ExternalProjects.

It still won't do it in CI until we enable building
examples as ExternalProjects for prefix builds.

This is preparation for that.

Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Change-Id: I19712719eb9fe73b451d852571aea2263ce0962b
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-02-08 11:06:22 +01:00
Alexandru Croitor bc21c4c1eb Switch examples to build as isolated sub-builds
Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Change-Id: I48513558d90c67a92679132be7a84720c015ba15
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2021-12-15 11:08:17 +01: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 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
Joerg Bornemann 13dc4f0b13 Raise cmake_minimum_required to VERSION 3.16 in examples
Pick-to: 6.2
Task-number: QTBUG-95636
Change-Id: I2ae5ba6164cb5ed450c8924d484d30167461c10d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-08-17 13:48:13 +02:00
Tomi Korpipaa c62946e787 Fix 2 examples for macOS
The missing font in qmlscatter seems to cause
the blank screen for some reason.

Pick-to: 6.2
Fixes: QTBUG-94331
Change-Id: I0a83c60ed8f37dbea8ca285d7894a655ea3923f7
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-08-09 13:41:56 +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 e0713ad6f8 Fix invisible text on macOS in qmlsurfacelayers example
Pick-to: 6.1
Task-number: QTBUG-94331
Change-Id: Ie75f8abe7860d1f26fba51ed62491e73554a29bd
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-06-09 09:07:35 +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
Tomi Korpipaa d54b10e4b9 Remove audiolevels example
QtMultimedia module has changed significantly
between Qt 5 and Qt 6.2, so it is best to just remove
this example and create a new one later on, if necessary.

Fixes: QTBUG-94182
Change-Id: I21c6a342d294bec70b15fc702dd6d3749f3c0884
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-06-03 13:41:10 +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
Tomi Korpipaa 40ffa9f609 Set style hint for font
The font matching algorithm in Linux finds an odd font
using the default style hint. Change style hint to get a
sensible font instead.

Pick-to: 6.1
Fixes: QTBUG-93676
Change-Id: I35ad0c406c3aaf77dde1606e1b67baffc8a12f91
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-05-24 11:33:26 +03:00
Venugopal Shivashankar f200775f83 Example: Replace int with nullptr
Fixes: QTBUG-93096
Change-Id: Ie640cdd87edae283d8c6105ab453c610b5d8b6b1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-05-05 12:33:32 +02:00
Tomi Korpipaa d19e191f99 Add find_package to allow standalone example builds
Fixes: QTBUG-93263
Change-Id: Ia80b6dc30c0797d2d17a349ffaad01ee5d057444
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
(cherry picked from commit 32c7d9b71e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-04-29 05:24:32 +00:00
Topi Reinio 3eba29e47e Doc: Fix documentation issues
* Restore removed example snippet tags
* Fix issues in the .qdocconf file

Pick-to: 6.1
Task-number: QTBUG-91875
Change-Id: Iff7068204b5713fbf9f9f568834b55c5c282abba
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-04-27 08:53:17 +00:00
Sami Varanka 7953e45cb4 Fix qml3doscilloscope example crash
Changed buttonlayout's minimumheight property
to use flatshadingtoggle's implicitHeight instead of
height. Created a ticket
to quick layouts (QTBUG-92896). Also removed direct
rendering (QTBUG-90665)

Pick-to: 6.1
Fixes: QTBUG-92830
Change-Id: I088ccfad19bf44a5aa7b837fb8e2f5fd3ee4752a
Reviewed-by: Tuomo Pelkonen <tuomo.pelkonen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-04-22 07:40:20 +03:00
Tomi Korpipaa 695276e2c4 Rename qmloscilloscope
There was a naming conflict with QtCharts
qmloscilloscope example, so this is now
renamed as qml3doscilloscope

Pick-to: 6.1
Fixes: QTBUG-92167
Change-Id: I657d9737c39b0680aabc6b7c00ebe04351643502
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2021-03-26 10:43:39 +02: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 21ab254164 Fix macOS build that has -Wunused-function as error
Clang may interpret static inline function as unused, although
it should not. Pragma it out for clang.

Fixes: QTBUG-91053
Pick-to: 6.1
Change-Id: I8fd8bec5236752189deff8a2f6ceb62e572dca30
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
2021-02-10 12:49:21 +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 ff193e33d8 Fix compilation issues for macOS and Android on Qt 6.0
Task-number: QTBUG-89297
Change-Id: I57acf345b6fc64a93d08d41016c755cae4edd6db
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-01-27 10:12:02 +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 df33d053c1 Fix qmlbars example for Qt 6.0
Remove API versions from imports, using standard Button and adapted to new TableView

Task-number: QTBUG-89298
Change-Id: Ic41c53a6c6d2c0b0542464e78395f5347bdb4e74
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2021-01-27 10:02:19 +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
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
Qt Forward Merge Bot 23e00330af Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-03-26 08:52:12 +01:00
Friedemann Kleint 51c361b85c Update dependencies
Add missing Q_MOC_INCLUDE and adapt to OpenGL split.

Change-Id: I6150876a62ca55ad63c09a128226c2bac428b821
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-26 08:14:59 +01:00
Edward Welbourne 407bee91eb Use Qt::SplitBehavior in preference to QString::SplitBehavior
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.

Change-Id: Iee6bd8e83592c26b63259959e58d52131921438f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-02 15:58:33 +01:00
Friedemann Kleint ebb48fa6be Fix deprecation warnings
colorgradient.cpp:80:61: warning: ‘QQmlListProperty<T>::QQmlListProperty(QObject*, QList<T*>&) [with T = QtDataVisualization::ColorGradientStop]’ is deprecated: Use constructor taking QList pointer, and gain improved performance [-Wdeprecated-declarations]
declarativerendernode.cpp:116:71: warning: ‘QSGTexture* QQuickWindow::createTextureFromId(uint, const QSize&, QQuickWindow::CreateTextureOptions) const’ is deprecated: Use createTextureFromNativeObject() instead [-Wdeprecated-declarations]
customformatter.cpp:167:34: warning: ‘QDateTime::QDateTime(const QDate&)’ is deprecated: Use QDate::startOfDay() [-Wdeprecated-declarations]

Change-Id: Iaf3b8814cd70a704b87b4970ad83ed5a7d4dc0f1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-02-17 09:48:50 +01:00
Sona Kurazyan 57ba04b0f0 Replace the deprecated QWheelEvent::delta() -> QWheelEvent::angleDelta()
Replaced the deprecated QWheelEvent::delta() with the vertical component of
angle delta, assuming that it's acceptable to have a single-dimension
mouse wheel in the example code.

Task-number: QTBUG-76491
Change-Id: Ie05bb5934ce43976cd3cf009343d7b50ea327f14
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-08-26 14:35:12 +02:00
Topi Reinio 1ad75d1169 Doc: Fix \code command usage
Since Qt 5.12, \code command accepts parameters, and in-line usage
no longer works (and was never documented to work).

Task-number: QTBUG-70980
Change-Id: I010ba21c2a20f70bfdacd7bb0c1aea3836c8efca
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-10-25 09:44:07 +00:00
Paul Wicking 5be5da2f09 Doc: Add missing dots (qtdatavis3d)
Task-number: QTBUG-68933
Change-Id: I4947e5906049cadcd2aefd7dfb7aee25fea7a778
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-19 09:54:17 +00:00
Kai Koehne 71b6fb32b1 Use FDL license for all .qdoc files
Change-Id: I732a95d5adbd7579b05e8cb2b1afd586d5b5bc58
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2018-05-30 09:20:42 +00:00
Friedemann Kleint b844f84418 itemmodel example: Remove unused member variables
Fix Clang warnings

main.cpp(74,13):  warning: private field 'm_styleTimer' is not used [-Wunused-private-field]
main.cpp(75,13):  warning: private field 'm_presetTimer' is not used [-Wunused-private-field]
main.cpp(76,13):  warning: private field 'm_themeTimer' is not used [-Wunused-private-field]

Task-number: QTBUG-63512
Change-Id: I618b0b6e6157b8a82af7e81b178f5156cf9c1bca
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-05-09 08:28:54 +00:00
Rainer Keller 4ceabb63a6 qtlite: Skip building examples when configured with no-feature-itemviews
Task-number: QTBUG-53141
Change-Id: I2e9fa0a5b72d79acc22c779e68a3dbe6a320a32a
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2018-01-26 07:50:30 +00:00
Rainer Keller 63b90a1d33 Remove unneeded include
Change-Id: I508fc0322f473a476f8943d4171f2242697519fa
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2018-01-19 08:04:14 +00:00
Liang Qi c6a8bae256 Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	.qmake.conf

Change-Id: I4e39ad733fec72e2233cd16fc50c96ca96280782
2018-01-18 21:25:09 +01:00
Mika Salmela c3a973273e If not m_resetArray then create it
Fix m_resetArray so that if it not yet created, then create it. Currently
it is created every time.

Change-Id: I850bd9d2f719cd76bfd3292a439f9585a4e99fc3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2017-12-04 08:39:36 +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 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
Liang Qi 3f5c279083 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	examples/datavisualization/bars/doc/src/bars.qdoc
	examples/datavisualization/custominput/doc/src/custominput.qdoc
	examples/datavisualization/customitems/doc/src/customitems.qdoc
	examples/datavisualization/draggableaxes/doc/src/draggableaxes.qdoc
	examples/datavisualization/itemmodel/doc/src/itemmodel.qdoc
	examples/datavisualization/qmlaxisdrag/doc/src/qmlaxisdrag.qdoc
	examples/datavisualization/qmlaxisformatter/doc/src/qmlaxisformatter.qdoc
	examples/datavisualization/qmlcustominput/doc/src/qmlcustominput.qdoc
	examples/datavisualization/qmloscilloscope/doc/src/qmloscilloscope.qdoc
	examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc
	examples/datavisualization/qmlspectrogram/doc/src/qmlspectrogram.qdoc
	examples/datavisualization/qmlsurface/doc/src/qmlsurface.qdoc
	examples/datavisualization/qmlsurfacelayers/doc/src/qmlsurfacelayers.qdoc
	examples/datavisualization/rotations/doc/src/rotations.qdoc
	examples/datavisualization/scatter/doc/src/scatter.qdoc
	examples/datavisualization/surface/doc/src/surface.qdoc
	examples/datavisualization/texturesurface/doc/src/texturesurface.qdoc
	examples/datavisualization/volumetric/doc/src/volumetric.qdoc
	src/datavisualization/doc/src/qtdatavisualization.qdoc

Change-Id: Ic15e77b1fee0708a235bf21815f72b854981537a
2016-11-08 11:46:38 +01:00
Topi Reinio 90aff70262 Doc: Use capitalization in section titles
Change-Id: I3ea9dde5f98813716d754d292af1f005d33ba98e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-11-02 12:46:21 +00:00