aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-26 01:00:13 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-26 01:00:13 +0200
commit257319079562368b6ee731f54e3f69647c3417b7 (patch)
tree231137a8fecdf1405eedb631bc3008a630cf9e16 /src
parent7ecc96305f5ec0ed093e2e1b182cb85b71609bcd (diff)
parentaa3d088e3dbc6e93620310cf8de0782fbb2b2ee8 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Diffstat (limited to 'src')
-rw-r--r--src/qml/doc/images/cpp-qml-integration-flowchart.odgbin15028 -> 15311 bytes
-rw-r--r--src/qml/doc/images/cpp-qml-integration-flowchart.pngbin80498 -> 64865 bytes
-rw-r--r--src/qml/qml/qqmlscriptblob.cpp4
-rw-r--r--src/qml/qml/qqmltypedata.cpp8
-rw-r--r--src/qml/qml/qqmltypeloader.cpp9
-rw-r--r--src/qml/qml/qqmltypeloader_p.h4
-rw-r--r--src/quick/doc/src/examples.qdoc1
-rw-r--r--src/quick/items/qquickitem.cpp6
-rw-r--r--src/quick/scenegraph/qsgrhitextureglyphcache_p.h6
9 files changed, 17 insertions, 21 deletions
diff --git a/src/qml/doc/images/cpp-qml-integration-flowchart.odg b/src/qml/doc/images/cpp-qml-integration-flowchart.odg
index f24021635e..026f89fd73 100644
--- a/src/qml/doc/images/cpp-qml-integration-flowchart.odg
+++ b/src/qml/doc/images/cpp-qml-integration-flowchart.odg
Binary files differ
diff --git a/src/qml/doc/images/cpp-qml-integration-flowchart.png b/src/qml/doc/images/cpp-qml-integration-flowchart.png
index 3649ff9e41..97f075f51e 100644
--- a/src/qml/doc/images/cpp-qml-integration-flowchart.png
+++ b/src/qml/doc/images/cpp-qml-integration-flowchart.png
Binary files differ
diff --git a/src/qml/qml/qqmlscriptblob.cpp b/src/qml/qml/qqmlscriptblob.cpp
index 6ac30d3ab5..eb103dc434 100644
--- a/src/qml/qml/qqmlscriptblob.cpp
+++ b/src/qml/qml/qqmlscriptblob.cpp
@@ -68,7 +68,7 @@ QQmlRefPointer<QQmlScriptData> QQmlScriptBlob::scriptData() const
void QQmlScriptBlob::dataReceived(const SourceCodeData &data)
{
- if (!diskCacheDisabled() || diskCacheForced()) {
+ if (diskCacheEnabled()) {
QQmlRefPointer<QV4::ExecutableCompilationUnit> unit
= QV4::ExecutableCompilationUnit::create();
QString error;
@@ -132,7 +132,7 @@ void QQmlScriptBlob::dataReceived(const SourceCodeData &data)
auto executableUnit = QV4::ExecutableCompilationUnit::create(std::move(unit));
- if ((!diskCacheDisabled() || diskCacheForced()) && !isDebugging()) {
+ if (diskCacheEnabled()) {
QString errorString;
if (executableUnit->saveToDisk(url(), &errorString)) {
QString error;
diff --git a/src/qml/qml/qqmltypedata.cpp b/src/qml/qml/qqmltypedata.cpp
index fac96a2d02..22587c226a 100644
--- a/src/qml/qml/qqmltypedata.cpp
+++ b/src/qml/qml/qqmltypedata.cpp
@@ -112,10 +112,7 @@ QQmlMetaType::CompositeMetaTypeIds QQmlTypeData::typeIds() const
bool QQmlTypeData::tryLoadFromDiskCache()
{
- if (diskCacheDisabled() && !diskCacheForced())
- return false;
-
- if (isDebugging())
+ if (!diskCacheEnabled())
return false;
QV4::ExecutionEngine *v4 = typeLoader()->engine()->handle();
@@ -634,8 +631,7 @@ void QQmlTypeData::compile(const QQmlRefPointer<QQmlTypeNameCache> &typeNameCach
return;
}
- const bool trySaveToDisk = (!diskCacheDisabled() || diskCacheForced())
- && !m_document->jsModule.debugMode && !typeRecompilation;
+ const bool trySaveToDisk = diskCacheEnabled() && !typeRecompilation;
if (trySaveToDisk) {
QString errorString;
if (m_compiledData->saveToDisk(url(), &errorString)) {
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index 997490361c..c2870396b0 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -707,14 +707,9 @@ bool QQmlTypeLoader::Blob::isDebugging() const
return typeLoader()->engine()->handle()->debugger() != nullptr;
}
-bool QQmlTypeLoader::Blob::diskCacheDisabled()
+bool QQmlTypeLoader::Blob::diskCacheEnabled() const
{
- return disableDiskCache();
-}
-
-bool QQmlTypeLoader::Blob::diskCacheForced()
-{
- return forceDiskCache();
+ return (!disableDiskCache() || forceDiskCache()) && !isDebugging();
}
bool QQmlTypeLoader::Blob::qmldirDataAvailable(const QQmlRefPointer<QQmlQmldirData> &data, QList<QQmlError> *errors)
diff --git a/src/qml/qml/qqmltypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h
index d45f0e095c..adecf61896 100644
--- a/src/qml/qml/qqmltypeloader_p.h
+++ b/src/qml/qml/qqmltypeloader_p.h
@@ -129,9 +129,7 @@ public:
virtual QString stringAt(int) const { return QString(); }
bool isDebugging() const;
-
- static bool diskCacheDisabled();
- static bool diskCacheForced();
+ bool diskCacheEnabled() const;
QQmlImports m_importCache;
QVector<PendingImportPtr> m_unresolvedImports;
diff --git a/src/quick/doc/src/examples.qdoc b/src/quick/doc/src/examples.qdoc
index 8c31e13a2d..a913af47c1 100644
--- a/src/quick/doc/src/examples.qdoc
+++ b/src/quick/doc/src/examples.qdoc
@@ -176,6 +176,7 @@ Creator.
\li \l{Scene Graph - Metal Texture Import}{Metal Texture Import}
\li \l{Scene Graph - OpenGL Under QML}{OpenGL Under QML}
\li \l{Scene Graph - Direct3D 11 Under QML}{Direct3D 11 Under QML}
+ \li \l{Scene Graph - Vulkan Under QML}{Vulkan Under QML}
\li \l{Scene Graph - Custom Rendering with QSGRenderNode}{Render Node}
\li \l{Scene Graph - Painted Item}{Painted Item}
\li \l{Scene Graph - Graph}{Graph}
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 796ab6cdd7..c6a19219ff 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -8534,7 +8534,11 @@ void QQuickItemLayer::setSourceRect(const QRectF &sourceRect)
/*!
\qmlproperty bool QtQuick::Item::layer.smooth
- Holds whether the layer is smoothly transformed.
+ Holds whether the layer is smoothly transformed. When enabled, sampling the
+ layer's texture is performed using \c linear interpolation, while
+ non-smooth results in using the \c nearest filtering mode.
+
+ By default, this property is set to \c false.
\sa {Item Layers}
*/
diff --git a/src/quick/scenegraph/qsgrhitextureglyphcache_p.h b/src/quick/scenegraph/qsgrhitextureglyphcache_p.h
index a7374d91a4..49854a596e 100644
--- a/src/quick/scenegraph/qsgrhitextureglyphcache_p.h
+++ b/src/quick/scenegraph/qsgrhitextureglyphcache_p.h
@@ -75,8 +75,10 @@ public:
QRhiTexture *texture() const { return m_texture; }
void commitResourceUpdates(QRhiResourceUpdateBatch *mergeInto);
- int width() const { return m_size.width(); }
- int height() const { return m_size.height(); }
+ // Clamp the default -1 width and height to 0 for compatibility with
+ // QOpenGLTextureGlyphCache.
+ int width() const { return qMax(0, m_size.width()); }
+ int height() const { return qMax(0, m_size.height()); }
bool eightBitFormatIsAlphaSwizzled() const;