diff options
author | Liang Qi <liang.qi@qt.io> | 2017-10-15 21:30:20 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-10-15 21:37:14 +0200 |
commit | 96b2323355a082599b7191f3079e8363bee825e0 (patch) | |
tree | ec2c3737566802816eb8aed8539a354179394359 | |
parent | 83e9d165761ad68730722aeb0bffb8fabe555d1f (diff) | |
parent | 0af2998cc99e90e3df34f794801340d8a769c735 (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
.qmake.conf
src/qml/jsruntime/qv4engine.cpp
Change-Id: I5f7b63a937a214267e15ad5757844d662a4f981b
-rw-r--r-- | dist/changes-5.9.2 | 86 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp | 2 | ||||
-rw-r--r-- | src/qml/compiler/qqmltypecompiler.cpp | 2 | ||||
-rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 2 | ||||
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 11 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine_p.h | 5 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4numberobject.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmltypeloader_p.h | 4 | ||||
-rw-r--r-- | src/quickwidgets/qquickwidget.cpp | 6 |
10 files changed, 108 insertions, 16 deletions
diff --git a/dist/changes-5.9.2 b/dist/changes-5.9.2 new file mode 100644 index 0000000000..fee64f2dea --- /dev/null +++ b/dist/changes-5.9.2 @@ -0,0 +1,86 @@ +Qt 5.9.2 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.9.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.9 series is binary compatible with the 5.8.x series. +Applications compiled for 5.8 will continue to run with 5.9. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt 5.9.2 Changes * +**************************************************************************** + +Qml +--- + + - Fix loading of static qml plugins using the old plugin interface id + - [QTBUG-62243] Fixed bug where sometimes changes to a qml singleton + would not propagate to the users or cause crashes + - [QTBUG-59256] Fix possible use-after-free when removing items from a + ListModel through JavaScript + - [QTBUG-61552] Fix crash due to misaligned data structures on ARMv7 + - [QTBUG-61681] Fix crash if QObject instances are passed between QQmlEngine + instances + - [QTBUG-59704] Fix crashes with objects retrieved via ListModel.get() upon + destruction + - [QTBUG-61536] Fix memory leaks when clearing/trimming component caches + - [QTBUG-62978] Fix race conditions in QML profiler + - [QTBUG-61781] Fix crashes with closures created in QML components that outlive + the component instances + - [QTBUG-62175] Fix incorrect values of lastIndex in regular expressions created + from literals + +QtQuick +------- + + - Window: + * [QTBUG-62055] Fixed a (rare) crash in mouseGrabberItem() + + - Text: + * [QTBUG-40943] Fixed TextInput cursor behavior when using inputMask + * QQuickTextInput: fixed a problem with validator transition from + Acceptable to an Intermediate state, which was preventing further editing + * [QTBUG-63153] TextEdit recalculates its implicit width when text is changed + + - AnimatedImage: + * [QTBUG-62380] Fixed a crash in QQuickAnimatedImage + * [QTBUG-62913] QQuickAnimatedImage::frameCount now has a notifier signal + + - Canvas: + * [QTBUG-37095] Canvas repaints at the correct resolution when the window is + dragged between high-DPI and lower-resolution screens. The new logging + category qt.quick.canvas can be enabled to verify what it is doing. + + - Drag and Drop: + * [QTBUG-61980] DnD dragged image hotspot is now set correctly + + - Item Views: + * [QTBUG-61537] ListView layout is redone when a delegate is placed at + the last visible position + * [QTBUG-33568] Fixed a problem with ListView delegate size change animation + when highlightRangeMode is StrictlyEnforceRange + * [QTBUG-60894] ListView.currentIndex stays in sync during ObjectModel.move() + * [QTBUG-62939] Flickable (and subclasses) rebound is more consistent + when flicked repeatedly beyond bounds + + - Scene Graph: + * [QTBUG-62392] Cached shader programs are freed by releaseResources() + * [QTBUG-61754] Fixed a memory leak in QSGAtlasTexture + * [QTBUG-54434] QQuickFramebufferObject::Renderer::invalidateFramebufferObject + always re-creates the FBO + * [QTBUG-61939] Fixed clipping when using the software renderer + * [QTBUG-61686] QSGFrameBufferObjectNode now stores devicePixelRatio as qreal + * [QTBUG-61502] QQuickWidget supports non-integral devicePixelRatio + * [QTBUG-59789] Fixed excessive recursion in QSGBatchRenderer which caused + a stack overflow when hiding TableView diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp index 107ec60943..d57d7e7406 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp @@ -277,7 +277,7 @@ GatherSourcesJob::GatherSourcesJob(QV4::ExecutionEngine *engine) void GatherSourcesJob::run() { - for (QV4::CompiledData::CompilationUnit *unit : qAsConst(engine->compilationUnits)) { + for (QV4::CompiledData::CompilationUnit *unit : engine->compilationUnits) { QString fileName = unit->fileName(); if (!fileName.isEmpty()) sources.append(fileName); diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp index 697690984f..46f0c46b99 100644 --- a/src/qml/compiler/qqmltypecompiler.cpp +++ b/src/qml/compiler/qqmltypecompiler.cpp @@ -412,7 +412,7 @@ bool SignalHandlerConverter::convertSignalHandlerExpressionsToFunctionDeclaratio const QString &originalPropertyName = stringAt(binding->propertyNameIndex); auto *typeRef = resolvedTypes.value(obj->inheritedTypeNameIndex); - const QQmlType type = typeRef->type; + const QQmlType type = typeRef ? typeRef->type : QQmlType(); if (type.isValid()) { COMPILE_EXCEPTION(binding, tr("\"%1.%2\" is not available in %3 %4.%5.").arg(typeName).arg(originalPropertyName).arg(type.module()).arg(type.majorVersion()).arg(type.minorVersion())); } else { diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index d0b2e4f08a..292f5cde45 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -210,7 +210,7 @@ QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine) void CompilationUnit::unlink() { if (engine) - engine->compilationUnits.erase(engine->compilationUnits.find(this)); + nextCompilationUnit.remove(); if (isRegisteredWithEngine) { Q_ASSERT(data && propertyCaches.count() > 0 && propertyCaches.at(/*root object*/0)); diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index ce54e4fae4..adf6c21cc3 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -66,6 +66,7 @@ #ifndef V4_BOOTSTRAP #include <private/qqmltypenamecache_p.h> #include <private/qqmlpropertycache_p.h> +#include "private/qintrusivelist_p.h" #endif QT_BEGIN_NAMESPACE @@ -880,6 +881,7 @@ struct Q_QML_PRIVATE_EXPORT CompilationUnit : public CompilationUnitBase, public virtual QV4::CompiledData::Unit *createUnitData(QmlIR::Document *irDocument); #ifndef V4_BOOTSTRAP + QIntrusiveListNode nextCompilationUnit; ExecutionEngine *engine; QQmlEnginePrivate *qmlEngine; // only used in QML environment for composite types, not in plain QJSEngine case. diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index a5fc37b91b..7b298a302c 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -502,10 +502,8 @@ ExecutionEngine::~ExecutionEngine() delete identifierTable; delete memoryManager; - QSet<QV4::CompiledData::CompilationUnit*> remainingUnits; - qSwap(compilationUnits, remainingUnits); - for (QV4::CompiledData::CompilationUnit *unit : qAsConst(remainingUnits)) - unit->unlink(); + while (!compilationUnits.isEmpty()) + (*compilationUnits.begin())->unlink(); internalClasses[Class_Empty]->destroy(); delete classPool; @@ -970,9 +968,8 @@ void ExecutionEngine::markObjects(MarkStack *markStack) classPool->markObjects(markStack); markStack->drain(); - for (QSet<CompiledData::CompilationUnit*>::ConstIterator it = compilationUnits.constBegin(), end = compilationUnits.constEnd(); - it != end; ++it) { - (*it)->markObjects(markStack); + for (auto compilationUnit: compilationUnits) { + compilationUnit->markObjects(markStack); markStack->drain(); } } diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index 3b4212020d..4549cda5b9 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -59,6 +59,7 @@ #ifndef V4_BOOTSTRAP # include <private/qv8engine_p.h> +# include <private/qv4compileddata_p.h> #endif namespace WTF { @@ -314,7 +315,9 @@ public: String *id_buffer() const { return reinterpret_cast<String *>(jsStrings + String_buffer); } String *id_lastIndex() const { return reinterpret_cast<String *>(jsStrings + String_lastIndex); } - QSet<CompiledData::CompilationUnit*> compilationUnits; +#ifndef V4_BOOTSTRAP + QIntrusiveList<CompiledData::CompilationUnit, &CompiledData::CompilationUnit::nextCompilationUnit> compilationUnits; +#endif quint32 m_engineId; diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp index 8cfa930888..d5c80dbf80 100644 --- a/src/qml/jsruntime/qv4numberobject.cpp +++ b/src/qml/jsruntime/qv4numberobject.cpp @@ -213,7 +213,9 @@ void NumberPrototype::method_isNaN(const BuiltinFunction *, Scope &scope, CallDa } double v = callData->args[0].toNumber(); - scope.result = Encode(std::isnan(v)); + // cast to bool explicitly as std::isnan() may give us ::isnan(), which + // sometimes returns an int and we don't want the Encode(int) overload. + scope.result = Encode(bool(std::isnan(v))); } void NumberPrototype::method_toString(const BuiltinFunction *, Scope &scope, CallData *callData) diff --git a/src/qml/qml/qqmltypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h index c214f0cd43..abc0df9068 100644 --- a/src/qml/qml/qqmltypeloader_p.h +++ b/src/qml/qml/qqmltypeloader_p.h @@ -322,8 +322,8 @@ public: void invalidate(); #ifdef QT_NO_QML_DEBUGGER - QQmlProfiler *profiler() const { return nullptr; } - void setProfiler(QQmlProfiler *) {} + quintptr profiler() const { return 0; } + void setProfiler(quintptr) {} #else QQmlProfiler *profiler() const { return m_profiler.data(); } void setProfiler(QQmlProfiler *profiler); diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index 6784155d25..326f0f7dd4 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -1392,8 +1392,6 @@ bool QQuickWidget::event(QEvent *e) Q_D(QQuickWidget); switch (e->type()) { - case QEvent::InputMethod: - case QEvent::InputMethodQuery: case QEvent::TouchBegin: case QEvent::TouchEnd: @@ -1402,6 +1400,10 @@ bool QQuickWidget::event(QEvent *e) // Touch events only have local and global positions, no need to map. return QCoreApplication::sendEvent(d->offscreenWindow, e); + case QEvent::InputMethod: + case QEvent::InputMethodQuery: + return QCoreApplication::sendEvent(d->offscreenWindow->focusObject(), e); + case QEvent::WindowChangeInternal: d->handleWindowChange(); break; |