From 1b73484630e1fbf483a124f77c07265d695f9484 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 8 Aug 2016 13:46:34 +0200 Subject: QML: Obliterate QQmlAccessors Change-Id: I70a080feb401cf23aef1bde44a19a11e27642f30 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4runtime_p.h | 2 - src/qml/qml/qml.pri | 2 - src/qml/qml/qqmlaccessors.cpp | 105 -------------------- src/qml/qml/qqmlaccessors_p.h | 182 ---------------------------------- src/qml/qml/qqmlbinding.cpp | 1 - src/qml/qml/qqmlobjectcreator.cpp | 1 - src/qml/qml/qqmlpropertycache.cpp | 22 +--- src/qml/qml/qqmlpropertycache_p.h | 5 - src/quick/items/qquickitem.cpp | 34 ------- src/quick/items/qquickitem.h | 1 - src/quick/items/qquickitem_p.h | 2 - src/quick/items/qquickitemsmodule.cpp | 1 - 12 files changed, 1 insertion(+), 357 deletions(-) delete mode 100644 src/qml/qml/qqmlaccessors.cpp delete mode 100644 src/qml/qml/qqmlaccessors_p.h (limited to 'src') diff --git a/src/qml/jsruntime/qv4runtime_p.h b/src/qml/jsruntime/qv4runtime_p.h index 88c09ec5f9..a32b3f1663 100644 --- a/src/qml/jsruntime/qv4runtime_p.h +++ b/src/qml/jsruntime/qv4runtime_p.h @@ -60,8 +60,6 @@ QT_BEGIN_NAMESPACE -class QQmlAccessors; - #undef QV4_COUNT_RUNTIME_FUNCTIONS namespace QV4 { diff --git a/src/qml/qml/qml.pri b/src/qml/qml/qml.pri index 4244b16210..8d8da3742d 100644 --- a/src/qml/qml/qml.pri +++ b/src/qml/qml/qml.pri @@ -20,7 +20,6 @@ SOURCES += \ $$PWD/qqmlinfo.cpp \ $$PWD/qqmlerror.cpp \ $$PWD/qqmlvaluetype.cpp \ - $$PWD/qqmlaccessors.cpp \ $$PWD/qqmlxmlhttprequest.cpp \ $$PWD/qqmlcleanup.cpp \ $$PWD/qqmlpropertycache.cpp \ @@ -87,7 +86,6 @@ HEADERS += \ $$PWD/qqmldata_p.h \ $$PWD/qqmlerror.h \ $$PWD/qqmlvaluetype_p.h \ - $$PWD/qqmlaccessors_p.h \ $$PWD/qqmlxmlhttprequest_p.h \ $$PWD/qqmlcleanup_p.h \ $$PWD/qqmlpropertycache_p.h \ diff --git a/src/qml/qml/qqmlaccessors.cpp b/src/qml/qml/qqmlaccessors.cpp deleted file mode 100644 index 7b0fafdc90..0000000000 --- a/src/qml/qml/qqmlaccessors.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtQml module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qqmlaccessors_p.h" - -#include "qqmldata_p.h" -#include "qqmlnotifier_p.h" - -QT_BEGIN_NAMESPACE - -struct AccessorProperties { - AccessorProperties(); - - QReadWriteLock lock; - QHash properties; -}; - -Q_GLOBAL_STATIC(AccessorProperties, accessorProperties) - -static void buildNameMask(QQmlAccessorProperties::Properties &properties) -{ - quint32 mask = 0; - - for (int ii = 0; ii < properties.count; ++ii) { - Q_ASSERT(strlen(properties.properties[ii].name) == properties.properties[ii].nameLength); - Q_ASSERT(properties.properties[ii].nameLength > 0); - - mask |= (1 << qMin(31U, properties.properties[ii].nameLength - 1)); - } - - properties.nameMask = mask; -} - -AccessorProperties::AccessorProperties() -{ -} - -QQmlAccessorProperties::Properties::Properties(Property *properties, int count) -: count(count), properties(properties) -{ - buildNameMask(*this); -} - -QQmlAccessorProperties::Properties -QQmlAccessorProperties::properties(const QMetaObject *mo) -{ - AccessorProperties *This = accessorProperties(); - - QReadLocker lock(&This->lock); - return This->properties.value(mo); -} - -void QQmlAccessorProperties::registerProperties(const QMetaObject *mo, int count, - Property *props) -{ - Q_ASSERT(count > 0); - - Properties properties(props, count); - - AccessorProperties *This = accessorProperties(); - - QWriteLocker lock(&This->lock); - - Q_ASSERT(!This->properties.contains(mo) || This->properties.value(mo) == properties); - - This->properties.insert(mo, properties); -} - -QT_END_NAMESPACE diff --git a/src/qml/qml/qqmlaccessors_p.h b/src/qml/qml/qqmlaccessors_p.h deleted file mode 100644 index e98663adfe..0000000000 --- a/src/qml/qml/qqmlaccessors_p.h +++ /dev/null @@ -1,182 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtQml module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QQMLACCESSORS_P_H -#define QQMLACCESSORS_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include -#include -#include -#include - -#if defined(Q_OS_QNX) || defined(Q_OS_LINUX) -#include -#endif - -QT_BEGIN_NAMESPACE - -class QObject; -struct QMetaObject; -class QQmlNotifier; - -// QML "accessor properties" allow V4 and V8 to bypass Qt's meta system to read and, more -// importantly, subscribe to properties directly. Any property that is primarily read -// from bindings is a candidate for inclusion as an accessor property. -// -// To define accessor properties, use the QML_DECLARE_PROPERTIES() and QML_DEFINE_PROPERTIES() -// macros. The QML_DECLARE_PROPERTIES() macro is used to specify the properties, and the -// QML_DEFINE_PROPERTIES() macro to register the properties with the -// QQmlAccessorProperties singleton. -// -// A class with accessor properties must also add the Q_CLASSINFO("qt_HasQmlAccessors", "true") -// tag to its declaration. This is essential for QML to maintain internal consistency, -// and forgetting to do so will probably cause your application to qFatal() with a -// helpful reminder of this requirement. -// -// It is important that QML_DEFINE_PROPERTIES() has been called before QML ever sees -// the type with the accessor properties. As QML_DEFINE_PROPERTIES() is idempotent, it is -// recommended to call it in the type's constructor as well as when the type is registered -// as a QML element (if it ever is). QML_DEFINE_PROPERTIES() is a very cheap operation -// if registration has already occurred. - -#define QML_DECLARE_PROPERTIES(type) \ - static volatile bool qqml_accessor_properties_isregistered_ ## type = false; \ - static QQmlAccessorProperties::Property qqml_accessor_properties_ ## type[] = - -#define QML_DEFINE_PROPERTIES(type) \ - do { \ - if (!qqml_accessor_properties_isregistered_ ## type) { \ - int count = sizeof(qqml_accessor_properties_ ## type) / \ - sizeof(QQmlAccessorProperties::Property); \ - QQmlAccessorProperties::registerProperties(&type::staticMetaObject, count, \ - qqml_accessor_properties_ ## type);\ - qqml_accessor_properties_isregistered_ ## type = true; \ - } \ - } while (false); - -#define QML_PRIVATE_ACCESSOR(clazz, cpptype, name, variable, setter) \ - static void clazz ## _ ## name ## Read(QObject *o, void *rv) \ - { \ - clazz ## Private *d = clazz ## Private::get(static_cast(o)); \ - *static_cast(rv) = d->variable; \ - } \ - static void clazz ## _ ## name ## Write(QObject *o, void *rv) \ - { \ - static_cast(o)->setter(*static_cast(rv)); \ - } - -#define QML_PROPERTY_NAME(name) #name, sizeof #name - 1 - -class QQmlAccessors -{ -public: - void (*read)(QObject *object, void *output); - void (*write)(QObject *object, void *output); - void (*notifier)(QObject *object, QQmlNotifier **notifier); -}; - -namespace QQmlAccessorProperties { - struct Property { - const char *name; - unsigned int nameLength; - qintptr data; - QQmlAccessors *accessors; - }; - - struct Properties { - inline Properties(); - Properties(Property *, int); - - bool operator==(const Properties &o) const { - return count == o.count && properties == o.properties; - } - - inline Property *property(const char *name); - - int count; - Property *properties; - quint32 nameMask; - }; - - Properties properties(const QMetaObject *); - void Q_QML_PRIVATE_EXPORT registerProperties(const QMetaObject *, int, Property *); -}; - -QQmlAccessorProperties::Property * -QQmlAccessorProperties::Properties::property(const char *name) -{ - if (count == 0) - return 0; - - const unsigned int length = (unsigned int)strlen(name); - - Q_ASSERT(length); - - if (nameMask & (1 << qMin(31U, length - 1))) { - - for (int ii = 0; ii < count; ++ii) { - if (properties[ii].nameLength == length && 0 == qstrcmp(name, properties[ii].name)) - return &properties[ii]; - } - - } - - return 0; -} - -QQmlAccessorProperties::Properties::Properties() -: count(0), properties(0), nameMask(0) -{ -} - -QT_END_NAMESPACE - -#endif // QQMLACCESSORS_P_H diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp index d944857fc1..896bc8d51d 100644 --- a/src/qml/qml/qqmlbinding.cpp +++ b/src/qml/qml/qqmlbinding.cpp @@ -43,7 +43,6 @@ #include "qqmlcontext.h" #include "qqmlinfo.h" #include "qqmldata_p.h" -#include "qqmlaccessors_p.h" #include #include #include diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index e02d362815..2218f277d6 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -54,7 +54,6 @@ #include #include #include -#include QT_USE_NAMESPACE diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index ed00eddb30..b9e2213035 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -45,7 +45,6 @@ #include #include -#include #include #include @@ -500,35 +499,16 @@ void QQmlPropertyCache::append(const QMetaObject *metaObject, int signalCount = metaObjectSignalCount(metaObject); int classInfoCount = QMetaObjectPrivate::get(metaObject)->classInfoCount; - QQmlAccessorProperties::Properties accessorProperties; - if (classInfoCount) { int classInfoOffset = metaObject->classInfoOffset(); - bool hasFastProperty = false; for (int ii = 0; ii < classInfoCount; ++ii) { int idx = ii + classInfoOffset; QMetaClassInfo mci = metaObject->classInfo(idx); const char *name = mci.name(); - if (0 == qstrcmp(name, "qt_HasQmlAccessors")) { - hasFastProperty = true; - } else if (0 == qstrcmp(name, "DefaultProperty")) { + if (0 == qstrcmp(name, "DefaultProperty")) { _defaultPropertyName = QString::fromUtf8(mci.value()); } } - - if (hasFastProperty) { - accessorProperties = QQmlAccessorProperties::properties(metaObject); - if (accessorProperties.count == 0) - qFatal("QQmlPropertyCache: %s has FastProperty class info, but has not " - "installed property accessors", metaObject->className()); - } else { -#ifndef QT_NO_DEBUG - accessorProperties = QQmlAccessorProperties::properties(metaObject); - if (accessorProperties.count != 0) - qFatal("QQmlPropertyCache: %s has fast property accessors, but is missing " - "FastProperty class info", metaObject->className()); -#endif - } } //Used to block access to QObject::destroyed() and QObject::deleteLater() from QML diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h index f28b2d0599..4da02037fa 100644 --- a/src/qml/qml/qqmlpropertycache_p.h +++ b/src/qml/qml/qqmlpropertycache_p.h @@ -62,7 +62,6 @@ #include #include -#include #include @@ -73,7 +72,6 @@ class QMetaProperty; class QQmlEngine; class QJSEngine; class QQmlPropertyData; -class QQmlAccessors; class QMetaObjectBuilder; class QQmlPropertyCacheMethodArguments; class QQmlVMEMetaObject; @@ -159,7 +157,6 @@ public: bool isFinal() const { return _flags.isFinal; } bool isOverridden() const { return _flags.isOverridden; } bool isDirect() const { return _flags.isDirect; } - bool hasAccessors() const { return accessors() != nullptr; } bool hasStaticMetaCallFunction() const { return staticMetaCallFunction() != nullptr; } bool isFunction() const { return _flags.type == Flags::FunctionType; } bool isQObject() const { return _flags.type == Flags::QObjectDerivedType; } @@ -240,8 +237,6 @@ public: _metaObjectOffset = qint16(off); } - QQmlAccessors *accessors() const { return nullptr; } // TODO: remove in subsequent patch - StaticMetaCallFunction staticMetaCallFunction() const { return _staticMetaCallFunction; } void trySetStaticMetaCallFunction(StaticMetaCallFunction f, unsigned relativePropertyIndex) { diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 4c6b0b4167..d38edfb7ab 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -66,7 +66,6 @@ #include #include #include -#include #include #include @@ -108,37 +107,6 @@ void debugFocusTree(QQuickItem *item, QQuickItem *scope = 0, int depth = 1) } } -static void QQuickItem_parentNotifier(QObject *o, QQmlNotifier **n) -{ - QQuickItemPrivate *d = QQuickItemPrivate::get(static_cast(o)); - *n = &d->parentNotifier; -} - -QML_PRIVATE_ACCESSOR(QQuickItem, QQuickItem *, parent, parentItem, setParentItem) -QML_PRIVATE_ACCESSOR(QQuickItem, qreal, x, x, setX) -QML_PRIVATE_ACCESSOR(QQuickItem, qreal, y, y, setY) -QML_PRIVATE_ACCESSOR(QQuickItem, qreal, width, width, setWidth) -QML_PRIVATE_ACCESSOR(QQuickItem, qreal, height, height, setHeight) - -static QQmlAccessors QQuickItem_parent = { QQuickItem_parentRead, QQuickItem_parentWrite, QQuickItem_parentNotifier }; -static QQmlAccessors QQuickItem_x = { QQuickItem_xRead, QQuickItem_xWrite, 0 }; -static QQmlAccessors QQuickItem_y = { QQuickItem_yRead, QQuickItem_yWrite, 0 }; -static QQmlAccessors QQuickItem_width = { QQuickItem_widthRead, QQuickItem_widthWrite, 0 }; -static QQmlAccessors QQuickItem_height = { QQuickItem_heightRead, QQuickItem_heightWrite, 0 }; - -QML_DECLARE_PROPERTIES(QQuickItem) { - { QML_PROPERTY_NAME(parent), 0, &QQuickItem_parent }, - { QML_PROPERTY_NAME(x), 0, &QQuickItem_x }, - { QML_PROPERTY_NAME(y), 0, &QQuickItem_y }, - { QML_PROPERTY_NAME(width), 0, &QQuickItem_width }, - { QML_PROPERTY_NAME(height), 0, &QQuickItem_height } -}; - -void QQuickItemPrivate::registerAccessorProperties() -{ - QML_DEFINE_PROPERTIES(QQuickItem); -} - /*! \qmltype Transform \instantiates QQuickTransform @@ -3165,8 +3133,6 @@ void QQuickItemPrivate::init(QQuickItem *parent) { Q_Q(QQuickItem); - registerAccessorProperties(); - baselineOffset = 0.0; if (parent) { diff --git a/src/quick/items/qquickitem.h b/src/quick/items/qquickitem.h index 0352f5ace8..87ae83246c 100644 --- a/src/quick/items/qquickitem.h +++ b/src/quick/items/qquickitem.h @@ -148,7 +148,6 @@ class Q_QUICK_EXPORT QQuickItem : public QObject, public QQmlParserStatus Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QQuickItemLayer *layer READ layer DESIGNABLE false CONSTANT FINAL) Q_CLASSINFO("DefaultProperty", "data") - Q_CLASSINFO("qt_HasQmlAccessors", "true") public: enum Flag { diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index 9ea2712e18..6d79d71021 100644 --- a/src/quick/items/qquickitem_p.h +++ b/src/quick/items/qquickitem_p.h @@ -244,8 +244,6 @@ public: static QQuickItemPrivate* get(QQuickItem *item) { return item->d_func(); } static const QQuickItemPrivate* get(const QQuickItem *item) { return item->d_func(); } - static void registerAccessorProperties(); - QQuickItemPrivate(); ~QQuickItemPrivate(); void init(QQuickItem *parent); diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp index fb60331ce2..1bc1aebe4f 100644 --- a/src/quick/items/qquickitemsmodule.cpp +++ b/src/quick/items/qquickitemsmodule.cpp @@ -133,7 +133,6 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) { QQmlPrivate::RegisterAutoParent autoparent = { 0, &qquickitem_autoParent }; QQmlPrivate::qmlregister(QQmlPrivate::AutoParentRegistration, &autoparent); - QQuickItemPrivate::registerAccessorProperties(); #ifdef QT_NO_MOVIE qmlRegisterTypeNotAvailable(uri,major,minor,"AnimatedImage", QCoreApplication::translate("QQuickAnimatedImage","Qt was built without support for QMovie")); -- cgit v1.2.3 From bb26b8ea7b973cf53099a35028780309750b10c7 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 30 Aug 2016 15:46:07 +0200 Subject: QML: Make sure the integer data is aligned on 4-byte boundaries The packing for a the compiled data is 1 byte, but integers clearly need 4 byte alignment. This worked before by accident, but broke when a single quint8 was added to the Function. Change-Id: Ia7954423d5a7b4a0e6ef177fc3ee350889f43154 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4compiler.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/qml/compiler/qv4compiler.cpp b/src/qml/compiler/qv4compiler.cpp index c6a872cc34..43347d246a 100644 --- a/src/qml/compiler/qv4compiler.cpp +++ b/src/qml/compiler/qv4compiler.cpp @@ -278,6 +278,7 @@ void QV4::Compiler::JSUnitGenerator::writeFunction(char *f, QV4::IR::Function *i QV4::CompiledData::Function *function = (QV4::CompiledData::Function *)f; quint32 currentOffset = sizeof(QV4::CompiledData::Function); + currentOffset = (currentOffset + 7) & ~quint32(0x7); function->nameIndex = getStringId(*irFunction->name); function->flags = 0; -- cgit v1.2.3 From 12d8004874c3f69ddd5aa7622da309c46930336b Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 26 Aug 2016 16:11:38 +0200 Subject: Fix binding dependencies when used in together with functions When a function called from a binding would access a scope or context property, we would end up registering those dependencies as permanent dependencies in the expression and set m_permanentDependenciesRegistered to true. Then after the binding evaluation itself, we would not end up registering the real binding's permanent dependencies. Change-Id: I3b6c1c181aa064d535362c736b5b2bbc4f576ba9 Done-with: Erik Task-number: QTBUG-54394 Reviewed-by: Erik Verbruggen --- src/qml/compiler/qv4instr_moth_p.h | 2 ++ src/qml/compiler/qv4isel_moth.cpp | 4 +++- src/qml/compiler/qv4isel_moth_p.h | 2 +- src/qml/compiler/qv4isel_p.cpp | 6 +++--- src/qml/compiler/qv4isel_p.h | 2 +- src/qml/jit/qv4isel_masm.cpp | 6 +++--- src/qml/jit/qv4isel_masm_p.h | 2 +- src/qml/jit/qv4regalloc.cpp | 2 +- src/qml/jsruntime/qv4runtime.cpp | 16 ++++++++-------- src/qml/jsruntime/qv4runtimeapi_p.h | 4 ++-- src/qml/jsruntime/qv4vme_moth.cpp | 4 ++-- 11 files changed, 27 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index 20b871c4e8..beb43376ee 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -335,12 +335,14 @@ union Instr int propertyIndex; Param base; Param result; + bool captureRequired; }; struct instr_loadContextObjectProperty { MOTH_INSTR_HEADER int propertyIndex; Param base; Param result; + bool captureRequired; }; struct instr_loadIdObject { MOTH_INSTR_HEADER diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp index fda5b4cdd0..cd47f22205 100644 --- a/src/qml/compiler/qv4isel_moth.cpp +++ b/src/qml/compiler/qv4isel_moth.cpp @@ -579,18 +579,20 @@ void InstructionSelection::setQObjectProperty(IR::Expr *source, IR::Expr *target addInstruction(store); } -void InstructionSelection::getQmlContextProperty(IR::Expr *source, IR::Member::MemberKind kind, int index, IR::Expr *target) +void InstructionSelection::getQmlContextProperty(IR::Expr *source, IR::Member::MemberKind kind, int index, bool captureRequired, IR::Expr *target) { if (kind == IR::Member::MemberOfQmlScopeObject) { Instruction::LoadScopeObjectProperty load; load.base = getParam(source); load.propertyIndex = index; + load.captureRequired = captureRequired; load.result = getResultParam(target); addInstruction(load); } else if (kind == IR::Member::MemberOfQmlContextObject) { Instruction::LoadContextObjectProperty load; load.base = getParam(source); load.propertyIndex = index; + load.captureRequired = captureRequired; load.result = getResultParam(target); addInstruction(load); } else if (kind == IR::Member::MemberOfIdObjectsArray) { diff --git a/src/qml/compiler/qv4isel_moth_p.h b/src/qml/compiler/qv4isel_moth_p.h index 2d2bb91228..c304284cbc 100644 --- a/src/qml/compiler/qv4isel_moth_p.h +++ b/src/qml/compiler/qv4isel_moth_p.h @@ -137,7 +137,7 @@ protected: virtual void setProperty(IR::Expr *source, IR::Expr *targetBase, const QString &targetName); virtual void setQmlContextProperty(IR::Expr *source, IR::Expr *targetBase, IR::Member::MemberKind kind, int propertyIndex); virtual void setQObjectProperty(IR::Expr *source, IR::Expr *targetBase, int propertyIndex); - virtual void getQmlContextProperty(IR::Expr *source, IR::Member::MemberKind kind, int index, IR::Expr *target); + virtual void getQmlContextProperty(IR::Expr *source, IR::Member::MemberKind kind, int index, bool captureRequired, IR::Expr *target); virtual void getQObjectProperty(IR::Expr *base, int propertyIndex, bool captureRequired, bool isSingleton, int attachedPropertiesId, IR::Expr *target); virtual void getElement(IR::Expr *base, IR::Expr *index, IR::Expr *target); virtual void setElement(IR::Expr *source, IR::Expr *targetBase, IR::Expr *targetIndex); diff --git a/src/qml/compiler/qv4isel_p.cpp b/src/qml/compiler/qv4isel_p.cpp index 72e6c276a9..efcfb9bd77 100644 --- a/src/qml/compiler/qv4isel_p.cpp +++ b/src/qml/compiler/qv4isel_p.cpp @@ -147,7 +147,7 @@ void IRDecoder::visitMove(IR::Move *s) const int attachedPropertiesId = m->attachedPropertiesId; const bool isSingletonProperty = m->kind == IR::Member::MemberOfSingletonObject; - if (_function && attachedPropertiesId == 0 && !m->property->isConstant()) { + if (_function && attachedPropertiesId == 0 && !m->property->isConstant() && _function->isQmlBinding) { if (m->kind == IR::Member::MemberOfQmlContextObject) { _function->contextObjectPropertyDependencies.insert(m->property->coreIndex(), m->property->notifyIndex()); captureRequired = false; @@ -157,14 +157,14 @@ void IRDecoder::visitMove(IR::Move *s) } } if (m->kind == IR::Member::MemberOfQmlScopeObject || m->kind == IR::Member::MemberOfQmlContextObject) { - getQmlContextProperty(m->base, (IR::Member::MemberKind)m->kind, m->property->coreIndex(), s->target); + getQmlContextProperty(m->base, (IR::Member::MemberKind)m->kind, m->property->coreIndex(), captureRequired, s->target); return; } getQObjectProperty(m->base, m->property->coreIndex(), captureRequired, isSingletonProperty, attachedPropertiesId, s->target); #endif // V4_BOOTSTRAP return; } else if (m->kind == IR::Member::MemberOfIdObjectsArray) { - getQmlContextProperty(m->base, (IR::Member::MemberKind)m->kind, m->idIndex, s->target); + getQmlContextProperty(m->base, (IR::Member::MemberKind)m->kind, m->idIndex, /*captureRequired*/false, s->target); return; } else if (m->base->asTemp() || m->base->asConst() || m->base->asArgLocal()) { getProperty(m->base, *m->name, s->target); diff --git a/src/qml/compiler/qv4isel_p.h b/src/qml/compiler/qv4isel_p.h index a3fa80b6f0..037c02e5ea 100644 --- a/src/qml/compiler/qv4isel_p.h +++ b/src/qml/compiler/qv4isel_p.h @@ -188,7 +188,7 @@ public: // to implement by subclasses: virtual void initClosure(IR::Closure *closure, IR::Expr *target) = 0; virtual void getProperty(IR::Expr *base, const QString &name, IR::Expr *target) = 0; virtual void getQObjectProperty(IR::Expr *base, int propertyIndex, bool captureRequired, bool isSingletonProperty, int attachedPropertiesId, IR::Expr *target) = 0; - virtual void getQmlContextProperty(IR::Expr *source, IR::Member::MemberKind kind, int index, IR::Expr *target) = 0; + virtual void getQmlContextProperty(IR::Expr *source, IR::Member::MemberKind kind, int index, bool captureRequired, IR::Expr *target) = 0; virtual void setProperty(IR::Expr *source, IR::Expr *targetBase, const QString &targetName) = 0; virtual void setQmlContextProperty(IR::Expr *source, IR::Expr *targetBase, IR::Member::MemberKind kind, int propertyIndex) = 0; virtual void setQObjectProperty(IR::Expr *source, IR::Expr *targetBase, int propertyIndex) = 0; diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp index 737ff389fa..d06d6907e5 100644 --- a/src/qml/jit/qv4isel_masm.cpp +++ b/src/qml/jit/qv4isel_masm.cpp @@ -737,12 +737,12 @@ void InstructionSelection::getProperty(IR::Expr *base, const QString &name, IR:: } } -void InstructionSelection::getQmlContextProperty(IR::Expr *base, IR::Member::MemberKind kind, int index, IR::Expr *target) +void InstructionSelection::getQmlContextProperty(IR::Expr *base, IR::Member::MemberKind kind, int index, bool captureRequired, IR::Expr *target) { if (kind == IR::Member::MemberOfQmlScopeObject) - generateRuntimeCall(target, getQmlScopeObjectProperty, Assembler::EngineRegister, Assembler::PointerToValue(base), Assembler::TrustedImm32(index)); + generateRuntimeCall(target, getQmlScopeObjectProperty, Assembler::EngineRegister, Assembler::PointerToValue(base), Assembler::TrustedImm32(index), Assembler::TrustedImm32(captureRequired)); else if (kind == IR::Member::MemberOfQmlContextObject) - generateRuntimeCall(target, getQmlContextObjectProperty, Assembler::EngineRegister, Assembler::PointerToValue(base), Assembler::TrustedImm32(index)); + generateRuntimeCall(target, getQmlContextObjectProperty, Assembler::EngineRegister, Assembler::PointerToValue(base), Assembler::TrustedImm32(index), Assembler::TrustedImm32(captureRequired)); else if (kind == IR::Member::MemberOfIdObjectsArray) generateRuntimeCall(target, getQmlIdObject, Assembler::EngineRegister, Assembler::PointerToValue(base), Assembler::TrustedImm32(index)); else diff --git a/src/qml/jit/qv4isel_masm_p.h b/src/qml/jit/qv4isel_masm_p.h index 5bca879a77..88241bd503 100644 --- a/src/qml/jit/qv4isel_masm_p.h +++ b/src/qml/jit/qv4isel_masm_p.h @@ -123,7 +123,7 @@ protected: virtual void setActivationProperty(IR::Expr *source, const QString &targetName); virtual void initClosure(IR::Closure *closure, IR::Expr *target); virtual void getProperty(IR::Expr *base, const QString &name, IR::Expr *target); - virtual void getQmlContextProperty(IR::Expr *source, IR::Member::MemberKind kind, int index, IR::Expr *target); + virtual void getQmlContextProperty(IR::Expr *source, IR::Member::MemberKind kind, int index, bool captureRequired, IR::Expr *target); virtual void getQObjectProperty(IR::Expr *base, int propertyIndex, bool captureRequired, bool isSingleton, int attachedPropertiesId, IR::Expr *target); virtual void setProperty(IR::Expr *source, IR::Expr *targetBase, const QString &targetName); virtual void setQmlContextProperty(IR::Expr *source, IR::Expr *targetBase, IR::Member::MemberKind kind, int propertyIndex); diff --git a/src/qml/jit/qv4regalloc.cpp b/src/qml/jit/qv4regalloc.cpp index 350ab7e0c6..406b9096ea 100644 --- a/src/qml/jit/qv4regalloc.cpp +++ b/src/qml/jit/qv4regalloc.cpp @@ -528,7 +528,7 @@ protected: // IRDecoder addCall(); } - virtual void getQmlContextProperty(IR::Expr *base, IR::Member::MemberKind /*kind*/, int /*index*/, IR::Expr *target) + virtual void getQmlContextProperty(IR::Expr *base, IR::Member::MemberKind /*kind*/, int /*index*/, bool /*captureRequired*/, IR::Expr *target) { addDef(target); addUses(base->asTemp(), Use::CouldHaveRegister); diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 9032503fdf..b7a4c4f643 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -988,7 +988,7 @@ ReturnedValue Runtime::method_callActivationProperty(ExecutionEngine *engine, in ReturnedValue Runtime::method_callQmlScopeObjectProperty(ExecutionEngine *engine, int propertyIndex, CallData *callData) { Scope scope(engine); - ScopedFunctionObject o(scope, method_getQmlScopeObjectProperty(engine, callData->thisObject, propertyIndex)); + ScopedFunctionObject o(scope, method_getQmlScopeObjectProperty(engine, callData->thisObject, propertyIndex, /*captureRequired*/true)); if (!o) { QString error = QStringLiteral("Property '%1' of scope object is not a function").arg(propertyIndex); return engine->throwTypeError(error); @@ -1001,7 +1001,7 @@ ReturnedValue Runtime::method_callQmlScopeObjectProperty(ExecutionEngine *engine ReturnedValue Runtime::method_callQmlContextObjectProperty(ExecutionEngine *engine, int propertyIndex, CallData *callData) { Scope scope(engine); - ScopedFunctionObject o(scope, method_getQmlContextObjectProperty(engine, callData->thisObject, propertyIndex)); + ScopedFunctionObject o(scope, method_getQmlContextObjectProperty(engine, callData->thisObject, propertyIndex, /*captureRequired*/true)); if (!o) { QString error = QStringLiteral("Property '%1' of context object is not a function").arg(propertyIndex); return engine->throwTypeError(error); @@ -1209,7 +1209,7 @@ QV4::ReturnedValue Runtime::method_typeofName(ExecutionEngine *engine, int nameI ReturnedValue Runtime::method_typeofScopeObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex) { Scope scope(engine); - ScopedValue prop(scope, method_getQmlScopeObjectProperty(engine, context, propertyIndex)); + ScopedValue prop(scope, method_getQmlScopeObjectProperty(engine, context, propertyIndex, /*captureRequired*/true)); if (scope.engine->hasException) return Encode::undefined(); return method_typeofValue(engine, prop); @@ -1218,7 +1218,7 @@ ReturnedValue Runtime::method_typeofScopeObjectProperty(ExecutionEngine *engine, ReturnedValue Runtime::method_typeofContextObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex) { Scope scope(engine); - ScopedValue prop(scope, method_getQmlContextObjectProperty(engine, context, propertyIndex)); + ScopedValue prop(scope, method_getQmlContextObjectProperty(engine, context, propertyIndex, /*captureRequired*/true)); if (scope.engine->hasException) return Encode::undefined(); return method_typeofValue(engine, prop); @@ -1453,16 +1453,16 @@ QV4::ReturnedValue Runtime::method_getQmlAttachedProperty(ExecutionEngine *engin return QV4::QObjectWrapper::getProperty(engine, attachedObject, propertyIndex, /*captureRequired*/true); } -ReturnedValue Runtime::method_getQmlScopeObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex) +ReturnedValue Runtime::method_getQmlScopeObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired) { const QmlContext &c = static_cast(context); - return QV4::QObjectWrapper::getProperty(engine, c.d()->qml->scopeObject, propertyIndex, false); + return QV4::QObjectWrapper::getProperty(engine, c.d()->qml->scopeObject, propertyIndex, captureRequired); } -ReturnedValue Runtime::method_getQmlContextObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex) +ReturnedValue Runtime::method_getQmlContextObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired) { const QmlContext &c = static_cast(context); - return QV4::QObjectWrapper::getProperty(engine, c.d()->qml->context->contextObject, propertyIndex, false); + return QV4::QObjectWrapper::getProperty(engine, c.d()->qml->context->contextObject, propertyIndex, captureRequired); } ReturnedValue Runtime::method_getQmlSingletonQObjectProperty(ExecutionEngine *engine, const Value &object, int propertyIndex, bool captureRequired) diff --git a/src/qml/jsruntime/qv4runtimeapi_p.h b/src/qml/jsruntime/qv4runtimeapi_p.h index 582cdcf4e9..040a545b83 100644 --- a/src/qml/jsruntime/qv4runtimeapi_p.h +++ b/src/qml/jsruntime/qv4runtimeapi_p.h @@ -327,8 +327,8 @@ struct Q_QML_PRIVATE_EXPORT Runtime { RUNTIME_METHOD(ReturnedValue, getQmlImportedScripts, (NoThrowEngine *engine)); RUNTIME_METHOD(ReturnedValue, getQmlSingleton, (NoThrowEngine *engine, int nameIndex)); RUNTIME_METHOD(ReturnedValue, getQmlAttachedProperty, (ExecutionEngine *engine, int attachedPropertiesId, int propertyIndex)); - RUNTIME_METHOD(ReturnedValue, getQmlScopeObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex)); - RUNTIME_METHOD(ReturnedValue, getQmlContextObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex)); + RUNTIME_METHOD(ReturnedValue, getQmlScopeObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired)); + RUNTIME_METHOD(ReturnedValue, getQmlContextObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired)); RUNTIME_METHOD(ReturnedValue, getQmlQObjectProperty, (ExecutionEngine *engine, const Value &object, int propertyIndex, bool captureRequired)); RUNTIME_METHOD(ReturnedValue, getQmlSingletonQObjectProperty, (ExecutionEngine *engine, const Value &object, int propertyIndex, bool captureRequired)); RUNTIME_METHOD(ReturnedValue, getQmlIdObject, (ExecutionEngine *engine, const Value &context, uint index)); diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index 420abd1458..9d18713253 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -527,7 +527,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code MOTH_END_INSTR(StoreScopeObjectProperty) MOTH_BEGIN_INSTR(LoadScopeObjectProperty) - STOREVALUE(instr.result, engine->runtime.getQmlScopeObjectProperty(engine, VALUE(instr.base), instr.propertyIndex)); + STOREVALUE(instr.result, engine->runtime.getQmlScopeObjectProperty(engine, VALUE(instr.base), instr.propertyIndex, instr.captureRequired)); MOTH_END_INSTR(LoadScopeObjectProperty) MOTH_BEGIN_INSTR(StoreContextObjectProperty) @@ -536,7 +536,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code MOTH_END_INSTR(StoreContextObjectProperty) MOTH_BEGIN_INSTR(LoadContextObjectProperty) - STOREVALUE(instr.result, engine->runtime.getQmlContextObjectProperty(engine, VALUE(instr.base), instr.propertyIndex)); + STOREVALUE(instr.result, engine->runtime.getQmlContextObjectProperty(engine, VALUE(instr.base), instr.propertyIndex, instr.captureRequired)); MOTH_END_INSTR(LoadContextObjectProperty) MOTH_BEGIN_INSTR(LoadIdObject) -- cgit v1.2.3 From e3b277d5ccac5b9a5cdcbb292fb04d84d44c7869 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 29 Aug 2016 14:18:31 +0200 Subject: Fix conversion of QByteArray back to String in JavaScript Commit 3b7e2a69f7eb8597c807de39b4de39721e9e2bd2 changed behavior so that QByteArray is converted to the JS ArrayBuffer type, which is a better fit than QVariant. However ArrayBuffer does not have a toString method in the spec, and therefore any previous implicit toString conversion such as when passing to JSON.parse() would fail. To restore compatibility this patch adds a non-spec toString() that performs an UTF-8 conversion, as it was done previously through QVariant's toString. Task-number: QTBUG-55562 Change-Id: I096046954f7b29f7258deaa9ef5c8fa9292552ef Reviewed-by: Lars Knoll Reviewed-by: J-P Nurmi --- src/qml/jsruntime/qv4arraybuffer.cpp | 10 ++++++++++ src/qml/jsruntime/qv4arraybuffer_p.h | 1 + 2 files changed, 11 insertions(+) (limited to 'src') diff --git a/src/qml/jsruntime/qv4arraybuffer.cpp b/src/qml/jsruntime/qv4arraybuffer.cpp index e006773c9e..34c7746684 100644 --- a/src/qml/jsruntime/qv4arraybuffer.cpp +++ b/src/qml/jsruntime/qv4arraybuffer.cpp @@ -154,6 +154,7 @@ void ArrayBufferPrototype::init(ExecutionEngine *engine, Object *ctor) defineDefaultProperty(engine->id_constructor(), (o = ctor)); defineAccessorProperty(QStringLiteral("byteLength"), method_get_byteLength, 0); defineDefaultProperty(QStringLiteral("slice"), method_slice, 2); + defineDefaultProperty(QStringLiteral("toString"), method_toString, 0); } ReturnedValue ArrayBufferPrototype::method_get_byteLength(CallContext *ctx) @@ -198,3 +199,12 @@ ReturnedValue ArrayBufferPrototype::method_slice(CallContext *ctx) return newBuffer.asReturnedValue(); } + +ReturnedValue ArrayBufferPrototype::method_toString(CallContext *ctx) +{ + Scope scope(ctx); + Scoped a(scope, ctx->thisObject()); + if (!a) + return Encode::undefined(); + return Encode(ctx->engine()->newString(QString::fromUtf8(a->asByteArray()))); +} diff --git a/src/qml/jsruntime/qv4arraybuffer_p.h b/src/qml/jsruntime/qv4arraybuffer_p.h index d079aeb9f7..b552cef9f1 100644 --- a/src/qml/jsruntime/qv4arraybuffer_p.h +++ b/src/qml/jsruntime/qv4arraybuffer_p.h @@ -106,6 +106,7 @@ struct ArrayBufferPrototype: Object static ReturnedValue method_get_byteLength(CallContext *ctx); static ReturnedValue method_slice(CallContext *ctx); + static ReturnedValue method_toString(CallContext *ctx); }; -- cgit v1.2.3 From 88c37194b2168fb9f915aaaf07d3bfbc5dc8be3d Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 30 Aug 2016 20:44:29 +0200 Subject: Bump cache file format version ... after the recent changes to codegen and runtime API. Change-Id: Id6f1ebf7b0c4dfab050c7262209dbe26116b2e7b Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4compileddata_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index b71c1d8185..ae8677138e 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE // Bump this whenever the compiler data structures change in an incompatible way. -#define QV4_DATA_STRUCTURE_VERSION 0x03 +#define QV4_DATA_STRUCTURE_VERSION 0x04 class QIODevice; class QQmlPropertyCache; -- cgit v1.2.3 From c13aa48d4cad8659af2b491e4b3ddbe46b38fcc5 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 30 Aug 2016 12:35:36 +0200 Subject: QML: treat permanent guards more like active guards Esp. when disabling notifications and marking notifiers as "done". Change-Id: I2d1c3bf048b32f68680744250e4250c3c4d76660 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlbinding.cpp | 2 ++ src/qml/qml/qqmljavascriptexpression.cpp | 10 ++++++++-- src/qml/qml/qqmljavascriptexpression_p.h | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp index 896bc8d51d..90698c3b24 100644 --- a/src/qml/qml/qqmlbinding.cpp +++ b/src/qml/qml/qqmlbinding.cpp @@ -252,6 +252,8 @@ protected: } + cancelPermanentGuards(); + ep->dereferenceScarceResources(); } diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index ebc4d49c36..8020bdb2be 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -115,12 +115,17 @@ QQmlJavaScriptExpression::~QQmlJavaScriptExpression() void QQmlJavaScriptExpression::setNotifyOnValueChanged(bool v) { activeGuards.setFlagValue(v); - if (!v) clearActiveGuards(); + permanentGuards.setFlagValue(v); + if (!v) { + clearActiveGuards(); + clearPermanentGuards(); + m_permanentDependenciesRegistered = false; + } } void QQmlJavaScriptExpression::resetNotifyOnValueChanged() { - clearActiveGuards(); + setNotifyOnValueChanged(false); } void QQmlJavaScriptExpression::setContext(QQmlContextData *context) @@ -429,6 +434,7 @@ void QQmlJavaScriptExpression::clearActiveGuards() void QQmlJavaScriptExpression::clearPermanentGuards() { + m_permanentDependenciesRegistered = false; while (QQmlJavaScriptExpressionGuard *g = permanentGuards.takeFirst()) g->Delete(); } diff --git a/src/qml/qml/qqmljavascriptexpression_p.h b/src/qml/qml/qqmljavascriptexpression_p.h index a5c7a80153..5f9cffb56d 100644 --- a/src/qml/qml/qqmljavascriptexpression_p.h +++ b/src/qml/qml/qqmljavascriptexpression_p.h @@ -146,6 +146,14 @@ public: protected: void createQmlBinding(QQmlContextData *ctxt, QObject *scope, const QString &code, const QString &filename, quint16 line); + void cancelPermanentGuards() const + { + if (m_permanentDependenciesRegistered) { + for (QQmlJavaScriptExpressionGuard *it = permanentGuards.first(); it; it = permanentGuards.next(it)) + it->cancelNotify(); + } + } + private: friend class QQmlContextData; friend class QQmlPropertyCapture; -- cgit v1.2.3 From 3839f6f572eddd0e864266d218bf3be555ff9924 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 26 Aug 2016 13:04:38 +0200 Subject: QQuickWidget: Don't render into a null image Change-Id: I3f70a16e3e48128b2eff906105b033af5a86079a Reviewed-by: Laszlo Agocs --- src/quickwidgets/qquickwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index c608697c94..de3692afb0 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -298,7 +298,7 @@ void QQuickWidgetPrivate::render(bool needsSync) QQuickWindowPrivate *cd = QQuickWindowPrivate::get(offscreenWindow); auto softwareRenderer = static_cast(cd->renderer); - if (softwareRenderer) { + if (softwareRenderer && !softwareImage.isNull()) { softwareRenderer->setCurrentPaintDevice(&softwareImage); renderControl->render(); -- cgit v1.2.3 From 589b79c2b1bff65eb96a24047a2cf46d1811b6d6 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Fri, 2 Sep 2016 09:06:01 +0200 Subject: Fix warning Otherwise breaks developer build for Windows Phone 8.1 Change-Id: I7810521f82de6b23ebb6b770374596c799bd135b Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4compilationunitmapper_win.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/qml/compiler/qv4compilationunitmapper_win.cpp b/src/qml/compiler/qv4compilationunitmapper_win.cpp index abf109484b..457b702ac3 100644 --- a/src/qml/compiler/qv4compilationunitmapper_win.cpp +++ b/src/qml/compiler/qv4compilationunitmapper_win.cpp @@ -116,6 +116,7 @@ CompiledData::Unit *CompilationUnitMapper::open(const QString &cacheFileName, co return reinterpret_cast(dataPtr); #else + Q_UNUSED(sourcePath); *errorString = QStringLiteral("Compilation unit mapping not supported on WinRT 8.1"); return nullptr; #endif -- cgit v1.2.3 From 7a518d8541c2628073fdbc36945dcacd07da1f07 Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Fri, 2 Sep 2016 09:27:18 +0300 Subject: Fix crash when instantiating new QObject object through QMetaObject Task-number: QTBUG-55691 Change-Id: I3472299e6a963a485be082c9522f1b48fb6c34c3 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4qobjectwrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index 3e1759fe9b..5d5db8bed4 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -1922,7 +1922,7 @@ ReturnedValue QMetaObjectWrapper::callConstructor(const QQmlPropertyData &data, const QMetaObject* mo = d()->metaObject; const QQmlStaticMetaObject object(mo); - return CallPrecise(object, data, engine, callArgs, QMetaObject::InvokeMetaMethod); + return CallPrecise(object, data, engine, callArgs, QMetaObject::CreateInstance); } -- cgit v1.2.3 From 9c8fc476c68767895a2c4086cb7f5b99c5fa141f Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 24 Aug 2016 13:04:46 +0200 Subject: Doc: Remove newline to fix QSGMaterial flags table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The value description cannot have empty lines, otherwise the table formatting is broken. Change-Id: Iea42356f5b49215bd9118c76ad988295dbd76a31 Reviewed-by: Topi Reiniƶ --- src/quick/scenegraph/coreapi/qsgmaterial.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.cpp b/src/quick/scenegraph/coreapi/qsgmaterial.cpp index 4bec7b19f4..13598bbe1d 100644 --- a/src/quick/scenegraph/coreapi/qsgmaterial.cpp +++ b/src/quick/scenegraph/coreapi/qsgmaterial.cpp @@ -681,7 +681,6 @@ QSGMaterial::~QSGMaterial() the full matrix of the geometry nodes for rendering. \value CustomCompileStep Starting with Qt 5.2, the scene graph will not always call - QSGMaterialShader::compile() when its shader program is compiled and linked. Set this flag to enforce that the function is called. -- cgit v1.2.3 From cd77297bd97bdd70d9526fb9c54ebcca8c081def Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Sun, 4 Sep 2016 11:27:18 +0300 Subject: Add qmlRegisterUncreatableMetaObject convenience function qmlRegisterUncreatableMetaObject is needed to register Q_NAMESPACE QMetaObjects. Task-number: QTBUG-54982 Change-Id: I767dfcb15db647e0dceb0c37b17e64f2a5c1dd8f Reviewed-by: Simon Hausmann --- src/qml/doc/src/qmlfunctions.qdoc | 36 ++++++++++++++++++++++++++++++++++++ src/qml/qml/qqml.h | 3 +++ src/qml/qml/qqmlengine.cpp | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) (limited to 'src') diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc index 26fc40ff37..8b24d19891 100644 --- a/src/qml/doc/src/qmlfunctions.qdoc +++ b/src/qml/doc/src/qmlfunctions.qdoc @@ -179,6 +179,42 @@ \sa qmlRegisterUncreatableType() */ +/*! + \fn static inline int qmlRegisterUncreatableMetaObject(const QMetaObject &staticMetaObject, const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& reason) + \relates QQmlEngine + \since 5.8 + + This function registers the \a staticMetaObject and its extension + in the QML system with the name \a qmlName in the library imported + from \a uri having version number composed from \a versionMajor and + \a versionMinor. + + This function is useful to register Q_NAMESPACE namespaces. + + Returns the QML type id. + + Example: + + \code + namespace MyNamespace { + Q_NAMESPACE + enum MyEnum { + Key1, + Key2, + }; + Q_ENUMS(MyEnum) + } + + //... + qmlRegisterUncreatableMetaObject(MyNamespace::staticMetaObject, "io.qt", 1, 0, "MyNamespace", "Access to enums & flags only"); + \endcode + + Now on QML side you can use the registered enums: + \code + Component.onCompleted: console.log(MyNamespace.Key2) + \endcode +*/ + /*! \fn int qmlRegisterCustomExtendedType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, QQmlCustomParser *parser) \relates QQmlEngine diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h index 8fb710ad9d..39764b8001 100644 --- a/src/qml/qml/qqml.h +++ b/src/qml/qml/qqml.h @@ -238,6 +238,9 @@ int qmlRegisterExtendedUncreatableType(const char *uri, int versionMajor, int ve return QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type); } + +Q_QML_EXPORT int qmlRegisterUncreatableMetaObject(const QMetaObject &staticMetaObject, const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& reason); + template int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName) { diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 7e4fe73ba1..cb51c18925 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -116,6 +116,39 @@ void qmlRegisterBaseTypes(const char *uri, int versionMajor, int versionMinor) QQmlValueTypeFactory::registerValueTypes(uri, versionMajor, versionMinor); } +// Declared in qqml.h +int qmlRegisterUncreatableMetaObject(const QMetaObject &staticMetaObject, + const char *uri, int versionMajor, + int versionMinor, const char *qmlName, + const QString& reason) +{ + QQmlPrivate::RegisterType type = { + 0, + + 0, + 0, + 0, + Q_NULLPTR, + reason, + + uri, versionMajor, versionMinor, qmlName, &staticMetaObject, + + QQmlAttachedPropertiesFunc(), + Q_NULLPTR, + + 0, + 0, + 0, + + Q_NULLPTR, Q_NULLPTR, + + Q_NULLPTR, + 0 + }; + + return QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type); +} + /*! \qmltype QtObject \instantiates QObject -- cgit v1.2.3 From d98c282554a83be015af742957580a6bf7dd4c68 Mon Sep 17 00:00:00 2001 From: Marco Benelli Date: Thu, 8 Sep 2016 17:32:46 +0200 Subject: Update .qmltypes Update qmltypes for 5.8. For some files the -noforceqtquick option is used; in this way there are no redundand definitions of QtQuick component and no unneded dependencies from QtQuick. Change-Id: Id29683fcd6d15056923867ea65b091f998297fc4 Reviewed-by: Simon Hausmann --- src/imports/builtins/builtins.qmltypes | 25 +- src/imports/folderlistmodel/plugins.qmltypes | 275 +--------------- src/imports/layouts/plugins.qmltypes | 4 +- src/imports/localstorage/plugins.qmltypes | 2 +- src/imports/models/plugins.qmltypes | 466 +-------------------------- src/imports/particles/plugins.qmltypes | 206 +----------- src/imports/qtqml/plugins.qmltypes | 21 +- src/imports/qtquick2/plugins.qmltypes | 185 +++++++++-- src/imports/settings/plugins.qmltypes | 2 +- src/imports/statemachine/plugins.qmltypes | 2 +- src/imports/testlib/plugins.qmltypes | 5 +- src/imports/window/plugins.qmltypes | 16 +- src/imports/xmllistmodel/plugins.qmltypes | 267 +-------------- 13 files changed, 223 insertions(+), 1253 deletions(-) (limited to 'src') diff --git a/src/imports/builtins/builtins.qmltypes b/src/imports/builtins/builtins.qmltypes index cca1c20d54..88e3ac6634 100644 --- a/src/imports/builtins/builtins.qmltypes +++ b/src/imports/builtins/builtins.qmltypes @@ -198,9 +198,7 @@ Module { "MacWindowToolBarButtonHint": 268435456, "BypassGraphicsProxyWidget": 536870912, "NoDropShadowWindowHint": 1073741824, - "WindowFullscreenButtonHint": -2147483648, - "WindowOkButtonHint": 524288, - "WindowCancelButtonHint": 1048576 + "WindowFullscreenButtonHint": -2147483648 } } Enum { @@ -243,9 +241,7 @@ Module { "MacWindowToolBarButtonHint": 268435456, "BypassGraphicsProxyWidget": 536870912, "NoDropShadowWindowHint": 1073741824, - "WindowFullscreenButtonHint": -2147483648, - "WindowOkButtonHint": 524288, - "WindowCancelButtonHint": 1048576 + "WindowFullscreenButtonHint": -2147483648 } } Enum { @@ -422,6 +418,7 @@ Module { "AA_DontShowIconsInMenus": 2, "AA_NativeWindows": 3, "AA_DontCreateNativeWidgetSiblings": 4, + "AA_PluginApplication": 5, "AA_MacPluginApplication": 5, "AA_DontUseNativeMenuBar": 6, "AA_MacDontSwapCtrlAndMeta": 7, @@ -438,7 +435,12 @@ Module { "AA_SetPalette": 19, "AA_EnableHighDpiScaling": 20, "AA_DisableHighDpiScaling": 21, - "AA_AttributeCount": 22 + "AA_UseStyleSheetPropagationInWidgetStyles": 22, + "AA_DontUseNativeDialogs": 23, + "AA_SynthesizeMouseForUnhandledTabletEvents": 24, + "AA_CompressHighFrequencyEvents": 25, + "AA_DontCheckOpenGLContextThreadAffinity": 26, + "AA_AttributeCount": 27 } } Enum { @@ -1274,8 +1276,10 @@ Module { "ImTextBeforeCursor": 2048, "ImTextAfterCursor": 4096, "ImEnterKeyType": 8192, + "ImAnchorRectangle": 16384, + "ImInputItemClipRectangle": 32768, "ImPlatformData": -2147483648, - "ImQueryInput": 186, + "ImQueryInput": 16570, "ImQueryAll": -1 } } @@ -1297,8 +1301,10 @@ Module { "ImTextBeforeCursor": 2048, "ImTextAfterCursor": 4096, "ImEnterKeyType": 8192, + "ImAnchorRectangle": 16384, + "ImInputItemClipRectangle": 32768, "ImPlatformData": -2147483648, - "ImQueryInput": 186, + "ImQueryInput": 16570, "ImQueryAll": -1 } } @@ -1579,6 +1585,7 @@ Module { Enum { name: "ScrollPhase" values: { + "NoScrollPhase": 0, "ScrollBegin": 1, "ScrollUpdate": 2, "ScrollEnd": 3 diff --git a/src/imports/folderlistmodel/plugins.qmltypes b/src/imports/folderlistmodel/plugins.qmltypes index 02127c63cb..e77b633932 100644 --- a/src/imports/folderlistmodel/plugins.qmltypes +++ b/src/imports/folderlistmodel/plugins.qmltypes @@ -4,284 +4,20 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable Qt.labs.folderlistmodel 2.1' +// 'qmlplugindump -nonrelocatable Qt.labs.folderlistmodel 2.2' Module { - dependencies: [] - Component { - name: "QAbstractItemModel" - prototype: "QObject" - Enum { - name: "LayoutChangeHint" - values: { - "NoLayoutChangeHint": 0, - "VerticalSortHint": 1, - "HorizontalSortHint": 2 - } - } - Signal { - name: "dataChanged" - Parameter { name: "topLeft"; type: "QModelIndex" } - Parameter { name: "bottomRight"; type: "QModelIndex" } - Parameter { name: "roles"; type: "QVector" } - } - Signal { - name: "dataChanged" - Parameter { name: "topLeft"; type: "QModelIndex" } - Parameter { name: "bottomRight"; type: "QModelIndex" } - } - Signal { - name: "headerDataChanged" - Parameter { name: "orientation"; type: "Qt::Orientation" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "layoutChanged" - Parameter { name: "parents"; type: "QList" } - Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" } - } - Signal { - name: "layoutChanged" - Parameter { name: "parents"; type: "QList" } - } - Signal { name: "layoutChanged" } - Signal { - name: "layoutAboutToBeChanged" - Parameter { name: "parents"; type: "QList" } - Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" } - } - Signal { - name: "layoutAboutToBeChanged" - Parameter { name: "parents"; type: "QList" } - } - Signal { name: "layoutAboutToBeChanged" } - Signal { - name: "rowsAboutToBeInserted" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "rowsInserted" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "rowsAboutToBeRemoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "rowsRemoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "columnsAboutToBeInserted" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "columnsInserted" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "columnsAboutToBeRemoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "columnsRemoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { name: "modelAboutToBeReset" } - Signal { name: "modelReset" } - Signal { - name: "rowsAboutToBeMoved" - Parameter { name: "sourceParent"; type: "QModelIndex" } - Parameter { name: "sourceStart"; type: "int" } - Parameter { name: "sourceEnd"; type: "int" } - Parameter { name: "destinationParent"; type: "QModelIndex" } - Parameter { name: "destinationRow"; type: "int" } - } - Signal { - name: "rowsMoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "start"; type: "int" } - Parameter { name: "end"; type: "int" } - Parameter { name: "destination"; type: "QModelIndex" } - Parameter { name: "row"; type: "int" } - } - Signal { - name: "columnsAboutToBeMoved" - Parameter { name: "sourceParent"; type: "QModelIndex" } - Parameter { name: "sourceStart"; type: "int" } - Parameter { name: "sourceEnd"; type: "int" } - Parameter { name: "destinationParent"; type: "QModelIndex" } - Parameter { name: "destinationColumn"; type: "int" } - } - Signal { - name: "columnsMoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "start"; type: "int" } - Parameter { name: "end"; type: "int" } - Parameter { name: "destination"; type: "QModelIndex" } - Parameter { name: "column"; type: "int" } - } - Method { name: "submit"; type: "bool" } - Method { name: "revert" } - Method { - name: "hasIndex" - type: "bool" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { - name: "hasIndex" - type: "bool" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - } - Method { - name: "index" - type: "QModelIndex" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { - name: "index" - type: "QModelIndex" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - } - Method { - name: "parent" - type: "QModelIndex" - Parameter { name: "child"; type: "QModelIndex" } - } - Method { - name: "sibling" - type: "QModelIndex" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - Parameter { name: "idx"; type: "QModelIndex" } - } - Method { - name: "rowCount" - type: "int" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { name: "rowCount"; type: "int" } - Method { - name: "columnCount" - type: "int" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { name: "columnCount"; type: "int" } - Method { - name: "hasChildren" - type: "bool" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { name: "hasChildren"; type: "bool" } - Method { - name: "data" - type: "QVariant" - Parameter { name: "index"; type: "QModelIndex" } - Parameter { name: "role"; type: "int" } - } - Method { - name: "data" - type: "QVariant" - Parameter { name: "index"; type: "QModelIndex" } - } - Method { - name: "setData" - type: "bool" - Parameter { name: "index"; type: "QModelIndex" } - Parameter { name: "value"; type: "QVariant" } - Parameter { name: "role"; type: "int" } - } - Method { - name: "setData" - type: "bool" - Parameter { name: "index"; type: "QModelIndex" } - Parameter { name: "value"; type: "QVariant" } - } - Method { - name: "headerData" - type: "QVariant" - Parameter { name: "section"; type: "int" } - Parameter { name: "orientation"; type: "Qt::Orientation" } - Parameter { name: "role"; type: "int" } - } - Method { - name: "headerData" - type: "QVariant" - Parameter { name: "section"; type: "int" } - Parameter { name: "orientation"; type: "Qt::Orientation" } - } - Method { - name: "fetchMore" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { - name: "canFetchMore" - type: "bool" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { - name: "flags" - type: "Qt::ItemFlags" - Parameter { name: "index"; type: "QModelIndex" } - } - Method { - name: "match" - type: "QModelIndexList" - Parameter { name: "start"; type: "QModelIndex" } - Parameter { name: "role"; type: "int" } - Parameter { name: "value"; type: "QVariant" } - Parameter { name: "hits"; type: "int" } - Parameter { name: "flags"; type: "Qt::MatchFlags" } - } - Method { - name: "match" - type: "QModelIndexList" - Parameter { name: "start"; type: "QModelIndex" } - Parameter { name: "role"; type: "int" } - Parameter { name: "value"; type: "QVariant" } - Parameter { name: "hits"; type: "int" } - } - Method { - name: "match" - type: "QModelIndexList" - Parameter { name: "start"; type: "QModelIndex" } - Parameter { name: "role"; type: "int" } - Parameter { name: "value"; type: "QVariant" } - } - } - Component { name: "QAbstractListModel"; prototype: "QAbstractItemModel" } + dependencies: ["QtQuick 2.8"] Component { name: "QQuickFolderListModel" prototype: "QAbstractListModel" exports: [ "Qt.labs.folderlistmodel/FolderListModel 1.0", "Qt.labs.folderlistmodel/FolderListModel 2.0", - "Qt.labs.folderlistmodel/FolderListModel 2.1" + "Qt.labs.folderlistmodel/FolderListModel 2.1", + "Qt.labs.folderlistmodel/FolderListModel 2.2" ] - exportMetaObjectRevisions: [0, 0, 1] + exportMetaObjectRevisions: [0, 0, 1, 2] Enum { name: "SortField" values: { @@ -304,6 +40,7 @@ Module { Property { name: "showDotAndDotDot"; type: "bool" } Property { name: "showHidden"; revision: 1; type: "bool" } Property { name: "showOnlyReadable"; type: "bool" } + Property { name: "caseSensitive"; revision: 2; type: "bool" } Property { name: "count"; type: "int"; isReadonly: true } Signal { name: "rowCountChanged" } Signal { name: "countChanged"; revision: 1 } diff --git a/src/imports/layouts/plugins.qmltypes b/src/imports/layouts/plugins.qmltypes index b130215b62..afb563391d 100644 --- a/src/imports/layouts/plugins.qmltypes +++ b/src/imports/layouts/plugins.qmltypes @@ -4,10 +4,10 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable QtQuick.Layouts 1.2' +// 'qmlplugindump -nonrelocatable QtQuick.Layouts 1.3' Module { - dependencies: [] + dependencies: ["QtQuick 2.8"] Component { name: "QQuickColumnLayout" defaultProperty: "data" diff --git a/src/imports/localstorage/plugins.qmltypes b/src/imports/localstorage/plugins.qmltypes index 7d81cdf6f4..dee81a78d0 100644 --- a/src/imports/localstorage/plugins.qmltypes +++ b/src/imports/localstorage/plugins.qmltypes @@ -4,7 +4,7 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable QtQuick.LocalStorage 2.0' +// 'qmlplugindump -nonrelocatable -noforceqtquick QtQuick.LocalStorage 2.0' Module { dependencies: [] diff --git a/src/imports/models/plugins.qmltypes b/src/imports/models/plugins.qmltypes index 0bd52a13fd..aa06a2a709 100644 --- a/src/imports/models/plugins.qmltypes +++ b/src/imports/models/plugins.qmltypes @@ -7,272 +7,7 @@ import QtQuick.tooling 1.2 // 'qmlplugindump -nonrelocatable QtQml.Models 2.3' Module { - dependencies: [] - Component { - name: "QAbstractItemModel" - prototype: "QObject" - Enum { - name: "LayoutChangeHint" - values: { - "NoLayoutChangeHint": 0, - "VerticalSortHint": 1, - "HorizontalSortHint": 2 - } - } - Signal { - name: "dataChanged" - Parameter { name: "topLeft"; type: "QModelIndex" } - Parameter { name: "bottomRight"; type: "QModelIndex" } - Parameter { name: "roles"; type: "QVector" } - } - Signal { - name: "dataChanged" - Parameter { name: "topLeft"; type: "QModelIndex" } - Parameter { name: "bottomRight"; type: "QModelIndex" } - } - Signal { - name: "headerDataChanged" - Parameter { name: "orientation"; type: "Qt::Orientation" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "layoutChanged" - Parameter { name: "parents"; type: "QList" } - Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" } - } - Signal { - name: "layoutChanged" - Parameter { name: "parents"; type: "QList" } - } - Signal { name: "layoutChanged" } - Signal { - name: "layoutAboutToBeChanged" - Parameter { name: "parents"; type: "QList" } - Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" } - } - Signal { - name: "layoutAboutToBeChanged" - Parameter { name: "parents"; type: "QList" } - } - Signal { name: "layoutAboutToBeChanged" } - Signal { - name: "rowsAboutToBeInserted" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "rowsInserted" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "rowsAboutToBeRemoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "rowsRemoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "columnsAboutToBeInserted" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "columnsInserted" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "columnsAboutToBeRemoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "columnsRemoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { name: "modelAboutToBeReset" } - Signal { name: "modelReset" } - Signal { - name: "rowsAboutToBeMoved" - Parameter { name: "sourceParent"; type: "QModelIndex" } - Parameter { name: "sourceStart"; type: "int" } - Parameter { name: "sourceEnd"; type: "int" } - Parameter { name: "destinationParent"; type: "QModelIndex" } - Parameter { name: "destinationRow"; type: "int" } - } - Signal { - name: "rowsMoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "start"; type: "int" } - Parameter { name: "end"; type: "int" } - Parameter { name: "destination"; type: "QModelIndex" } - Parameter { name: "row"; type: "int" } - } - Signal { - name: "columnsAboutToBeMoved" - Parameter { name: "sourceParent"; type: "QModelIndex" } - Parameter { name: "sourceStart"; type: "int" } - Parameter { name: "sourceEnd"; type: "int" } - Parameter { name: "destinationParent"; type: "QModelIndex" } - Parameter { name: "destinationColumn"; type: "int" } - } - Signal { - name: "columnsMoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "start"; type: "int" } - Parameter { name: "end"; type: "int" } - Parameter { name: "destination"; type: "QModelIndex" } - Parameter { name: "column"; type: "int" } - } - Method { name: "submit"; type: "bool" } - Method { name: "revert" } - Method { - name: "hasIndex" - type: "bool" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { - name: "hasIndex" - type: "bool" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - } - Method { - name: "index" - type: "QModelIndex" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { - name: "index" - type: "QModelIndex" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - } - Method { - name: "parent" - type: "QModelIndex" - Parameter { name: "child"; type: "QModelIndex" } - } - Method { - name: "sibling" - type: "QModelIndex" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - Parameter { name: "idx"; type: "QModelIndex" } - } - Method { - name: "rowCount" - type: "int" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { name: "rowCount"; type: "int" } - Method { - name: "columnCount" - type: "int" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { name: "columnCount"; type: "int" } - Method { - name: "hasChildren" - type: "bool" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { name: "hasChildren"; type: "bool" } - Method { - name: "data" - type: "QVariant" - Parameter { name: "index"; type: "QModelIndex" } - Parameter { name: "role"; type: "int" } - } - Method { - name: "data" - type: "QVariant" - Parameter { name: "index"; type: "QModelIndex" } - } - Method { - name: "setData" - type: "bool" - Parameter { name: "index"; type: "QModelIndex" } - Parameter { name: "value"; type: "QVariant" } - Parameter { name: "role"; type: "int" } - } - Method { - name: "setData" - type: "bool" - Parameter { name: "index"; type: "QModelIndex" } - Parameter { name: "value"; type: "QVariant" } - } - Method { - name: "headerData" - type: "QVariant" - Parameter { name: "section"; type: "int" } - Parameter { name: "orientation"; type: "Qt::Orientation" } - Parameter { name: "role"; type: "int" } - } - Method { - name: "headerData" - type: "QVariant" - Parameter { name: "section"; type: "int" } - Parameter { name: "orientation"; type: "Qt::Orientation" } - } - Method { - name: "fetchMore" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { - name: "canFetchMore" - type: "bool" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { - name: "flags" - type: "Qt::ItemFlags" - Parameter { name: "index"; type: "QModelIndex" } - } - Method { - name: "match" - type: "QModelIndexList" - Parameter { name: "start"; type: "QModelIndex" } - Parameter { name: "role"; type: "int" } - Parameter { name: "value"; type: "QVariant" } - Parameter { name: "hits"; type: "int" } - Parameter { name: "flags"; type: "Qt::MatchFlags" } - } - Method { - name: "match" - type: "QModelIndexList" - Parameter { name: "start"; type: "QModelIndex" } - Parameter { name: "role"; type: "int" } - Parameter { name: "value"; type: "QVariant" } - Parameter { name: "hits"; type: "int" } - } - Method { - name: "match" - type: "QModelIndexList" - Parameter { name: "start"; type: "QModelIndex" } - Parameter { name: "role"; type: "int" } - Parameter { name: "value"; type: "QVariant" } - } - } - Component { name: "QAbstractListModel"; prototype: "QAbstractItemModel" } + dependencies: ["QtQuick 2.8"] Component { name: "QItemSelectionModel" prototype: "QObject" @@ -384,203 +119,4 @@ Module { } Method { name: "selectedColumns"; type: "QModelIndexList" } } - Component { - name: "QQmlDelegateModel" - defaultProperty: "delegate" - prototype: "QQmlInstanceModel" - exports: ["QtQml.Models/DelegateModel 2.1"] - exportMetaObjectRevisions: [0] - attachedType: "QQmlDelegateModelAttached" - Property { name: "model"; type: "QVariant" } - Property { name: "delegate"; type: "QQmlComponent"; isPointer: true } - Property { name: "filterOnGroup"; type: "string" } - Property { name: "items"; type: "QQmlDelegateModelGroup"; isReadonly: true; isPointer: true } - Property { - name: "persistedItems" - type: "QQmlDelegateModelGroup" - isReadonly: true - isPointer: true - } - Property { name: "groups"; type: "QQmlDelegateModelGroup"; isList: true; isReadonly: true } - Property { name: "parts"; type: "QObject"; isReadonly: true; isPointer: true } - Property { name: "rootIndex"; type: "QVariant" } - Signal { name: "filterGroupChanged" } - Signal { name: "defaultGroupsChanged" } - Method { - name: "modelIndex" - type: "QVariant" - Parameter { name: "idx"; type: "int" } - } - Method { name: "parentModelIndex"; type: "QVariant" } - } - Component { - name: "QQmlDelegateModelAttached" - prototype: "QObject" - Property { name: "model"; type: "QQmlDelegateModel"; isReadonly: true; isPointer: true } - Property { name: "groups"; type: "QStringList" } - Property { name: "isUnresolved"; type: "bool"; isReadonly: true } - Signal { name: "unresolvedChanged" } - } - Component { - name: "QQmlDelegateModelGroup" - prototype: "QObject" - exports: ["QtQml.Models/DelegateModelGroup 2.1"] - exportMetaObjectRevisions: [0] - Property { name: "count"; type: "int"; isReadonly: true } - Property { name: "name"; type: "string" } - Property { name: "includeByDefault"; type: "bool" } - Signal { name: "defaultIncludeChanged" } - Signal { - name: "changed" - Parameter { name: "removed"; type: "QQmlV4Handle" } - Parameter { name: "inserted"; type: "QQmlV4Handle" } - } - Method { - name: "insert" - Parameter { type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "create" - Parameter { type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "resolve" - Parameter { type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "remove" - Parameter { type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "addGroups" - Parameter { type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "removeGroups" - Parameter { type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "setGroups" - Parameter { type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "move" - Parameter { type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "get" - type: "QQmlV4Handle" - Parameter { name: "index"; type: "int" } - } - } - Component { name: "QQmlDelegateModelParts"; prototype: "QObject" } - Component { - name: "QQmlListElement" - prototype: "QObject" - exports: ["QtQml.Models/ListElement 2.1"] - exportMetaObjectRevisions: [0] - } - Component { - name: "QQmlListModel" - prototype: "QAbstractListModel" - exports: ["QtQml.Models/ListModel 2.1"] - exportMetaObjectRevisions: [0] - Property { name: "count"; type: "int"; isReadonly: true } - Property { name: "dynamicRoles"; type: "bool" } - Method { name: "clear" } - Method { - name: "remove" - Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "append" - Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "insert" - Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "get" - type: "QQmlV4Handle" - Parameter { name: "index"; type: "int" } - } - Method { - name: "set" - Parameter { name: "index"; type: "int" } - Parameter { type: "QQmlV4Handle" } - } - Method { - name: "setProperty" - Parameter { name: "index"; type: "int" } - Parameter { name: "property"; type: "string" } - Parameter { name: "value"; type: "QVariant" } - } - Method { - name: "move" - Parameter { name: "from"; type: "int" } - Parameter { name: "to"; type: "int" } - Parameter { name: "count"; type: "int" } - } - Method { name: "sync" } - } - Component { - name: "QQmlObjectModel" - defaultProperty: "children" - prototype: "QQmlInstanceModel" - exports: [ - "QtQml.Models/ObjectModel 2.1", - "QtQml.Models/ObjectModel 2.3" - ] - exportMetaObjectRevisions: [0, 3] - attachedType: "QQmlObjectModelAttached" - Property { name: "children"; type: "QObject"; isList: true; isReadonly: true } - Method { name: "clear"; revision: 3 } - Method { - name: "get" - revision: 3 - type: "QObject*" - Parameter { name: "index"; type: "int" } - } - Method { - name: "append" - revision: 3 - Parameter { name: "object"; type: "QObject"; isPointer: true } - } - Method { - name: "insert" - revision: 3 - Parameter { name: "index"; type: "int" } - Parameter { name: "object"; type: "QObject"; isPointer: true } - } - Method { - name: "move" - revision: 3 - Parameter { name: "from"; type: "int" } - Parameter { name: "to"; type: "int" } - Parameter { name: "n"; type: "int" } - } - Method { - name: "move" - revision: 3 - Parameter { name: "from"; type: "int" } - Parameter { name: "to"; type: "int" } - } - Method { - name: "remove" - revision: 3 - Parameter { name: "index"; type: "int" } - Parameter { name: "n"; type: "int" } - } - Method { - name: "remove" - revision: 3 - Parameter { name: "index"; type: "int" } - } - } - Component { - name: "QQmlObjectModelAttached" - prototype: "QObject" - Property { name: "index"; type: "int"; isReadonly: true } - } } diff --git a/src/imports/particles/plugins.qmltypes b/src/imports/particles/plugins.qmltypes index ce78392610..5c4bd01980 100644 --- a/src/imports/particles/plugins.qmltypes +++ b/src/imports/particles/plugins.qmltypes @@ -7,7 +7,7 @@ import QtQuick.tooling 1.2 // 'qmlplugindump -nonrelocatable QtQuick.Particles 2.0' Module { - dependencies: [] + dependencies: ["QtQuick 2.8"] Component { name: "QQuickAgeAffector" defaultProperty: "data" @@ -491,160 +491,6 @@ Module { Parameter { name: "arg"; type: "EntryEffect" } } } - Component { - name: "QQuickItem" - defaultProperty: "data" - prototype: "QObject" - Enum { - name: "TransformOrigin" - values: { - "TopLeft": 0, - "Top": 1, - "TopRight": 2, - "Left": 3, - "Center": 4, - "Right": 5, - "BottomLeft": 6, - "Bottom": 7, - "BottomRight": 8 - } - } - Property { name: "parent"; type: "QQuickItem"; isPointer: true } - Property { name: "data"; type: "QObject"; isList: true; isReadonly: true } - Property { name: "resources"; type: "QObject"; isList: true; isReadonly: true } - Property { name: "children"; type: "QQuickItem"; isList: true; isReadonly: true } - Property { name: "x"; type: "double" } - Property { name: "y"; type: "double" } - Property { name: "z"; type: "double" } - Property { name: "width"; type: "double" } - Property { name: "height"; type: "double" } - Property { name: "opacity"; type: "double" } - Property { name: "enabled"; type: "bool" } - Property { name: "visible"; type: "bool" } - Property { name: "visibleChildren"; type: "QQuickItem"; isList: true; isReadonly: true } - Property { name: "states"; type: "QQuickState"; isList: true; isReadonly: true } - Property { name: "transitions"; type: "QQuickTransition"; isList: true; isReadonly: true } - Property { name: "state"; type: "string" } - Property { name: "childrenRect"; type: "QRectF"; isReadonly: true } - Property { name: "anchors"; type: "QQuickAnchors"; isReadonly: true; isPointer: true } - Property { name: "left"; type: "QQuickAnchorLine"; isReadonly: true } - Property { name: "right"; type: "QQuickAnchorLine"; isReadonly: true } - Property { name: "horizontalCenter"; type: "QQuickAnchorLine"; isReadonly: true } - Property { name: "top"; type: "QQuickAnchorLine"; isReadonly: true } - Property { name: "bottom"; type: "QQuickAnchorLine"; isReadonly: true } - Property { name: "verticalCenter"; type: "QQuickAnchorLine"; isReadonly: true } - Property { name: "baseline"; type: "QQuickAnchorLine"; isReadonly: true } - Property { name: "baselineOffset"; type: "double" } - Property { name: "clip"; type: "bool" } - Property { name: "focus"; type: "bool" } - Property { name: "activeFocus"; type: "bool"; isReadonly: true } - Property { name: "activeFocusOnTab"; revision: 1; type: "bool" } - Property { name: "rotation"; type: "double" } - Property { name: "scale"; type: "double" } - Property { name: "transformOrigin"; type: "TransformOrigin" } - Property { name: "transformOriginPoint"; type: "QPointF"; isReadonly: true } - Property { name: "transform"; type: "QQuickTransform"; isList: true; isReadonly: true } - Property { name: "smooth"; type: "bool" } - Property { name: "antialiasing"; type: "bool" } - Property { name: "implicitWidth"; type: "double" } - Property { name: "implicitHeight"; type: "double" } - Property { name: "layer"; type: "QQuickItemLayer"; isReadonly: true; isPointer: true } - Signal { - name: "childrenRectChanged" - Parameter { type: "QRectF" } - } - Signal { - name: "baselineOffsetChanged" - Parameter { type: "double" } - } - Signal { - name: "stateChanged" - Parameter { type: "string" } - } - Signal { - name: "focusChanged" - Parameter { type: "bool" } - } - Signal { - name: "activeFocusChanged" - Parameter { type: "bool" } - } - Signal { - name: "activeFocusOnTabChanged" - revision: 1 - Parameter { type: "bool" } - } - Signal { - name: "parentChanged" - Parameter { type: "QQuickItem"; isPointer: true } - } - Signal { - name: "transformOriginChanged" - Parameter { type: "TransformOrigin" } - } - Signal { - name: "smoothChanged" - Parameter { type: "bool" } - } - Signal { - name: "antialiasingChanged" - Parameter { type: "bool" } - } - Signal { - name: "clipChanged" - Parameter { type: "bool" } - } - Signal { - name: "windowChanged" - revision: 1 - Parameter { name: "window"; type: "QQuickWindow"; isPointer: true } - } - Method { name: "update" } - Method { - name: "grabToImage" - revision: 2 - type: "bool" - Parameter { name: "callback"; type: "QJSValue" } - Parameter { name: "targetSize"; type: "QSize" } - } - Method { - name: "grabToImage" - revision: 2 - type: "bool" - Parameter { name: "callback"; type: "QJSValue" } - } - Method { - name: "contains" - type: "bool" - Parameter { name: "point"; type: "QPointF" } - } - Method { - name: "mapFromItem" - Parameter { type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "mapToItem" - Parameter { type: "QQmlV4Function"; isPointer: true } - } - Method { name: "forceActiveFocus" } - Method { - name: "forceActiveFocus" - Parameter { name: "reason"; type: "Qt::FocusReason" } - } - Method { - name: "nextItemInFocusChain" - revision: 1 - type: "QQuickItem*" - Parameter { name: "forward"; type: "bool" } - } - Method { name: "nextItemInFocusChain"; revision: 1; type: "QQuickItem*" } - Method { - name: "childAt" - type: "QQuickItem*" - Parameter { name: "x"; type: "double" } - Parameter { name: "y"; type: "double" } - } - } Component { name: "QQuickItemParticle" defaultProperty: "data" @@ -1150,56 +996,6 @@ Module { Parameter { name: "arg"; type: "bool" } } } - Component { - name: "QQuickStochasticState" - prototype: "QObject" - Property { name: "duration"; type: "int" } - Property { name: "durationVariation"; type: "int" } - Property { name: "randomStart"; type: "bool" } - Property { name: "to"; type: "QVariantMap" } - Property { name: "name"; type: "string" } - Signal { - name: "durationChanged" - Parameter { name: "arg"; type: "int" } - } - Signal { - name: "nameChanged" - Parameter { name: "arg"; type: "string" } - } - Signal { - name: "toChanged" - Parameter { name: "arg"; type: "QVariantMap" } - } - Signal { - name: "durationVariationChanged" - Parameter { name: "arg"; type: "int" } - } - Signal { name: "entered" } - Signal { - name: "randomStartChanged" - Parameter { name: "arg"; type: "bool" } - } - Method { - name: "setDuration" - Parameter { name: "arg"; type: "int" } - } - Method { - name: "setName" - Parameter { name: "arg"; type: "string" } - } - Method { - name: "setTo" - Parameter { name: "arg"; type: "QVariantMap" } - } - Method { - name: "setDurationVariation" - Parameter { name: "arg"; type: "int" } - } - Method { - name: "setRandomStart" - Parameter { name: "arg"; type: "bool" } - } - } Component { name: "QQuickTargetDirection" prototype: "QQuickDirection" diff --git a/src/imports/qtqml/plugins.qmltypes b/src/imports/qtqml/plugins.qmltypes index 864aca1f32..82333627a0 100644 --- a/src/imports/qtqml/plugins.qmltypes +++ b/src/imports/qtqml/plugins.qmltypes @@ -4,7 +4,7 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable QtQml 2.2' +// 'qmlplugindump -nonrelocatable -noforceqtquick QtQml 2.3' Module { dependencies: [] @@ -27,12 +27,13 @@ Module { Component { name: "QQmlBind" prototype: "QObject" - exports: ["QtQml/Binding 2.0"] - exportMetaObjectRevisions: [0] + exports: ["QtQml/Binding 2.0", "QtQml/Binding 2.8"] + exportMetaObjectRevisions: [0, 8] Property { name: "target"; type: "QObject"; isPointer: true } Property { name: "property"; type: "string" } Property { name: "value"; type: "QVariant" } Property { name: "when"; type: "bool" } + Property { name: "delayed"; revision: 8; type: "bool" } } Component { name: "QQmlComponent" @@ -92,10 +93,12 @@ Module { Component { name: "QQmlConnections" prototype: "QObject" - exports: ["QtQml/Connections 2.0"] - exportMetaObjectRevisions: [0] + exports: ["QtQml/Connections 2.0", "QtQml/Connections 2.3"] + exportMetaObjectRevisions: [0, 1] Property { name: "target"; type: "QObject"; isPointer: true } + Property { name: "enabled"; type: "bool" } Property { name: "ignoreUnknownSignals"; type: "bool" } + Signal { name: "enabledChanged"; revision: 1 } } Component { name: "QQmlInstanceModel" @@ -192,6 +195,13 @@ Module { } } } + Component { + name: "QQmlLoggingCategory" + prototype: "QObject" + exports: ["QtQml/LoggingCategory 2.8"] + exportMetaObjectRevisions: [0] + Property { name: "name"; type: "string" } + } Component { name: "QQmlTimer" prototype: "QObject" @@ -215,6 +225,7 @@ Module { Property { name: "button"; type: "int"; isReadonly: true } Property { name: "buttons"; type: "int"; isReadonly: true } Property { name: "modifiers"; type: "int"; isReadonly: true } + Property { name: "source"; revision: 7; type: "int"; isReadonly: true } Property { name: "wasHeld"; type: "bool"; isReadonly: true } Property { name: "isClick"; type: "bool"; isReadonly: true } Property { name: "accepted"; type: "bool" } diff --git a/src/imports/qtquick2/plugins.qmltypes b/src/imports/qtquick2/plugins.qmltypes index c3a14254f3..441cd743aa 100644 --- a/src/imports/qtquick2/plugins.qmltypes +++ b/src/imports/qtquick2/plugins.qmltypes @@ -4,7 +4,7 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable QtQuick 2.6' +// 'qmlplugindump -nonrelocatable -noforceqtquick QtQuick 2.8' Module { dependencies: [] @@ -318,7 +318,9 @@ Module { } } Property { name: "cursorRectangle"; type: "QRectF"; isReadonly: true } + Property { name: "anchorRectangle"; type: "QRectF"; isReadonly: true } Property { name: "keyboardRectangle"; type: "QRectF"; isReadonly: true } + Property { name: "inputItemClipRectangle"; type: "QRectF"; isReadonly: true } Property { name: "visible"; type: "bool"; isReadonly: true } Property { name: "animating"; type: "bool"; isReadonly: true } Property { name: "locale"; type: "QLocale"; isReadonly: true } @@ -1156,6 +1158,7 @@ Module { Property { name: "layoutDirection"; type: "Qt::LayoutDirection"; isReadonly: true } Property { name: "supportsMultipleWindows"; type: "bool"; isReadonly: true } Property { name: "state"; type: "Qt::ApplicationState"; isReadonly: true } + Property { name: "font"; type: "QFont"; isReadonly: true } Signal { name: "stateChanged" Parameter { name: "state"; type: "Qt::ApplicationState" } @@ -1212,6 +1215,24 @@ Module { Property { name: "verticalTileMode"; type: "TileMode" } Property { name: "sourceSize"; type: "QSize"; isReadonly: true } } + Component { + name: "QQuickBorderImageMesh" + prototype: "QQuickShaderEffectMesh" + exports: ["QtQuick/BorderImageMesh 2.8"] + exportMetaObjectRevisions: [0] + Enum { + name: "TileMode" + values: { + "Stretch": 0, + "Repeat": 1, + "Round": 2 + } + } + Property { name: "border"; type: "QQuickScaleGrid"; isReadonly: true; isPointer: true } + Property { name: "size"; type: "QSize" } + Property { name: "horizontalTileMode"; type: "TileMode" } + Property { name: "verticalTileMode"; type: "TileMode" } + } Component { name: "QQuickCanvasItem" defaultProperty: "data" @@ -1378,6 +1399,7 @@ Module { Property { name: "source"; type: "QObject"; isPointer: true } Property { name: "target"; type: "QObject"; isReadonly: true; isPointer: true } Property { name: "hotSpot"; type: "QPointF" } + Property { name: "imageSource"; revision: 8; type: "QUrl" } Property { name: "keys"; type: "QStringList" } Property { name: "mimeData"; type: "QVariantMap" } Property { name: "supportedActions"; type: "Qt::DropActions" } @@ -1497,7 +1519,8 @@ Module { "AutoFlickDirection": 0, "HorizontalFlick": 1, "VerticalFlick": 2, - "HorizontalAndVerticalFlick": 3 + "HorizontalAndVerticalFlick": 3, + "AutoFlickIfNeeded": 12 } } Property { name: "contentWidth"; type: "double" } @@ -1779,6 +1802,69 @@ Module { Property { name: "position"; type: "double" } Property { name: "color"; type: "QColor" } } + Component { + name: "QQuickGraphicsInfo" + prototype: "QObject" + exports: ["QtQuick/GraphicsInfo 2.8"] + isCreatable: false + exportMetaObjectRevisions: [0] + Enum { + name: "GraphicsApi" + values: { + "Unknown": 0, + "Software": 1, + "OpenGL": 2, + "Direct3D12": 3 + } + } + Enum { + name: "ShaderType" + values: { + "UnknownShadingLanguage": 0, + "GLSL": 1, + "HLSL": 2 + } + } + Enum { + name: "ShaderCompilationType" + values: { + "RuntimeCompilation": 1, + "OfflineCompilation": 2 + } + } + Enum { + name: "ShaderSourceType" + values: { + "ShaderSourceString": 1, + "ShaderSourceFile": 2, + "ShaderByteCode": 4 + } + } + Enum { + name: "OpenGLContextProfile" + values: { + "OpenGLNoProfile": 0, + "OpenGLCoreProfile": 1, + "OpenGLCompatibilityProfile": 2 + } + } + Enum { + name: "RenderableType" + values: { + "SurfaceFormatUnspecified": 0, + "SurfaceFormatOpenGL": 1, + "SurfaceFormatOpenGLES": 2 + } + } + Property { name: "api"; type: "GraphicsApi"; isReadonly: true } + Property { name: "shaderType"; type: "ShaderType"; isReadonly: true } + Property { name: "shaderCompilationType"; type: "ShaderCompilationType"; isReadonly: true } + Property { name: "shaderSourceType"; type: "ShaderSourceType"; isReadonly: true } + Property { name: "majorVersion"; type: "int"; isReadonly: true } + Property { name: "minorVersion"; type: "int"; isReadonly: true } + Property { name: "profile"; type: "OpenGLContextProfile"; isReadonly: true } + Property { name: "renderableType"; type: "RenderableType"; isReadonly: true } + } Component { name: "QQuickGrid" defaultProperty: "data" @@ -1850,8 +1936,12 @@ Module { name: "QQuickGridView" defaultProperty: "data" prototype: "QQuickItemView" - exports: ["QtQuick/GridView 2.0", "QtQuick/GridView 2.1"] - exportMetaObjectRevisions: [0, 1] + exports: [ + "QtQuick/GridView 2.0", + "QtQuick/GridView 2.1", + "QtQuick/GridView 2.7" + ] + exportMetaObjectRevisions: [0, 1, 7] attachedType: "QQuickGridViewAttached" Enum { name: "Flow" @@ -2119,6 +2209,18 @@ Module { type: "bool" Parameter { name: "point"; type: "QPointF" } } + Method { + name: "mapToGlobal" + revision: 7 + type: "QPointF" + Parameter { name: "point"; type: "QPointF" } + } + Method { + name: "mapFromGlobal" + revision: 7 + type: "QPointF" + Parameter { name: "point"; type: "QPointF" } + } Method { name: "mapFromItem" Parameter { type: "QQmlV4Function"; isPointer: true } @@ -2260,6 +2362,7 @@ Module { Property { name: "currentIndex"; type: "int" } Property { name: "currentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "keyNavigationWraps"; type: "bool" } + Property { name: "keyNavigationEnabled"; revision: 7; type: "bool" } Property { name: "cacheBuffer"; type: "int" } Property { name: "displayMarginBeginning"; revision: 2; type: "int" } Property { name: "displayMarginEnd"; revision: 2; type: "int" } @@ -2285,6 +2388,7 @@ Module { Property { name: "preferredHighlightBegin"; type: "double" } Property { name: "preferredHighlightEnd"; type: "double" } Property { name: "highlightMoveDuration"; type: "int" } + Signal { name: "keyNavigationEnabledChanged"; revision: 7 } Signal { name: "populateTransitionChanged" } Signal { name: "addTransitionChanged" } Signal { name: "addDisplacedTransitionChanged" } @@ -2559,9 +2663,10 @@ Module { exports: [ "QtQuick/ListView 2.0", "QtQuick/ListView 2.1", - "QtQuick/ListView 2.4" + "QtQuick/ListView 2.4", + "QtQuick/ListView 2.7" ] - exportMetaObjectRevisions: [0, 1, 2] + exportMetaObjectRevisions: [0, 1, 2, 7] attachedType: "QQuickListViewAttached" Enum { name: "Orientation" @@ -3014,8 +3119,8 @@ Module { name: "QQuickPathView" defaultProperty: "data" prototype: "QQuickItem" - exports: ["QtQuick/PathView 2.0"] - exportMetaObjectRevisions: [0] + exports: ["QtQuick/PathView 2.0", "QtQuick/PathView 2.7"] + exportMetaObjectRevisions: [0, 7] attachedType: "QQuickPathViewAttached" Enum { name: "HighlightRangeMode" @@ -3033,6 +3138,14 @@ Module { "SnapOneItem": 2 } } + Enum { + name: "MovementDirection" + values: { + "Shortest": 0, + "Negative": 1, + "Positive": 2 + } + } Enum { name: "PositionMode" values: { @@ -3065,10 +3178,12 @@ Module { Property { name: "delegate"; type: "QQmlComponent"; isPointer: true } Property { name: "pathItemCount"; type: "int" } Property { name: "snapMode"; type: "SnapMode" } + Property { name: "movementDirection"; revision: 7; type: "MovementDirection" } Property { name: "cacheItemCount"; type: "int" } Signal { name: "snapPositionChanged" } Signal { name: "movementStarted" } Signal { name: "movementEnded" } + Signal { name: "movementDirectionChanged"; revision: 7 } Signal { name: "flickStarted" } Signal { name: "flickEnded" } Signal { name: "dragStarted" } @@ -3942,23 +4057,23 @@ Module { } Signal { name: "styleChanged" - Parameter { name: "style"; type: "TextStyle" } + Parameter { name: "style"; type: "QQuickText::TextStyle" } } Signal { name: "horizontalAlignmentChanged" - Parameter { name: "alignment"; type: "HAlignment" } + Parameter { name: "alignment"; type: "QQuickText::HAlignment" } } Signal { name: "verticalAlignmentChanged" - Parameter { name: "alignment"; type: "VAlignment" } + Parameter { name: "alignment"; type: "QQuickText::VAlignment" } } Signal { name: "textFormatChanged" - Parameter { name: "textFormat"; type: "TextFormat" } + Parameter { name: "textFormat"; type: "QQuickText::TextFormat" } } Signal { name: "elideModeChanged" - Parameter { name: "mode"; type: "TextElideMode" } + Parameter { name: "mode"; type: "QQuickText::TextElideMode" } } Signal { name: "contentSizeChanged" } Signal { @@ -3997,9 +4112,10 @@ Module { "QtQuick/TextEdit 2.1", "QtQuick/TextEdit 2.2", "QtQuick/TextEdit 2.3", - "QtQuick/TextEdit 2.6" + "QtQuick/TextEdit 2.6", + "QtQuick/TextEdit 2.7" ] - exportMetaObjectRevisions: [0, 1, 2, 3, 6] + exportMetaObjectRevisions: [0, 1, 2, 3, 6, 7] Enum { name: "HAlignment" values: { @@ -4070,6 +4186,7 @@ Module { Property { name: "cursorPosition"; type: "int" } Property { name: "cursorRectangle"; type: "QRectF"; isReadonly: true } Property { name: "cursorDelegate"; type: "QQmlComponent"; isPointer: true } + Property { name: "overwriteMode"; type: "bool" } Property { name: "selectionStart"; type: "int"; isReadonly: true } Property { name: "selectionEnd"; type: "int"; isReadonly: true } Property { name: "selectedText"; type: "string"; isReadonly: true } @@ -4099,6 +4216,8 @@ Module { Property { name: "leftPadding"; revision: 6; type: "double" } Property { name: "rightPadding"; revision: 6; type: "double" } Property { name: "bottomPadding"; revision: 6; type: "double" } + Property { name: "preeditText"; revision: 7; type: "string"; isReadonly: true } + Signal { name: "preeditTextChanged"; revision: 7 } Signal { name: "contentSizeChanged" } Signal { name: "colorChanged" @@ -4118,15 +4237,15 @@ Module { } Signal { name: "horizontalAlignmentChanged" - Parameter { name: "alignment"; type: "HAlignment" } + Parameter { name: "alignment"; type: "QQuickTextEdit::HAlignment" } } Signal { name: "verticalAlignmentChanged" - Parameter { name: "alignment"; type: "VAlignment" } + Parameter { name: "alignment"; type: "QQuickTextEdit::VAlignment" } } Signal { name: "textFormatChanged" - Parameter { name: "textFormat"; type: "TextFormat" } + Parameter { name: "textFormat"; type: "QQuickTextEdit::TextFormat" } } Signal { name: "readOnlyChanged" @@ -4136,6 +4255,10 @@ Module { name: "cursorVisibleChanged" Parameter { name: "isCursorVisible"; type: "bool" } } + Signal { + name: "overwriteModeChanged" + Parameter { name: "overwriteMode"; type: "bool" } + } Signal { name: "activeFocusOnPressChanged" Parameter { name: "activeFocusOnPressed"; type: "bool" } @@ -4159,7 +4282,7 @@ Module { } Signal { name: "mouseSelectionModeChanged" - Parameter { name: "mode"; type: "SelectionMode" } + Parameter { name: "mode"; type: "QQuickTextEdit::SelectionMode" } } Signal { name: "linkActivated" @@ -4210,6 +4333,7 @@ Module { revision: 2 Parameter { name: "text"; type: "string" } } + Method { name: "clear"; revision: 7 } Method { name: "inputMethodQuery" revision: 4 @@ -4265,9 +4389,10 @@ Module { "QtQuick/TextInput 2.0", "QtQuick/TextInput 2.2", "QtQuick/TextInput 2.4", - "QtQuick/TextInput 2.6" + "QtQuick/TextInput 2.6", + "QtQuick/TextInput 2.7" ] - exportMetaObjectRevisions: [0, 2, 3, 6] + exportMetaObjectRevisions: [0, 2, 3, 6, 7] Enum { name: "EchoMode" values: { @@ -4339,6 +4464,7 @@ Module { Property { name: "cursorPosition"; type: "int" } Property { name: "cursorRectangle"; type: "QRectF"; isReadonly: true } Property { name: "cursorDelegate"; type: "QQmlComponent"; isPointer: true } + Property { name: "overwriteMode"; type: "bool" } Property { name: "selectionStart"; type: "int"; isReadonly: true } Property { name: "selectionEnd"; type: "int"; isReadonly: true } Property { name: "selectedText"; type: "string"; isReadonly: true } @@ -4352,6 +4478,7 @@ Module { Property { name: "passwordCharacter"; type: "string" } Property { name: "passwordMaskDelay"; revision: 3; type: "int" } Property { name: "displayText"; type: "string"; isReadonly: true } + Property { name: "preeditText"; revision: 7; type: "string"; isReadonly: true } Property { name: "autoScroll"; type: "bool" } Property { name: "selectByMouse"; type: "bool" } Property { name: "mouseSelectionMode"; type: "SelectionMode" } @@ -4376,11 +4503,11 @@ Module { } Signal { name: "horizontalAlignmentChanged" - Parameter { name: "alignment"; type: "HAlignment" } + Parameter { name: "alignment"; type: "QQuickTextInput::HAlignment" } } Signal { name: "verticalAlignmentChanged" - Parameter { name: "alignment"; type: "VAlignment" } + Parameter { name: "alignment"; type: "QQuickTextInput::VAlignment" } } Signal { name: "readOnlyChanged" @@ -4390,6 +4517,10 @@ Module { name: "cursorVisibleChanged" Parameter { name: "isCursorVisible"; type: "bool" } } + Signal { + name: "overwriteModeChanged" + Parameter { name: "overwriteMode"; type: "bool" } + } Signal { name: "maximumLengthChanged" Parameter { name: "maximumLength"; type: "int" } @@ -4400,13 +4531,14 @@ Module { } Signal { name: "echoModeChanged" - Parameter { name: "echoMode"; type: "EchoMode" } + Parameter { name: "echoMode"; type: "QQuickTextInput::EchoMode" } } Signal { name: "passwordMaskDelayChanged" revision: 3 Parameter { name: "delay"; type: "int" } } + Signal { name: "preeditTextChanged"; revision: 7 } Signal { name: "activeFocusOnPressChanged" Parameter { name: "activeFocusOnPress"; type: "bool" } @@ -4421,7 +4553,7 @@ Module { } Signal { name: "mouseSelectionModeChanged" - Parameter { name: "mode"; type: "SelectionMode" } + Parameter { name: "mode"; type: "QQuickTextInput::SelectionMode" } } Signal { name: "contentSizeChanged" } Signal { name: "paddingChanged"; revision: 6 } @@ -4463,6 +4595,7 @@ Module { revision: 3 Parameter { name: "position"; type: "int" } } + Method { name: "clear"; revision: 7 } Method { name: "positionAt" Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true } @@ -4628,7 +4761,7 @@ Module { Property { name: "pixelDelta"; type: "QPoint"; isReadonly: true } Property { name: "buttons"; type: "int"; isReadonly: true } Property { name: "modifiers"; type: "int"; isReadonly: true } - Property { name: "inverted"; type: "bool" } + Property { name: "inverted"; type: "bool"; isReadonly: true } Property { name: "accepted"; type: "bool" } } Component { diff --git a/src/imports/settings/plugins.qmltypes b/src/imports/settings/plugins.qmltypes index eaa310edc9..40d8746525 100644 --- a/src/imports/settings/plugins.qmltypes +++ b/src/imports/settings/plugins.qmltypes @@ -4,7 +4,7 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable Qt.labs.settings 1.0' +// 'qmlplugindump -nonrelocatable -noforceqtquick Qt.labs.settings 1.0' Module { dependencies: [] diff --git a/src/imports/statemachine/plugins.qmltypes b/src/imports/statemachine/plugins.qmltypes index c4b453b9e4..0fe9b63e03 100644 --- a/src/imports/statemachine/plugins.qmltypes +++ b/src/imports/statemachine/plugins.qmltypes @@ -4,7 +4,7 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable QtQml.StateMachine 1.0' +// 'qmlplugindump -nonrelocatable -noforceqtquick QtQml.StateMachine 1.0' Module { dependencies: [] diff --git a/src/imports/testlib/plugins.qmltypes b/src/imports/testlib/plugins.qmltypes index 2beb38a940..563778e55e 100644 --- a/src/imports/testlib/plugins.qmltypes +++ b/src/imports/testlib/plugins.qmltypes @@ -4,15 +4,16 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable QtTest 1.0' +// 'qmlplugindump -nonrelocatable -noforceqtquick QtTest 1.1' Module { - dependencies: [] + dependencies: ["QtQuick 2.0"] Component { name: "QuickTestEvent" prototype: "QObject" exports: ["QtTest/TestEvent 1.0"] exportMetaObjectRevisions: [0] + Property { name: "defaultMouseDelay"; type: "int"; isReadonly: true } Method { name: "keyPress" type: "bool" diff --git a/src/imports/window/plugins.qmltypes b/src/imports/window/plugins.qmltypes index 8c21271614..6a8dbfa024 100644 --- a/src/imports/window/plugins.qmltypes +++ b/src/imports/window/plugins.qmltypes @@ -7,7 +7,20 @@ import QtQuick.tooling 1.2 // 'qmlplugindump -nonrelocatable QtQuick.Window 2.2' Module { - dependencies: [] + dependencies: ["QtQuick 2.8"] + Component { + name: "QQuickRootItem" + defaultProperty: "data" + prototype: "QQuickItem" + Method { + name: "setWidth" + Parameter { name: "w"; type: "int" } + } + Method { + name: "setHeight" + Parameter { name: "h"; type: "int" } + } + } Component { name: "QQuickScreen" prototype: "QObject" @@ -102,6 +115,7 @@ Module { Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "width"; type: "int"; isReadonly: true } Property { name: "height"; type: "int"; isReadonly: true } + Property { name: "window"; type: "QQuickWindow"; isReadonly: true; isPointer: true } } Component { name: "QQuickWindowQmlImpl" diff --git a/src/imports/xmllistmodel/plugins.qmltypes b/src/imports/xmllistmodel/plugins.qmltypes index d098d11409..cc675d5f83 100644 --- a/src/imports/xmllistmodel/plugins.qmltypes +++ b/src/imports/xmllistmodel/plugins.qmltypes @@ -7,272 +7,7 @@ import QtQuick.tooling 1.2 // 'qmlplugindump -nonrelocatable QtQuick.XmlListModel 2.0' Module { - dependencies: [] - Component { - name: "QAbstractItemModel" - prototype: "QObject" - Enum { - name: "LayoutChangeHint" - values: { - "NoLayoutChangeHint": 0, - "VerticalSortHint": 1, - "HorizontalSortHint": 2 - } - } - Signal { - name: "dataChanged" - Parameter { name: "topLeft"; type: "QModelIndex" } - Parameter { name: "bottomRight"; type: "QModelIndex" } - Parameter { name: "roles"; type: "QVector" } - } - Signal { - name: "dataChanged" - Parameter { name: "topLeft"; type: "QModelIndex" } - Parameter { name: "bottomRight"; type: "QModelIndex" } - } - Signal { - name: "headerDataChanged" - Parameter { name: "orientation"; type: "Qt::Orientation" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "layoutChanged" - Parameter { name: "parents"; type: "QList" } - Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" } - } - Signal { - name: "layoutChanged" - Parameter { name: "parents"; type: "QList" } - } - Signal { name: "layoutChanged" } - Signal { - name: "layoutAboutToBeChanged" - Parameter { name: "parents"; type: "QList" } - Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" } - } - Signal { - name: "layoutAboutToBeChanged" - Parameter { name: "parents"; type: "QList" } - } - Signal { name: "layoutAboutToBeChanged" } - Signal { - name: "rowsAboutToBeInserted" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "rowsInserted" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "rowsAboutToBeRemoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "rowsRemoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "columnsAboutToBeInserted" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "columnsInserted" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "columnsAboutToBeRemoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { - name: "columnsRemoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "first"; type: "int" } - Parameter { name: "last"; type: "int" } - } - Signal { name: "modelAboutToBeReset" } - Signal { name: "modelReset" } - Signal { - name: "rowsAboutToBeMoved" - Parameter { name: "sourceParent"; type: "QModelIndex" } - Parameter { name: "sourceStart"; type: "int" } - Parameter { name: "sourceEnd"; type: "int" } - Parameter { name: "destinationParent"; type: "QModelIndex" } - Parameter { name: "destinationRow"; type: "int" } - } - Signal { - name: "rowsMoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "start"; type: "int" } - Parameter { name: "end"; type: "int" } - Parameter { name: "destination"; type: "QModelIndex" } - Parameter { name: "row"; type: "int" } - } - Signal { - name: "columnsAboutToBeMoved" - Parameter { name: "sourceParent"; type: "QModelIndex" } - Parameter { name: "sourceStart"; type: "int" } - Parameter { name: "sourceEnd"; type: "int" } - Parameter { name: "destinationParent"; type: "QModelIndex" } - Parameter { name: "destinationColumn"; type: "int" } - } - Signal { - name: "columnsMoved" - Parameter { name: "parent"; type: "QModelIndex" } - Parameter { name: "start"; type: "int" } - Parameter { name: "end"; type: "int" } - Parameter { name: "destination"; type: "QModelIndex" } - Parameter { name: "column"; type: "int" } - } - Method { name: "submit"; type: "bool" } - Method { name: "revert" } - Method { - name: "hasIndex" - type: "bool" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { - name: "hasIndex" - type: "bool" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - } - Method { - name: "index" - type: "QModelIndex" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { - name: "index" - type: "QModelIndex" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - } - Method { - name: "parent" - type: "QModelIndex" - Parameter { name: "child"; type: "QModelIndex" } - } - Method { - name: "sibling" - type: "QModelIndex" - Parameter { name: "row"; type: "int" } - Parameter { name: "column"; type: "int" } - Parameter { name: "idx"; type: "QModelIndex" } - } - Method { - name: "rowCount" - type: "int" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { name: "rowCount"; type: "int" } - Method { - name: "columnCount" - type: "int" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { name: "columnCount"; type: "int" } - Method { - name: "hasChildren" - type: "bool" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { name: "hasChildren"; type: "bool" } - Method { - name: "data" - type: "QVariant" - Parameter { name: "index"; type: "QModelIndex" } - Parameter { name: "role"; type: "int" } - } - Method { - name: "data" - type: "QVariant" - Parameter { name: "index"; type: "QModelIndex" } - } - Method { - name: "setData" - type: "bool" - Parameter { name: "index"; type: "QModelIndex" } - Parameter { name: "value"; type: "QVariant" } - Parameter { name: "role"; type: "int" } - } - Method { - name: "setData" - type: "bool" - Parameter { name: "index"; type: "QModelIndex" } - Parameter { name: "value"; type: "QVariant" } - } - Method { - name: "headerData" - type: "QVariant" - Parameter { name: "section"; type: "int" } - Parameter { name: "orientation"; type: "Qt::Orientation" } - Parameter { name: "role"; type: "int" } - } - Method { - name: "headerData" - type: "QVariant" - Parameter { name: "section"; type: "int" } - Parameter { name: "orientation"; type: "Qt::Orientation" } - } - Method { - name: "fetchMore" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { - name: "canFetchMore" - type: "bool" - Parameter { name: "parent"; type: "QModelIndex" } - } - Method { - name: "flags" - type: "Qt::ItemFlags" - Parameter { name: "index"; type: "QModelIndex" } - } - Method { - name: "match" - type: "QModelIndexList" - Parameter { name: "start"; type: "QModelIndex" } - Parameter { name: "role"; type: "int" } - Parameter { name: "value"; type: "QVariant" } - Parameter { name: "hits"; type: "int" } - Parameter { name: "flags"; type: "Qt::MatchFlags" } - } - Method { - name: "match" - type: "QModelIndexList" - Parameter { name: "start"; type: "QModelIndex" } - Parameter { name: "role"; type: "int" } - Parameter { name: "value"; type: "QVariant" } - Parameter { name: "hits"; type: "int" } - } - Method { - name: "match" - type: "QModelIndexList" - Parameter { name: "start"; type: "QModelIndex" } - Parameter { name: "role"; type: "int" } - Parameter { name: "value"; type: "QVariant" } - } - } - Component { name: "QAbstractListModel"; prototype: "QAbstractItemModel" } + dependencies: ["QtQuick 2.8"] Component { name: "QQuickXmlListModel" defaultProperty: "roles" -- cgit v1.2.3 From 8373853c45f8ba17b5fe38d9ab0c12cf0ac39ff3 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 26 Aug 2016 10:58:32 +0200 Subject: Make LayoutMirroring work with Window [ChangeLog][QtQuick][LayoutMirroring] Made it possible to attach LayoutMirroring to a Window. Task-number: QTBUG-55517 Change-Id: I3bc5960bf2a9c28b0edc801722dbd6499b803ff3 Reviewed-by: Qt CI Bot Reviewed-by: Shawn Rutledge --- src/quick/items/qquickitem.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index d38edfb7ab..f983d3d649 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -1450,6 +1450,9 @@ QQuickKeysAttached *QQuickKeysAttached::qmlAttachedProperties(QObject *obj) behavior to all child items as well. If the \c LayoutMirroring attached property has not been defined for an item, mirroring is not enabled. + \note Since Qt 5.8, \c LayoutMirroring can be attached to a \l Window. In practice, it is the same as + attaching \c LayoutMirroring to the window's \c contentItem. + The following example shows mirroring in action. The \l Row below is specified as being anchored to the left of its parent. However, since mirroring has been enabled, the anchor is horizontally reversed and it is now anchored to the right. Also, since items in a \l Row are positioned @@ -1499,11 +1502,15 @@ QQuickKeysAttached *QQuickKeysAttached::qmlAttachedProperties(QObject *obj) QQuickLayoutMirroringAttached::QQuickLayoutMirroringAttached(QObject *parent) : QObject(parent), itemPrivate(0) { - if (QQuickItem *item = qobject_cast(parent)) { + if (QQuickItem *item = qobject_cast(parent)) itemPrivate = QQuickItemPrivate::get(item); + else if (QQuickWindow *window = qobject_cast(parent)) + itemPrivate = QQuickItemPrivate::get(window->contentItem()); + + if (itemPrivate) itemPrivate->extra.value().layoutDirectionAttached = this; - } else - qmlInfo(parent) << tr("LayoutDirection attached property only works with Items"); + else + qmlInfo(parent) << tr("LayoutDirection attached property only works with Items and Windows"); } QQuickLayoutMirroringAttached * QQuickLayoutMirroringAttached::qmlAttachedProperties(QObject *object) -- cgit v1.2.3 From 777109347c837b07b4463d68257cda65ed7f3bac Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 10 Sep 2016 13:00:48 -0700 Subject: Use the stringData() function from qmetaobject.cpp It does some extra checking. This adds a comment so that we won't forget to update it if the source changes too. Change-Id: I9093948278414644a416fffd14730eb6b8dfe585 Reviewed-by: Ulf Hermann Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlpropertycache.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index b9e2213035..337c37b5be 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -1091,9 +1091,21 @@ QQmlPropertyCache::property(QJSEngine *engine, QObject *obj, return qQmlPropertyCacheProperty(engine, obj, name, context, local); } +// these two functions are copied from qmetaobject.cpp static inline const QMetaObjectPrivate *priv(const uint* data) { return reinterpret_cast(data); } +static inline const QByteArray stringData(const QMetaObject *mo, int index) +{ + Q_ASSERT(priv(mo->d.data)->revision >= 7); + const QByteArrayDataPtr data = { const_cast(&mo->d.stringdata[index]) }; + Q_ASSERT(data.ptr->ref.isStatic()); + Q_ASSERT(data.ptr->alloc == 0); + Q_ASSERT(data.ptr->capacityReserved == 0); + Q_ASSERT(data.ptr->size >= 0); + return data; +} + bool QQmlPropertyCache::isDynamicMetaObject(const QMetaObject *mo) { return priv(mo->d.data)->revision >= 3 && priv(mo->d.data)->flags & DynamicMetaObject; @@ -1399,8 +1411,7 @@ bool QQmlPropertyCache::addToHash(QCryptographicHash &hash, const QMetaObject &m hash.addData(reinterpret_cast(mo.d.data), fieldCount * sizeof(uint)); for (int i = 0; i < stringCount; ++i) { - const QByteArrayDataPtr data = { const_cast(&mo.d.stringdata[i]) }; - hash.addData(QByteArray(data)); + hash.addData(stringData(&mo, i)); } return true; -- cgit v1.2.3 From 893140169557eb06d79e783d38673217deab28c1 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 12 Sep 2016 14:13:30 +0200 Subject: QML: Fix xmlhttprequestdata leak The creation and deletion condetion were different. We can unconditionally delete it, because the field is always initialized to nullptr. Change-Id: If7d4528d9cdf03d81d37b3b4d4bd24fcd0fca8ef Reviewed-by: Simon Hausmann --- src/qml/qml/v8/qv8engine.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp index e08ff3b979..f15020f6c9 100644 --- a/src/qml/qml/v8/qv8engine.cpp +++ b/src/qml/qml/v8/qv8engine.cpp @@ -160,10 +160,9 @@ QV8Engine::~QV8Engine() qDeleteAll(m_extensionData); m_extensionData.clear(); -#if !defined(QT_NO_XMLSTREAMREADER) && defined(QT_NO_NETWORK) qt_rem_qmlxmlhttprequest(m_v4Engine, m_xmlHttpRequestData); m_xmlHttpRequestData = 0; -#endif + delete m_listModelData; m_listModelData = 0; -- cgit v1.2.3 From 858c62583ff776edb8c9e539f0331f5d658de2d1 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Fri, 9 Sep 2016 15:07:44 +0200 Subject: Fix crash when using Software Renderer on HiDPI QBackingStore For some reason the QPaintDevice of a QBackingStore is not valid on HiDPI QBackingStores until QBackingStore::begin() has been called. I suspect this is a bug in qtbase, but until this is fixed this change will make sure that the paint device will always be valid, even in this unusual situation. Task-number: QTBUG-55875 Change-Id: I63137d0de9b68d29bfcf86d1807f576923875b5d Reviewed-by: Laszlo Agocs --- .../scenegraph/adaptations/software/qsgsoftwarerenderer.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp index ae89ed7d8a..cad826fb27 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp @@ -101,8 +101,13 @@ void QSGSoftwareRenderer::render() return; // If there is a backingstore, set the current paint device - if (m_backingStore) + if (m_backingStore) { + // For HiDPI QBackingStores, the paint device is not valid + // until begin() has been called. See: QTBUG-55875 + m_backingStore->beginPaint(QRegion()); m_paintDevice = m_backingStore->paintDevice(); + m_backingStore->endPaint(); + } QElapsedTimer renderTimer; @@ -133,8 +138,12 @@ void QSGSoftwareRenderer::render() qint64 optimizeRenderListTime = renderTimer.restart(); // If Rendering to a backingstore, prepare it to be updated - if (m_backingStore != nullptr) + if (m_backingStore != nullptr) { m_backingStore->beginPaint(updateRegion); + // It is possible that a QBackingStore's paintDevice() will change + // when begin() is called. + m_paintDevice = m_backingStore->paintDevice(); + } QPainter painter(m_paintDevice); painter.setRenderHint(QPainter::Antialiasing); -- cgit v1.2.3 From 696367fd6ca1a2c3b2d4b1682e50a3d3a0bbbb15 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 7 Sep 2016 17:57:03 +0300 Subject: Qt Quick depends on gui Change-Id: Iaed15ebbf669dadb692aec0f8db13a7e0b2e5fcc Reviewed-by: Andy Nichols --- src/src.pro | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/src.pro b/src/src.pro index fc1cea67cd..11bc4de8e3 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,14 +1,16 @@ TEMPLATE = subdirs CONFIG += ordered SUBDIRS += \ - qml \ - quick \ - qmltest + qml -qtHaveModule(gui):qtConfig(opengl(es1|es2)?): \ - SUBDIRS += particles +qtHaveModule(gui) { + SUBDIRS += \ + quick \ + qmltest -qtHaveModule(gui): qtHaveModule(widgets): SUBDIRS += quickwidgets + qtConfig(opengl(es1|es2)?): SUBDIRS += particles + qtHaveModule(widgets): SUBDIRS += quickwidgets +} SUBDIRS += \ plugins \ -- cgit v1.2.3 From 213232635272440a51380237c56158a5f7f4b148 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 15 Sep 2016 13:29:22 +0200 Subject: Add qt_attribution.json file for masm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ied24eb3dd3741c913f4a4ec80fe39d0678e46d5c Reviewed-by: Topi Reiniƶ --- src/3rdparty/masm/LICENSE | 22 ++++++++++++++++++++++ src/3rdparty/masm/qt_attribution.json | 23 +++++++++++++++++++++++ src/qml/doc/src/qtqml.qdoc | 13 +++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 src/3rdparty/masm/LICENSE create mode 100644 src/3rdparty/masm/qt_attribution.json (limited to 'src') diff --git a/src/3rdparty/masm/LICENSE b/src/3rdparty/masm/LICENSE new file mode 100644 index 0000000000..3ab4db6d84 --- /dev/null +++ b/src/3rdparty/masm/LICENSE @@ -0,0 +1,22 @@ +Copyright (C) 2012 Apple Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/3rdparty/masm/qt_attribution.json b/src/3rdparty/masm/qt_attribution.json new file mode 100644 index 0000000000..c53f1a4bc5 --- /dev/null +++ b/src/3rdparty/masm/qt_attribution.json @@ -0,0 +1,23 @@ +{ + "Id": "masm", + "Name": "JavaScriptCore Macro Assembler", + "QDocModule": "qtqml", + "QtUsage": "Used in Qt QML.", + + "License": "BSD 2-clause \"Simplified\" License", + "LicenseId": "BSD-2-Clause", + "LicenseFile": "LICENSE", + "Copyright": "Copyright (C) 2003-2015 Apple Inc. All rights reserved. +Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) +Copyright (C) 2007-2009 Torch Mobile, Inc. All rights reserved. (http://www.torchmobile.com/) +Copyright (C) 2009, 2010 University of Szeged +Copyright (C) 2009-2011 STMicroelectronics. All rights reserved. +Copyright (C) 2010 MIPS Technologies, Inc. All rights reserved. +Copyright (C) 2010 Peter Varga (pvarga@inf.u-szeged.hu), University of Szeged +Copyright (C) 2010 MIPS Technologies, Inc. All rights reserved. +Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved. +Copyright (C) 2011 Google Inc. All rights reserved. +Copyright (C) 2013 Samsung Electronics. All rights reserved. +Copyright (C) 2015 Cisco Systems, Inc. All rights reserved. +Copyright (c) 2002-2009 Vivek Thampi" +} diff --git a/src/qml/doc/src/qtqml.qdoc b/src/qml/doc/src/qtqml.qdoc index 33bb0c0750..747466281e 100644 --- a/src/qml/doc/src/qtqml.qdoc +++ b/src/qml/doc/src/qtqml.qdoc @@ -131,6 +131,19 @@ the QML code to interact with C++ code. \li \l{The Declarative State Machine Framework} \endlist +\section1 Licenses and Attributions + +Qt QML is available under commercial licenses from \l{The Qt Company}. +In addition, it is available under the +\l{GNU Lesser General Public License, version 3}, or +the \l{GNU General Public License, version 2}. +See \l{Qt Licensing} for further details. + +Furthermore Qt QML potentially contains third party +modules under following permissive licenses: + +\generatelist{groupsbymodule attributions-qtqml} + \section1 Guides and Other Information Further information for writing QML applications: -- cgit v1.2.3 From 16914894f035963ace51c92de13aad11a53c3cf8 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 12 Sep 2016 11:22:01 +0200 Subject: QML: Cleanup prefix/suffixes for plug-in resolving So now we can read it without getting cross-eyed. Change-Id: Ica6a072fcd505fd4fedca3ccfac7dfc00b522354 Reviewed-by: Lars Knoll --- src/qml/qml/qqmlimport.cpp | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index ee4d3efa6f..98e2f9eefd 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -1727,29 +1727,32 @@ QString QQmlImportDatabase::resolvePlugin(QQmlTypeLoader *typeLoader, const QString &baseName) { #if defined(Q_OS_WIN) - return resolvePlugin(typeLoader, qmldirPath, qmldirPluginPath, baseName, - QStringList() + static const QString prefix; + static const QStringList suffixes = { # ifdef QT_DEBUG - << QLatin1String("d.dll") // try a qmake-style debug build first + QLatin1String("d.dll"), // try a qmake-style debug build first # endif - << QLatin1String(".dll")); + QLatin1String(".dll") + }; #elif defined(Q_OS_DARWIN) - - return resolvePlugin(typeLoader, qmldirPath, qmldirPluginPath, baseName, - QStringList() + static const QString prefix = QLatin1String("lib"); + static const QStringList suffixes = { # ifdef QT_DEBUG - << QLatin1String("_debug.dylib") // try a qmake-style debug build first - << QLatin1String(".dylib") + QLatin1String("_debug.dylib"), // try a qmake-style debug build first + QLatin1String(".dylib"), # else - << QLatin1String(".dylib") - << QLatin1String("_debug.dylib") // try a qmake-style debug build after + QLatin1String(".dylib"), + QLatin1String("_debug.dylib"), // try a qmake-style debug build after # endif - << QLatin1String(".so") - << QLatin1String(".bundle"), - QLatin1String("lib")); + QLatin1String(".so"), + QLatin1String(".bundle") + }; # else // Unix - return resolvePlugin(typeLoader, qmldirPath, qmldirPluginPath, baseName, QStringList() << QLatin1String(".so"), QLatin1String("lib")); + static const QString prefix = QLatin1String("lib"); + static const QStringList suffixes = { QLatin1String(".so") }; #endif + + return resolvePlugin(typeLoader, qmldirPath, qmldirPluginPath, baseName, suffixes, prefix); } /*! -- cgit v1.2.3