summaryrefslogtreecommitdiffstats
path: root/src/extras/defaults
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-08-31 03:00:17 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-08-31 03:00:17 +0200
commita95a5e31dc9397dcf34a8391cdad66c3e1b332db (patch)
tree399de9cf0f2ac8fde8d7af79a5900efbb7a05bba /src/extras/defaults
parentdcd99cbfd756276194ab462df4b9e26b932097b6 (diff)
parenta802fd74e010a6d8ebfc2243232e0373d67f3df6 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'src/extras/defaults')
-rw-r--r--src/extras/defaults/qmetalroughmaterial.cpp6
-rw-r--r--src/extras/defaults/qskyboxentity.cpp2
-rw-r--r--src/extras/defaults/qspritegrid.cpp6
-rw-r--r--src/extras/defaults/qspritegrid_p.h2
-rw-r--r--src/extras/defaults/qspritesheet.cpp4
5 files changed, 10 insertions, 10 deletions
diff --git a/src/extras/defaults/qmetalroughmaterial.cpp b/src/extras/defaults/qmetalroughmaterial.cpp
index 572bfecfd..a969593db 100644
--- a/src/extras/defaults/qmetalroughmaterial.cpp
+++ b/src/extras/defaults/qmetalroughmaterial.cpp
@@ -212,7 +212,7 @@ QMetalRoughMaterial::~QMetalRoughMaterial()
color value or a texture. By default the value of this property is "grey".
*/
/*!
- \qmlproperty color Qt3D.Extras::MetalRoughMaterial::baseColor
+ \qmlproperty variant Qt3D.Extras::MetalRoughMaterial::baseColor
Holds the current base color of the material. This can be either a plain
color value or a texture. By default the value of this property is "grey".
@@ -232,7 +232,7 @@ QVariant QMetalRoughMaterial::baseColor() const
property is 0.
*/
/*!
- \qmlproperty real Qt3D.Extras::MetalRoughMaterial::metalness
+ \qmlproperty variant Qt3D.Extras::MetalRoughMaterial::metalness
Holds the current metalness level of the material, as a value between
0 (purely dielectric, the default) and 1 (purely metallic). This can be
@@ -253,7 +253,7 @@ QVariant QMetalRoughMaterial::metalness() const
0.
*/
/*!
- \qmlproperty real Qt3D.Extras::MetalRoughMaterial::roughness
+ \qmlproperty variant Qt3D.Extras::MetalRoughMaterial::roughness
Holds the current roughness level of the material. This can be either a
plain uniform value or a texture. By default the value of this property is
diff --git a/src/extras/defaults/qskyboxentity.cpp b/src/extras/defaults/qskyboxentity.cpp
index e82a30950..8d01e8d82 100644
--- a/src/extras/defaults/qskyboxentity.cpp
+++ b/src/extras/defaults/qskyboxentity.cpp
@@ -240,7 +240,7 @@ void QSkyboxEntityPrivate::reloadTexture()
/*!
* \qmltype SkyboxEntity
* \instantiates Qt3DExtras::QSkyboxEntity
- \inqmlmodule Qt3D.Extras
+ * \inqmlmodule Qt3D.Extras
*
* \brief SkyboxEntity is a convenience Entity subclass that can be used to
* insert a skybox in a 3D scene.
diff --git a/src/extras/defaults/qspritegrid.cpp b/src/extras/defaults/qspritegrid.cpp
index 31d4dd5c0..15016a891 100644
--- a/src/extras/defaults/qspritegrid.cpp
+++ b/src/extras/defaults/qspritegrid.cpp
@@ -57,7 +57,7 @@ QSpriteGridPrivate::QSpriteGridPrivate()
int QSpriteGridPrivate::maxIndex() const
{
- return m_numColumns * m_numRows;
+ return m_numColumns * m_numRows - 1;
}
void QSpriteGridPrivate::updateSizes()
@@ -65,10 +65,10 @@ void QSpriteGridPrivate::updateSizes()
Q_Q(QSpriteGrid);
if (m_texture && m_numColumns && m_numRows) {
m_textureSize = QSize(m_texture->width(), m_texture->height());
- m_cellSize = QSize(m_texture->width() / m_numColumns, m_texture->height() / m_numRows);
+ m_cellSize = QSizeF((float) m_texture->width() / m_numColumns, (float) m_texture->height() / m_numRows);
} else {
m_textureSize = QSize();
- m_cellSize = QSize();
+ m_cellSize = QSizeF();
}
if (m_cellSize.isEmpty() || m_numColumns == 0 || m_numRows == 0) {
diff --git a/src/extras/defaults/qspritegrid_p.h b/src/extras/defaults/qspritegrid_p.h
index 6135ebf0d..8d05b2bcc 100644
--- a/src/extras/defaults/qspritegrid_p.h
+++ b/src/extras/defaults/qspritegrid_p.h
@@ -69,7 +69,7 @@ class QSpriteGridPrivate : public QAbstractSpriteSheetPrivate
int m_numColumns;
int m_numRows;
- QSize m_cellSize;
+ QSizeF m_cellSize;
Q_DECLARE_PUBLIC(QSpriteGrid)
};
diff --git a/src/extras/defaults/qspritesheet.cpp b/src/extras/defaults/qspritesheet.cpp
index 87f664ce4..8eb1e33e6 100644
--- a/src/extras/defaults/qspritesheet.cpp
+++ b/src/extras/defaults/qspritesheet.cpp
@@ -56,7 +56,7 @@ QSpriteSheetPrivate::QSpriteSheetPrivate()
int QSpriteSheetPrivate::maxIndex() const
{
- return m_sprites.count();
+ return m_sprites.count() - 1;
}
void QSpriteSheetPrivate::updateSizes()
@@ -77,7 +77,7 @@ void QSpriteSheetPrivate::updateSizes()
return;
}
- if (m_currentIndex < 0 || m_currentIndex > m_sprites.size()) {
+ if (m_currentIndex < 0 || m_currentIndex >= m_sprites.size()) {
m_currentIndex = 0;
emit q->currentIndexChanged(m_currentIndex);
}