aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-10-22 21:21:39 +0200
committerLiang Qi <liang.qi@qt.io>2016-10-22 21:21:39 +0200
commit2ff13bdf697adff8574c5cea716627c78fb6b5b3 (patch)
treef4eac21b3b54f62d9f79714f40d5c9f4804dfc0c /src/quick/scenegraph
parent9d487cd6bf8ad75de19a4c05eb3d2641ce4a5289 (diff)
parente13eece273195a9f39d29712a233a8dd00ddf71b (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/coreapi/qsggeometry.h10
-rw-r--r--src/quick/scenegraph/qsgadaptationlayer.cpp2
2 files changed, 2 insertions, 10 deletions
diff --git a/src/quick/scenegraph/coreapi/qsggeometry.h b/src/quick/scenegraph/coreapi/qsggeometry.h
index 00acb51c8a..7a916610e3 100644
--- a/src/quick/scenegraph/coreapi/qsggeometry.h
+++ b/src/quick/scenegraph/coreapi/qsggeometry.h
@@ -88,15 +88,7 @@ public:
UnsignedShortType = 0x1403,
IntType = 0x1404,
UnsignedIntType = 0x1405,
- FloatType = 0x1406,
-
- TypeByte = ByteType,
- TypeUnsignedByte = UnsignedByteType,
- TypeShort = ShortType,
- TypeUnsignedShort = UnsignedShortType,
- TypeInt = IntType,
- TypeUnsignedInt = UnsignedIntType,
- TypeFloat = FloatType
+ FloatType = 0x1406
};
struct Q_QUICK_EXPORT Attribute
diff --git a/src/quick/scenegraph/qsgadaptationlayer.cpp b/src/quick/scenegraph/qsgadaptationlayer.cpp
index e219ddd82e..9923fa6e24 100644
--- a/src/quick/scenegraph/qsgadaptationlayer.cpp
+++ b/src/quick/scenegraph/qsgadaptationlayer.cpp
@@ -122,7 +122,7 @@ void QSGDistanceFieldGlyphCache::populate(const QVector<glyph_t> &glyphs)
int count = glyphs.count();
for (int i = 0; i < count; ++i) {
glyph_t glyphIndex = glyphs.at(i);
- if ((int) glyphIndex >= glyphCount()) {
+ if ((int) glyphIndex >= glyphCount() && glyphCount() > 0) {
qWarning("Warning: distance-field glyph is not available with index %d", glyphIndex);
continue;
}