a property should never, never, ever called "data"

means the element won't be able to have children
This commit is contained in:
Marco Martin 2011-12-15 18:28:57 +01:00
parent eb4b2dc7f8
commit d52cb2a57b
3 changed files with 5 additions and 5 deletions

View File

@ -103,7 +103,7 @@ QDeclarativeItem* DeclarativeDragArea::target() const
} }
// data // data
DeclarativeMimeData* DeclarativeDragArea::data() const DeclarativeMimeData* DeclarativeDragArea::mimeData() const
{ {
return m_data; return m_data;
} }

View File

@ -35,7 +35,7 @@ class DeclarativeDragArea : public QDeclarativeItem
Q_PROPERTY(QDeclarativeComponent* delegate READ delegate WRITE setDelegate NOTIFY delegateChanged RESET resetDelegate) Q_PROPERTY(QDeclarativeComponent* delegate READ delegate WRITE setDelegate NOTIFY delegateChanged RESET resetDelegate)
Q_PROPERTY(QDeclarativeItem* source READ source WRITE setSource NOTIFY sourceChanged RESET resetSource) Q_PROPERTY(QDeclarativeItem* source READ source WRITE setSource NOTIFY sourceChanged RESET resetSource)
Q_PROPERTY(QDeclarativeItem* target READ source NOTIFY targetChanged) Q_PROPERTY(QDeclarativeItem* target READ source NOTIFY targetChanged)
Q_PROPERTY(DeclarativeMimeData* data READ data CONSTANT) Q_PROPERTY(DeclarativeMimeData* mimeData READ mimeData CONSTANT)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) //TODO: Should call setAcceptDrops() Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) //TODO: Should call setAcceptDrops()
Q_PROPERTY(Qt::DropActions supportedActions READ supportedActions WRITE setSupportedActions NOTIFY supportedActionsChanged) Q_PROPERTY(Qt::DropActions supportedActions READ supportedActions WRITE setSupportedActions NOTIFY supportedActionsChanged)
Q_PROPERTY(Qt::DropAction defaultAction READ defaultAction WRITE setDefaultAction NOTIFY defaultActionChanged) Q_PROPERTY(Qt::DropAction defaultAction READ defaultAction WRITE setDefaultAction NOTIFY defaultActionChanged)
@ -65,7 +65,7 @@ public:
Qt::DropAction defaultAction() const; Qt::DropAction defaultAction() const;
void setDefaultAction(Qt::DropAction action); void setDefaultAction(Qt::DropAction action);
DeclarativeMimeData* data() const; DeclarativeMimeData* mimeData() const;
signals: signals:
void delegateChanged(); void delegateChanged();

View File

@ -35,7 +35,7 @@ class DeclarativeDragDropEvent : public QObject
Q_PROPERTY(int y READ y) Q_PROPERTY(int y READ y)
Q_PROPERTY(int buttons READ buttons) Q_PROPERTY(int buttons READ buttons)
Q_PROPERTY(int modifiers READ modifiers) Q_PROPERTY(int modifiers READ modifiers)
Q_PROPERTY(DeclarativeMimeData* data READ data) Q_PROPERTY(DeclarativeMimeData* mimeData READ mimeData)
Q_PROPERTY(Qt::DropActions possibleActions READ possibleActions) Q_PROPERTY(Qt::DropActions possibleActions READ possibleActions)
Q_PROPERTY(Qt::DropAction proposedAction READ proposedAction) Q_PROPERTY(Qt::DropAction proposedAction READ proposedAction)
@ -47,7 +47,7 @@ public:
int y() const { return m_y; } int y() const { return m_y; }
int buttons() const { return m_buttons; } int buttons() const { return m_buttons; }
int modifiers() const { return m_modifiers; } int modifiers() const { return m_modifiers; }
DeclarativeMimeData* data() { return &m_data; } DeclarativeMimeData* mimeData() { return &m_data; }
Qt::DropAction proposedAction() const { return m_event->proposedAction(); } Qt::DropAction proposedAction() const { return m_event->proposedAction(); }
Qt::DropActions possibleActions() const { return m_event->possibleActions(); } Qt::DropActions possibleActions() const { return m_event->possibleActions(); }