summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.cmake.conf1
-rw-r--r--CMakeLists.txt2
-rw-r--r--conanfile.py120
-rw-r--r--dependencies.yaml6
-rw-r--r--examples/datavisualization/bars/CMakeLists.txt2
-rw-r--r--examples/datavisualization/bars/graphmodifier.h2
-rw-r--r--examples/datavisualization/custominput/CMakeLists.txt2
-rw-r--r--examples/datavisualization/customitems/CMakeLists.txt2
-rw-r--r--examples/datavisualization/customproxy/CMakeLists.txt2
-rw-r--r--examples/datavisualization/draggableaxes/CMakeLists.txt2
-rw-r--r--examples/datavisualization/itemmodel/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qml3doscilloscope/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlaxisdrag/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlaxisformatter/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlbars/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlcustominput/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmllegend/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlmultigraph/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlscatter/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml1
-rw-r--r--examples/datavisualization/qmlspectrogram/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlsurface/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlsurfacelayers/CMakeLists.txt2
-rw-r--r--examples/datavisualization/rotations/CMakeLists.txt2
-rw-r--r--examples/datavisualization/scatter/CMakeLists.txt2
-rw-r--r--examples/datavisualization/scatter/scatterdatamodifier.h2
-rw-r--r--examples/datavisualization/surface/CMakeLists.txt2
-rw-r--r--examples/datavisualization/texturesurface/CMakeLists.txt2
-rw-r--r--examples/datavisualization/volumetric/CMakeLists.txt2
-rw-r--r--src/datavisualization/data/qsurfacedataproxy.cpp80
-rw-r--r--src/datavisualization/engine/q3dcamera_p.h2
-rw-r--r--src/datavisualization/engine/qabstract3dgraph.cpp5
-rw-r--r--src/datavisualizationqml2/abstractdeclarative.cpp5
-rw-r--r--src/datavisualizationqml2/colorgradient_p.h2
-rw-r--r--src/datavisualizationqml2/declarativebars.cpp2
-rw-r--r--src/datavisualizationqml2/declarativebars_p.h6
-rw-r--r--src/datavisualizationqml2/declarativecolor_p.h2
-rw-r--r--src/datavisualizationqml2/declarativescene_p.h2
-rw-r--r--src/datavisualizationqml2/declarativeseries_p.h4
-rw-r--r--tests/auto/cpptest/CMakeLists.txt1
-rw-r--r--tests/auto/cpptest/q3dsurface-modelproxy-nan/CMakeLists.txt11
-rw-r--r--tests/auto/cpptest/q3dsurface-modelproxy-nan/tst_proxy.cpp292
-rw-r--r--tests/manual/directional/scatterdatamodifier.h2
43 files changed, 424 insertions, 170 deletions
diff --git a/.cmake.conf b/.cmake.conf
index 4e73b3d6..4aa8eb1f 100644
--- a/.cmake.conf
+++ b/.cmake.conf
@@ -1 +1,2 @@
set(QT_REPO_MODULE_VERSION "6.2.0")
+set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e61dda74..417b8f09 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.15.0)
+cmake_minimum_required(VERSION 3.16)
include(.cmake.conf)
project(QtDataVisualization
diff --git a/conanfile.py b/conanfile.py
index bfd82662..8aa42f17 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -26,110 +26,34 @@
##
#############################################################################
-from conans import ConanFile, tools, CMake
-import os
+from conans import ConanFile
+import re
+from pathlib import Path
-class QtConanError(Exception):
- pass
+def _parse_qt_version_by_key(key: str) -> str:
+ with open(Path(__file__).parent.resolve() / ".cmake.conf") as f:
+ m = re.search(fr'{key} .*"(.*)"', f.read())
+ return m.group(1) if m else ""
+
+
+def _get_qt_minor_version() -> str:
+ return ".".join(_parse_qt_version_by_key("QT_REPO_MODULE_VERSION").split(".")[:2])
class QtDataVisualization(ConanFile):
name = "qtdatavis3d"
- version = "6.2.0"
license = "GPL-3.0+, Commercial Qt License Agreement"
author = "The Qt Company <https://www.qt.io/contact-us>"
- url = "https://code.qt.io/cgit/qt/qtdatavis3d.git/"
- description = "Qt Data Visualization provides UI Components for displaying 3D graphs, driven by static or dynamic data models."
- topics = ("qt", "qt6", "data visualization", "qtquick")
- settings = "os", "compiler", "build_type", "arch"
- options = {"shared": [True, False, "default"],
- "qt6": "ANY"} # this is needed to model unique package_id for the Add-on build per used Qt6 version
- default_options = {"shared": "default", # default: Use the value of the Qt build
- "qt6": None}
+ url = "https://code.qt.io/cgit/qt/qtdatavis3d.git"
+ description = (
+ "Qt Data Visualization provides UI Components for displaying 3D graphs, driven by static or "
+ "dynamic data models."
+ )
+ topics = "qt", "qt6", "data visualization", "qtquick"
+ settings = "os", "compiler", "arch", "build_type"
+ # for referencing the version number and prerelease tag and dependencies info
+ exports = ".cmake.conf", "dependencies.yaml"
exports_sources = "*", "!conan*.*"
- revision_mode = "scm" # use commit ID as the RREV (recipe revision)
-
- def source(self):
- # sources are installed next to recipe, no need to clone etc. sources here
- pass
-
- def _get_cmake_prefix_path(self):
- # 'QTDIR' provided as env variable in profile file which is part of the Qt essential binary
- # package(s). Installed under .conan/profiles
- cmake_prefix_path = os.environ.get("QTDIR")
- if not cmake_prefix_path:
- raise QtConanError("'QTDIR' not defined! The 'QTDIR' needs to point to Qt installation directory.")
- print(f"CMAKE_PREFIX_PATH for '{self.name}/{self.version}' build is: {cmake_prefix_path}")
- return cmake_prefix_path
-
- def _read_env(self, key):
- value = os.environ.get(key)
- if not value:
- raise QtConanError(f"{self.settings.os} build specified but '{key}' was not defined?")
- return value
-
- def _get_qtcmake(self):
- qt_install_path = self._get_cmake_prefix_path()
- ext = ".bat" if tools.os_info.is_windows else ""
- qtcmake = os.path.abspath(os.path.join(qt_install_path, "bin", "qt-cmake" + ext))
- if not os.path.exists(qtcmake):
- raise QtConanError(f"Unable to locate {qtcmake} from 'QTDIR': {qt_install_path}")
- return qtcmake
-
- def _get_cmake_tool(self):
- cmake = CMake(self, cmake_program=self._get_qtcmake())
- cmake.verbose = True
-
- # Qt modules need to be 'installed'.
- # We need to direct the 'make install' to some directory under Conan cache,
- # place it under the current build directory which is also under the Conan cache.
- # Note, the actual 'make install' is called in "package()".
- install_dir = os.path.join(os.getcwd(), "_install_tmp")
- cmake.definitions["CMAKE_INSTALL_PREFIX"] = install_dir
-
- # Use the value of the Qt build
- if self.options.shared.value == "default":
- del cmake.definitions["BUILD_SHARED_LIBS"]
-
- cmake_toolchain_file = os.environ.get("CMAKE_TOOLCHAIN_FILE")
- if cmake_toolchain_file:
- cmake.definitions["CMAKE_TOOLCHAIN_FILE"] = cmake_toolchain_file
-
- if self.settings.os == "Android":
- cmake.definitions["ANDROID_SDK_ROOT"] = self._read_env('ANDROID_SDK_ROOT')
- cmake.definitions["ANDROID_NDK_ROOT"] = self._read_env('ANDROID_NDK_ROOT')
-
- if self.settings.os == "iOS":
- # Instead of Conan's auto-added 'Darwin', explicitly pass 'iOS'.
- cmake.definitions["CMAKE_SYSTEM_NAME"] = "iOS"
-
- # Remove the explicit sysroot, let CMake detect the sysroots, to ensure
- # that multi-arch builds work.
- del cmake.definitions["CMAKE_OSX_SYSROOT"]
-
- # Remove the conan provided architecture, instead rely on the architectures set
- # by the Qt toolchain file, which with official Qt packages most likely means
- # multi-arch iOS.
- del cmake.definitions["CMAKE_OSX_ARCHITECTURES"]
-
- return cmake
-
- def build(self):
- cmake = self._get_cmake_tool()
- self.run('%s "%s" %s' % (self._get_qtcmake(), self.source_folder, cmake.command_line))
- self.run('cmake --build . %s' % cmake.build_config)
- return
-
- def package(self):
- install_dir = os.path.join(os.getcwd(), "_install_tmp") # see 'CMAKE_INSTALL_PREFIX' above
- self.run('cmake --build . --target install')
- self.copy("*", src=install_dir, dst=".")
-
- def package_info(self):
- self.cpp_info.libs = ["Qt6DataVisualization"] # used for the actual library filename, Ordered list with the library names
-
- def deploy(self):
- self.copy("*") # copy from current package
- self.copy_deps("*") # copy from dependencies
-
+ python_requires = f"qt-conan-common/{_get_qt_minor_version()}@qt/everywhere"
+ python_requires_extend = "qt-conan-common.QtLeafModule"
diff --git a/dependencies.yaml b/dependencies.yaml
index f6b3356c..2ea1dc1a 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,10 +1,10 @@
dependencies:
../qtbase:
- ref: 621c16a9650d3068ec9aea2c055193c00a5f8ce5
+ ref: 9acf8cadc98e7dc4802089d25f9149b6b03f67a0
required: true
../qtdeclarative:
- ref: 4bb54ee50eb8bbaf0b7d2f48e0ab8d324f304f1a
+ ref: bf8bebb7ba01ac563df2fe2e55aa948e9edc7307
required: false
../qtmultimedia:
- ref: bb5877d33bf34769383ef105ca11fa80112ea98a
+ ref: 632ddc6c38cb3b239382408b2f1bbcbfa53dd73b
required: false
diff --git a/examples/datavisualization/bars/CMakeLists.txt b/examples/datavisualization/bars/CMakeLists.txt
index 5388c565..5bc76255 100644
--- a/examples/datavisualization/bars/CMakeLists.txt
+++ b/examples/datavisualization/bars/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(bars LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/bars/graphmodifier.h b/examples/datavisualization/bars/graphmodifier.h
index b1420e33..4611cc43 100644
--- a/examples/datavisualization/bars/graphmodifier.h
+++ b/examples/datavisualization/bars/graphmodifier.h
@@ -77,7 +77,7 @@ Q_SIGNALS:
void shadowQualityChanged(int quality);
void backgroundEnabledChanged(bool enabled);
void gridEnabledChanged(bool enabled);
- void fontChanged(QFont font);
+ void fontChanged(const QFont &font);
void fontSizeChanged(int size);
private:
diff --git a/examples/datavisualization/custominput/CMakeLists.txt b/examples/datavisualization/custominput/CMakeLists.txt
index 94007d98..a9008ac1 100644
--- a/examples/datavisualization/custominput/CMakeLists.txt
+++ b/examples/datavisualization/custominput/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(custominput LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/customitems/CMakeLists.txt b/examples/datavisualization/customitems/CMakeLists.txt
index a415d170..54f64e25 100644
--- a/examples/datavisualization/customitems/CMakeLists.txt
+++ b/examples/datavisualization/customitems/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(customitems LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/customproxy/CMakeLists.txt b/examples/datavisualization/customproxy/CMakeLists.txt
index c93b4165..b1c3c661 100644
--- a/examples/datavisualization/customproxy/CMakeLists.txt
+++ b/examples/datavisualization/customproxy/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(customproxy LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/draggableaxes/CMakeLists.txt b/examples/datavisualization/draggableaxes/CMakeLists.txt
index 76fdba33..5728b70f 100644
--- a/examples/datavisualization/draggableaxes/CMakeLists.txt
+++ b/examples/datavisualization/draggableaxes/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(draggableaxes LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/itemmodel/CMakeLists.txt b/examples/datavisualization/itemmodel/CMakeLists.txt
index 2f35c1a3..4848fffb 100644
--- a/examples/datavisualization/itemmodel/CMakeLists.txt
+++ b/examples/datavisualization/itemmodel/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(itemmodel LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qml3doscilloscope/CMakeLists.txt b/examples/datavisualization/qml3doscilloscope/CMakeLists.txt
index 7a50caa1..26ed3b19 100644
--- a/examples/datavisualization/qml3doscilloscope/CMakeLists.txt
+++ b/examples/datavisualization/qml3doscilloscope/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qml3doscilloscope LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlaxisdrag/CMakeLists.txt b/examples/datavisualization/qmlaxisdrag/CMakeLists.txt
index 7a2125b9..774c1210 100644
--- a/examples/datavisualization/qmlaxisdrag/CMakeLists.txt
+++ b/examples/datavisualization/qmlaxisdrag/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlaxisdrag LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlaxisformatter/CMakeLists.txt b/examples/datavisualization/qmlaxisformatter/CMakeLists.txt
index 54f23dde..3c4335b5 100644
--- a/examples/datavisualization/qmlaxisformatter/CMakeLists.txt
+++ b/examples/datavisualization/qmlaxisformatter/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlaxisformatter LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlbars/CMakeLists.txt b/examples/datavisualization/qmlbars/CMakeLists.txt
index 071c788c..6792b858 100644
--- a/examples/datavisualization/qmlbars/CMakeLists.txt
+++ b/examples/datavisualization/qmlbars/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlbars LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlcustominput/CMakeLists.txt b/examples/datavisualization/qmlcustominput/CMakeLists.txt
index 0e659e9e..f359d3fc 100644
--- a/examples/datavisualization/qmlcustominput/CMakeLists.txt
+++ b/examples/datavisualization/qmlcustominput/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlcustominput LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmllegend/CMakeLists.txt b/examples/datavisualization/qmllegend/CMakeLists.txt
index 2c3f56f0..ed972f4b 100644
--- a/examples/datavisualization/qmllegend/CMakeLists.txt
+++ b/examples/datavisualization/qmllegend/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmllegend LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlmultigraph/CMakeLists.txt b/examples/datavisualization/qmlmultigraph/CMakeLists.txt
index dae22cbd..388c5df2 100644
--- a/examples/datavisualization/qmlmultigraph/CMakeLists.txt
+++ b/examples/datavisualization/qmlmultigraph/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlmultigraph LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlscatter/CMakeLists.txt b/examples/datavisualization/qmlscatter/CMakeLists.txt
index 4f154bf2..65e5d2a7 100644
--- a/examples/datavisualization/qmlscatter/CMakeLists.txt
+++ b/examples/datavisualization/qmlscatter/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlscatter LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml b/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml
index 89863d84..a64538da 100644
--- a/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml
+++ b/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml
@@ -52,7 +52,6 @@ Item {
Theme3D {
id: themeIsabelle
type: Theme3D.ThemeIsabelle
- font.family: "Lucida Handwriting"
font.pointSize: 40
}
//! [13]
diff --git a/examples/datavisualization/qmlspectrogram/CMakeLists.txt b/examples/datavisualization/qmlspectrogram/CMakeLists.txt
index d0ac0515..ce86d5c1 100644
--- a/examples/datavisualization/qmlspectrogram/CMakeLists.txt
+++ b/examples/datavisualization/qmlspectrogram/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlspectrogram LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlsurface/CMakeLists.txt b/examples/datavisualization/qmlsurface/CMakeLists.txt
index e2d3bf33..c1a6459c 100644
--- a/examples/datavisualization/qmlsurface/CMakeLists.txt
+++ b/examples/datavisualization/qmlsurface/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlsurface LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlsurfacelayers/CMakeLists.txt b/examples/datavisualization/qmlsurfacelayers/CMakeLists.txt
index 12c27085..d011aa03 100644
--- a/examples/datavisualization/qmlsurfacelayers/CMakeLists.txt
+++ b/examples/datavisualization/qmlsurfacelayers/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlsurfacelayers LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/rotations/CMakeLists.txt b/examples/datavisualization/rotations/CMakeLists.txt
index d3333639..620d34b3 100644
--- a/examples/datavisualization/rotations/CMakeLists.txt
+++ b/examples/datavisualization/rotations/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(rotations LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/scatter/CMakeLists.txt b/examples/datavisualization/scatter/CMakeLists.txt
index 0dbedc1d..1b2e967f 100644
--- a/examples/datavisualization/scatter/CMakeLists.txt
+++ b/examples/datavisualization/scatter/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(scatter LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/scatter/scatterdatamodifier.h b/examples/datavisualization/scatter/scatterdatamodifier.h
index cbb14995..f79a46e9 100644
--- a/examples/datavisualization/scatter/scatterdatamodifier.h
+++ b/examples/datavisualization/scatter/scatterdatamodifier.h
@@ -63,7 +63,7 @@ Q_SIGNALS:
void backgroundEnabledChanged(bool enabled);
void gridEnabledChanged(bool enabled);
void shadowQualityChanged(int quality);
- void fontChanged(QFont font);
+ void fontChanged(const QFont &font);
private:
QVector3D randVector();
diff --git a/examples/datavisualization/surface/CMakeLists.txt b/examples/datavisualization/surface/CMakeLists.txt
index 594c5988..8740d13e 100644
--- a/examples/datavisualization/surface/CMakeLists.txt
+++ b/examples/datavisualization/surface/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(surface LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/texturesurface/CMakeLists.txt b/examples/datavisualization/texturesurface/CMakeLists.txt
index ac8c7ed9..5da2e03e 100644
--- a/examples/datavisualization/texturesurface/CMakeLists.txt
+++ b/examples/datavisualization/texturesurface/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(texturesurface LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/volumetric/CMakeLists.txt b/examples/datavisualization/volumetric/CMakeLists.txt
index e79fff49..577c1604 100644
--- a/examples/datavisualization/volumetric/CMakeLists.txt
+++ b/examples/datavisualization/volumetric/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(volumetric LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/src/datavisualization/data/qsurfacedataproxy.cpp b/src/datavisualization/data/qsurfacedataproxy.cpp
index 7601d021..c9c6425d 100644
--- a/src/datavisualization/data/qsurfacedataproxy.cpp
+++ b/src/datavisualization/data/qsurfacedataproxy.cpp
@@ -552,9 +552,11 @@ void QSurfaceDataProxyPrivate::limitValues(QVector3D &minValues, QVector3D &maxV
float itemValue = m_dataArray->at(i)->at(j).y();
if (qIsNaN(itemValue) || qIsInf(itemValue))
continue;
- if (min > itemValue && isValidValue(itemValue, axisY))
+ if ((min > itemValue || (qIsNaN(min) || qIsInf(min)))
+ && isValidValue(itemValue, axisY)) {
min = itemValue;
- if (max < itemValue)
+ }
+ if (max < itemValue || (qIsNaN(max) || qIsInf(max)))
max = itemValue;
}
}
@@ -569,33 +571,59 @@ void QSurfaceDataProxyPrivate::limitValues(QVector3D &minValues, QVector3D &maxV
float xHigh = m_dataArray->at(0)->last().x();
float zLow = m_dataArray->at(0)->at(0).z();
float zHigh = m_dataArray->last()->at(0).z();
- for (int i = 0; i < columns; i++) {
- float zItemValue = m_dataArray->at(0)->at(i).z();
- if (qIsNaN(zItemValue) || qIsInf(zItemValue))
- continue;
- else if (isValidValue(zItemValue, axisZ))
- zLow = qMin(zLow,zItemValue);
+ for (int i = 0; i < rows; i++) {
+ for (int j = 0; j < columns; j++) {
+ float zItemValue = m_dataArray->at(i)->at(j).z();
+ if (qIsNaN(zItemValue) || qIsInf(zItemValue))
+ continue;
+ else if (isValidValue(zItemValue, axisZ))
+ zLow = qMin(zLow,zItemValue);
+ }
+ if (!qIsNaN(zLow) && !qIsInf(zLow))
+ break;
}
- for (int i = 0; i < columns; i++) {
- float zItemValue = m_dataArray->last()->at(i).z();
- if (qIsNaN(zItemValue) || qIsInf(zItemValue))
- continue;
- else if (isValidValue(zItemValue, axisZ))
- zHigh = qMax(zHigh, zItemValue);
+ for (int i = rows - 1; i >= 0; i--) {
+ for (int j = 0; j < columns; j++) {
+ float zItemValue = m_dataArray->at(i)->at(j).z();
+ if (qIsNaN(zItemValue) || qIsInf(zItemValue))
+ continue;
+ else if (isValidValue(zItemValue, axisZ))
+ {
+ if (!qIsNaN(zHigh) && !qIsInf(zHigh))
+ zHigh = qMax(zHigh, zItemValue);
+ else
+ zHigh = zItemValue;
+ }
+ }
+ if (!qIsNaN(zHigh) && !qIsInf(zHigh))
+ break;
}
- for (int i = 0; i < rows; i++) {
- float xItemValue = m_dataArray->at(i)->at(0).x();
- if (qIsNaN(xItemValue) || qIsInf(xItemValue))
- continue;
- else if (isValidValue(xItemValue, axisX))
- xLow = qMin(xLow, xItemValue);
+ for (int j = 0; j<columns; j++){
+ for (int i = 0; i < rows; i++) {
+ float xItemValue = m_dataArray->at(i)->at(j).x();
+ if (qIsNaN(xItemValue) || qIsInf(xItemValue))
+ continue;
+ else if (isValidValue(xItemValue, axisX))
+ xLow = qMin(xLow, xItemValue);
+ }
+ if (!qIsNaN(xLow) && !qIsInf(xLow))
+ break;
}
- for (int i = 0; i < rows; i++) {
- float xItemValue = m_dataArray->at(i)->last().x();
- if (qIsNaN(xItemValue) || qIsInf(xItemValue))
- continue;
- else if (isValidValue(xItemValue, axisX))
- xHigh = qMax(xHigh, xItemValue);
+ for (int j = columns-1; j >= 0; j--){
+ for (int i = 0; i < rows; i++) {
+ float xItemValue = m_dataArray->at(i)->at(j).x();
+ if (qIsNaN(xItemValue) || qIsInf(xItemValue))
+ continue;
+ else if (isValidValue(xItemValue, axisX))
+ {
+ if (!qIsNaN(xHigh) && !qIsInf(xHigh))
+ xHigh = qMax(xHigh, xItemValue);
+ else
+ xHigh = xItemValue;
+ }
+ }
+ if (!qIsNaN(xHigh) && !qIsInf(xHigh))
+ break;
}
minValues.setX(xLow);
minValues.setZ(zLow);
diff --git a/src/datavisualization/engine/q3dcamera_p.h b/src/datavisualization/engine/q3dcamera_p.h
index 944e408e..27685a43 100644
--- a/src/datavisualization/engine/q3dcamera_p.h
+++ b/src/datavisualization/engine/q3dcamera_p.h
@@ -89,7 +89,7 @@ Q_SIGNALS:
void minYRotationChanged(float rotation);
void maxXRotationChanged(float rotation);
void maxYRotationChanged(float rotation);
- void viewMatrixChanged(QMatrix4x4 viewMatrix);
+ void viewMatrixChanged(const QMatrix4x4 &viewMatrix);
void viewMatrixAutoUpdateChanged(bool enabled);
public:
diff --git a/src/datavisualization/engine/qabstract3dgraph.cpp b/src/datavisualization/engine/qabstract3dgraph.cpp
index 6e17937e..957004f4 100644
--- a/src/datavisualization/engine/qabstract3dgraph.cpp
+++ b/src/datavisualization/engine/qabstract3dgraph.cpp
@@ -656,11 +656,6 @@ qreal QAbstract3DGraph::currentFps() const
*
* \brief Whether orthographic projection is used for displaying the graph.
*
- * If \c {true}, ortographic projection is used to create 2D graphs by replacing
- * the default input handler with one that does not allow rotating the graph and
- * by setting the camera to view the graph
- * directly from the side or from the top. Also, axis labels typically need to be rotated when
- * viewing the graph from the sides.
* Defaults to \c{false}.
* \note Shadows will be disabled when set to \c{true}.
*
diff --git a/src/datavisualizationqml2/abstractdeclarative.cpp b/src/datavisualizationqml2/abstractdeclarative.cpp
index dbbd803d..890ea324 100644
--- a/src/datavisualizationqml2/abstractdeclarative.cpp
+++ b/src/datavisualizationqml2/abstractdeclarative.cpp
@@ -66,8 +66,11 @@ AbstractDeclarative::AbstractDeclarative(QQuickItem *parent) :
connect(this, &QQuickItem::windowChanged, this, &AbstractDeclarative::handleWindowChanged);
// Set contents to false in case we are in qml designer to make component look nice
- m_runningInDesigner = QGuiApplication::applicationDisplayName() == "Qml2Puppet";
+ m_runningInDesigner = QGuiApplication::applicationDisplayName() == QLatin1String("Qml2Puppet");
setFlag(ItemHasContents, !m_runningInDesigner);
+
+ // Accept touchevents
+ setAcceptTouchEvents(true);
}
AbstractDeclarative::~AbstractDeclarative()
diff --git a/src/datavisualizationqml2/colorgradient_p.h b/src/datavisualizationqml2/colorgradient_p.h
index 3e5162a7..bdec6469 100644
--- a/src/datavisualizationqml2/colorgradient_p.h
+++ b/src/datavisualizationqml2/colorgradient_p.h
@@ -64,7 +64,7 @@ public:
Q_SIGNALS:
void positionChanged(qreal position);
- void colorChanged(QColor color);
+ void colorChanged(const QColor &color);
private:
void updateGradient();
diff --git a/src/datavisualizationqml2/declarativebars.cpp b/src/datavisualizationqml2/declarativebars.cpp
index fe90e159..8ac2888c 100644
--- a/src/datavisualizationqml2/declarativebars.cpp
+++ b/src/datavisualizationqml2/declarativebars.cpp
@@ -112,7 +112,7 @@ float DeclarativeBars::barThickness() const
return m_barsController->barThickness();
}
-void DeclarativeBars::setBarSpacing(QSizeF spacing)
+void DeclarativeBars::setBarSpacing(const QSizeF &spacing)
{
if (spacing != barSpacing()) {
m_barsController->setBarSpecs(GLfloat(barThickness()), spacing, isBarSpacingRelative());
diff --git a/src/datavisualizationqml2/declarativebars_p.h b/src/datavisualizationqml2/declarativebars_p.h
index 97359ede..fb75a40b 100644
--- a/src/datavisualizationqml2/declarativebars_p.h
+++ b/src/datavisualizationqml2/declarativebars_p.h
@@ -79,7 +79,7 @@ public:
void setBarThickness(float thicknessRatio);
float barThickness() const;
- void setBarSpacing(QSizeF spacing);
+ void setBarSpacing(const QSizeF &spacing);
QSizeF barSpacing() const;
void setBarSpacingRelative(bool relative);
@@ -111,9 +111,9 @@ Q_SIGNALS:
void columnAxisChanged(QCategory3DAxis *axis);
void multiSeriesUniformChanged(bool uniform);
void barThicknessChanged(float thicknessRatio);
- void barSpacingChanged(QSizeF spacing);
+ void barSpacingChanged(const QSizeF &spacing);
void barSpacingRelativeChanged(bool relative);
- void meshFileNameChanged(QString filename);
+ void meshFileNameChanged(const QString &filename);
void primarySeriesChanged(QBar3DSeries *series);
void selectedSeriesChanged(QBar3DSeries *series);
Q_REVISION(1) void floorLevelChanged(float level);
diff --git a/src/datavisualizationqml2/declarativecolor_p.h b/src/datavisualizationqml2/declarativecolor_p.h
index 54be5397..c4e3a30d 100644
--- a/src/datavisualizationqml2/declarativecolor_p.h
+++ b/src/datavisualizationqml2/declarativecolor_p.h
@@ -57,7 +57,7 @@ public:
QColor color() const;
Q_SIGNALS:
- void colorChanged(QColor color);
+ void colorChanged(const QColor &color);
private:
QColor m_color;
diff --git a/src/datavisualizationqml2/declarativescene_p.h b/src/datavisualizationqml2/declarativescene_p.h
index 70e3da82..5fd8ae22 100644
--- a/src/datavisualizationqml2/declarativescene_p.h
+++ b/src/datavisualizationqml2/declarativescene_p.h
@@ -63,7 +63,7 @@ public:
QPoint invalidSelectionPoint() const;
Q_SIGNALS:
- void selectionQueryPositionChanged(const QPointF position);
+ void selectionQueryPositionChanged(const QPointF &position);
};
QT_END_NAMESPACE
diff --git a/src/datavisualizationqml2/declarativeseries_p.h b/src/datavisualizationqml2/declarativeseries_p.h
index 5f5a535a..18631b85 100644
--- a/src/datavisualizationqml2/declarativeseries_p.h
+++ b/src/datavisualizationqml2/declarativeseries_p.h
@@ -93,7 +93,7 @@ public Q_SLOTS:
void handleMultiHighlightGradientUpdate();
Q_SIGNALS:
- void selectedBarChanged(QPointF position);
+ void selectedBarChanged(const QPointF &position);
void baseGradientChanged(ColorGradient *gradient);
void singleHighlightGradientChanged(ColorGradient *gradient);
void multiHighlightGradientChanged(ColorGradient *gradient);
@@ -185,7 +185,7 @@ public Q_SLOTS:
void handleMultiHighlightGradientUpdate();
Q_SIGNALS:
- void selectedPointChanged(QPointF position);
+ void selectedPointChanged(const QPointF &position);
void baseGradientChanged(ColorGradient *gradient);
void singleHighlightGradientChanged(ColorGradient *gradient);
void multiHighlightGradientChanged(ColorGradient *gradient);
diff --git a/tests/auto/cpptest/CMakeLists.txt b/tests/auto/cpptest/CMakeLists.txt
index 7b6ef00b..bed23651 100644
--- a/tests/auto/cpptest/CMakeLists.txt
+++ b/tests/auto/cpptest/CMakeLists.txt
@@ -9,6 +9,7 @@ add_subdirectory(q3dscatter-series)
add_subdirectory(q3dsurface)
add_subdirectory(q3dsurface-proxy)
add_subdirectory(q3dsurface-modelproxy)
+add_subdirectory(q3dsurface-modelproxy-nan)
add_subdirectory(q3dsurface-heightproxy)
add_subdirectory(q3dsurface-series)
add_subdirectory(q3daxis-category)
diff --git a/tests/auto/cpptest/q3dsurface-modelproxy-nan/CMakeLists.txt b/tests/auto/cpptest/q3dsurface-modelproxy-nan/CMakeLists.txt
new file mode 100644
index 00000000..8125bd21
--- /dev/null
+++ b/tests/auto/cpptest/q3dsurface-modelproxy-nan/CMakeLists.txt
@@ -0,0 +1,11 @@
+qt_internal_add_test(q3dsurface-modelproxy-nan
+ SOURCES
+ tst_proxy.cpp
+ INCLUDE_DIRECTORIES
+ ../common
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::DataVisualization
+)
diff --git a/tests/auto/cpptest/q3dsurface-modelproxy-nan/tst_proxy.cpp b/tests/auto/cpptest/q3dsurface-modelproxy-nan/tst_proxy.cpp
new file mode 100644
index 00000000..53b9ac39
--- /dev/null
+++ b/tests/auto/cpptest/q3dsurface-modelproxy-nan/tst_proxy.cpp
@@ -0,0 +1,292 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Data Visualization module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <QtDataVisualization/QItemModelSurfaceDataProxy>
+#include <QtDataVisualization/Q3DSurface>
+
+#include "cpptestutil.h"
+
+class tst_proxy: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void dataContainingNaNFirstRow();
+ void dataContainingNaNLastRow();
+ void dataContainingNaNFirstLastRow();
+};
+
+void tst_proxy::initTestCase()
+{
+}
+
+void tst_proxy::cleanupTestCase()
+{
+}
+
+void tst_proxy::init()
+{
+}
+
+void tst_proxy::cleanup()
+{
+}
+
+void tst_proxy::dataContainingNaNFirstRow()
+{
+ if (!CpptestUtil::isOpenGLSupported())
+ QSKIP("OpenGL not supported on this platform");
+
+ const int size = 10;
+ const int missingRow = 0;
+
+ QItemModelSurfaceDataProxy *proxy = new QItemModelSurfaceDataProxy();
+ QSurface3DSeries *series = new QSurface3DSeries(proxy);
+ Q3DSurface *graph = new Q3DSurface();
+ graph->addSeries(series);
+
+ // X
+ QSurfaceDataArray *array = new QSurfaceDataArray();
+ array->reserve(size);
+ for (int i = 0; i < size; i++) {
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D((i == missingRow) ? std::numeric_limits<float>::quiet_NaN()
+ : static_cast<float>(i),
+ qSin(static_cast<float>(i)), static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+
+ // Y
+ for (int i = 0; i < size; i++) {
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D(static_cast<float>(i),
+ (i == missingRow) ? std::numeric_limits<float>::quiet_NaN()
+ : qSin(static_cast<float>(i)),
+ static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+
+ // Z
+ for (int i = 0; i < size; i++) {
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D(static_cast<float>(i),
+ qSin(static_cast<float>(i)),
+ (i == missingRow) ? std::numeric_limits<float>::quiet_NaN()
+ : static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+
+ delete graph;
+
+}
+
+void tst_proxy::dataContainingNaNLastRow()
+{
+ if (!CpptestUtil::isOpenGLSupported())
+ QSKIP("OpenGL not supported on this platform");
+
+ const int size = 10;
+ const int missingRow = size - 1;
+ QItemModelSurfaceDataProxy *proxy = new QItemModelSurfaceDataProxy();
+ QSurface3DSeries *series = new QSurface3DSeries(proxy);
+ Q3DSurface *graph = new Q3DSurface();
+ graph->addSeries(series);
+
+ // X
+ QSurfaceDataArray *array = new QSurfaceDataArray();
+ array->reserve(size);
+ for (int i = 0; i < size; i++) {
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D((i == missingRow) ? std::numeric_limits<float>::quiet_NaN()
+ : static_cast<float>(i),
+ qSin(static_cast<float>(i)), static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+
+ // Y
+ for (int i = 0; i < size; i++) {
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D(static_cast<float>(i),
+ (i == missingRow) ? std::numeric_limits<float>::quiet_NaN()
+ : qSin(static_cast<float>(i)),
+ static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+
+ // Z
+ for (int i = 0; i < size; i++) {
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D(static_cast<float>(i),
+ qSin(static_cast<float>(i)),
+ (i == missingRow) ? std::numeric_limits<float>::quiet_NaN()
+ : static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+ delete graph;
+}
+
+void tst_proxy::dataContainingNaNFirstLastRow()
+{
+ if (!CpptestUtil::isOpenGLSupported())
+ QSKIP("OpenGL not supported on this platform");
+
+ const int size = 10;
+ const int rowFirst = 0;
+ const int rowLast = size - 1;
+ QItemModelSurfaceDataProxy *proxy = new QItemModelSurfaceDataProxy();
+ QSurface3DSeries *series = new QSurface3DSeries(proxy);
+ Q3DSurface *graph = new Q3DSurface();
+ graph->addSeries(series);
+
+ // X
+ QSurfaceDataArray *array = new QSurfaceDataArray();
+ array->reserve(size);
+ for (int i = 0; i < size; i++) {
+ bool missingRow = (i == rowFirst || i == rowLast);
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D(missingRow ? std::numeric_limits<float>::quiet_NaN()
+ : static_cast<float>(i),
+ qSin(static_cast<float>(i)), static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+
+ // Y
+ for (int i = 0; i < size; i++) {
+ bool missingRow = (i == rowFirst || i == rowLast);
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D(static_cast<float>(i),
+ missingRow ? std::numeric_limits<float>::quiet_NaN()
+ : qSin(static_cast<float>(i)),
+ static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+
+ // Z
+ for (int i = 0; i < size; i++) {
+ bool missingRow = (i == rowFirst || i == rowLast);
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D(static_cast<float>(i),
+ qSin(static_cast<float>(i)),
+ missingRow ? std::numeric_limits<float>::quiet_NaN()
+ : static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+ delete graph;
+}
+
+QTEST_MAIN(tst_proxy)
+#include "tst_proxy.moc"
diff --git a/tests/manual/directional/scatterdatamodifier.h b/tests/manual/directional/scatterdatamodifier.h
index 7ca463c3..3120b6f6 100644
--- a/tests/manual/directional/scatterdatamodifier.h
+++ b/tests/manual/directional/scatterdatamodifier.h
@@ -65,7 +65,7 @@ Q_SIGNALS:
void backgroundEnabledChanged(bool enabled);
void gridEnabledChanged(bool enabled);
void shadowQualityChanged(int quality);
- void fontChanged(QFont font);
+ void fontChanged(const QFont &font);
private:
Q3DScatter *m_graph;