summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-12-23 00:42:48 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-12-23 00:42:48 (GMT)
commitf5ecc70e108f02274e7ef94d4cf9f0cb4db5422a (patch)
treed298c9cb23ca7ef846dbde356f95d7f3eef99fbe
parente180de35280e48ded1c22b519d6d36f30cf5100d (diff)
downloadQt-f5ecc70e108f02274e7ef94d4cf9f0cb4db5422a.zip
Qt-f5ecc70e108f02274e7ef94d4cf9f0cb4db5422a.tar.gz
Qt-f5ecc70e108f02274e7ef94d4cf9f0cb4db5422a.tar.bz2
Revert some of 944a9b41e34e0a8c9b9994a040a6b83aa4e11291
External projects require anchors to be creatable.
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanchors.cpp8
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanchors_p.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
index ddf2a3b..4948633 100644
--- a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
@@ -50,7 +50,7 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_NOCREATE_TYPE(QmlGraphicsAnchors)
+QML_DEFINE_TYPE(Qt,4,6,Anchors,QmlGraphicsAnchors)
//TODO: should we cache relationships, so we don't have to check each time (parent-child or sibling)?
//TODO: support non-parent, non-sibling (need to find lowest common ancestor)
@@ -131,6 +131,12 @@ static qreal adjustedPosition(QmlGraphicsItem *item, QmlGraphicsAnchorLine::Anch
\warning Currently, only anchoring to siblings or parent is supported.
*/
+QmlGraphicsAnchors::QmlGraphicsAnchors(QObject *parent)
+ : QObject(*new QmlGraphicsAnchorsPrivate(0), parent)
+{
+ qFatal("QmlGraphicsAnchors::QmlGraphicsAnchors(QObject*) called");
+}
+
QmlGraphicsAnchors::QmlGraphicsAnchors(QmlGraphicsItem *item, QObject *parent)
: QObject(*new QmlGraphicsAnchorsPrivate(item), parent)
{
diff --git a/src/declarative/graphicsitems/qmlgraphicsanchors_p.h b/src/declarative/graphicsitems/qmlgraphicsanchors_p.h
index dc6a7a8..5a8f8c1 100644
--- a/src/declarative/graphicsitems/qmlgraphicsanchors_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsanchors_p.h
@@ -79,6 +79,7 @@ class Q_DECLARATIVE_EXPORT QmlGraphicsAnchors : public QObject
Q_PROPERTY(QmlGraphicsItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged)
public:
+ QmlGraphicsAnchors(QObject *parent=0);
QmlGraphicsAnchors(QmlGraphicsItem *item, QObject *parent=0);
virtual ~QmlGraphicsAnchors();