[SCM] qtdeclarative packaging branch, ubuntu, updated. ubuntu/5.5.1-2ubuntu4-7-g909a978

Timo Jyrinki timo at moszumanska.debian.org
Mon Mar 14 12:08:34 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtdeclarative.git;a=commitdiff;h=909a978

The following commit has been merged in the ubuntu branch:
commit 909a9783bf89ead83b39377e1343fd97ad687673
Author: Timo Jyrinki <timo.jyrinki at canonical.com>
Date:   Mon Mar 14 12:08:20 2016 +0000

    Postpone landing of the two patches. Remove for now.
---
 ...-for-revisions-when-assigning-to-grouped-.patch | 209 ---------------------
 .../qml-preserve-composite-singleton-types.patch   | 163 ----------------
 2 files changed, 372 deletions(-)

diff --git a/debian/patches/Don-t-check-for-revisions-when-assigning-to-grouped-.patch b/debian/patches/Don-t-check-for-revisions-when-assigning-to-grouped-.patch
deleted file mode 100644
index 54a5071..0000000
--- a/debian/patches/Don-t-check-for-revisions-when-assigning-to-grouped-.patch
+++ /dev/null
@@ -1,209 +0,0 @@
-From e9a6c1d4e30d6adb2190d52bebb7fecd2b539e82 Mon Sep 17 00:00:00 2001
-From: Lars Knoll <lars.knoll at theqtcompany.com>
-Date: Tue, 19 Jan 2016 15:37:26 +0100
-Subject: [PATCH] Don't check for revisions when assigning to grouped
- properties
-
-This leads to wrong behavior in some cases, where we reject
-valid revisions, and there is probably no case, where this could
-lead to a conflict for the user of the API.
-
-Change-Id: I1614332cf4c07c6a227551612331dd69b2ae71f3
-Task-number: QTBUG-40043
-Reviewed-by: Simon Hausmann <simon.hausmann at theqtcompany.com>
----
- src/qml/compiler/qqmlirbuilder.cpp                      | 12 ++++++------
- src/qml/compiler/qqmlirbuilder_p.h                      |  9 +++++++--
- src/qml/compiler/qqmltypecompiler.cpp                   |  5 +++--
- .../qml/qqmlecmascript/data/metaobjectRevision5.qml     | 12 ++++++++++++
- tests/auto/qml/qqmlecmascript/testtypes.cpp             |  1 +
- tests/auto/qml/qqmlecmascript/testtypes.h               | 17 +++++++++++++++++
- tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp    |  9 +++++++++
- 7 files changed, 55 insertions(+), 10 deletions(-)
- create mode 100644 tests/auto/qml/qqmlecmascript/data/metaobjectRevision5.qml
-
-diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp
-index 16c4cb2..791355a 100644
---- a/src/qml/compiler/qqmlirbuilder.cpp
-+++ b/src/qml/compiler/qqmlirbuilder.cpp
-@@ -1875,17 +1875,17 @@ QV4::IR::Expr *JSCodeGen::fallbackNameLookup(const QString &name, int line, int
- 
- #ifndef V4_BOOTSTRAP
- 
--QQmlPropertyData *PropertyResolver::property(const QString &name, bool *notInRevision, QObject *object, QQmlContextData *context)
-+QQmlPropertyData *PropertyResolver::property(const QString &name, bool *notInRevision, RevisionCheck check)
- {
-     if (notInRevision) *notInRevision = false;
- 
--    QQmlPropertyData *d = cache->property(name, object, context);
-+    QQmlPropertyData *d = cache->property(name, 0, 0);
- 
-     // Find the first property
-     while (d && d->isFunction())
-         d = cache->overrideData(d);
- 
--    if (d && !cache->isAllowedInRevision(d)) {
-+    if (check != IgnoreRevision && d && !cache->isAllowedInRevision(d)) {
-         if (notInRevision) *notInRevision = true;
-         return 0;
-     } else {
-@@ -1894,11 +1894,11 @@ QQmlPropertyData *PropertyResolver::property(const QString &name, bool *notInRev
- }
- 
- 
--QQmlPropertyData *PropertyResolver::signal(const QString &name, bool *notInRevision, QObject *object, QQmlContextData *context)
-+QQmlPropertyData *PropertyResolver::signal(const QString &name, bool *notInRevision)
- {
-     if (notInRevision) *notInRevision = false;
- 
--    QQmlPropertyData *d = cache->property(name, object, context);
-+    QQmlPropertyData *d = cache->property(name, 0, 0);
-     if (notInRevision) *notInRevision = false;
- 
-     while (d && !(d->isFunction()))
-@@ -1914,7 +1914,7 @@ QQmlPropertyData *PropertyResolver::signal(const QString &name, bool *notInRevis
-     if (name.endsWith(QStringLiteral("Changed"))) {
-         QString propName = name.mid(0, name.length() - static_cast<int>(strlen("Changed")));
- 
--        d = property(propName, notInRevision, object, context);
-+        d = property(propName, notInRevision);
-         if (d)
-             return cache->signal(d->notifyIndex);
-     }
-diff --git a/src/qml/compiler/qqmlirbuilder_p.h b/src/qml/compiler/qqmlirbuilder_p.h
-index 9a659f4..633a4cc 100644
---- a/src/qml/compiler/qqmlirbuilder_p.h
-+++ b/src/qml/compiler/qqmlirbuilder_p.h
-@@ -460,10 +460,15 @@ struct Q_QML_EXPORT PropertyResolver
-         return cache->property(index);
-     }
- 
--    QQmlPropertyData *property(const QString &name, bool *notInRevision = 0, QObject *object = 0, QQmlContextData *context = 0);
-+    enum RevisionCheck {
-+        CheckRevision,
-+        IgnoreRevision
-+    };
-+
-+    QQmlPropertyData *property(const QString &name, bool *notInRevision = 0, RevisionCheck check = CheckRevision);
- 
-     // This code must match the semantics of QQmlPropertyPrivate::findSignalByName
--    QQmlPropertyData *signal(const QString &name, bool *notInRevision, QObject *object = 0, QQmlContextData *context = 0);
-+    QQmlPropertyData *signal(const QString &name, bool *notInRevision);
- 
-     QQmlPropertyCache *cache;
- };
-diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp
-index cde7a2a..6fd15d1 100644
---- a/src/qml/compiler/qqmltypecompiler.cpp
-+++ b/src/qml/compiler/qqmltypecompiler.cpp
-@@ -1859,6 +1859,7 @@ bool QQmlPropertyValidator::validateObject(int objectIndex, const QV4::CompiledD
-         }
- 
-         bool bindingToDefaultProperty = false;
-+        bool isGroupProperty = instantiatingBinding && instantiatingBinding->type == QV4::CompiledData::Binding::Type_GroupProperty;
- 
-         bool notInRevision = false;
-         QQmlPropertyData *pd = 0;
-@@ -1867,7 +1868,7 @@ bool QQmlPropertyValidator::validateObject(int objectIndex, const QV4::CompiledD
-                 || binding->flags & QV4::CompiledData::Binding::IsSignalHandlerObject)
-                 pd = propertyResolver.signal(name, &notInRevision);
-             else
--                pd = propertyResolver.property(name, &notInRevision);
-+                pd = propertyResolver.property(name, &notInRevision, isGroupProperty ? QmlIR::PropertyResolver::IgnoreRevision : QmlIR::PropertyResolver::CheckRevision);
- 
-             if (notInRevision) {
-                 QString typeName = stringAt(obj->inheritedTypeNameIndex);
-@@ -1879,7 +1880,7 @@ bool QQmlPropertyValidator::validateObject(int objectIndex, const QV4::CompiledD
-                 }
-             }
-         } else {
--           if (instantiatingBinding && instantiatingBinding->type == QV4::CompiledData::Binding::Type_GroupProperty)
-+           if (isGroupProperty)
-                COMPILE_EXCEPTION(binding, tr("Cannot assign a value directly to a grouped property"));
- 
-            pd = defaultProperty;
-diff --git a/tests/auto/qml/qqmlecmascript/data/metaobjectRevision5.qml b/tests/auto/qml/qqmlecmascript/data/metaobjectRevision5.qml
-new file mode 100644
-index 0000000..0493a7c
---- /dev/null
-+++ b/tests/auto/qml/qqmlecmascript/data/metaobjectRevision5.qml
-@@ -0,0 +1,12 @@
-+import Qt.test 1.1
-+import QtQuick 2.0
-+
-+MyItemUsingRevisionedObject {
-+    property real test
-+
-+    revisioned.prop1: 10
-+    revisioned.prop2: 1
-+
-+    Component.onCompleted: test = revisioned.prop1 + revisioned.prop2
-+}
-+
-diff --git a/tests/auto/qml/qqmlecmascript/testtypes.cpp b/tests/auto/qml/qqmlecmascript/testtypes.cpp
-index 285158a..b9e088d 100644
---- a/tests/auto/qml/qqmlecmascript/testtypes.cpp
-+++ b/tests/auto/qml/qqmlecmascript/testtypes.cpp
-@@ -452,6 +452,7 @@ void registerTypes()
-     qmlRegisterType<MyRevisionedSubclass>("Qt.test",1,0,"MyRevisionedSubclass");
-     // MyRevisionedSubclass 1.1 uses MyRevisionedClass revision 1
-     qmlRegisterType<MyRevisionedSubclass,1>("Qt.test",1,1,"MyRevisionedSubclass");
-+    qmlRegisterType<MyItemUsingRevisionedObject>("Qt.test", 1, 0, "MyItemUsingRevisionedObject");
- 
- #ifndef QT_NO_WIDGETS
-     qmlRegisterExtendedType<QWidget,QWidgetDeclarativeUI>("Qt.test",1,0,"QWidget");
-diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h
-index eb4a314..5603356 100644
---- a/tests/auto/qml/qqmlecmascript/testtypes.h
-+++ b/tests/auto/qml/qqmlecmascript/testtypes.h
-@@ -1084,10 +1084,27 @@ protected:
-     qreal m_p4;
- };
- 
-+
-+class MyItemUsingRevisionedObject : public QObject
-+{
-+    Q_OBJECT
-+    Q_PROPERTY(MyRevisionedClass *revisioned READ revisioned)
-+
-+public:
-+    MyItemUsingRevisionedObject() {
-+        m_revisioned = new MyRevisionedClass;
-+    }
-+
-+    MyRevisionedClass *revisioned() const { return m_revisioned; }
-+private:
-+    MyRevisionedClass *m_revisioned;
-+};
-+
- QML_DECLARE_TYPE(MyRevisionedBaseClassRegistered)
- QML_DECLARE_TYPE(MyRevisionedBaseClassUnregistered)
- QML_DECLARE_TYPE(MyRevisionedClass)
- QML_DECLARE_TYPE(MyRevisionedSubclass)
-+QML_DECLARE_TYPE(MyItemUsingRevisionedObject)
- Q_DECLARE_METATYPE(MyQmlObject::MyType)
- 
- 
-diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
-index b30dfcb..a208bf5 100644
---- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
-+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
-@@ -6578,6 +6578,15 @@ void tst_qqmlecmascript::revision()
-         QCOMPARE(object->property("test").toReal(), 11.);
-         delete object;
-     }
-+
-+    {
-+        QQmlComponent component(&engine, testFileUrl("metaobjectRevision5.qml"));
-+
-+        QObject *object = component.create();
-+        QVERIFY(object != 0);
-+        QCOMPARE(object->property("test").toReal(), 11.);
-+        delete object;
-+    }
- }
- 
- void tst_qqmlecmascript::realToInt()
--- 
-2.7.0
-
diff --git a/debian/patches/qml-preserve-composite-singleton-types.patch b/debian/patches/qml-preserve-composite-singleton-types.patch
deleted file mode 100644
index 1ecc91e..0000000
--- a/debian/patches/qml-preserve-composite-singleton-types.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-From 4b018848f7a7055976895de8a4b8208b58a36fac Mon Sep 17 00:00:00 2001
-From: Marco Benelli <marco.benelli at theqtcompany.com>
-Date: Fri, 4 Dec 2015 15:56:07 +0100
-Subject: [PATCH] qml: preserve composite singleton types.
-
-Composite singleton types used to always have version -1,-1; regardless
-of what is written in qmldir.
-
-Change-Id: Ia193e73695e57095f6a09b97768805f2f23cd56a
-Reviewed-by: Erik Verbruggen <erik.verbruggen at theqtcompany.com>
----
- src/qml/qml/qqmlimport.cpp                            | 19 +++++++++++++------
- src/qml/qml/qqmlimport_p.h                            |  2 ++
- src/qml/qml/qqmltypeloader.cpp                        |  4 ++--
- .../tests/dumper/CompositeSingleton/Singleton.qml     |  6 ++++++
- .../tests/dumper/CompositeSingleton/qmldir            |  3 +++
- tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp    | 14 ++++++++++++++
- 6 files changed, 40 insertions(+), 8 deletions(-)
- create mode 100644 tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/Singleton.qml
- create mode 100644 tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/qmldir
-
-diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
-index f6f8c6e..d538199 100644
---- a/src/qml/qml/qqmlimport.cpp
-+++ b/src/qml/qml/qqmlimport.cpp
-@@ -125,7 +125,9 @@ bool isPathAbsolute(const QString &path)
- }
- 
- // If the type does not already exist as a file import, add the type and return the new type
--QQmlType *getTypeForUrl(const QString &urlString, const QHashedStringRef& typeName, bool isCompositeSingleton, QList<QQmlError> *errors)
-+QQmlType *getTypeForUrl(const QString &urlString, const QHashedStringRef& typeName,
-+                        bool isCompositeSingleton, QList<QQmlError> *errors,
-+                        int majorVersion=-1, int minorVersion=-1)
- {
-     QUrl url(urlString);
-     QQmlType *ret = QQmlMetaType::qmlType(url);
-@@ -140,8 +142,8 @@ QQmlType *getTypeForUrl(const QString &urlString, const QHashedStringRef& typeNa
-             QQmlPrivate::RegisterCompositeSingletonType reg = {
-                 url,
-                 "", //Empty URI indicates loaded via file imports
--                -1,
--                -1,
-+                majorVersion,
-+                minorVersion,
-                 buf.constData()
-             };
-             ret = QQmlMetaType::qmlTypeFromIndex(QQmlPrivate::qmlregister(QQmlPrivate::CompositeSingletonRegistration, &reg));
-@@ -149,8 +151,8 @@ QQmlType *getTypeForUrl(const QString &urlString, const QHashedStringRef& typeNa
-             QQmlPrivate::RegisterCompositeType reg = {
-                 url,
-                 "", //Empty URI indicates loaded via file imports
--                -1,
--                -1,
-+                majorVersion,
-+                minorVersion,
-                 buf.constData()
-             };
-             ret = QQmlMetaType::qmlTypeFromIndex(QQmlPrivate::qmlregister(QQmlPrivate::CompositeRegistration, &reg));
-@@ -416,6 +418,8 @@ void findCompositeSingletons(const QQmlImportNamespace &set, QList<QQmlImports::
-                 QQmlImports::CompositeSingletonReference ref;
-                 ref.typeName = cit->typeName;
-                 ref.prefix = set.prefix;
-+                ref.majorVersion = cit->majorVersion;
-+                ref.minorVersion = cit->minorVersion;
-                 resultList.append(ref);
-             }
-         }
-@@ -656,7 +660,10 @@ bool QQmlImportNamespace::Import::resolveType(QQmlTypeLoader *typeLoader,
-         }
- 
-         if (candidate != end) {
--            QQmlType *returnType = getTypeForUrl(componentUrl, type, isCompositeSingleton, 0);
-+            int major = vmajor ? *vmajor : -1;
-+            int minor = vminor ? *vminor : -1;
-+            QQmlType *returnType = getTypeForUrl(componentUrl, type, isCompositeSingleton, 0,
-+                                                 major, minor);
-             if (type_return)
-                 *type_return = returnType;
-             return returnType != 0;
-diff --git a/src/qml/qml/qqmlimport_p.h b/src/qml/qml/qqmlimport_p.h
-index bda87f2..951b975 100644
---- a/src/qml/qml/qqmlimport_p.h
-+++ b/src/qml/qml/qqmlimport_p.h
-@@ -118,6 +118,8 @@ public:
-     {
-         QString typeName;
-         QString prefix;
-+        int majorVersion;
-+        int minorVersion;
-     };
- 
-     QList<CompositeSingletonReference> resolvedCompositeSingletons() const;
-diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
-index 29f1ca7..1e67154 100644
---- a/src/qml/qml/qqmltypeloader.cpp
-+++ b/src/qml/qml/qqmltypeloader.cpp
-@@ -2320,8 +2320,8 @@ void QQmlTypeData::resolveTypes()
-             m_namespaces.insert(csRef.prefix);
-         }
- 
--        int majorVersion = -1;
--        int minorVersion = -1;
-+        int majorVersion = csRef.majorVersion > -1 ? csRef.majorVersion : -1;
-+        int minorVersion = csRef.minorVersion > -1 ? csRef.minorVersion : -1;
- 
-         if (!resolveType(typeName, majorVersion, minorVersion, ref))
-             return;
-diff --git a/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/Singleton.qml b/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/Singleton.qml
-new file mode 100644
-index 0000000..b47d2e9
---- /dev/null
-+++ b/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/Singleton.qml
-@@ -0,0 +1,6 @@
-+pragma Singleton
-+import QtQuick 2.0
-+
-+QtObject {
-+    property int test: 0
-+}
-diff --git a/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/qmldir b/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/qmldir
-new file mode 100644
-index 0000000..8df57f6
---- /dev/null
-+++ b/tests/auto/qml/qmlplugindump/tests/dumper/CompositeSingleton/qmldir
-@@ -0,0 +1,3 @@
-+module tests.dumper.CompositeSingleton
-+singleton Singleton 1.0 Singleton.qml
-+depends QtQuick 2.0
-diff --git a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
-index 28d687b..eb05e8c 100644
---- a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
-+++ b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
-@@ -47,6 +47,7 @@ public:
- private slots:
-     void initTestCase();
-     void builtins();
-+    void singleton();
- 
- private:
-     QString qmlplugindumpPath;
-@@ -102,6 +103,19 @@ void tst_qmlplugindump::builtins()
-     QVERIFY(result.contains(QLatin1String("Module {")));
- }
- 
-+void tst_qmlplugindump::singleton()
-+{
-+    QProcess dumper;
-+    QStringList args;
-+    args << QLatin1String("tests.dumper.CompositeSingleton") << QLatin1String("1.0")
-+         << QLatin1String(".");
-+    dumper.start(qmlplugindumpPath, args);
-+    dumper.waitForFinished();
-+
-+    const QString &result = dumper.readAllStandardOutput();
-+    QVERIFY(result.contains(QLatin1String("exports: [\"Singleton 1.0\"]")));
-+}
-+
- QTEST_MAIN(tst_qmlplugindump)
- 
- #include "tst_qmlplugindump.moc"
--- 
-2.7.0
-

-- 
qtdeclarative packaging



More information about the pkg-kde-commits mailing list