diff options
author | Charles Yin <charles.yin@nokia.com> | 2010-11-29 13:38:58 +1000 |
---|---|---|
committer | Charles Yin <charles.yin@nokia.com> | 2010-12-01 11:43:38 +1000 |
commit | 5bf5c8091e08e4e3cab2181c88da42782f031f44 (patch) | |
tree | 9a00a499bce501e948e406f1fc924967294a92ed | |
parent | de5dc585a219e7202beea795bb460b82693c4db7 (diff) |
QDeclarativeOrganizerCollection::id/setId use QOrganizerCollectionId::toString/fromString instead hash value.
Change-Id: I56b18832f4e4002b49a23da3e49fcbcff95c5ba3
-rw-r--r-- | examples/qmlorganizer/contents/MonthView.qml (renamed from examples/qmlorganizer/contents/monthview.qml) | 3 | ||||
-rw-r--r-- | examples/qmlorganizer/organizer.qml | 2 | ||||
-rw-r--r-- | examples/qmlorganizer/qmlorganizer.pro | 4 | ||||
-rw-r--r-- | examples/qmlorganizer/qmlorganizer.qrc | 2 | ||||
-rw-r--r-- | plugins/declarative/contacts/qdeclarativecontactfilter.cpp | 3 | ||||
-rw-r--r-- | plugins/declarative/organizer/qdeclarativeorganizercollection_p.h | 11 | ||||
-rw-r--r-- | plugins/declarative/organizer/qdeclarativeorganizeritemfilter.cpp | 4 |
7 files changed, 19 insertions, 10 deletions
diff --git a/examples/qmlorganizer/contents/monthview.qml b/examples/qmlorganizer/contents/MonthView.qml index a9bb295669..7703c7a72b 100644 --- a/examples/qmlorganizer/contents/monthview.qml +++ b/examples/qmlorganizer/contents/MonthView.qml @@ -40,6 +40,8 @@ import Qt 4.7 import "month.js" as Month +import QtMobility.organizer 1.1 + Item { id:monthView property int month: 9 @@ -47,6 +49,7 @@ Item { property date startDay:new Date(year, month, 1) property int startWeekday:startDay.getDay() property int today + property OrganizerModel model:null anchors.fill: parent diff --git a/examples/qmlorganizer/organizer.qml b/examples/qmlorganizer/organizer.qml index cd9c704a5a..c4363e74ba 100644 --- a/examples/qmlorganizer/organizer.qml +++ b/examples/qmlorganizer/organizer.qml @@ -106,7 +106,7 @@ Rectangle { height: 600; opacity: 0; anchors.fill: contentArea; - Loader {id: monthLoader; opacity:parent.opacity; anchors.fill: parent; source: "contents/monthview.qml";} + Loader {id: monthLoader; opacity:parent.opacity; anchors.fill: parent; source: "contents/MonthView.qml";} } Rectangle { id: timelineView; diff --git a/examples/qmlorganizer/qmlorganizer.pro b/examples/qmlorganizer/qmlorganizer.pro index 8ac766ab02..c7bdf0892b 100644 --- a/examples/qmlorganizer/qmlorganizer.pro +++ b/examples/qmlorganizer/qmlorganizer.pro @@ -18,7 +18,6 @@ OTHER_FILES += \ contents/timeline.js \ contents/settingsview.qml \ contents/ScrollBar.qml \ - contents/monthview.qml \ contents/MediaButton.qml \ contents/detailsview.qml \ contents/Button.qml \ @@ -34,7 +33,8 @@ OTHER_FILES += \ contents/images/default.svg \ contents/images/button-pressed.png \ contents/images/button.png \ - contents/month.js + contents/month.js \ + contents/MonthView.qml symbian: { load(data_caging_paths) diff --git a/examples/qmlorganizer/qmlorganizer.qrc b/examples/qmlorganizer/qmlorganizer.qrc index bc3d5b89ac..d9eae8288a 100644 --- a/examples/qmlorganizer/qmlorganizer.qrc +++ b/examples/qmlorganizer/qmlorganizer.qrc @@ -4,7 +4,7 @@ <file>contents/Button.qml</file> <file>contents/detailsview.qml</file> <file>contents/MediaButton.qml</file> - <file>contents/monthview.qml</file> + <file>contents/MonthView.qml</file> <file>contents/ScrollBar.qml</file> <file>contents/settingsview.qml</file> <file>contents/timeline.js</file> diff --git a/plugins/declarative/contacts/qdeclarativecontactfilter.cpp b/plugins/declarative/contacts/qdeclarativecontactfilter.cpp index eb87672939..08eb6a8909 100644 --- a/plugins/declarative/contacts/qdeclarativecontactfilter.cpp +++ b/plugins/declarative/contacts/qdeclarativecontactfilter.cpp @@ -120,8 +120,9 @@ /*! \qmlclass DetailFilter QDeclarativeContactDetailFilter - \brief The DetailFilter element provides a filter based around a detail value criterion. + \brief The \l DetailFilter element provides a filter based around a detail value criterion. + \qmlmodule contacts \ingroup qml-contacts This element is part of the \bold{QtMobility.contacts 1.1} module. diff --git a/plugins/declarative/organizer/qdeclarativeorganizercollection_p.h b/plugins/declarative/organizer/qdeclarativeorganizercollection_p.h index 352d6573b4..1b7bedbc7c 100644 --- a/plugins/declarative/organizer/qdeclarativeorganizercollection_p.h +++ b/plugins/declarative/organizer/qdeclarativeorganizercollection_p.h @@ -54,7 +54,7 @@ QTM_USE_NAMESPACE class QDeclarativeOrganizerCollection : public QObject { Q_OBJECT - Q_PROPERTY(uint collectionId READ id NOTIFY valueChanged) + Q_PROPERTY(QString collectionId READ id WRITE setId NOTIFY valueChanged) Q_PROPERTY(QString name READ name WRITE setName NOTIFY valueChanged) Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY valueChanged) Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY valueChanged) @@ -66,9 +66,14 @@ public: } - uint id() const + QString id() const { - return qHash(d.id()); + return d.id().toString(); + } + + void setId(const QString& newId) + { + d.setId(QOrganizerCollectionId::fromString(newId)); } QString name() const diff --git a/plugins/declarative/organizer/qdeclarativeorganizeritemfilter.cpp b/plugins/declarative/organizer/qdeclarativeorganizeritemfilter.cpp index 6f04b92c42..554e17bced 100644 --- a/plugins/declarative/organizer/qdeclarativeorganizeritemfilter.cpp +++ b/plugins/declarative/organizer/qdeclarativeorganizeritemfilter.cpp @@ -106,8 +106,8 @@ /*! \qmlclass DetailFilter QDeclarativeOrganizerItemDetailFilter - \brief The DetailFilter element provides a filter based around a detail value criterion. - + \brief The \l DetailFilter element provides a filter based around a detail value criterion. + \qmlmodule organizer \ingroup qml-organizer This element is part of the \bold{QtMobility.organizer 1.1} module. |