summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/utils
Commit message (Collapse)AuthorAgeFilesLines
* Resolve a duplicate symbol issueAmir Masoud Abdol2023-04-212-1/+2
| | | | | | | | | | | On unity build, `itemScaler` is defined in `scatter3drenderer.cpp` as well, and causes a symbol redefinition error. By making this one a static member, we can avoid it. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Iba5b27a9e066de4c4502b30f5c265770bf991649 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix invalid drawModeTomi Korpipaa2023-01-191-1/+0
| | | | | | | | | | | Q_ENUM is now required for flags to work correctly from QML. Added the missing definitions. Pick-to: 6.5 Fixes: QTBUG-110358 Change-Id: Ifde893a33a5b43c26f51b0c97883458462376be6 Reviewed-by: Sami Varanka <sami.varanka@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Port from container::count() and length() to size()Marc Mutz2022-10-052-9/+9
| | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = 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: Ibed02600e225ee63c06d61bcd6187518f650a0a0 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Do not crash if custom object load failsTomi Korpipaa2022-08-262-37/+53
| | | | | | | | | | | | | | | There was no check for the existence of UVs or normals in an OBJ file. A check for those was added. Additionally a debug message was added in case model loading fails due to missing UVs or normals. Furthermore, we no more qFatal out when custom object loading fails. Pick-to: 6.2 6.4 Fixes: QTBUG-105398 Change-Id: Ie2742fb4307fe117e313cedf8111bc8f460f9c7b Reviewed-by: Sami Varanka <sami.varanka@qt.io> Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io> Reviewed-by: Dilek Akcay Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix -Wunused-function on non-OSX platformsMarc Mutz2022-06-211-3/+1
| | | | | | | | Found by headerscheck. Pick-to: 6.4 6.3 6.2 Change-Id: If3c7e2a10132a1201a08db1fb9b71d0cdcd395ff Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-1323-644/+46
| | | | | | | | | | | 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>
* Fix errors caused by dependency updateTomi Korpipaa2022-03-311-6/+10
| | | | | | | | Fixes: QTBUG-102139 Change-Id: Id9bc508f714a51915fd4d8f67e36561942e19c74 Reviewed-by: Sami Varanka <sami.varanka@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* datavis3d: do not rely on transitive includesFabian Kosmale2022-03-111-0/+1
| | | | | Change-Id: I837af484ee94b4a55bd4f6a404ea5b98b800d093 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix API review findingTomi Korpipaa2022-02-101-3/+3
| | | | | | | | | | | 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>
* Add: Colorize surfaceseries wireframeSami Varanka2021-08-061-0/+4
| | | | | | | | | | | | | 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>
* Fix: basegradient applied incorrectly to surfaceSami Varanka2021-08-031-1/+2
| | | | | | | | | | | | | When surface data contains NaN/Inf values, the basegradient might get applied incorrectly. Fixed the error by adding check for NaN/Inf in getNormalizedVertex. Pick-to: 6.1 Fixes: QTBUG-78767 Change-Id: I94d850f8ed21bc98dcbc4ba26b02989c1c1bf90b Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix Q3DScatter memory leakSami Varanka2021-06-082-1/+2
| | | | | | | | | | | | | | | | | | | | When using static optimization for scattergraph and series mesh type is not point mesh, the scatter3D renderer uses ScatterObjectBufferHelper's fullLoad. In the fullLoad old data buffers are deleted, if m_meshDataLoaded is set to true. However, at the beginning of the fullLoad, the flag was always set to false so old data buffers were never deleted. Moved the setting of the m_meshDataLoaded to false after the deletion of old buffers. Added similar code to scatterpointbufferhelper for consistency. Pick-to: 5.15 6.1 Fixes: QTBUG-80194 Change-Id: I2fd71af86b1fd73621074187f112fd9783df36df Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Remove left-over .pri filesJoerg Bornemann2021-05-051-26/+0
| | | | | | Task-number: QTBUG-88742 Change-Id: I140a038ccb47433ff7fe437bfc002e580bfb21a6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix macOS build that has -Wunused-function as errorTomi Korpipaa2021-02-101-2/+2
| | | | | | | | | | 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>
* Prevent segfault with software rendererTomi Korpipaa2021-02-101-1/+1
| | | | | | | | | | | SW renderer doesn't have opengles2 config set, so we need to make sure the pointer does not include garbage. Fixes: QTBUG-91032 Pick-to: 6.1 Change-Id: I98aa2f10889fe04c2f6f4af6abd0fe559ba686bf Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix conan build errorsTomi Korpipaa2021-01-291-2/+2
| | | | | | Fixes: QTBUG-90737 Change-Id: Iab4a0f9d4ff3618dfb4c1675dfd731421de29f9f Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Remove custom namespaceTomi Korpipaa2021-01-2822-44/+44
| | | | | | Fixes: QTBUG-90400 Change-Id: Ia2f1974a21112bad97724717d073d367c4413a7f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add CMake buildTuomo Pelkonen2021-01-271-1/+6
| | | | | | | Task-number: QTBUG-89299 Change-Id: I5becbf39605e566c3d32cb5e210d974df9de27da Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix compilation issues for macOS and Android on Qt 6.0Tuomo Pelkonen2021-01-274-11/+14
| | | | | | Task-number: QTBUG-89297 Change-Id: I57acf345b6fc64a93d08d41016c755cae4edd6db Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Migrate C++ API rendering path to Qt 6Tomi Korpipaa2020-12-143-15/+20
| | | | | | | | | | 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>
* Add missing overrideAlexander Volkov2020-06-291-1/+1
| | | | | Change-Id: I20cec71db97cbf896255d4f6d7e947072a86e2bb Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-06-262-8/+8
| | | | | | | | | 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>
* Use QList instead of QVectorJarek Kobus2020-06-2514-80/+67
| | | | | | | Task-number: QTBUG-84469 Change-Id: I4dc064b70adb054ca4add2dd662e7227255ff970 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update dependenciesFriedemann Kleint2020-03-261-1/+1
| | | | | | | Add missing Q_MOC_INCLUDE and adapt to OpenGL split. Change-Id: I6150876a62ca55ad63c09a128226c2bac428b821 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Avoid initializing QFlags with 0 or nullptrFriedemann Kleint2019-11-262-15/+8
| | | | | | | It is being deprecated. Change-Id: I38e6bc29ac03108f56f445069b2dbbe8a3db201a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix deprecation warnings about QString::sprintf()Friedemann Kleint2019-05-271-3/+3
| | | | | | | | | | Fix warnings: utils/utils.cpp:268:55: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations] utils/utils.cpp:270:56: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations] utils/utils.cpp:272:47: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations] Change-Id: I27628b7a3d7daa75399ef4952efe373a65d8974e Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix QFont-related deprecation warningsFriedemann Kleint2019-02-061-2/+2
| | | | | | | | | | | Replace QFontMetrics::width() by horizontalAdvance(), fixing: utils/utils.cpp:87:43: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFont::horizontalAdvance [-Wdeprecated-declarations] ^~~~~ utils/utils.cpp:139:58: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFont::horizontalAdvance [-Wdeprecated-declarations] engine/axisrendercache.cpp:204:50: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFont::horizontalAdvance [-Wdeprecated-declarations] Change-Id: I8cfc466cee55b14060feae9b16a087c1db92cf90 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Fix mesa checkJoni Poikelin2019-01-221-1/+1
| | | | | | | | VMware virtual machines have "OpenGL ES 3.0 Mesa x.x.x" as the version string. Change-Id: I5c23524a021732e84b78090de2913b4d974e9f34 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Replace Q_NULLPTR with nullptrKevin Funk2017-09-261-1/+1
| | | | | Change-Id: Idc9a7a0ebcc986c8def79ac56f7defceea1e4432 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Fix QDoc error by using #ifndef Q_QDOC to omit unused functionLeena Miettinen2017-03-171-0/+2
| | | | | | | | Also fix the function signature in the qdoc file. Change-Id: If8a7cb83f94efb9a5a999c99fce722e4ffb96312 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Check if we got OpenGL2.1 functions before trying to use themTomi Korpipää2016-11-171-1/+5
| | | | | | Change-Id: Ia8b4a25094d4a608d3a20b808fd14c3941ae2dff Task-number: QTRD-2116 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-beta1Liang Qi2016-04-081-1/+1
|\ | | | | | | | | | | | | Conflicts: src/datavisualization/utils/qutils.h Change-Id: Ic882590b5386697fb4af068e435704849ed5405c
| * Add explicit and make public headers compile with ↵Marc Mutz2016-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Wzero-as-null-pointer-constant ... or equivalent. QtBase 5.6 headers already compile that way, so let the other modules follow suit. Added explicit where it was missing. This is not a source- incompatible change, because code that breaks by this is a bug. Let's not have this sitting around in an LTS. Change-Id: I579e8714f94884dc555b673c9f85508f17cdc99d Task-number: QTBUG-45291 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
| * qutils.h: pass the headerclean checkMarc Mutz2016-03-031-1/+1
| | | | | | | | | | | | | | C-style casts aren't allowed in public headers. Change-Id: I1c1d6efb534b767d2ac06ecfae782b7a34bf37eb Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* | Only use OpenGL ES2 for Mesa on WindowsJonathan Liu2016-01-192-2/+8
| | | | | | | | | | | | | | | | | | Mesa is used on Linux desktops for open source graphics drivers which support more than OpenGL ES2. This fixes the volumetric example not rendering correctly when using the open source ATI graphics driver. Change-Id: Ibf4df6cc84881a15464653b65d1221b20c853b19 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* | Copyright file update to GPLMiikka Heikkinen2016-01-1223-207/+391
| | | | | | | | | | Change-Id: Ib264fe1f2cd1589e2ba1ef2dc7d8f3951e125708 Reviewed-by: Tomi Korpipää <tomi.korpipaa@theqtcompany.com>
* | Fix build with -Werror=old-style-castSimon Hausmann2015-12-171-1/+1
|/ | | | | | | It appears to be enabled in developer builds in Qt 5.7 Change-Id: Ib96cc866b511d8b947323d27f172dc3dd5f3e46f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Fix issues with COIN buildsMiikka Heikkinen2015-10-223-17/+26
| | | | | | | | | | | | -Fix miscellaneous compile errors -Move manual tests to manual folder and enable export of autotests -Added widgets requirement -Fixed autotests -Fixed renderer and controller synchronization in QML case -Treat fallback Mesa as ES2 similar to setting AA_UseSoftwareOpenGL Change-Id: If6619733725d079e339bef16262e5ea1450ab20f Reviewed-by: Tomi Korpipää <tomi.korpipaa@theqtcompany.com>
* Update license headersMiikka Heikkinen2015-10-2023-253/+322
| | | | | Change-Id: I0581aefcf9dabc64b05eb8c97b5b92da1fb26299 Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
* Fixed OpenGL 3.x crashTomi Korpipää2015-10-191-0/+2
| | | | | | Change-Id: I43bd6f8d2f565a989e4d48d68a8c610240ed35fb Task-number: QTRD-3492 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Fix compilation with namespaced Qt.Friedemann Kleint2015-09-213-2/+4
| | | | | | Task-number: QTRD-3655 Change-Id: Id68e9cec8d1093fe1557b07a148ae04a27656284 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Copyright header changesMika Salmela2015-04-1423-69/+69
| | | | | | | Copyright header changes for 5.5. Change-Id: I0361cfe1ebdb28955cb927700f14cf7b72694421 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Once more crash fix on texture adding.Mika Salmela2014-11-211-5/+13
| | | | | | | B2Qt device called uvs creation before array creation. Change-Id: Ia0cac175a3e0769f2571a0eadc7c764ae4092cc2 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Fix crash when adding a texture on QMLMika Salmela2014-11-211-5/+7
| | | | | | | | When texture was attached on the qmlsurface example, the smoothUVs was called before the actual model mesh was created. Change-Id: I5a62b06291232df54ce08d586d8794b332a4eece Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Support larger custom meshes.Miikka Heikkinen2014-11-189-117/+14
| | | | | | | | | | Vertex index was limited to unsigned short, meaning even slightly complex meshes couldn't be used. Changed to unsigned int. Also removed unused vertex indexer methods. Change-Id: Iebe62bd3a501dc79ee2857cca28ac0d05bd4a55e Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
* Change copyright headers.Miikka Heikkinen2014-11-0723-161/+161
| | | | | | Change-Id: I453438fee92f18c983c1bef04c68b24a7ff72cf9 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com> Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com>
* Added flags to software renderer test Tomi Korpipää2014-11-052-0/+4
| | | | | | Change-Id: I0667a0e53fd07fe9c6ce7b2d63887eda1692bf3b Change-Id: I0667a0e53fd07fe9c6ce7b2d63887eda1692bf3b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Fixed font size jumping in ES2 Tomi Korpipää2014-11-051-1/+1
| | | | | | | | Task-number: QTRD-3412 Change-Id: I7f19ee34ccdde3a227033e3a88994e157b0092c4 Change-Id: I7f19ee34ccdde3a227033e3a88994e157b0092c4 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com>
* Force software renderer to using ES2 Tomi Korpipää2014-11-052-10/+55
| | | | | | | Task-number: QTRD-3410 Change-Id: I86b240b6548ec4c94f6be0dc352ed112965926f3 Change-Id: I86b240b6548ec4c94f6be0dc352ed112965926f3 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com>
* Fixed surface slice problemTomi Korpipää2014-10-311-1/+1
| | | | | | Task-number: QTRD-3402 Change-Id: I70ef641fc7249b144d6e98971f1fb74f2935d706 Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com>