From b8d8ae2dc5be1a90b65faeb94ca188beda46dc1e Mon Sep 17 00:00:00 2001
From: Aaron Kennedy <aaron.kennedy@nokia.com>
Date: Wed, 5 Aug 2009 11:56:44 +1000
Subject: Make QFxAnchorLine private and internal

---
 src/declarative/fx/qfxanchors.cpp           |  3 +++
 src/declarative/fx/qfxanchors.h             |  2 +-
 src/declarative/fx/qfxanchors_p.h           | 25 +++++++++++++++++++++++++
 src/declarative/fx/qfxitem.cpp              |  6 +++++-
 src/declarative/fx/qfxitem.h                | 25 +------------------------
 src/declarative/fx/qfxitem_p.h              |  1 +
 src/declarative/util/qfxview.cpp            |  1 -
 src/declarative/util/qmlstateoperations.cpp |  4 ++++
 8 files changed, 40 insertions(+), 27 deletions(-)

diff --git a/src/declarative/fx/qfxanchors.cpp b/src/declarative/fx/qfxanchors.cpp
index 1595f57..b60990c 100644
--- a/src/declarative/fx/qfxanchors.cpp
+++ b/src/declarative/fx/qfxanchors.cpp
@@ -969,3 +969,6 @@ bool QFxAnchorsPrivate::checkVAnchorValid(QFxAnchorLine anchor) const
 }
 
 QT_END_NAMESPACE
+
+#include "moc_qfxanchors.cpp"
+
diff --git a/src/declarative/fx/qfxanchors.h b/src/declarative/fx/qfxanchors.h
index 70217d6..3dd64c7 100644
--- a/src/declarative/fx/qfxanchors.h
+++ b/src/declarative/fx/qfxanchors.h
@@ -54,6 +54,7 @@ QT_BEGIN_NAMESPACE
 QT_MODULE(Declarative)
 
 class QFxAnchorsPrivate;
+class QFxAnchorLine;
 class Q_DECLARATIVE_EXPORT QFxAnchors : public QObject
 {
     Q_OBJECT
@@ -172,7 +173,6 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QFxAnchors::UsedAnchors)
 
 QT_END_NAMESPACE
 
-Q_DECLARE_METATYPE(QFxAnchorLine)
 QML_DECLARE_TYPE(QFxAnchors)
 
 QT_END_HEADER
diff --git a/src/declarative/fx/qfxanchors_p.h b/src/declarative/fx/qfxanchors_p.h
index ca42966..9b1bc18 100644
--- a/src/declarative/fx/qfxanchors_p.h
+++ b/src/declarative/fx/qfxanchors_p.h
@@ -58,6 +58,31 @@
 
 QT_BEGIN_NAMESPACE
 
+class QFxAnchorLine
+{
+public:
+    QFxAnchorLine() : item(0), anchorLine(Invalid)
+    {
+    }
+
+    enum AnchorLine {
+        Invalid = 0x0,
+        Left = 0x01,
+        Right = 0x02,
+        Top = 0x04,
+        Bottom = 0x08,
+        HCenter = 0x10,
+        VCenter = 0x20,
+        Baseline = 0x40,
+        Horizontal_Mask = Left | Right | HCenter,
+        Vertical_Mask = Top | Bottom | VCenter | Baseline
+    };
+
+    QFxItem *item;
+    AnchorLine anchorLine;
+};
+Q_DECLARE_METATYPE(QFxAnchorLine)
+
 class QFxAnchorsPrivate : public QObjectPrivate
 {
     Q_DECLARE_PUBLIC(QFxAnchors)
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index 2d3fa8d..b081edc 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -53,7 +53,6 @@
 #include <QtDeclarative/qmlengine.h>
 #include "qmlstate.h"
 #include "qlistmodelinterface.h"
-#include "qfxanchors_p.h"
 
 #include "qfxview.h"
 #include "qmlstategroup.h"
@@ -371,6 +370,7 @@ QFxItem::QFxItem(QFxItem* parent)
   : QGraphicsObject(*(new QFxItemPrivate), parent, 0)
 {
     Q_D(QFxItem);
+    qRegisterMetaType<QFxAnchorLine>("QFxAnchorLine");
     d->init(parent);
 }
 
@@ -380,6 +380,7 @@ QFxItem::QFxItem(QFxItemPrivate &dd, QFxItem *parent)
   : QGraphicsObject(dd, parent, 0)
 {
     Q_D(QFxItem);
+    qRegisterMetaType<QFxAnchorLine>("QFxAnchorLine");
     d->init(parent);
 }
 
@@ -1884,3 +1885,6 @@ bool QFxItem::event(QEvent *ev)
 }
 
 QT_END_NAMESPACE
