aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-12 01:00:38 +0100
committerUlf Hermann <ulf.hermann@qt.io>2018-12-12 13:08:25 +0100
commit39643ef86e8bc48b8b6cf83ac0ebae7411029030 (patch)
tree79277e468160ebc04a65a85c9668dabefbf3ce33 /src
parent489d6c28dda51c187c85017e30c1e018420e26ac (diff)
parente3446c8225acbaa6a613d6c62e8e2fc58e2b70b0 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts: tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp Change-Id: Ic1dace832ad4b29023d24808b8617b5dcc915eb5
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/masm/stubs/wtf/Optional.h3
-rw-r--r--src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp17
-rw-r--r--src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h1
-rw-r--r--src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp3
-rw-r--r--src/qml/compiler/qqmlirbuilder.cpp10
-rw-r--r--src/qml/compiler/qqmlirbuilder_p.h1
-rw-r--r--src/qml/compiler/qv4codegen.cpp70
-rw-r--r--src/qml/compiler/qv4codegen_p.h6
-rw-r--r--src/qml/jsruntime/qv4alloca_p.h2
-rw-r--r--src/qml/jsruntime/qv4script.cpp1
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp1
-rw-r--r--src/qml/parser/qqmljslexer.cpp2
-rw-r--r--src/qml/qml/qqmlengine.cpp3
-rw-r--r--src/qmltest/doc/src/qtquicktest-index.qdoc3
-rw-r--r--src/quick/handlers/qquicktaphandler.cpp4
-rw-r--r--src/quick/items/qquickevents_p_p.h1
-rw-r--r--src/quick/items/qquickitem.cpp23
-rw-r--r--src/quick/items/qquickitem_p.h1
-rw-r--r--src/quick/items/qquickitemsmodule.cpp16
-rw-r--r--src/quick/items/qquicktext.cpp2
-rw-r--r--src/quick/items/qquickwindow.cpp9
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp7
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp3
-rw-r--r--src/quick/util/qquickstyledtext.cpp22
24 files changed, 171 insertions, 40 deletions
diff --git a/src/3rdparty/masm/stubs/wtf/Optional.h b/src/3rdparty/masm/stubs/wtf/Optional.h
index fdb7de51ce..602dbc1b43 100644
--- a/src/3rdparty/masm/stubs/wtf/Optional.h
+++ b/src/3rdparty/masm/stubs/wtf/Optional.h
@@ -84,7 +84,8 @@ private:
#endif
-#if __cplusplus < 201402L && !QT_CONFIG(cxx14_make_unique)
+#if __cplusplus < 201402L && !QT_CONFIG(cxx14_make_unique)\
+&& !defined(__cpp_lib_make_unique)
namespace std {
template<typename T, class ...Args>
diff --git a/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp b/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp
index e45b79706b..b5f6b39c60 100644
--- a/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp
+++ b/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp
@@ -174,7 +174,7 @@ void QSGOpenVGRectangleNode::render()
}
-QSGOpenVGImageNode::QSGOpenVGImageNode()
+QSGOpenVGImageNode::QSGOpenVGImageNode() : m_texture(nullptr), m_owns(false)
{
// Set Dummy material and geometry to avoid asserts
setMaterial((QSGMaterial*)1);
@@ -184,9 +184,8 @@ QSGOpenVGImageNode::QSGOpenVGImageNode()
QSGOpenVGImageNode::~QSGOpenVGImageNode()
{
- if (m_owns) {
- m_texture->deleteLater();
- }
+ if (m_owns)
+ delete m_texture;
}
void QSGOpenVGImageNode::setRect(const QRectF &rect)
@@ -212,6 +211,8 @@ QRectF QSGOpenVGImageNode::sourceRect() const
void QSGOpenVGImageNode::setTexture(QSGTexture *texture)
{
+ if (m_owns)
+ delete m_texture;
m_texture = texture;
markDirty(DirtyMaterial);
}
@@ -321,7 +322,7 @@ void QSGOpenVGImageNode::render()
}
-QSGOpenVGNinePatchNode::QSGOpenVGNinePatchNode()
+QSGOpenVGNinePatchNode::QSGOpenVGNinePatchNode() : m_texture(nullptr)
{
// Set Dummy material and geometry to avoid asserts
setMaterial((QSGMaterial*)1);
@@ -329,8 +330,14 @@ QSGOpenVGNinePatchNode::QSGOpenVGNinePatchNode()
}
+QSGOpenVGNinePatchNode::~QSGOpenVGNinePatchNode()
+{
+ delete m_texture;
+}
+
void QSGOpenVGNinePatchNode::setTexture(QSGTexture *texture)
{
+ delete m_texture;
m_texture = texture;
markDirty(DirtyMaterial);
}
diff --git a/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h b/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h
index 8e12c27824..e1cd3063a1 100644
--- a/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h
+++ b/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h
@@ -118,6 +118,7 @@ class QSGOpenVGNinePatchNode : public QSGNinePatchNode, public QSGOpenVGRenderab
{
public:
QSGOpenVGNinePatchNode();
+ ~QSGOpenVGNinePatchNode();
void setTexture(QSGTexture *texture) override;
void setBounds(const QRectF &bounds) override;
diff --git a/src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp b/src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp
index 9493920100..c41dfd7400 100644
--- a/src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp
+++ b/src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp
@@ -43,6 +43,7 @@
#include <QtCore/QCoreApplication>
#include <QtCore/QElapsedTimer>
+#include <private/qquickanimatorcontroller_p.h>
#include <private/qquickwindow_p.h>
#include <private/qquickprofiler_p.h>
@@ -94,6 +95,8 @@ void QSGOpenVGRenderLoop::windowDestroyed(QQuickWindow *window)
} else if (vg && window == vg->window()) {
vg->doneCurrent();
}
+
+ delete d->animationController;
}
void QSGOpenVGRenderLoop::exposureChanged(QQuickWindow *window)
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp
index 9ff38db911..84fd66b114 100644
--- a/src/qml/compiler/qqmlirbuilder.cpp
+++ b/src/qml/compiler/qqmlirbuilder.cpp
@@ -1835,8 +1835,9 @@ JSCodeGen::JSCodeGen(const QString &sourceCode, QV4::Compiler::JSUnitGenerator *
, _scopeObject(nullptr)
, _qmlContextSlot(-1)
, _importedScriptsSlot(-1)
- , m_globalNames(globalNames)
{
+ m_globalNames = globalNames;
+
_module = jsModule;
_fileNameIsUrl = true;
}
@@ -2306,15 +2307,10 @@ QV4::Compiler::Codegen::Reference JSCodeGen::fallbackNameLookup(const QString &n
return Reference::fromQmlContextObject(base, data->coreIndex(), data->notifyIndex(), capturePolicy);
}
}
-
- Reference r = Reference::fromName(this, name);
- if (m_globalNames.contains(name))
- r.global = true;
- return r;
#else
Q_UNUSED(name)
- return Reference();
#endif // V4_BOOTSTRAP
+ return Reference();
}
#ifndef V4_BOOTSTRAP
diff --git a/src/qml/compiler/qqmlirbuilder_p.h b/src/qml/compiler/qqmlirbuilder_p.h
index d1e2b17bb7..3dde929cc4 100644
--- a/src/qml/compiler/qqmlirbuilder_p.h
+++ b/src/qml/compiler/qqmlirbuilder_p.h
@@ -640,7 +640,6 @@ private:
QQmlPropertyCache *_scopeObject;
int _qmlContextSlot;
int _importedScriptsSlot;
- QSet<QString> m_globalNames;
};
struct Q_QML_PRIVATE_EXPORT IRLoader {
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 63cdb78d27..cdba21604d 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -102,6 +102,62 @@ Codegen::Codegen(QV4::Compiler::JSUnitGenerator *jsUnitGenerator, bool strict)
jsUnitGenerator->codeGeneratorName = QStringLiteral("moth");
}
+const char *globalNames[] = {
+ "isNaN",
+ "parseFloat",
+ "String",
+ "EvalError",
+ "URIError",
+ "Math",
+ "encodeURIComponent",
+ "RangeError",
+ "eval",
+ "isFinite",
+ "ReferenceError",
+ "Infinity",
+ "Function",
+ "RegExp",
+ "Number",
+ "parseInt",
+ "Object",
+ "decodeURI",
+ "TypeError",
+ "Boolean",
+ "encodeURI",
+ "NaN",
+ "Error",
+ "decodeURIComponent",
+ "Date",
+ "Array",
+ "Symbol",
+ "escape",
+ "unescape",
+ "SyntaxError",
+ "undefined",
+ "JSON",
+ "ArrayBuffer",
+ "SharedArrayBuffer",
+ "DataView",
+ "Int8Array",
+ "Uint8Array",
+ "Uint8ClampedArray",
+ "Int16Array",
+ "Uint16Array",
+ "Int32Array",
+ "Uint32Array",
+ "Float32Array",
+ "Float64Array",
+ "WeakSet",
+ "Set",
+ "WeakMap",
+ "Map",
+ "Reflect",
+ "Proxy",
+ "Atomics",
+ "Promise",
+ nullptr
+};
+
void Codegen::generateFromProgram(const QString &fileName,
const QString &finalUrl,
const QString &sourceCode,
@@ -118,6 +174,18 @@ void Codegen::generateFromProgram(const QString &fileName,
_module->fileName = fileName;
_module->finalUrl = finalUrl;
+ if (contextType == ContextType::ScriptImportedByQML) {
+ // the global object is frozen, so we know that members of it are
+ // pointing to the global object. This is important so that references
+ // to Math etc. do not go through the expensive path in the context wrapper
+ // that tries to see whether we have a matching type
+ //
+ // Since this can be called from the loader thread we can't get the list
+ // directly from the engine, so let's hardcode the most important ones here
+ for (const char **g = globalNames; *g != nullptr; ++g)
+ m_globalNames << QString::fromLatin1(*g);
+ }
+
ScanFunctions scan(this, sourceCode, contextType);
scan(node);
@@ -2336,6 +2404,8 @@ Codegen::Reference Codegen::referenceForName(const QString &name, bool isLhs, co
Reference r = Reference::fromName(this, name);
r.global = useFastLookups && (resolved.type == Context::ResolvedName::Global);
+ if (!r.global && m_globalNames.contains(name))
+ r.global = true;
return r;
}
diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h
index 289728f505..3f96afc7c2 100644
--- a/src/qml/compiler/qv4codegen_p.h
+++ b/src/qml/compiler/qv4codegen_p.h
@@ -708,6 +708,11 @@ public:
return *_returnLabel;
}
+ void setGlobalNames(const QSet<QString>& globalNames) {
+ m_globalNames = globalNames;
+ }
+
+
protected:
friend class ScanFunctions;
friend struct ControlFlow;
@@ -730,6 +735,7 @@ protected:
bool inFormalParameterList = false;
bool functionEndsWithReturn = false;
bool _tailCallsAreAllowed = true;
+ QSet<QString> m_globalNames;
ControlFlow *controlFlow = nullptr;
diff --git a/src/qml/jsruntime/qv4alloca_p.h b/src/qml/jsruntime/qv4alloca_p.h
index 1e9f83a90e..65c3e4d65a 100644
--- a/src/qml/jsruntime/qv4alloca_p.h
+++ b/src/qml/jsruntime/qv4alloca_p.h
@@ -89,7 +89,7 @@ public:
Qt_AllocaWrapper() { m_data = 0; }
~Qt_AllocaWrapper() { free(m_data); }
void *data() { return m_data; }
- void allocate(int size) { m_data = malloc(size); }
+ void allocate(int size) { m_data = malloc(size); memset(m_data, 0, size); }
private:
void *m_data;
};
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index f80db86be5..7bbef3335e 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -241,6 +241,7 @@ Script *Script::createFromFileOrCache(ExecutionEngine *engine, QmlContext *qmlCo
QmlIR::Document::removeScriptPragmas(sourceCode);
auto result = new QV4::Script(engine, qmlContext, /*parseAsBinding*/false, sourceCode, originalUrl.toString());
+ result->contextType = QV4::Compiler::ContextType::ScriptImportedByQML;
result->parse();
return result;
}
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index 5208894934..937a535b83 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -550,6 +550,7 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine,
MOTH_END_INSTR(LoadName)
MOTH_BEGIN_INSTR(LoadGlobalLookup)
+ STORE_IP();
QV4::Lookup *l = function->compilationUnit->runtimeLookups + index;
acc = l->globalGetter(l, engine);
CHECK_EXCEPTION;
diff --git a/src/qml/parser/qqmljslexer.cpp b/src/qml/parser/qqmljslexer.cpp
index e5b8894fb1..c53b13f64d 100644
--- a/src/qml/parser/qqmljslexer.cpp
+++ b/src/qml/parser/qqmljslexer.cpp
@@ -884,7 +884,7 @@ int Lexer::scanString(ScanStringMode mode)
scanChar();
while (_codePtr <= _endPtr) {
- if (_char == mode) {
+ if (_char == quote) {
scanChar();
if (_engine) {
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index f288646ec7..c400e9239b 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -755,6 +755,9 @@ void QQmlPrivate::qdeclarativeelement_destructor(QObject *o)
d->context = nullptr;
}
+ if (d->outerContext && d->outerContext->contextObject == o)
+ d->outerContext->contextObject = nullptr;
+
// Mark this object as in the process of deletion to
// prevent it resolving in bindings
QQmlData::markAsDeleted(o);
diff --git a/src/qmltest/doc/src/qtquicktest-index.qdoc b/src/qmltest/doc/src/qtquicktest-index.qdoc
index 15ea33d06a..48b41d4f0a 100644
--- a/src/qmltest/doc/src/qtquicktest-index.qdoc
+++ b/src/qmltest/doc/src/qtquicktest-index.qdoc
@@ -151,17 +151,18 @@
\li Name
\li Purpose
\row
- \row
\li void applicationAvailable()
\li Called right after the QApplication object was instantiated.
Use this function to setup everything that is not related
to QML directly.
+ \row
\li void qmlEngineAvailable(QQmlEngine*)
\li Called when the QML engine is available.
Any \l {QQmlEngine::addImportPath}{import paths},
\l {QQmlEngine::addPluginPath}{plugin paths},
and \l {QQmlFileSelector::setExtraSelectors}{extra file selectors}
will have been set on the engine by this point.
+ \row
\li void cleanupTestCase()
\li Called right after the test execution has finished.
Use this function to clean up before everything will start to be destructed.
diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp
index e97722d6b7..d480d3b491 100644
--- a/src/quick/handlers/qquicktaphandler.cpp
+++ b/src/quick/handlers/qquicktaphandler.cpp
@@ -107,6 +107,10 @@ static bool dragOverThreshold(const QQuickEventPoint *point)
bool QQuickTapHandler::wantsEventPoint(QQuickEventPoint *point)
{
+ if (!point->pointerEvent()->asPointerMouseEvent() &&
+ !point->pointerEvent()->asPointerTouchEvent() &&
+ !point->pointerEvent()->asPointerTabletEvent() )
+ return false;
// If the user has not violated any constraint, it could be a tap.
// Otherwise we want to give up the grab so that a competing handler
// (e.g. DragHandler) gets a chance to take over.
diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h
index d1a8bbd901..e614b1bd6d 100644
--- a/src/quick/items/qquickevents_p_p.h
+++ b/src/quick/items/qquickevents_p_p.h
@@ -723,5 +723,6 @@ QML_DECLARE_TYPE(QQuickCloseEvent)
QML_DECLARE_TYPE(QQuickPointerDevice)
QML_DECLARE_TYPE(QPointingDeviceUniqueId)
QML_DECLARE_TYPE(QQuickPointerEvent)
+Q_DECLARE_METATYPE(QQuickEventPoint::GrabTransition)
#endif // QQUICKEVENTS_P_P_H
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index f58e08038f..0cd4c446d9 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -89,6 +89,7 @@ QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(DBG_MOUSE_TARGET)
Q_DECLARE_LOGGING_CATEGORY(DBG_HOVER_TRACE)
Q_DECLARE_LOGGING_CATEGORY(lcTransient)
+Q_LOGGING_CATEGORY(lcHandlerParent, "qt.quick.handler.parent")
void debugFocusTree(QQuickItem *item, QQuickItem *scope = nullptr, int depth = 1)
{
@@ -3280,12 +3281,11 @@ void QQuickItemPrivate::data_append(QQmlListProperty<QObject> *prop, QObject *o)
if (o->inherits("QGraphicsItem"))
qWarning("Cannot add a QtQuick 1.0 item (%s) into a QtQuick 2.0 scene!", o->metaObject()->className());
else if (QQuickPointerHandler *pointerHandler = qmlobject_cast<QQuickPointerHandler *>(o)) {
- Q_ASSERT(pointerHandler->parentItem() == that);
- // Accept all buttons, and leave filtering to pointerEvent() and/or user JS,
- // because there can be multiple handlers...
- that->setAcceptedMouseButtons(Qt::AllButtons);
- QQuickItemPrivate *p = QQuickItemPrivate::get(that);
- p->extra.value().pointerHandlers.prepend(pointerHandler);
+ if (pointerHandler->parent() != that) {
+ qCDebug(lcHandlerParent) << "reparenting handler" << pointerHandler << ":" << pointerHandler->parent() << "->" << that;
+ pointerHandler->setParent(that);
+ }
+ QQuickItemPrivate::get(that)->addPointerHandler(pointerHandler);
} else {
QQuickWindow *thisWindow = qmlobject_cast<QQuickWindow *>(o);
QQuickItem *item = that;
@@ -8209,6 +8209,17 @@ bool QQuickItemPrivate::hasHoverHandlers() const
return false;
}
+void QQuickItemPrivate::addPointerHandler(QQuickPointerHandler *h)
+{
+ Q_Q(QQuickItem);
+ // Accept all buttons, and leave filtering to pointerEvent() and/or user JS,
+ // because there can be multiple handlers...
+ q->setAcceptedMouseButtons(Qt::AllButtons);
+ auto &handlers = extra.value().pointerHandlers;
+ if (!handlers.contains(h))
+ handlers.prepend(h);
+}
+
#if QT_CONFIG(quick_shadereffect)
QQuickItemLayer::QQuickItemLayer(QQuickItem *item)
: m_item(item)
diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h
index 11b47114cf..4ca3a01d02 100644
--- a/src/quick/items/qquickitem_p.h
+++ b/src/quick/items/qquickitem_p.h
@@ -281,6 +281,7 @@ public:
bool hasPointerHandlers() const;
bool hasHoverHandlers() const;
+ void addPointerHandler(QQuickPointerHandler *h);
// data property
static void data_append(QQmlListProperty<QObject> *, QObject *);
diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp
index a20150e3b9..b2fcfb4307 100644
--- a/src/quick/items/qquickitemsmodule.cpp
+++ b/src/quick/items/qquickitemsmodule.cpp
@@ -145,6 +145,7 @@ static QQmlPrivate::AutoParentResult qquickitem_autoParent(QObject *obj, QObject
return QQmlPrivate::Parented;
}
} else if (QQuickPointerHandler *handler = qmlobject_cast<QQuickPointerHandler *>(obj)) {
+ QQuickItemPrivate::get(parentItem)->addPointerHandler(handler);
handler->setParent(parent);
return QQmlPrivate::Parented;
}
@@ -156,13 +157,14 @@ static QQmlPrivate::AutoParentResult qquickitem_autoParent(QObject *obj, QObject
qCDebug(lcTransient) << win << "is transient for" << parentWindow;
win->setTransientParent(parentWindow);
return QQmlPrivate::Parented;
- } else {
- QQuickItem *item = qmlobject_cast<QQuickItem *>(obj);
- if (item) {
- // The parent of an Item inside a Window is actually the implicit content Item
- item->setParentItem(parentWindow->contentItem());
- return QQmlPrivate::Parented;
- }
+ } else if (QQuickItem *item = qmlobject_cast<QQuickItem *>(obj)) {
+ // The parent of an Item inside a Window is actually the implicit content Item
+ item->setParentItem(parentWindow->contentItem());
+ return QQmlPrivate::Parented;
+ } else if (QQuickPointerHandler *handler = qmlobject_cast<QQuickPointerHandler *>(obj)) {
+ QQuickItemPrivate::get(parentWindow->contentItem())->addPointerHandler(handler);
+ handler->setParent(parentWindow->contentItem());
+ return QQmlPrivate::Parented;
}
return QQmlPrivate::IncompatibleObject;
} else if (qmlobject_cast<QQuickItem *>(obj)) {
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index 4d4540bc36..dd7fbccff5 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -2082,6 +2082,8 @@ void QQuickText::resetMaximumLineCount()
\code
<b></b> - bold
+ <del></del> - strike out (removed content)
+ <s></s> - strike out (no longer accurate or no longer relevant content)
<strong></strong> - bold
<i></i> - italic
<br> - new line
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index a09aa830fb..b5a68a2283 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -2246,13 +2246,14 @@ QQuickPointerEvent *QQuickWindowPrivate::queryPointerEventInstance(QQuickPointer
{
// Search for a matching reusable event object.
for (QQuickPointerEvent *e : pointerEventInstances) {
- // If device can generate native gestures (e.g. a trackpad), there might be two QQuickPointerEvents:
- // QQuickPointerNativeGestureEvent and QQuickPointerTouchEvent. Use eventType to disambiguate.
+ // If device can generate native gestures (e.g. a trackpad), there might be multiple QQuickPointerEvents:
+ // QQuickPointerNativeGestureEvent, QQuickPointerScrollEvent, and QQuickPointerTouchEvent.
+ // Use eventType to disambiguate.
#if QT_CONFIG(gestures)
- if (eventType == QEvent::NativeGesture && !qobject_cast<QQuickPointerNativeGestureEvent*>(e))
+ if ((eventType == QEvent::NativeGesture) != bool(e->asPointerNativeGestureEvent()))
continue;
#endif
- if (eventType == QEvent::Wheel && !qobject_cast<QQuickPointerScrollEvent*>(e))
+ if ((eventType == QEvent::Wheel) != bool(e->asPointerScrollEvent()))
continue;
// Otherwise we assume there's only one event type per device.
// More disambiguation tests might need to be added above if that changes later.
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp
index bd0698be6c..20286a03d5 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp
@@ -156,10 +156,11 @@ void QSGSoftwareNinePatchNode::setTexture(QSGTexture *texture)
QSGSoftwarePixmapTexture *pt = qobject_cast<QSGSoftwarePixmapTexture*>(texture);
if (!pt) {
qWarning() << "Image used with invalid texture format.";
- return;
+ } else {
+ m_pixmap = pt->pixmap();
+ markDirty(DirtyMaterial);
}
- m_pixmap = pt->pixmap();
- markDirty(DirtyMaterial);
+ delete texture;
}
void QSGSoftwareNinePatchNode::setBounds(const QRectF &bounds)
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp
index b400473128..f5a41410ee 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp
@@ -45,6 +45,7 @@
#include <private/qquickwindow_p.h>
#include <QElapsedTimer>
+#include <private/qquickanimatorcontroller_p.h>
#include <private/qquickprofiler_p.h>
#include <private/qsgsoftwarerenderer_p.h>
#include <qpa/qplatformbackingstore.h>
@@ -98,6 +99,8 @@ void QSGSoftwareRenderLoop::windowDestroyed(QQuickWindow *window)
if (m_windows.size() == 0) {
rc->invalidate();
}
+
+ delete d->animationController;
}
void QSGSoftwareRenderLoop::renderWindow(QQuickWindow *window, bool isNewExpose)
diff --git a/src/quick/util/qquickstyledtext.cpp b/src/quick/util/qquickstyledtext.cpp
index 762d49f2d2..5e1aaf121e 100644
--- a/src/quick/util/qquickstyledtext.cpp
+++ b/src/quick/util/qquickstyledtext.cpp
@@ -50,6 +50,8 @@
QQuickStyledText supports few tags:
<b></b> - bold
+ <del></del> - strike out (removed content)
+ <s></s> - strike out (no longer accurate or no longer relevant content)
<strong></strong> - bold
<i></i> - italic
<br> - new line
@@ -379,8 +381,16 @@ bool QQuickStyledTextPrivate::parseTag(const QChar *&ch, const QString &textIn,
format.setFontWeight(QFont::Bold);
return true;
}
- } else if (tag == QLatin1String("strong")) {
- format.setFontWeight(QFont::Bold);
+ } else if (char0 == QLatin1Char('s')) {
+ if (tagLength == 1) {
+ format.setFontStrikeOut(true);
+ return true;
+ } else if (tag == QLatin1String("strong")) {
+ format.setFontWeight(QFont::Bold);
+ return true;
+ }
+ } else if (tag == QLatin1String("del")) {
+ format.setFontStrikeOut(true);
return true;
} else if (tag == QLatin1String("ol")) {
List listItem;
@@ -511,7 +521,13 @@ bool QQuickStyledTextPrivate::parseCloseTag(const QChar *&ch, const QString &tex
return true;
} else if (tag == QLatin1String("font")) {
return true;
- } else if (tag == QLatin1String("strong")) {
+ } else if (char0 == QLatin1Char('s')) {
+ if (tagLength == 1) {
+ return true;
+ } else if (tag == QLatin1String("strong")) {
+ return true;
+ }
+ } else if (tag == QLatin1String("del")) {
return true;
} else if (tag == QLatin1String("ol")) {
if (!listStack.isEmpty()) {