aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-07-28 21:32:56 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-07-28 21:33:17 +0200
commit182983943b76bc0e40ff7693853ef2262323fa80 (patch)
tree4e542c3f2906e348da045375c3a3a85fc1d0d73c /src
parent8ced0f0f9954f857265fd18080da95427069135d (diff)
parent80e03bbd9a42401d50af450aff5351c3a0c95444 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/masm/wtf/Assertions.h2
-rw-r--r--src/qml/doc/snippets/code/src_script_qjsengine.cpp13
-rw-r--r--src/qml/doc/src/cppintegration/data.qdoc2
-rw-r--r--src/qml/doc/src/cppintegration/definetypes.qdoc4
-rw-r--r--src/qml/doc/src/cppintegration/exposecppattributes.qdoc1
-rw-r--r--src/qml/doc/src/qmlfunctions.qdoc2
-rw-r--r--src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc3
-rw-r--r--src/qml/jsapi/qjsengine.cpp7
-rw-r--r--src/qml/qml/qqmlbinding.cpp7
-rw-r--r--src/qml/qml/qqmlextensioninterface.h3
-rw-r--r--src/qml/qml/qqmlimport.cpp4
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp4
-rw-r--r--src/qml/qml/qqmljavascriptexpression_p.h2
-rw-r--r--src/qml/qml/qqmlnotifier.cpp9
-rw-r--r--src/qml/qml/qqmlnotifier_p.h10
-rw-r--r--src/qml/types/qqmllistmodel.cpp10
-rw-r--r--src/quick/items/qquickframebufferobject.cpp16
-rw-r--r--src/quick/items/qquicklistview.cpp62
-rw-r--r--src/quick/items/qquickloader.cpp1
-rw-r--r--src/quick/items/qquicktextinput.cpp4
-rw-r--r--src/quick/items/qquickwindow.cpp2
-rw-r--r--src/quick/items/qquickwindowattached_p.h3
-rw-r--r--src/quick/items/qquickwindowmodule.cpp2
-rw-r--r--src/quick/items/qquickwindowmodule_p.h5
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp4
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.cpp1
-rw-r--r--src/quick/scenegraph/qsgdefaultrendercontext.cpp5
-rw-r--r--src/quick/scenegraph/util/qsgatlastexture.cpp7
-rw-r--r--src/quick/scenegraph/util/qsgatlastexture_p.h2
29 files changed, 138 insertions, 59 deletions
diff --git a/src/3rdparty/masm/wtf/Assertions.h b/src/3rdparty/masm/wtf/Assertions.h
index af65f5325c..491e434498 100644
--- a/src/3rdparty/masm/wtf/Assertions.h
+++ b/src/3rdparty/masm/wtf/Assertions.h
@@ -167,7 +167,7 @@ WTF_EXPORT_PRIVATE void WTFInstallReportBacktraceOnCrashHook();
Signals are ignored by the crash reporter on OS X so we must do better.
*/
#ifndef CRASH
-#if COMPILER(CLANG)
+#if COMPILER(CLANG) || COMPILER(GCC)
#define CRASH() \
(WTFReportBacktrace(), \
WTFInvokeCrashHook(), \
diff --git a/src/qml/doc/snippets/code/src_script_qjsengine.cpp b/src/qml/doc/snippets/code/src_script_qjsengine.cpp
index c9bd7dfcd9..0305574d34 100644
--- a/src/qml/doc/snippets/code/src_script_qjsengine.cpp
+++ b/src/qml/doc/snippets/code/src_script_qjsengine.cpp
@@ -91,3 +91,16 @@ myEngine.evaluate("button.checkable = true");
qDebug() << scriptButton.property("checkable").toBool();
scriptButton.property("show").call(); // call the show() slot
//! [5]
+
+
+//! [6]
+QJSEngine engine;
+
+QObject *myQObject = new QObject();
+myQObject->setProperty("dynamicProperty", 3);
+
+QJSValue myScriptQObject = engine.newQObject(myQObject);
+engine.globalObject().setProperty("myObject", myScriptQObject);
+
+qDebug() << engine.evaluate("myObject.dynamicProperty").toInt();
+//! [6]
diff --git a/src/qml/doc/src/cppintegration/data.qdoc b/src/qml/doc/src/cppintegration/data.qdoc
index 9cc7291583..c3d073872a 100644
--- a/src/qml/doc/src/cppintegration/data.qdoc
+++ b/src/qml/doc/src/cppintegration/data.qdoc
@@ -370,7 +370,7 @@ properties:
private:
QString m_name;
- }
+ };
Q_DECLARE_METATYPE(Actor)
\endcode
diff --git a/src/qml/doc/src/cppintegration/definetypes.qdoc b/src/qml/doc/src/cppintegration/definetypes.qdoc
index 32084bd308..1ce00c6ad0 100644
--- a/src/qml/doc/src/cppintegration/definetypes.qdoc
+++ b/src/qml/doc/src/cppintegration/definetypes.qdoc
@@ -346,8 +346,8 @@ demonstrates a usage of extension objects.
\section1 Defining QML-Specific Types and Attributes
-
-\section2 Providing Attached Objects for Data Annotations
+\section2 Providing Attached Properties
+\keyword Integrating QML and C++ - Attached Properties
In the QML language syntax, there is a notion of \l{Attached properties and
attached signal handlers}{\e {attached properties} and \e {attached signal
diff --git a/src/qml/doc/src/cppintegration/exposecppattributes.qdoc b/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
index c4c58c2821..2121c1f291 100644
--- a/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
+++ b/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
@@ -301,6 +301,7 @@ Note that the template class type for the QQmlListProperty — in this case,
\section2 Grouped Properties
+\keyword Integrating QML and C++ - Grouped Properties
Any read-only object-type property is accessible from QML code as a
\e {grouped property}. This can be used to expose a group of related
diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc
index 834684fe6d..e73f1cb59c 100644
--- a/src/qml/doc/src/qmlfunctions.qdoc
+++ b/src/qml/doc/src/qmlfunctions.qdoc
@@ -354,7 +354,7 @@
Returns 0 if type \e T is not a valid attaching type, or if \a create is false and no
attachment object instance has previously been created for \a attachee.
- \sa {Providing Attached Objects for Data Annotations}
+ \sa {Providing Attached Properties}
*/
diff --git a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
index befe575fe1..0f08cec844 100644
--- a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
+++ b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
@@ -857,8 +857,7 @@ are otherwise unavailable to the object. In particular, they allow objects to
access properties or signals that are specifically relevant to the individual
object.
-A QML type implementation may choose to \l {Providing Attached Objects for
-Data Annotations}{create an \e {attaching type} in C++} with
+A QML type implementation may choose to \l {Providing Attached Properties}{create an \e {attaching type} in C++} with
particular properties and signals. Instances of this type can then be created
and \e attached to specific objects at run time, allowing those objects to
access the properties and signals of the attaching type. These are accessed by
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index e4c150057a..c678f8037a 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -175,9 +175,14 @@ Q_DECLARE_METATYPE(QList<int>)
called from the script to create a new QObject instance with
JavaScriptOwnership.
+ \snippet code/src_script_qjsengine.cpp 5
+ \section2 Dynamic QObject Properties
- \snippet code/src_script_qjsengine.cpp 5
+ Dynamic QObject properties are not supported. For example, the following code
+ will not work:
+
+ \snippet code/src_script_qjsengine.cpp 6
\section1 Extensions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp
index 0ccb4e8e4e..84f30af066 100644
--- a/src/qml/qml/qqmlbinding.cpp
+++ b/src/qml/qml/qqmlbinding.cpp
@@ -559,7 +559,12 @@ void QQmlBinding::getPropertyData(QQmlPropertyData **propertyData, QQmlPropertyD
Q_ASSERT(propertyData);
QQmlData *data = QQmlData::get(*m_target, false);
- Q_ASSERT(data && data->propertyCache);
+ Q_ASSERT(data);
+
+ if (Q_UNLIKELY(!data->propertyCache)) {
+ data->propertyCache = QQmlEnginePrivate::get(context()->engine)->cache(m_target->metaObject());
+ data->propertyCache->addref();
+ }
*propertyData = data->propertyCache->property(m_targetIndex.coreIndex());
Q_ASSERT(*propertyData);
diff --git a/src/qml/qml/qqmlextensioninterface.h b/src/qml/qml/qqmlextensioninterface.h
index ef56d5e312..62b9b26569 100644
--- a/src/qml/qml/qqmlextensioninterface.h
+++ b/src/qml/qml/qqmlextensioninterface.h
@@ -66,7 +66,10 @@ public:
Q_DECLARE_INTERFACE(QQmlTypesExtensionInterface, "org.qt-project.Qt.QQmlTypesExtensionInterface/1.0")
+// NOTE: When changing this to a new version and deciding to add backup code to
+// continue to support the previous version, make sure to support both of these iids.
#define QQmlExtensionInterface_iid "org.qt-project.Qt.QQmlExtensionInterface/1.0"
+#define QQmlExtensionInterface_iid_old "org.qt-project.Qt.QQmlExtensionInterface"
Q_DECLARE_INTERFACE(QQmlExtensionInterface, QQmlExtensionInterface_iid)
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index d2a7970a84..fc8e60e3f2 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -971,8 +971,8 @@ static QVector<QStaticPlugin> makePlugins()
// the list the first time called to only contain QML plugins:
const auto staticPlugins = QPluginLoader::staticPlugins();
for (const QStaticPlugin &plugin : staticPlugins) {
- if (plugin.metaData().value(QLatin1String("IID")).toString()
- == QLatin1String(QQmlExtensionInterface_iid)) {
+ const QString iid = plugin.metaData().value(QLatin1String("IID")).toString();
+ if (iid == QLatin1String(QQmlExtensionInterface_iid) || iid == QLatin1String(QQmlExtensionInterface_iid_old)) {
plugins.append(plugin);
}
}
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp
index 214cfff6b2..31c277d283 100644
--- a/src/qml/qml/qqmljavascriptexpression.cpp
+++ b/src/qml/qml/qqmljavascriptexpression.cpp
@@ -283,7 +283,7 @@ void QQmlPropertyCapture::captureProperty(QQmlNotifier *n, Duration duration)
\a n is in the signal index range (see QObjectPrivate::signalIndex()).
*/
-void QQmlPropertyCapture::captureProperty(QObject *o, int c, int n, Duration duration)
+void QQmlPropertyCapture::captureProperty(QObject *o, int c, int n, Duration duration, bool doNotify)
{
if (watcher->wasDeleted())
return;
@@ -319,7 +319,7 @@ void QQmlPropertyCapture::captureProperty(QObject *o, int c, int n, Duration dur
Q_ASSERT(g->isConnected(o, n));
} else {
g = QQmlJavaScriptExpressionGuard::New(expression, engine);
- g->connect(o, n, engine);
+ g->connect(o, n, engine, doNotify);
}
if (duration == Permanently)
diff --git a/src/qml/qml/qqmljavascriptexpression_p.h b/src/qml/qml/qqmljavascriptexpression_p.h
index b540959331..8b4b64f4d2 100644
--- a/src/qml/qml/qqmljavascriptexpression_p.h
+++ b/src/qml/qml/qqmljavascriptexpression_p.h
@@ -206,7 +206,7 @@ public:
static void registerQmlDependencies(const QV4::CompiledData::Function *compiledFunction, const QV4::Scope &scope);
void captureProperty(QQmlNotifier *, Duration duration = OnlyOnce);
- void captureProperty(QObject *, int, int, Duration duration = OnlyOnce);
+ void captureProperty(QObject *, int, int, Duration duration = OnlyOnce, bool doNotify = true);
QQmlEngine *engine;
QQmlJavaScriptExpression *expression;
diff --git a/src/qml/qml/qqmlnotifier.cpp b/src/qml/qml/qqmlnotifier.cpp
index 538ca822ee..938e2b77e2 100644
--- a/src/qml/qml/qqmlnotifier.cpp
+++ b/src/qml/qml/qqmlnotifier.cpp
@@ -117,7 +117,7 @@ void QQmlNotifier::emitNotify(QQmlNotifierEndpoint *endpoint, void **a)
\a sourceSignal MUST be in the signal index range (see QObjectPrivate::signalIndex()).
This is different from QMetaMethod::methodIndex().
*/
-void QQmlNotifierEndpoint::connect(QObject *source, int sourceSignal, QQmlEngine *engine)
+void QQmlNotifierEndpoint::connect(QObject *source, int sourceSignal, QQmlEngine *engine, bool doNotify)
{
disconnect();
@@ -142,8 +142,11 @@ void QQmlNotifierEndpoint::connect(QObject *source, int sourceSignal, QQmlEngine
QQmlPropertyPrivate::flushSignal(source, sourceSignal);
QQmlData *ddata = QQmlData::get(source, true);
ddata->addNotify(sourceSignal, this);
- QObjectPrivate * const priv = QObjectPrivate::get(source);
- priv->connectNotify(QMetaObjectPrivate::signal(source->metaObject(), sourceSignal));
+ if (doNotify) {
+ needsConnectNotify = doNotify;
+ QObjectPrivate * const priv = QObjectPrivate::get(source);
+ priv->connectNotify(QMetaObjectPrivate::signal(source->metaObject(), sourceSignal));
+ }
}
QT_END_NAMESPACE
diff --git a/src/qml/qml/qqmlnotifier_p.h b/src/qml/qml/qqmlnotifier_p.h
index dad79e0e55..6e91369793 100644
--- a/src/qml/qml/qqmlnotifier_p.h
+++ b/src/qml/qml/qqmlnotifier_p.h
@@ -100,7 +100,7 @@ public:
inline bool isConnected(QObject *source, int sourceSignal) const;
inline bool isConnected(QQmlNotifier *) const;
- void connect(QObject *source, int sourceSignal, QQmlEngine *engine);
+ void connect(QObject *source, int sourceSignal, QQmlEngine *engine, bool doNotify = true);
inline void connect(QQmlNotifier *);
inline void disconnect();
@@ -121,9 +121,10 @@ private:
inline QQmlNotifier *senderAsNotifier() const;
Callback callback:4;
+ int needsConnectNotify:1;
// The index is in the range returned by QObjectPrivate::signalIndex().
// This is different from QMetaMethod::methodIndex().
- signed int sourceSignal:28;
+ signed int sourceSignal:27;
};
QQmlNotifier::QQmlNotifier()
@@ -155,7 +156,7 @@ void QQmlNotifier::notify()
}
QQmlNotifierEndpoint::QQmlNotifierEndpoint(Callback callback)
-: next(0), prev(0), senderPtr(0), callback(callback), sourceSignal(-1)
+: next(0), prev(0), senderPtr(0), callback(callback), needsConnectNotify(false), sourceSignal(-1)
{
}
@@ -205,7 +206,8 @@ void QQmlNotifierEndpoint::disconnect()
if (sourceSignal != -1) {
QObject * const obj = senderAsObject();
QObjectPrivate * const priv = QObjectPrivate::get(obj);
- priv->disconnectNotify(QMetaObjectPrivate::signal(obj->metaObject(), sourceSignal));
+ if (needsConnectNotify)
+ priv->disconnectNotify(QMetaObjectPrivate::signal(obj->metaObject(), sourceSignal));
}
if (isNotifying()) *((qintptr *)(senderPtr & ~0x1)) = 0;
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp
index 517411fa47..20000557ee 100644
--- a/src/qml/types/qqmllistmodel.cpp
+++ b/src/qml/types/qqmllistmodel.cpp
@@ -1367,13 +1367,9 @@ ReturnedValue ModelObject::get(const Managed *m, String *name, bool *hasProperty
if (QQmlEngine *qmlEngine = that->engine()->qmlEngine()) {
QQmlEnginePrivate *ep = QQmlEnginePrivate::get(qmlEngine);
- if (ep && ep->propertyCapture) {
- QObjectPrivate *op = QObjectPrivate::get(that->object());
- // Temporarily hide the dynamic meta-object, to prevent it from being created when the capture
- // triggers a QObject::connectNotify() by calling obj->metaObject().
- QScopedValueRollback<QDynamicMetaObjectData*> metaObjectBlocker(op->metaObject, 0);
- ep->propertyCapture->captureProperty(that->object(), -1, role->index);
- }
+ if (ep && ep->propertyCapture)
+ ep->propertyCapture->captureProperty(that->object(), -1, role->index,
+ QQmlPropertyCapture::OnlyOnce, false);
}
const int elementIndex = that->d()->m_elementIndex;
diff --git a/src/quick/items/qquickframebufferobject.cpp b/src/quick/items/qquickframebufferobject.cpp
index 52b19d994c..042ee21aec 100644
--- a/src/quick/items/qquickframebufferobject.cpp
+++ b/src/quick/items/qquickframebufferobject.cpp
@@ -260,7 +260,7 @@ public:
bool renderPending;
bool invalidatePending;
- int devicePixelRatio;
+ qreal devicePixelRatio;
};
static inline bool isOpenGL(QSGRenderContext *rc)
@@ -312,14 +312,12 @@ QSGNode *QQuickFramebufferObject::updatePaintNode(QSGNode *node, UpdatePaintNode
n->devicePixelRatio = window()->effectiveDevicePixelRatio();
desiredFboSize *= n->devicePixelRatio;
- if (n->fbo && (d->followsItemSize || n->invalidatePending)) {
- if (n->fbo->size() != desiredFboSize) {
- delete n->fbo;
- n->fbo = 0;
- delete n->msDisplayFbo;
- n->msDisplayFbo = 0;
- n->invalidatePending = false;
- }
+ if (n->fbo && ((d->followsItemSize && n->fbo->size() != desiredFboSize) || n->invalidatePending)) {
+ delete n->fbo;
+ n->fbo = 0;
+ delete n->msDisplayFbo;
+ n->msDisplayFbo = 0;
+ n->invalidatePending = false;
}
if (!n->fbo) {
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp
index 18f9b8512d..979a3557a1 100644
--- a/src/quick/items/qquicklistview.cpp
+++ b/src/quick/items/qquicklistview.cpp
@@ -1835,6 +1835,38 @@ bool QQuickListViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte
\snippet qml/listview/listview.qml flickBothDirections
+ \section1 Stacking Order in ListView
+
+ The \l {QQuickItem::z}{Z value} of items determines whether they are
+ rendered above or below other items. ListView uses several different
+ default Z values, depending on what type of item is being created:
+
+ \table
+ \header
+ \li Property
+ \li Default Z value
+ \row
+ \li \l delegate
+ \li 1
+ \row
+ \li \l footer
+ \li 1
+ \row
+ \li \l header
+ \li 1
+ \row
+ \li \l highlight
+ \li 0
+ \row
+ \li \l section.delegate
+ \li 2
+ \endtable
+
+ These default values are set if the Z value of the item is \c 0, so setting
+ the Z value of these items to \c 0 has no effect. Note that the Z value is
+ of type \l [QML] {real}, so it is possible to set fractional
+ values like \c 0.1.
+
\sa {QML Data Models}, GridView, PathView, {Qt Quick Examples - Views}
*/
QQuickListView::QQuickListView(QQuickItem *parent)
@@ -1963,6 +1995,8 @@ QQuickListView::~QQuickListView()
\note Delegates are instantiated as needed and may be destroyed at any time.
They are parented to ListView's \l {Flickable::contentItem}{contentItem}, not to the view itself.
State should \e never be stored in a delegate.
+
+ \sa {Stacking Order in ListView}
*/
/*!
\qmlproperty int QtQuick::ListView::currentIndex
@@ -1990,7 +2024,7 @@ QQuickListView::~QQuickListView()
The default \l {QQuickItem::z}{stacking order}
of the highlight item is \c 0.
- \sa highlight, highlightFollowsCurrentItem
+ \sa highlight, highlightFollowsCurrentItem, {Stacking Order in ListView}
*/
/*!
@@ -2009,7 +2043,8 @@ QQuickListView::~QQuickListView()
highlight item is \c 0.
\sa highlightItem, highlightFollowsCurrentItem,
- {Qt Quick Examples - Views#Highlight}{ListView highlight example}
+ {Qt Quick Examples - Views#Highlight}{ListView highlight example},
+ {Stacking Order in ListView}
*/
/*!
@@ -2352,7 +2387,8 @@ void QQuickListView::setOrientation(QQuickListView::Orientation orientation)
differing sections will result in a section header being created
even if that section exists elsewhere.
- \sa {Qt Quick Examples - Views}{ListView examples}
+ \sa {Qt Quick Examples - Views}{ListView examples},
+ {Stacking Order in ListView}
*/
QQuickViewSection *QQuickListView::sectionCriteria()
{
@@ -2503,7 +2539,7 @@ void QQuickListView::setSnapMode(SnapMode mode)
footer is positioned at the end of the view, after any items. The
default \l {QQuickItem::z}{stacking order} of the footer is \c 1.
- \sa header, footerItem
+ \sa header, footerItem, {Stacking Order in ListView}
*/
@@ -2515,7 +2551,7 @@ void QQuickListView::setSnapMode(SnapMode mode)
header is positioned at the beginning of the view, before any items.
The default \l {QQuickItem::z}{stacking order} of the header is \c 1.
- \sa footer, headerItem
+ \sa footer, headerItem, {Stacking Order in ListView}
*/
/*!
@@ -2526,7 +2562,7 @@ void QQuickListView::setSnapMode(SnapMode mode)
header is positioned at the beginning of the view, before any items.
The default \l {QQuickItem::z}{stacking order} of the header is \c 1.
- \sa header, footerItem
+ \sa header, footerItem, {Stacking Order in ListView}
*/
/*!
@@ -2537,7 +2573,7 @@ void QQuickListView::setSnapMode(SnapMode mode)
footer is positioned at the end of the view, after any items. The
default \l {QQuickItem::z}{stacking order} of the footer is \c 1.
- \sa footer, headerItem
+ \sa footer, headerItem, {Stacking Order in ListView}
*/
/*!
@@ -2555,6 +2591,12 @@ void QQuickListView::setSnapMode(SnapMode mode)
The header can be pushed away by moving the content forwards, and pulled back by
moving the content backwards.
\endlist
+
+ \note This property has no effect on the \l {QQuickItem::z}{stacking order}
+ of the header. For example, if the header should be shown above the
+ \l delegate items when using \c ListView.OverlayHeader, its Z value
+ should be set to a value higher than that of the delegates. For more
+ information, see \l {Stacking Order in ListView}.
*/
QQuickListView::HeaderPositioning QQuickListView::headerPositioning() const
{
@@ -2592,6 +2634,12 @@ void QQuickListView::setHeaderPositioning(QQuickListView::HeaderPositioning posi
The footer can be pushed away by moving the content backwards, and pulled back by
moving the content forwards.
\endlist
+
+ \note This property has no effect on the \l {QQuickItem::z}{stacking order}
+ of the footer. For example, if the footer should be shown above the
+ \l delegate items when using \c ListView.OverlayFooter, its Z value
+ should be set to a value higher than that of the delegates. For more
+ information, see \l {Stacking Order in ListView}.
*/
QQuickListView::FooterPositioning QQuickListView::footerPositioning() const
{
diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp
index 5d5934bbd2..2c8f854d4d 100644
--- a/src/quick/items/qquickloader.cpp
+++ b/src/quick/items/qquickloader.cpp
@@ -270,6 +270,7 @@ qreal QQuickLoaderPrivate::getImplicitHeight() const
In some cases you may wish to use a Loader within a view delegate to improve delegate
loading performance. This works well in most cases, but there is one important issue to
+ be aware of related to the \l{QtQml::Component#Creation Context}{creation context} of a Component.
In the following example, the \c index context property inserted by the ListView into \c delegateComponent's
context will be inaccessible to Text, as the Loader will use the creation context of \c myComponent as the parent
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index 49f574156a..318a2fd9a3 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -3420,10 +3420,10 @@ void QQuickTextInputPrivate::processInputMethodEvent(QInputMethodEvent *event)
if (!event->commitString().isEmpty()) {
internalInsert(event->commitString());
cursorPositionChanged = true;
+ } else {
+ m_cursor = qBound(0, c, m_text.length());
}
- m_cursor = qBound(0, c, m_text.length());
-
for (int i = 0; i < event->attributes().size(); ++i) {
const QInputMethodEvent::Attribute &a = event->attributes().at(i);
if (a.type == QInputMethodEvent::Selection) {
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 7ea593fe76..ce1016579c 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -4094,6 +4094,8 @@ void QQuickWindow::resetOpenGLState()
The flags which you read from this property might differ from the ones
that you set if the requested flags could not be fulfilled.
+
+ \sa Qt::WindowFlags
*/
/*!
diff --git a/src/quick/items/qquickwindowattached_p.h b/src/quick/items/qquickwindowattached_p.h
index 3212508fd8..191f22137c 100644
--- a/src/quick/items/qquickwindowattached_p.h
+++ b/src/quick/items/qquickwindowattached_p.h
@@ -51,6 +51,7 @@
// We mean it.
//
+#include <private/qtquickglobal_p.h>
#include <qqml.h>
#include <QWindow>
@@ -59,7 +60,7 @@ QT_BEGIN_NAMESPACE
class QQuickItem;
class QQuickWindow;
-class Q_AUTOTEST_EXPORT QQuickWindowAttached : public QObject
+class Q_QUICK_PRIVATE_EXPORT QQuickWindowAttached : public QObject
{
Q_OBJECT
diff --git a/src/quick/items/qquickwindowmodule.cpp b/src/quick/items/qquickwindowmodule.cpp
index a7f45534c4..45e3f0004d 100644
--- a/src/quick/items/qquickwindowmodule.cpp
+++ b/src/quick/items/qquickwindowmodule.cpp
@@ -205,6 +205,4 @@ void QQuickWindowModule::defineModule()
QT_END_NAMESPACE
-QML_DECLARE_TYPEINFO(QQuickWindowQmlImpl, QML_HAS_ATTACHED_PROPERTIES)
-
#include "moc_qquickwindowmodule_p.cpp"
diff --git a/src/quick/items/qquickwindowmodule_p.h b/src/quick/items/qquickwindowmodule_p.h
index 16130bc8a0..869d5b9a8e 100644
--- a/src/quick/items/qquickwindowmodule_p.h
+++ b/src/quick/items/qquickwindowmodule_p.h
@@ -54,10 +54,10 @@
#include <private/qtquickglobal_p.h>
#include <qquickwindow.h>
#include <qqmlparserstatus.h>
+#include <private/qquickwindowattached_p.h>
QT_BEGIN_NAMESPACE
-class QQuickWindowAttached;
class QQuickWindowQmlImplPrivate;
class Q_QUICK_PRIVATE_EXPORT QQuickWindowQmlImpl : public QQuickWindow, public QQmlParserStatus
@@ -105,4 +105,7 @@ public:
QT_END_NAMESPACE
+QML_DECLARE_TYPE(QQuickWindowQmlImpl)
+QML_DECLARE_TYPEINFO(QQuickWindowQmlImpl, QML_HAS_ATTACHED_PROPERTIES)
+
#endif
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp
index 4937565aa9..666f1d0616 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp
@@ -83,7 +83,7 @@ void QSGSoftwareRenderableNodeUpdater::endVisit(QSGTransformNode *)
bool QSGSoftwareRenderableNodeUpdater::visit(QSGClipNode *node)
{
// Make sure to translate the clip rect into world coordinates
- if (m_clipState.count() == 1) {
+ if (m_clipState.count() == 0 || m_clipState.top().isNull()) {
m_clipState.push(m_transformState.top().map(QRegion(node->clipRect().toRect())));
m_hasClip = true;
} else {
@@ -97,7 +97,7 @@ bool QSGSoftwareRenderableNodeUpdater::visit(QSGClipNode *node)
void QSGSoftwareRenderableNodeUpdater::endVisit(QSGClipNode *)
{
m_clipState.pop();
- if (m_clipState.count() == 1)
+ if (m_clipState.count() == 0 || m_clipState.top().isNull())
m_hasClip = false;
}
diff --git a/src/quick/scenegraph/coreapi/qsgnode.cpp b/src/quick/scenegraph/coreapi/qsgnode.cpp
index e400928d4e..264b30b897 100644
--- a/src/quick/scenegraph/coreapi/qsgnode.cpp
+++ b/src/quick/scenegraph/coreapi/qsgnode.cpp
@@ -1582,6 +1582,7 @@ QDebug operator<<(QDebug d, const QSGRootNode *n)
d << "RootNode(null)";
return d;
}
+ QDebugStateSaver saver(d);
d << "RootNode" << hex << (const void *) n << (n->isSubtreeBlocked() ? "*BLOCKED*" : "");
#ifdef QSG_RUNTIME_DESCRIPTION
d << QSGNodePrivate::description(n);
diff --git a/src/quick/scenegraph/qsgdefaultrendercontext.cpp b/src/quick/scenegraph/qsgdefaultrendercontext.cpp
index 34bb554db6..95f3555994 100644
--- a/src/quick/scenegraph/qsgdefaultrendercontext.cpp
+++ b/src/quick/scenegraph/qsgdefaultrendercontext.cpp
@@ -308,9 +308,6 @@ QSGDefaultRenderContext *QSGDefaultRenderContext::from(QOpenGLContext *context)
return qobject_cast<QSGDefaultRenderContext *>(context->property(QSG_RENDERCONTEXT_PROPERTY).value<QObject *>());
}
-QT_END_NAMESPACE
-
-
QSGDistanceFieldGlyphCache *QSGDefaultRenderContext::distanceFieldGlyphCache(const QRawFont &font)
{
QString key = fontKey(font);
@@ -323,4 +320,6 @@ QSGDistanceFieldGlyphCache *QSGDefaultRenderContext::distanceFieldGlyphCache(con
return cache;
}
+QT_END_NAMESPACE
+
#include "moc_qsgdefaultrendercontext_p.cpp"
diff --git a/src/quick/scenegraph/util/qsgatlastexture.cpp b/src/quick/scenegraph/util/qsgatlastexture.cpp
index 22f0b13f46..d5f836a525 100644
--- a/src/quick/scenegraph/util/qsgatlastexture.cpp
+++ b/src/quick/scenegraph/util/qsgatlastexture.cpp
@@ -116,7 +116,7 @@ QSGTexture *Manager::create(const QImage &image, bool hasAlphaChannel)
Texture *t = 0;
if (image.width() < m_atlas_size_limit && image.height() < m_atlas_size_limit) {
if (!m_atlas)
- m_atlas = new Atlas(m_atlas_size);
+ m_atlas = new Atlas(m_atlas_size, this);
// t may be null for atlas allocation failure
t = m_atlas->create(image);
if (t && !hasAlphaChannel && t->hasAlphaChannel())
@@ -125,8 +125,9 @@ QSGTexture *Manager::create(const QImage &image, bool hasAlphaChannel)
return t;
}
-Atlas::Atlas(const QSize &size)
- : m_allocator(size)
+Atlas::Atlas(const QSize &size, QObject *parent)
+ : QObject(parent)
+ , m_allocator(size)
, m_texture_id(0)
, m_size(size)
, m_atlas_transient_image_threshold(0)
diff --git a/src/quick/scenegraph/util/qsgatlastexture_p.h b/src/quick/scenegraph/util/qsgatlastexture_p.h
index 3dee539547..0bb07e8e89 100644
--- a/src/quick/scenegraph/util/qsgatlastexture_p.h
+++ b/src/quick/scenegraph/util/qsgatlastexture_p.h
@@ -88,7 +88,7 @@ private:
class Atlas : public QObject
{
public:
- Atlas(const QSize &size);
+ Atlas(const QSize &size, QObject *parent);
~Atlas();
void invalidate();