+
+#include "moc_qfxitem.cpp"
+
diff --git a/src/declarative/fx/qfxitem.h b/src/declarative/fx/qfxitem.h
index b1676e4..4a26c9b 100644
--- a/src/declarative/fx/qfxitem.h
+++ b/src/declarative/fx/qfxitem.h
@@ -89,31 +89,8 @@ private:
     qreal m_width;
 };
 
-class QFxAnchorLine
-{
-public:
-    QFxAnchorLine() : item(0), anchorLine(Invalid)
-    {
-    }
-
-    enum AnchorLine {
-        Invalid = 0x0,
-        Left = 0x01,
-        Right = 0x02,
-        Top = 0x04,
-        Bottom = 0x08,
-        HCenter = 0x10,
-        VCenter = 0x20,
-        Baseline = 0x40,
-        Horizontal_Mask = Left | Right | HCenter,
-        Vertical_Mask = Top | Bottom | VCenter | Baseline
-    };
-
-    QFxItem *item;
-    AnchorLine anchorLine;
-};
-
 class QmlState;
+class QFxAnchorLine;
 class QmlTransition;
 class QFxKeyEvent;
 class QFxAnchors;
diff --git a/src/declarative/fx/qfxitem_p.h b/src/declarative/fx/qfxitem_p.h
index b11b812..08d173d 100644
--- a/src/declarative/fx/qfxitem_p.h
+++ b/src/declarative/fx/qfxitem_p.h
@@ -57,6 +57,7 @@
 #include <QtDeclarative/qmlstate.h>
 #include <QtDeclarative/qfxanchors.h>
 #include <private/qmlnullablevalue_p.h>
+#include <private/qfxanchors_p.h>
 #include <QtDeclarative/qml.h>
 #include <QtDeclarative/qmlcontext.h>
 #include <QtCore/qlist.h>
diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp
index 2f5cdd3..0f129d8 100644
--- a/src/declarative/util/qfxview.cpp
+++ b/src/declarative/util/qfxview.cpp
@@ -140,7 +140,6 @@ QFxView::QFxView(QWidget *parent)
 void QFxViewPrivate::init()
 {
     // XXX: These need to be put in a central location for this kind of thing
-    qRegisterMetaType<QFxAnchorLine>("QFxAnchorLine");
 
     QmlMetaType::registerCustomStringConverter(QVariant::Pixmap, &stringToPixmap);
     QmlMetaType::registerCustomStringConverter(QVariant::Icon, &stringToIcon);
diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp
index 1f53bee..056912f 100644
--- a/src/declarative/util/qmlstateoperations.cpp
+++ b/src/declarative/util/qmlstateoperations.cpp
@@ -46,6 +46,7 @@
 #include "qmlstateoperations.h"
 #include <QtCore/qdebug.h>
 #include <QtDeclarative/qmlinfo.h>
+#include <private/qfxanchors_p.h>
 
 QT_BEGIN_NAMESPACE
 
@@ -524,3 +525,6 @@ void QmlSetAnchors::clearReverseBindings()
 }
 
 QT_END_NAMESPACE
+
+#include "moc_qmlstateoperations.cpp"
+
-- 
cgit v0.12