aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/designer
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-10-18 08:33:26 +0200
committerLiang Qi <liang.qi@qt.io>2016-10-18 08:33:26 +0200
commitf04c2c40fd7ee91e5cbff2ca4df0fdc30dfbbcd5 (patch)
tree4e96d097987deb8d4d1a963e911dcbd1641a8502 /src/quick/designer
parent0da811cdfebdae1d96c99fe681e6a776e73d2f7f (diff)
parente76ed6a2655894bd671ee7397a15f2e57cfc8d33 (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: src/qml/jsruntime/qv4variantobject.cpp src/qml/types/qquickworkerscript.cpp src/quick/scenegraph/util/qsgdefaultpainternode_p.h tools/qmljs/qmljs.cpp Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
Diffstat (limited to 'src/quick/designer')
-rw-r--r--src/quick/designer/designer.pri6
-rw-r--r--src/quick/designer/qquickdesignercustomparserobject.cpp59
-rw-r--r--src/quick/designer/qquickdesignercustomparserobject_p.h68
-rw-r--r--src/quick/designer/qquickdesignersupport.cpp3
-rw-r--r--src/quick/designer/qquickdesignersupportmetainfo.cpp6
-rw-r--r--src/quick/designer/qquickdesignersupportmetainfo_p.h1
6 files changed, 141 insertions, 2 deletions
diff --git a/src/quick/designer/designer.pri b/src/quick/designer/designer.pri
index eb2141134d..f87ea4da04 100644
--- a/src/quick/designer/designer.pri
+++ b/src/quick/designer/designer.pri
@@ -7,7 +7,8 @@ HEADERS += \
designer/qquickdesignersupportproperties_p.h \
designer/qquickdesignersupportmetainfo_p.h \
designer/qqmldesignermetaobject_p.h \
- designer/qquickdesignersupport_p.h
+ designer/qquickdesignersupport_p.h \
+ designer/qquickdesignercustomparserobject_p.h
SOURCES += \
designer/qquickdesignercustomobjectdata.cpp \
@@ -18,4 +19,5 @@ SOURCES += \
designer/qquickdesignersupportpropertychanges.cpp \
designer/qquickdesignersupportstates.cpp \
designer/qquickdesignerwindowmanager.cpp \
- designer/qqmldesignermetaobject.cpp
+ designer/qqmldesignermetaobject.cpp \
+ designer/qquickdesignercustomparserobject.cpp
diff --git a/src/quick/designer/qquickdesignercustomparserobject.cpp b/src/quick/designer/qquickdesignercustomparserobject.cpp
new file mode 100644
index 0000000000..b785abe361
--- /dev/null
+++ b/src/quick/designer/qquickdesignercustomparserobject.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick 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 "qquickdesignercustomparserobject_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QQuickDesignerCustomParserObject::QQuickDesignerCustomParserObject()
+{
+
+}
+
+void QQuickDesignerCustomParser::verifyBindings(const QV4::CompiledData::Unit *, const QList<const QV4::CompiledData::Binding *> &)
+{
+ /* Nothing to do we accept anything */
+}
+
+void QQuickDesignerCustomParser::applyBindings(QObject *, QV4::CompiledData::CompilationUnit *, const QList<const QV4::CompiledData::Binding *> &)
+{
+ /* Nothing to do we accept anything */
+}
+
+QT_END_NAMESPACE
diff --git a/src/quick/designer/qquickdesignercustomparserobject_p.h b/src/quick/designer/qquickdesignercustomparserobject_p.h
new file mode 100644
index 0000000000..06206443b2
--- /dev/null
+++ b/src/quick/designer/qquickdesignercustomparserobject_p.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick 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 QUICKDESIGNERCUSTOMPARSEROBJECT_H
+#define QUICKDESIGNERCUSTOMPARSEROBJECT_H
+
+#include <QObject>
+#include <private/qqmlcustomparser_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickDesignerCustomParserObject : public QObject
+{
+ Q_OBJECT
+
+public:
+ QQuickDesignerCustomParserObject();
+};
+
+class QQuickDesignerCustomParser : public QQmlCustomParser
+{
+public:
+ QQuickDesignerCustomParser()
+ : QQmlCustomParser(AcceptsAttachedProperties | AcceptsSignalHandlers) {}
+
+ void verifyBindings(const QV4::CompiledData::Unit *qmlUnit, const QList<const QV4::CompiledData::Binding *> &props) override;
+ void applyBindings(QObject *obj, QV4::CompiledData::CompilationUnit *compilationUnit, const QList<const QV4::CompiledData::Binding *> &bindings) override;
+};
+
+QT_END_NAMESPACE
+
+#endif // QUICKDESIGNERCUSTOMPARSEROBJECT_H
diff --git a/src/quick/designer/qquickdesignersupport.cpp b/src/quick/designer/qquickdesignersupport.cpp
index 44be12bb78..3ff5a3ce96 100644
--- a/src/quick/designer/qquickdesignersupport.cpp
+++ b/src/quick/designer/qquickdesignersupport.cpp
@@ -40,7 +40,9 @@
#include "qquickdesignersupport_p.h"
#include <private/qquickitem_p.h>
+#if QT_CONFIG(quick_shadereffect)
#include <QtQuick/private/qquickshadereffectsource_p.h>
+#endif
#include <QtQuick/private/qquickrectangle_p.h>
#include <QtQml/private/qabstractanimationjob_p.h>
#include <private/qqmlengine_p.h>
@@ -51,6 +53,7 @@
#include <private/qqmlvme_p.h>
#include <private/qqmlcomponentattached_p.h>
#include <private/qqmldata_p.h>
+#include <private/qsgadaptationlayer_p.h>
#include "qquickdesignerwindowmanager_p.h"
diff --git a/src/quick/designer/qquickdesignersupportmetainfo.cpp b/src/quick/designer/qquickdesignersupportmetainfo.cpp
index 27c9814ef1..332ae26bd4 100644
--- a/src/quick/designer/qquickdesignersupportmetainfo.cpp
+++ b/src/quick/designer/qquickdesignersupportmetainfo.cpp
@@ -37,6 +37,7 @@
**
****************************************************************************/
+#include "qquickdesignercustomparserobject_p.h"
#include "qquickdesignersupportmetainfo_p.h"
#include "qqmldesignermetaobject_p.h"
@@ -70,5 +71,10 @@ void QQuickDesignerSupportMetaInfo::registerNotifyPropertyChangeCallBack(void (*
QQmlDesignerMetaObject::registerNotifyPropertyChangeCallBack(callback);
}
+void QQuickDesignerSupportMetaInfo::registerMockupObject(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
+{
+ qmlRegisterCustomType<QQuickDesignerCustomParserObject>(uri, versionMajor, versionMinor, qmlName, new QQuickDesignerCustomParser);
+}
+
QT_END_NAMESPACE
diff --git a/src/quick/designer/qquickdesignersupportmetainfo_p.h b/src/quick/designer/qquickdesignersupportmetainfo_p.h
index 43cd8e8fb1..344d720d98 100644
--- a/src/quick/designer/qquickdesignersupportmetainfo_p.h
+++ b/src/quick/designer/qquickdesignersupportmetainfo_p.h
@@ -63,6 +63,7 @@ class Q_QUICK_EXPORT QQuickDesignerSupportMetaInfo
public:
static bool isSubclassOf(QObject *object, const QByteArray &superTypeName);
static void registerNotifyPropertyChangeCallBack(void (*callback)(QObject *, const QQuickDesignerSupport::PropertyName &));
+ static void registerMockupObject(const char *uri, int versionMajor, int versionMinor, const char *qmlName);
};
QT_END_NAMESPACE