[Development] Qt 5.2 header diff: QtQuick

Knoll Lars Lars.Knoll at digia.com
Tue Nov 5 19:12:22 CET 2013


Looks ok as well.

Cheers,
Lars

On 05/11/13 01:07, "Thiago Macieira" <thiago.macieira at intel.com> wrote:

>Pastebin URL (expires in 24 hours):
>http://paste.fedoraproject.org/51638/61143313
>
>--- 
>diff --git a/src/quick/designer/designersupport.h
>b/src/quick/designer/designersupport.h
>index 5139a65..41458ae 100644
>--- a/src/quick/designer/designersupport.h
>+++ b/src/quick/designer/designersupport.h
>@@ -80,7 +80,7 @@ private:
> 
> class QCursor;
> class QQuickItemLayer;
>-class QQmlV8Function;
>+class QQmlV4Function;
> class QQuickState;
> class QQuickAnchorLine;
> class QQuickTransition;
>@@ -320,8 +320,8 @@ public:
> 
>     void polish();
> 
>-    Q_INVOKABLE void mapFromItem(QQmlV8Function*) const;
>-    Q_INVOKABLE void mapToItem(QQmlV8Function*) const;
>+    Q_INVOKABLE void mapFromItem(QQmlV4Function*) const;
>+    Q_INVOKABLE void mapToItem(QQmlV4Function*) const;
>     Q_INVOKABLE void forceActiveFocus();
>     Q_INVOKABLE void forceActiveFocus(Qt::FocusReason reason);
>     Q_REVISION(1) Q_INVOKABLE QQuickItem *nextItemInFocusChain(bool
>forward = true);
>diff --git a/src/quick/items/qquickpainteditem.h
>b/src/quick/items/qquickpainteditem.h
>index 8892400..0a332bf 100644
>--- a/src/quick/items/qquickpainteditem.h
>+++ b/src/quick/items/qquickpainteditem.h
>@@ -47,24 +47,6 @@
> 
> QT_BEGIN_NAMESPACE
> 
>-/*!
>-    \class QQuickTextDocument
>-    \since 5.1
>-    \brief The QQuickTextDocument class provides access to the
>QTextDocument of QQuickTextEdit
>-    \inmodule QtQuick
>-
>-    This class provides access to the QTextDocument of QQuickTextEdit
>elements.
>-    This is provided to allow usage of the \l{Rich Text Processing}
>functionalities of Qt.
>-    You are not allowed to modify the document, but it can be used to
>output content, for example with \l{QTextDocumentWriter}),
>-    or provide additional formatting, for example with
>\l{QSyntaxHighlighter}.
>-
>-    The class has to be used from C++ directly, using the property of
>the \l TextEdit.
>-
>-    Warning: The QTextDocument provided is used internally by \l {Qt
>Quick} elements to provide text manipulation primitives.
>-    You are not allowed to perform any modification of the internal
>state of the QTextDocument. If you do, the element
>-    in question may stop functioning or crash.
>-*/
>-
> class QQuickTextDocumentPrivate;
> class Q_QUICK_EXPORT QQuickTextDocument : public QObject
> {
>diff --git a/src/quick/items/qquickview.h b/src/quick/items/qquickview.h
>index 3e8883d..66d5e34 100644
>--- a/src/quick/items/qquickview.h
>+++ b/src/quick/items/qquickview.h
>@@ -72,7 +72,8 @@ public:
>     enum CreateTextureOption {
>         TextureHasAlphaChannel  = 0x0001,
>         TextureHasMipmaps       = 0x0002,
>-        TextureOwnsGLTexture    = 0x0004
>+        TextureOwnsGLTexture    = 0x0004,
>+        TextureCanUseAtlas      = 0x0008
>     };
> 
>     Q_DECLARE_FLAGS(CreateTextureOptions, CreateTextureOption)
>@@ -99,6 +100,8 @@ public:
>     uint renderTargetId() const;
>     QSize renderTargetSize() const;
> 
>+    void resetOpenGLState();
>+
>     QQmlIncubationController *incubationController() const;
> 
> #ifndef QT_NO_ACCESSIBILITY
>@@ -107,6 +110,7 @@ public:
> 
>     // Scene graph specific functions
>     QSGTexture *createTextureFromImage(const QImage &image) const;
>+    QSGTexture *createTextureFromImage(const QImage &image,
>CreateTextureOptions options) const;
>     QSGTexture *createTextureFromId(uint id, const QSize &size,
>CreateTextureOptions options = CreateTextureOption(0)) const;
> 
>     void setClearBeforeRendering(bool enabled);
>@@ -139,6 +143,7 @@ Q_SIGNALS:
> 
> public Q_SLOTS:
>     void update();
>+    void forcePolish();
>     void releaseResources();
> 
> protected:
>diff --git a/src/quick/qtquickglobal.h b/src/quick/qtquickglobal.h
>index 4cbeb4a..bffdf19 100644
>--- a/src/quick/qtquickglobal.h
>+++ b/src/quick/qtquickglobal.h
>@@ -151,10 +151,10 @@ public:
>     static void updateTexturedRectGeometry(QSGGeometry *g, const QRectF
>&rect, const QRectF &sourceRect);
> 
>     void setIndexDataPattern(DataPattern p);
>-    DataPattern indexDataPattern() const { return (DataPattern)
>m_index_usage_pattern; }
>+    DataPattern indexDataPattern() const { return
>DataPattern(m_index_usage_pattern); }
> 
>     void setVertexDataPattern(DataPattern p);
>-    DataPattern vertexDataPattern() const { return (DataPattern)
>m_vertex_usage_pattern; }
>+    DataPattern vertexDataPattern() const { return
>DataPattern(m_vertex_usage_pattern); }
> 
>     void markIndexDataDirty();
>     void markVertexDataDirty();
>@@ -190,25 +190,25 @@ private:
> inline uint *QSGGeometry::indexDataAsUInt()
> {
>     Q_ASSERT(m_index_type == GL_UNSIGNED_INT);
>-    return (uint *) indexData();
>+    return static_cast<uint *>(indexData());
> }
> 
> inline quint16 *QSGGeometry::indexDataAsUShort()
> {
>     Q_ASSERT(m_index_type == GL_UNSIGNED_SHORT);
>-    return (quint16 *) indexData();
>+    return static_cast<quint16 *>(indexData());
> }
> 
> inline const uint *QSGGeometry::indexDataAsUInt() const
> {
>     Q_ASSERT(m_index_type == GL_UNSIGNED_INT);
>-    return (uint *) indexData();
>+    return static_cast<const uint *>(indexData());
> }
> 
> inline const quint16 *QSGGeometry::indexDataAsUShort() const
> {
>     Q_ASSERT(m_index_type == GL_UNSIGNED_SHORT);
>-    return (quint16 *) indexData();
>+    return static_cast<const quint16 *>(indexData());
> }
> 
> inline QSGGeometry::Point2D *QSGGeometry::vertexDataAsPoint2D()
>@@ -218,7 +218,7 @@ inline QSGGeometry::Point2D
>*QSGGeometry::vertexDataAsPoint2D()
>     Q_ASSERT(m_attributes.attributes[0].tupleSize == 2);
>     Q_ASSERT(m_attributes.attributes[0].type == GL_FLOAT);
>     Q_ASSERT(m_attributes.attributes[0].position == 0);
>-    return (Point2D *) m_data;
>+    return static_cast<Point2D *>(m_data);
> }
> 
> inline QSGGeometry::TexturedPoint2D
>*QSGGeometry::vertexDataAsTexturedPoint2D()
>@@ -231,7 +231,7 @@ inline QSGGeometry::TexturedPoint2D
>*QSGGeometry::vertexDataAsTexturedPoint2D()
>     Q_ASSERT(m_attributes.attributes[1].position == 1);
>     Q_ASSERT(m_attributes.attributes[1].tupleSize == 2);
>     Q_ASSERT(m_attributes.attributes[1].type == GL_FLOAT);
>-    return (TexturedPoint2D *) m_data;
>+    return static_cast<TexturedPoint2D *>(m_data);
> }
> 
> inline QSGGeometry::ColoredPoint2D
>*QSGGeometry::vertexDataAsColoredPoint2D()
>@@ -244,7 +244,7 @@ inline QSGGeometry::ColoredPoint2D
>*QSGGeometry::vertexDataAsColoredPoint2D()
>     Q_ASSERT(m_attributes.attributes[1].position == 1);
>     Q_ASSERT(m_attributes.attributes[1].tupleSize == 4);
>     Q_ASSERT(m_attributes.attributes[1].type == GL_UNSIGNED_BYTE);
>-    return (ColoredPoint2D *) m_data;
>+    return static_cast<ColoredPoint2D *>(m_data);
> }
> 
> inline const QSGGeometry::Point2D *QSGGeometry::vertexDataAsPoint2D()
>const
>@@ -254,7 +254,7 @@ inline const QSGGeometry::Point2D
>*QSGGeometry::vertexDataAsPoint2D() const
>     Q_ASSERT(m_attributes.attributes[0].tupleSize == 2);
>     Q_ASSERT(m_attributes.attributes[0].type == GL_FLOAT);
>     Q_ASSERT(m_attributes.attributes[0].position == 0);
>-    return (const Point2D *) m_data;
>+    return static_cast<const Point2D *>(m_data);
> }
> 
> inline const QSGGeometry::TexturedPoint2D
>*QSGGeometry::vertexDataAsTexturedPoint2D() const
>@@ -267,7 +267,7 @@ inline const QSGGeometry::TexturedPoint2D
>*QSGGeometry::vertexDataAsTexturedPoin
>     Q_ASSERT(m_attributes.attributes[1].position == 1);
>     Q_ASSERT(m_attributes.attributes[1].tupleSize == 2);
>     Q_ASSERT(m_attributes.attributes[1].type == GL_FLOAT);
>-    return (const TexturedPoint2D *) m_data;
>+    return static_cast<const TexturedPoint2D *>(m_data);
> }
> 
> inline const QSGGeometry::ColoredPoint2D
>*QSGGeometry::vertexDataAsColoredPoint2D() const
>@@ -280,7 +280,7 @@ inline const QSGGeometry::ColoredPoint2D
>*QSGGeometry::vertexDataAsColoredPoint2
>     Q_ASSERT(m_attributes.attributes[1].position == 1);
>     Q_ASSERT(m_attributes.attributes[1].tupleSize == 4);
>     Q_ASSERT(m_attributes.attributes[1].type == GL_UNSIGNED_BYTE);
>-    return (const ColoredPoint2D *) m_data;
>+    return static_cast<const ColoredPoint2D *>(m_data);
> }
> 
> int QSGGeometry::sizeOfIndex() const
>diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.h
>b/src/quick/scenegraph/coreapi/qsgmaterial.h
>index 20ab21a..f3ef62d 100644
>--- a/src/quick/scenegraph/coreapi/qsgmaterial.h
>+++ b/src/quick/scenegraph/coreapi/qsgmaterial.h
>@@ -49,6 +49,10 @@ QT_BEGIN_NAMESPACE
> 
> class QSGMaterial;
> 
>+namespace QSGBatchRenderer {
>+    class ShaderManager;
>+}
>+
> class Q_QUICK_EXPORT QSGMaterialShader
> {
> public:
>@@ -95,8 +99,8 @@ public:
>     inline QOpenGLShaderProgram *program() { return &m_program; }
> 
> protected:
>-
>     friend class QSGContext;
>+    friend class QSGBatchRenderer::ShaderManager;
> 
>     virtual void compile();
>     virtual void initialize() { }
>@@ -118,7 +122,9 @@ public:
>         Blending            = 0x0001,
>         RequiresDeterminant = 0x0002, // Allow precalculated translation
>and 2D rotation
>         RequiresFullMatrixExceptTranslate = 0x0004 |
>RequiresDeterminant, // Allow precalculated translation
>-        RequiresFullMatrix  = 0x0008 | RequiresFullMatrixExceptTranslate
>+        RequiresFullMatrix  = 0x0008 | RequiresFullMatrixExceptTranslate,
>+
>+        CustomCompileStep   = 0x0010
>     };
>     Q_DECLARE_FLAGS(Flags, Flag)
> 
>@@ -133,7 +139,6 @@ public:
>     void setFlag(Flags flags, bool on = true);
> 
> private:
>-    friend class QSGContext;
>     Flags m_flags;
>     void *m_reserved;
>     Q_DISABLE_COPY(QSGMaterial)
>diff --git a/src/quick/scenegraph/coreapi/qsgnode.h
>b/src/quick/scenegraph/coreapi/qsgnode.h
>index 3fa2f7f..60e7652 100644
>--- a/src/quick/scenegraph/coreapi/qsgnode.h
>+++ b/src/quick/scenegraph/coreapi/qsgnode.h
>@@ -49,7 +49,7 @@
> 
> QT_BEGIN_NAMESPACE
> 
>-//#define QML_RUNTIME_TESTING
>+// #define QSG_RUNTIME_DESCRIPTION
> 
> class QSGRenderer;
> 
>@@ -58,6 +58,14 @@ class QSGRootNode;
> class QSGGeometryNode;
> class QSGTransformNode;
> class QSGClipNode;
>+class QSGNodePrivate;
>+class QSGBasicGeometryNodePrivate;
>+class QSGGeometryNodePrivate;
>+
>+namespace QSGBatchRenderer {
>+    class Renderer;
>+    class Updater;
>+}
> 
> class Q_QUICK_EXPORT QSGNode
> {
>@@ -79,16 +87,19 @@ public:
>         OwnedByParent               = 0x0001,
>         UsePreprocess               = 0x0002,
> 
>-        // Upper 16 bits reserved for node subclasses
>+        // 0x00ff0000 bits reserved for node subclasses
> 
>         // QSGBasicGeometryNode
>         OwnsGeometry                = 0x00010000,
>         OwnsMaterial                = 0x00020000,
>         OwnsOpaqueMaterial          = 0x00040000
>+
>+        // Uppermost 8 bits are reserved for internal use.
>     };
>     Q_DECLARE_FLAGS(Flags, Flag)
> 
>     enum DirtyStateBit {
>+        DirtySubtreeBlocked         = 0x0080,
>         DirtyMatrix                 = 0x0100,
>         DirtyNodeAdded              = 0x0400,
>         DirtyNodeRemoved            = 0x0800,
>@@ -143,15 +154,13 @@ public:
> 
>     virtual void preprocess() { }
> 
>-#ifdef QML_RUNTIME_TESTING
>-    QString description;
>-#endif
>-
> protected:
>     QSGNode(NodeType type);
>+    QSGNode(QSGNodePrivate &dd, NodeType type);
> 
> private:
>     friend class QSGRootNode;
>+    friend class QSGBatchRenderer::Renderer;
> 
>     void init();
>     void destroy();
>@@ -165,11 +174,18 @@ private:
>     int m_subtreeRenderableCount;
> 
>     Flags m_nodeFlags;
>-    DirtyState m_dirtyState;
>+    DirtyState m_dirtyState; // Obsolete, remove in Qt 6
>+
>+protected:
>+    friend class QSGNodePrivate;
> 
>-    void *m_reserved;
>+    QScopedPointer<QSGNodePrivate> d_ptr;
> };
> 
>+#ifdef QSG_RUNTIME_DESCRIPTION
>+void Q_QUICK_EXPORT qsgnode_set_description(QSGNode *node, const QString
>&description);
>+#endif
>+
> class Q_QUICK_EXPORT QSGBasicGeometryNode : public QSGNode
> {
> public:
>@@ -184,9 +200,12 @@ public:
> 
> protected:
>     QSGBasicGeometryNode(NodeType type);
>+    QSGBasicGeometryNode(QSGBasicGeometryNodePrivate &dd, NodeType type);
> 
> private:
>     friend class QSGNodeUpdater;
>+    friend class QSGBatchRenderer::Updater;
>+
>     QSGGeometry *m_geometry;
> 
>     int m_reserved_start_index;
>@@ -218,6 +237,9 @@ public:
>     void setInheritedOpacity(qreal opacity);
>     qreal inheritedOpacity() const { return m_opacity; }
> 
>+protected:
>+    QSGGeometryNode(QSGGeometryNodePrivate &dd);
>+
> private:
>     friend class QSGNodeUpdater;
> 
>diff --git a/src/quick/scenegraph/util/qsgflatcolormaterial.h
>b/src/quick/scenegraph/util/qsgflatcolormaterial.h
>index 12a37f2..2c802cc 100644
>--- a/src/quick/scenegraph/util/qsgflatcolormaterial.h
>+++ b/src/quick/scenegraph/util/qsgflatcolormaterial.h
>@@ -48,6 +48,8 @@
> 
> QT_BEGIN_NAMESPACE
> 
>+class QSGSimpleTextureNodePrivate;
>+
> class Q_QUICK_EXPORT QSGSimpleTextureNode : public QSGGeometryNode
> {
> public:
>@@ -63,14 +65,28 @@ public:
>     void setFiltering(QSGTexture::Filtering filtering);
>     QSGTexture::Filtering filtering() const;
> 
>+    enum TextureCoordinatesTransformFlag {
>+        NoTransform        = 0x00,
>+        MirrorHorizontally = 0x01,
>+        MirrorVertically   = 0x02
>+    };
>+    Q_DECLARE_FLAGS(TextureCoordinatesTransformMode,
>TextureCoordinatesTransformFlag)
>+
>+    void setTextureCoordinatesTransform(TextureCoordinatesTransformMode
>mode);
>+    TextureCoordinatesTransformMode textureCoordinatesTransform() const;
>+
> private:
>     QSGGeometry m_geometry;
>     QSGOpaqueTextureMaterial m_opaque_material;
>     QSGTextureMaterial m_material;
> 
>     QRectF m_rect;
>+
>+    Q_DECLARE_PRIVATE(QSGSimpleTextureNode)
> };
> 
>+Q_DECLARE_OPERATORS_FOR_FLAGS(QSGSimpleTextureNode::TextureCoordinatesTra
>nsformMode)
>+
> QT_END_NAMESPACE
> 
> #endif // QSGSIMPLETEXTURENODE_H
>diff --git a/src/quick/scenegraph/util/qsgtexture.h
>b/src/quick/scenegraph/util/qsgtexture.h
>index 299ffc2..5bc7095 100644
>--- a/src/quick/scenegraph/util/qsgtexture.h
>+++ b/src/quick/scenegraph/util/qsgtexture.h
>@@ -60,16 +60,16 @@ public:
>     QSGTexture *texture() const { return m_texture; }
> 
>     void setMipmapFiltering(QSGTexture::Filtering filteringType) {
>m_mipmap_filtering = filteringType; }
>-    QSGTexture::Filtering mipmapFiltering() const { return
>(QSGTexture::Filtering) m_mipmap_filtering; }
>+    QSGTexture::Filtering mipmapFiltering() const { return
>QSGTexture::Filtering(m_mipmap_filtering); }
> 
>     void setFiltering(QSGTexture::Filtering filteringType) { m_filtering
>= filteringType; }
>-    QSGTexture::Filtering filtering() const { return
>(QSGTexture::Filtering)  m_filtering; }
>+    QSGTexture::Filtering filtering() const { return
>QSGTexture::Filtering(m_filtering); }
> 
>     void setHorizontalWrapMode(QSGTexture::WrapMode mode) {
>m_horizontal_wrap = mode; }
>-    QSGTexture::WrapMode horizontalWrapMode() const { return
>(QSGTexture::WrapMode) m_horizontal_wrap; }
>+    QSGTexture::WrapMode horizontalWrapMode() const { return
>QSGTexture::WrapMode(m_horizontal_wrap); }
> 
>     void setVerticalWrapMode(QSGTexture::WrapMode mode) {
>m_vertical_wrap = mode; }
>-    QSGTexture::WrapMode verticalWrapMode() const { return
>(QSGTexture::WrapMode) m_vertical_wrap; }
>+    QSGTexture::WrapMode verticalWrapMode() const { return
>QSGTexture::WrapMode(m_vertical_wrap); }
> 
> protected:
>     QSGTexture *m_texture;
>diff --git a/src/quick/scenegraph/util/qsgtextureprovider.h
>b/src/quick/scenegraph/util/qsgtextureprovider.h
>index 608b3c6..892f0e5 100644
>--- a/src/quick/scenegraph/util/qsgtextureprovider.h
>+++ b/src/quick/scenegraph/util/qsgtextureprovider.h
>_______________________________________________
>Development mailing list
>Development at qt-project.org
>http://lists.qt-project.org/mailman/listinfo/development





More information about the Development mailing list