summaryrefslogtreecommitdiffstats
path: root/src/organizer
diff options
context:
space:
mode:
Diffstat (limited to 'src/organizer')
-rw-r--r--src/organizer/details/qorganizeritemdetails.cpp21
-rw-r--r--src/organizer/qorganizerabstractrequest.cpp1
-rw-r--r--src/organizer/qorganizeritem.cpp9
-rw-r--r--src/organizer/qorganizeritemdetail.cpp6
-rw-r--r--src/organizer/qorganizeritemdetail_p.h1
-rw-r--r--src/organizer/qorganizermanagerengine.cpp9
-rw-r--r--src/organizer/requests/qorganizeritemsaverequest.cpp1
7 files changed, 42 insertions, 6 deletions
diff --git a/src/organizer/details/qorganizeritemdetails.cpp b/src/organizer/details/qorganizeritemdetails.cpp
index 4eb2180a39..8e9f23b21e 100644
--- a/src/organizer/details/qorganizeritemdetails.cpp
+++ b/src/organizer/details/qorganizeritemdetails.cpp
@@ -57,6 +57,7 @@ QTM_BEGIN_NAMESPACE
\brief The QOrganizerItemDescription class contains some arbitrary information which is relevant to the organizer item.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
*/
/*!
@@ -95,6 +96,7 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerItemDescription::FieldDescription, "Descripti
\brief The QOrganizerItemDisplayLabel class contains the backend-synthesized display label of the organizer item.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
*/
/*!
@@ -151,6 +153,7 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerItemDisplayLabel::FieldLabel, "Label");
or occurrence of an event.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
*/
/*!
@@ -238,6 +241,7 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerEventTime::FieldAllDay, "AllDay");
\brief The QOrganizerItemGuid class contains the globally unique identifier of the organizer item, which can be used for synchronization purposes.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
*/
/*!
@@ -276,6 +280,7 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerItemGuid::FieldGuid, "Guid");
\brief The QOrganizerItemParent class contains information about the event or todo that generated this item.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
*/
/*!
@@ -332,6 +337,7 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerItemParent::FieldOriginalDate, "OriginalDate"
the date and time for which a journal entry has been created.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
*/
/*!
@@ -367,6 +373,7 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerJournalTime::FieldEntryDateTime, "EntryDateTi
\brief The QOrganizerItemLocation class contains information about a location which is related to the organizer item in some manner.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
*/
@@ -454,6 +461,7 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerItemLocation::FieldLabel, "Label");
\brief The QOrganizerItemComment class contains some arbitrary information which is relevant to the organizer item.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
*/
/*!
@@ -503,6 +511,7 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerItemComment::FieldComment, "Comment");
\brief The QOrganizerItemPriority class contains the priority of the organizer item, which may be used to resolve scheduling conflicts.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
*/
/*!
@@ -719,6 +728,7 @@ void QOrganizerItemRecurrence::setExceptionDates(const QSet<QDate>& xdates)
\brief The QOrganizerItemReminder class contains information about when and how the user wants to reminded of the item
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
Note that the Organizer API does not enforce that the user is reminded of the item;
rather, it simply allows clients to store and manipulate data which might be used
@@ -863,6 +873,7 @@ QOrganizerItemReminder::ReminderType QOrganizerItemReminder::reminderType() cons
\brief The QOrganizerItemAudibleReminder class contains information about an audible reminder of an item.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
An audible reminder is a reminder which alerts the user about the item, with sound.
Note that the Organizer API does not enforce that the sound data is played,
@@ -903,6 +914,7 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerItemAudibleReminder::FieldDataUrl, "DataUrl")
\brief The QOrganizerItemEmailReminder class contains information about an email reminder of an item.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
An email reminder is a reminder which alerts the user (or other users) about the item,
by sending an email.
@@ -986,6 +998,7 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerItemEmailReminder::FieldRecipients, "Recipien
\brief The QOrganizerItemVisualReminder class contains information about a visual reminder of an item.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
A visual reminder is a reminder which alerts the user about the item, with a message, image or video.
Note that the Organizer API does not enforce that the visual data is displayed,
@@ -1043,6 +1056,7 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerItemVisualReminder::FieldDataUrl, "DataUrl");
\brief The QOrganizerItemTag class contains some arbitrary tag which is relevant to the organizer item.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
*/
/*!
@@ -1088,9 +1102,11 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerItemTag::FieldTag, "Tag");
/* ==================== QOrganizerItemTimestamp ======================= */
/*!
\class QOrganizerItemTimestamp
- \brief The QOrganizerItemTimestamp class contains the creation and last-modified timestamp associated with the organizer item. XXX TODO: what about last accessed?
+ \brief The QOrganizerItemTimestamp class contains the creation and last-modified timestamp associated with the organizer item.
+ XXX TODO: what about last accessed?
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
*/
/*!
@@ -1147,6 +1163,7 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerItemTimestamp::FieldCreationTimestamp, "Creat
\brief The QOrganizerTodoProgress class contains information about the progress of a todo item.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
*/
/*!
@@ -1222,6 +1239,7 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerTodoProgress::FieldFinishedDateTime, "Finishe
\brief The QOrganizerTodoTime class contains information about the time range of a todo item.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
*/
/*!
@@ -1298,6 +1316,7 @@ Q_DEFINE_LATIN1_CONSTANT(QOrganizerTodoTime::FieldAllDay, "AllDay");
\brief The QOrganizerItemType class describes the type of the organizer item. This detail may be automatically synthesized by the backend depending on other details in the organizer item.
\inmodule QtOrganizer
\ingroup organizer-details
+ \since 1.1
*/
/*!
diff --git a/src/organizer/qorganizerabstractrequest.cpp b/src/organizer/qorganizerabstractrequest.cpp
index 553652a91c..5253dcbb3e 100644
--- a/src/organizer/qorganizerabstractrequest.cpp
+++ b/src/organizer/qorganizerabstractrequest.cpp
@@ -58,6 +58,7 @@ QTM_BEGIN_NAMESPACE
asynchronous requests to be made of a manager if it supports them.
\inmodule QtOrganizer
+ \since 1.1
\ingroup organizer-main
diff --git a/src/organizer/qorganizeritem.cpp b/src/organizer/qorganizeritem.cpp
index f28a056f4b..0d7ca7f18b 100644
--- a/src/organizer/qorganizeritem.cpp
+++ b/src/organizer/qorganizeritem.cpp
@@ -74,6 +74,7 @@ QTM_BEGIN_NAMESPACE
\brief The QOrganizerItem class represents an event, todo, note, or journal entry
\inmodule QtOrganizer
+ \since 1.1
\ingroup organizer-main
@@ -645,9 +646,15 @@ bool QOrganizerItem::removeDetail(QOrganizerItemDetail* detail)
/*! Returns true if this organizer item is equal to the \a other organizer item, false if either the id, collection id or stored details are not the same */
bool QOrganizerItem::operator==(const QOrganizerItem& other) const
{
+ // work around, as this function is "const" that we can't sort m_details
+ QList<QOrganizerItemDetail> myDetails = d->m_details;
+ QList<QOrganizerItemDetail> otherDetails = other.d->m_details;
+ qSort(myDetails.begin(), myDetails.end(), compareOrganizerItemDetail);
+ qSort(otherDetails.begin(), otherDetails.end(), compareOrganizerItemDetail);
+
return other.d->m_id == d->m_id &&
other.d->m_collectionId == d->m_collectionId &&
- other.d->m_details == d->m_details;
+ otherDetails == myDetails;
}
/*!
diff --git a/src/organizer/qorganizeritemdetail.cpp b/src/organizer/qorganizeritemdetail.cpp
index 93e41d947c..cf02ed3b44 100644
--- a/src/organizer/qorganizeritemdetail.cpp
+++ b/src/organizer/qorganizeritemdetail.cpp
@@ -75,6 +75,7 @@ Q_DESTRUCTOR_FUNCTION(qClearAllocatedStringHash)
\brief The QOrganizerItemDetail class represents a single, complete detail about an organizer item.
\inmodule QtOrganizer
\ingroup organizer-main
+ \since 1.1
All of the information for an organizer item is stored in one or more QOrganizerItemDetail objects.
@@ -330,6 +331,11 @@ bool QOrganizerItemDetail::operator==(const QOrganizerItemDetail& other) const
return true;
}
+bool compareOrganizerItemDetail(const QOrganizerItemDetail &one, const QOrganizerItemDetail &other)
+{
+ return (one.definitionName() < other.definitionName());
+}
+
uint qHash(const QOrganizerItemStringHolder& key)
{
if (!key.m_str)
diff --git a/src/organizer/qorganizeritemdetail_p.h b/src/organizer/qorganizeritemdetail_p.h
index 8ee60bcd1f..c09929a71e 100644
--- a/src/organizer/qorganizeritemdetail_p.h
+++ b/src/organizer/qorganizeritemdetail_p.h
@@ -154,6 +154,7 @@ public:
};
uint qHash(const QOrganizerItemStringHolder& key);
+bool compareOrganizerItemDetail(const QOrganizerItemDetail &one, const QOrganizerItemDetail &other);
class QOrganizerItemDetailPrivate : public QSharedData
{
diff --git a/src/organizer/qorganizermanagerengine.cpp b/src/organizer/qorganizermanagerengine.cpp
index 3036e8134c..2711a1a1b7 100644
--- a/src/organizer/qorganizermanagerengine.cpp
+++ b/src/organizer/qorganizermanagerengine.cpp
@@ -67,6 +67,7 @@ QTM_BEGIN_NAMESPACE
\inmodule QtOrganizer
\ingroup organizer-backends
+ \since 1.1
Instances of this class are usually provided by a
\l QOrganizerManagerEngineFactory, which is loaded from a plugin.
@@ -2593,7 +2594,7 @@ const QOrganizerCollectionEngineId* QOrganizerManagerEngine::engineCollectionId(
\o it can't reliably access any properties of the request pointer any more. The pointer will
be invalid once this function returns.
\endlist
-
+
This means that if there is a worker thread, the engine needs to let that thread know that the
request object is not valid and block until that thread acknowledges it. One way to do this is to
have a QSet<QOrganizerAbstractRequest*> (or QMap<QOrganizerAbstractRequest,
@@ -2614,13 +2615,13 @@ void QOrganizerManagerEngine::requestDestroyed(QOrganizerAbstractRequest* req)
Generally, the engine queues the request and processes it at some later time (probably in another
thread).
-
+
Once a request is started, the engine should call the updateRequestState and/or the specific
updateXXXXXRequest functions to mark it in the active state.
-
+
If the engine is particularly fast, or the operation involves only in memory data, the request can
be processed and completed without queueing it.
-
+
Note that when the client is threaded, and the request might live on a different thread, the
engine needs to be careful with locking. In particular, the request might be deleted while the
engine is still working on it. In this case, the requestDestroyed function will be called while
diff --git a/src/organizer/requests/qorganizeritemsaverequest.cpp b/src/organizer/requests/qorganizeritemsaverequest.cpp
index 32461b076a..f2c80e19be 100644
--- a/src/organizer/requests/qorganizeritemsaverequest.cpp
+++ b/src/organizer/requests/qorganizeritemsaverequest.cpp
@@ -56,6 +56,7 @@ QTM_BEGIN_NAMESPACE
the overall operation error (which may be retrieved by calling error()) is updated.
\ingroup organizer-requests
+ \since 1.1
*/
/*! Constructs a new organizer item save request whose parent is the specified \a parent */