qtcontacts-tracker:mzabaluev-qtcontacts-tracker.git
7 years agoChanges: Create and update contacts in one step
Mathias Hasselmann [Thu, 17 Jun 2010 21:50:31 +0000 (23:50 +0200)]
Changes: Create and update contacts in one step

RevBy: TrustMe
Details:

 * src/dao/contactdetailschema.cpp:
   defineGuidDetail(), defineTimestampDetail():
   Make some details writeable.

 * src/engine/contactsaverequest2.cpp:
   collectInsertions(), collectDeletions(), buildQuery(), saveContact(), start():
   Merge createContact() into saveContact().
 * src/engine/contactsaverequest2.h:
   Mark request pointer as constant.

 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-1.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-2.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-3.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-4.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-5.rq:
   Update reference queries.

7 years agoChanges: Generate local contact id from GUID.
Mathias Hasselmann [Thu, 17 Jun 2010 12:18:36 +0000 (14:18 +0200)]
Changes: Generate local contact id from GUID.

RevBy: TrustMe

7 years agoChanges: Improve errorMap handling and cleanup save request flow a bit
Mathias Hasselmann [Thu, 17 Jun 2010 11:18:51 +0000 (13:18 +0200)]
Changes: Improve errorMap handling and cleanup save request flow a bit

RevBy: TrustMe
Details:

 * src/engine/contactsaverequest2.cpp:
 * src/engine/contactsaverequest2.h: Add createContactSuccess() and
   saveContactSuccess() to make incrementing m_contactOffset less confusing.
   Fully fill the errorMap on start and only remove entries on success so that
   API users see which contacts have not been saved yet.

7 years agoChanges: Prevent qWarning() spam in QT_NO_DEBUG mode when saving addresses.
Mathias Hasselmann [Fri, 18 Jun 2010 08:43:39 +0000 (10:43 +0200)]
Changes: Prevent qWarning() spam in QT_NO_DEBUG mode when saving addresses.

RevBy: TrustMe

7 years agoFixes: Prevent segfault if the request contains multiple merges for the same contact
Mathias Hasselmann [Fri, 18 Jun 2010 08:41:39 +0000 (10:41 +0200)]
Fixes: Prevent segfault if the request contains multiple merges for the same contact

RevBy: TrustMe

7 years agoFixes: Threading issues in sync requests.
Mathias Hasselmann [Wed, 16 Jun 2010 13:24:04 +0000 (15:24 +0200)]
Fixes: Threading issues in sync requests.

RevBy: TrustMe
Details:

 * src/engine/engine.cpp: ContactTrackerRequestTask, run():
   Move request loop to ContactTrackerRequestTask thread when needed to have
   event processing within the right event loop. As a result we'll have to
   destroy the worker before leaving the thread to prevent signals caused by
   the task thread being send into the void.

7 years agoChanges: Use ContactTrackerRequestTask in waitForRequestFinished
Mathias Hasselmann [Wed, 16 Jun 2010 13:21:27 +0000 (15:21 +0200)]
Changes: Use ContactTrackerRequestTask in waitForRequestFinished

RevBy: TrustMe
Details:

 * src/engine/engine.cpp: ContactTrackerRequestTask, isFinished(),
   run(), waitForRequestFinished(), runSyncRequest(): Add consider timeout in
   request task. Make request pointer a weak pointer to deal with nasty slots
   just deleting the request. Update runSyncRequest() a bit.

7 years agoRevert "New: Introduce batch size engine parameters"
Mathias Hasselmann [Wed, 16 Jun 2010 09:38:47 +0000 (11:38 +0200)]
Revert "New: Introduce batch size engine parameters"

This reverts commit 8244847c994de6ebef1f593aafaa0c5db48f8c24.

7 years agoPrepare harmattan/4.7.2-1
Mathias Hasselmann [Thu, 17 Jun 2010 07:50:54 +0000 (09:50 +0200)]
Prepare harmattan/4.7.2-1

7 years agoFixes: NB#175259 - QContactPhoneNumber::match returns all contacts if there are no...
Mathias Hasselmann [Thu, 17 Jun 2010 07:44:59 +0000 (09:44 +0200)]
Fixes: NB#175259 - QContactPhoneNumber::match returns all contacts if there are no matches

Bug: NB#175259
RevBy: TrustMe
Details:

 * src/engine/contactfetchrequest.cpp: localIdsAvailable():
   Emit empty result when no matching local Id was found, instead of running
   buildAndRunQuery() which then would build a fetch-all query.

 * tests/ut_qtcontacts_common/ut_qtcontacts_common.cpp: validateContact():
   Skip QContactDetail::FieldDetailUri in validation.

 * tests/ut_qtcontacts_fetch/ut_qtcontacts_fetch.cpp: testMatchPhoneNumber():
 * tests/ut_qtcontacts_fetch/ut_qtcontacts_fetch.h: testMatchPhoneNumber():
   Add unit test for this bug.

7 years agoPrepare harmattan/4.7.1-1
Mathias Hasselmann [Wed, 16 Jun 2010 21:28:21 +0000 (23:28 +0200)]
Prepare harmattan/4.7.1-1

7 years agoChanges:Remove unused #include from globalmutex.cpp.
Mathias Hasselmann [Wed, 16 Jun 2010 08:50:39 +0000 (10:50 +0200)]
Changes:Remove unused #include from globalmutex.cpp.

RevBy: people-review

7 years agoFixes: Properly detect empty detail filter values
Mathias Hasselmann [Mon, 14 Jun 2010 21:23:52 +0000 (23:23 +0200)]
Fixes: Properly detect empty detail filter values

RevBy: TrustMe
Details:

 * src/dao/conversion.cpp: makeValue():
   Check QUrl::isEmpty() instead of isValid() which is about encoding, not
   content.
 * src/dao/querybuilder.cpp: bindFilter():
   Do a real emptyness check for the detail filter value.
 * tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.cpp:
   testIMContactsFiltering(): Use proper contact IRI. Use QCOMPARE() instead of
   QVERIFY() for checking the service's display name for better error messages.

7 years agoFixes: leak of requests in engine.
Mathias Hasselmann [Tue, 15 Jun 2010 20:12:27 +0000 (22:12 +0200)]
Fixes: leak of requests in engine.

RevBy: Murray Cumming
Details:

 * src/engine/engine.cpp: startRequest(), requestDestroyed():
   Only connect destroyed() signal when needed. Don't try to dynamic_cast the
   destroyed object, because it cannot work at that point.
 * src/engine/engine.h: requestDestroyed(): Rename that slot.
 * src/engine/engine_p.h: m_requests: Use void* for key.

Initial patch by Murray Cumming

7 years agoRevert "Fixes: Remove bogus QContactTrackerEngine::destroyed() slot"
Mathias Hasselmann [Tue, 15 Jun 2010 20:25:46 +0000 (22:25 +0200)]
Revert "Fixes: Remove bogus QContactTrackerEngine::destroyed() slot"

This reverts commit ec2de944caf4314c772e9799da70e2d1a03c6c80.

7 years agoRemove early emit of empty contacts
astojilj [Tue, 15 Jun 2010 19:44:26 +0000 (22:44 +0300)]
Remove early emit of empty contacts

7 years agoFixes: Make testFetchSavedContact() repeatable.
Mathias Hasselmann [Tue, 15 Jun 2010 09:34:43 +0000 (11:34 +0200)]
Fixes: Make testFetchSavedContact() repeatable.

RevBy: TrustMe
Details: Remove bogus "localIds().clear()" call.

7 years agoChanges: Use ResourceCleanser for removing contacts in ut_qtcontacts_common
Mathias Hasselmann [Tue, 15 Jun 2010 09:33:56 +0000 (11:33 +0200)]
Changes: Use ResourceCleanser for removing contacts in ut_qtcontacts_common

RevBy: TrustMe
Details: The ResourceCleanser is more reliable as it waits for deletion being signaled.

7 years agoPrepare harmattan/4.7.0-1
Mathias Hasselmann [Mon, 14 Jun 2010 22:41:57 +0000 (00:41 +0200)]
Prepare harmattan/4.7.0-1

7 years agoFixes: Accidental deletion of all address properties when saving a contact
Mathias Hasselmann [Mon, 14 Jun 2010 22:30:21 +0000 (00:30 +0200)]
Fixes: Accidental deletion of all address properties when saving a contact

RevBy: TrustMe
Details:

 * src/engine/contactsaverequest2.cpp: collectDeletions():
   Skip annoymous IRI schemes when collecting deletions as deleting them would
   wipe all instances.

 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-1.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-2.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-3.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-4.rq:
   Update reference queries to cover removal of phone number subtypes.

7 years agoFixes: testIMContactsFiltering()
Mathias Hasselmann [Mon, 14 Jun 2010 21:53:39 +0000 (23:53 +0200)]
Fixes: testIMContactsFiltering()

RevBy: TrustMe
Details:

 * src/dao/conversion.cpp: QTrackerContactTelepathyIriConversion::makeValue():
   Use two arguments version of makeTelepathyIri().
 * src/dao/subject.cpp: makeTelepathyIri(), makePresenceIri():
   Create account IRI when passing empty IM address to makeTelepathyIri().
   Warn about passing empty IM address to makePresenceIri().

7 years agoFixes: Use fixed local phone number length for query builder tests.
Mathias Hasselmann [Mon, 14 Jun 2010 21:28:47 +0000 (23:28 +0200)]
Fixes: Use fixed local phone number length for query builder tests.

RevBy: TrustMe
Details:

 * tests/ut_qtcontacts_common/ut_qtcontacts_common.cpp:
 * tests/ut_qtcontacts_common/ut_qtcontacts_common.h:
   Reuse useless virtual slots: Private methods cannot be overriden.

 * tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.cpp:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.h:
   Set fixed local phone number length and try to restore original value after
   testing.

7 years agoFixes: Wrong assumptions in testContactsRemovedSince()
Mathias Hasselmann [Mon, 14 Jun 2010 15:52:39 +0000 (17:52 +0200)]
Fixes: Wrong assumptions in testContactsRemovedSince()

RevBy: TrustMe

7 years agoChanges: Improve warnings printed by the query builder
Mathias Hasselmann [Mon, 14 Jun 2010 15:51:43 +0000 (17:51 +0200)]
Changes: Improve warnings printed by the query builder

RevBy: TrustMe

7 years agoFixes: Use new local id fetch request for filtering in old contact fetch request.
Mathias Hasselmann [Mon, 14 Jun 2010 13:33:37 +0000 (15:33 +0200)]
Fixes: Use new local id fetch request for filtering in old contact fetch request.

RevBy: Aleksandar

7 years agoFixes: Find SPARQL scripts out of build tree
Mathias Hasselmann [Mon, 14 Jun 2010 15:23:57 +0000 (17:23 +0200)]
Fixes: Find SPARQL scripts out of build tree

RevBy: TrustMe

7 years agoFixes: Make ut_qtcontacts_trackerplugin load test-account-1.ttl when run out of tree.
Mathias Hasselmann [Mon, 14 Jun 2010 13:32:44 +0000 (15:32 +0200)]
Fixes: Make ut_qtcontacts_trackerplugin load test-account-1.ttl when run out of tree.

RevBy: TrustMe

7 years agoFixes: Enable new local id fetch request by default
Mathias Hasselmann [Mon, 14 Jun 2010 12:24:43 +0000 (14:24 +0200)]
Fixes: Enable new local id fetch request by default

RevBy: Aleksandar

7 years agout_qtcontacts_common: Help valgrind to detect leaks even with deferred delete.
Murray Cumming [Fri, 11 Jun 2010 11:00:49 +0000 (13:00 +0200)]
ut_qtcontacts_common: Help valgrind to detect leaks even with deferred delete.

RevBy: people-review
Details:
* tests/ut_qtcontacts_common/ut_qtcontacts_common.cpp: Process all
pending events, including DeferredDelete, to really delete
everything to stop valgrind from reporting false leaks, because
QTest does not do this.

7 years agoFixes: Properly invoke qmake for building static library's Makefiles when needed
Mathias Hasselmann [Sun, 13 Jun 2010 20:43:44 +0000 (22:43 +0200)]
Fixes: Properly invoke qmake for building static library's Makefiles when needed

RevBy: TrustMe
Details: This fixes out-of-tree building a bit

7 years agoFixes: Don't create nested event loop for getting RDF class hierarchy
Mathias Hasselmann [Sat, 12 Jun 2010 22:30:57 +0000 (00:30 +0200)]
Fixes: Don't create nested event loop for getting RDF class hierarchy

RevBy: TrustMe

7 years agoFixes: Stop all LiveNodeModels before destroying save request
Mathias Hasselmann [Sat, 12 Jun 2010 22:29:46 +0000 (00:29 +0200)]
Fixes: Stop all LiveNodeModels before destroying save request

RevBy: people-review

7 years agoFixes: Refactor QTrackerContactGlobalMutex to work with Qt's broken thread support.
Mathias Hasselmann [Sat, 12 Jun 2010 22:15:21 +0000 (00:15 +0200)]
Fixes: Refactor QTrackerContactGlobalMutex to work with Qt's broken thread support.

RevBy: TrustMe
Details:

 * src/dbus/globalmutex.cpp:
 * src/dbus/globalmutex.h: Remove internal QEventLoop object as Qt doesn't
   support nested event loops it seems. Emit signals instead. Also create a
   private DBus connection as QtDBus is not thread-safe (QTBUG-11413).

 * src/engine/contactsaverequest2.cpp:
 * src/engine/contactsaverequest2.h:
   Use new signals of QTrackerContactGlobalMutex.

7 years agoNew: Introduce batch size engine parameters
Mathias Hasselmann [Sat, 12 Jun 2010 21:53:29 +0000 (23:53 +0200)]
New: Introduce batch size engine parameters

RevBy: TrustMe

7 years agoChanges: Remove thread pool from engine
Mathias Hasselmann [Sat, 12 Jun 2010 22:05:47 +0000 (00:05 +0200)]
Changes: Remove thread pool from engine

RevBy: TrustMe
Details: Cannot use thread pool as QEventLoop becomes useless after calling
quit() on it.

7 years agoChanges: Avoid some console spam in QT_NO_DEBUG mode
Mathias Hasselmann [Sat, 12 Jun 2010 22:03:53 +0000 (00:03 +0200)]
Changes: Avoid some console spam in QT_NO_DEBUG mode

RevBy: TrustMe

7 years agoFixes: Avoid "unused variable" warnings in QT_NO_DEBUG mode
Mathias Hasselmann [Sat, 12 Jun 2010 21:54:39 +0000 (23:54 +0200)]
Fixes: Avoid "unused variable" warnings in QT_NO_DEBUG mode

RevBy: TrustMe

7 years agoFixes: Avoid parsing too many vCards when testing
Mathias Hasselmann [Sat, 12 Jun 2010 21:54:08 +0000 (23:54 +0200)]
Fixes: Avoid parsing too many vCards when testing

RevBy: TrustMe

7 years agoFixes: Remove bogus QContactTrackerEngine::destroyed() slot
Mathias Hasselmann [Sat, 12 Jun 2010 21:51:46 +0000 (23:51 +0200)]
Fixes: Remove bogus QContactTrackerEngine::destroyed() slot

RevBy: TrustMe
Details: This slot really is not needed and it causes crashes.

7 years agoFixes: Build-fix in ut_qtcontacts_trackerplugin
Mathias Hasselmann [Fri, 11 Jun 2010 16:23:33 +0000 (18:23 +0200)]
Fixes: Build-fix in ut_qtcontacts_trackerplugin

RevBy: TrustMe

7 years agoChanges: Move reference data handling to ut_qtcontacts_common.
Mathias Hasselmann [Fri, 11 Jun 2010 13:27:41 +0000 (15:27 +0200)]
Changes: Move reference data handling to ut_qtcontacts_common.

RevBy: TrustMe

7 years agoNew: Add timing debug flag.
Mathias Hasselmann [Fri, 11 Jun 2010 11:00:46 +0000 (13:00 +0200)]
New: Add timing debug flag.

RevBy: TrustMe

7 years agoDo not allow the thread pool to block even if we have hung threads
Mikhail Zabaluev [Wed, 9 Jun 2010 17:16:46 +0000 (20:16 +0300)]
Do not allow the thread pool to block even if we have hung threads

7 years agoSmarter thread pool definition through Q_GLOBAL_STATIC
Mikhail Zabaluev [Wed, 9 Jun 2010 16:57:59 +0000 (19:57 +0300)]
Smarter thread pool definition through Q_GLOBAL_STATIC

7 years agoRemoved the botched thread-safety attempt in waitForRequestFinished
Mikhail Zabaluev [Wed, 9 Jun 2010 15:58:33 +0000 (18:58 +0300)]
Removed the botched thread-safety attempt in waitForRequestFinished

The implementation is not required in the documentation to be thread-safe,
and this code isn't any good for that anyway.

7 years agoFill sync methods' error maps from the request when it times out
Mikhail Zabaluev [Wed, 9 Jun 2010 15:41:01 +0000 (18:41 +0300)]
Fill sync methods' error maps from the request when it times out

It _might_ have something interesting already.

7 years agoAddressed minor review comments
Mikhail Zabaluev [Wed, 9 Jun 2010 15:40:16 +0000 (18:40 +0300)]
Addressed minor review comments

7 years agoActually spin the event loop in QContactTrackerEngine::waitForRequestFinished
Mikhail Zabaluev [Tue, 8 Jun 2010 13:02:39 +0000 (16:02 +0300)]
Actually spin the event loop in QContactTrackerEngine::waitForRequestFinished

7 years agoReimplement QContactTrackerEngine::waitForRequestFinished with RequestEventLoop
Mikhail Zabaluev [Tue, 8 Jun 2010 11:55:54 +0000 (14:55 +0300)]
Reimplement QContactTrackerEngine::waitForRequestFinished with RequestEventLoop

Code reuse, and no 10 ms wakeups, FTW!

7 years agoImplement the synchronous methods of the engine by running in a separate thread
Mikhail Zabaluev [Fri, 4 Jun 2010 14:33:20 +0000 (17:33 +0300)]
Implement the synchronous methods of the engine by running in a separate thread

7 years agoChanges: QContactTrackerEngineData: copy constructor: Copy all.
Murray Cumming [Fri, 11 Jun 2010 09:07:54 +0000 (11:07 +0200)]
Changes: QContactTrackerEngineData: copy constructor: Copy all.

RevBy: people-review
Details:
* src/engine/engine.cpp: Also copy m_parameter and m_requests
because this is probably intended. The copy constructor was probably
just forgotten whey they were added.

7 years agoNew: Minimal performance test for contact saving
Mathias Hasselmann [Wed, 9 Jun 2010 23:26:20 +0000 (01:26 +0200)]
New: Minimal performance test for contact saving

RevBy: TrustMe
Details:

 * tests/ut_qtcontacts_common/ut_qtcontacts_common.cpp: Really consider the vcard limit.
 * tests/ut_qtcontacts_trackerplugin_performance/ut_qtcontacts_trackerplugin_performance.cpp:
 * tests/ut_qtcontacts_trackerplugin_performance/ut_qtcontacts_trackerplugin_performance.h: Add saving test.
 * tests/ut_qtcontacts_trackerplugin_performance/ut_qtcontacts_trackerplugin_performance.pro: Pass test data dir.

7 years agoChanges: Move vcard parsing to ut_qtcontacts_common.
Mathias Hasselmann [Wed, 9 Jun 2010 22:43:35 +0000 (00:43 +0200)]
Changes: Move vcard parsing to ut_qtcontacts_common.

RevBy: TrustMe
Details:

 * src/dao/dao.pri: Properly update MOBILITY variable.
 * tests/ut_qtcontacts_common/ut_qtcontacts_common.pri: Add versit dependency.
 * tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.pro: Remove versit dependency.

 * tests/ut_qtcontacts_common/ut_qtcontacts_common.cpp:
 * tests/ut_qtcontacts_common/ut_qtcontacts_common.h: Add parseVCards().
 * tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.cpp:
 * tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.h: Remove parseVCard().

7 years agoFixes: Initialize error variable in detailDefinitions().
Mathias Hasselmann [Wed, 9 Jun 2010 22:27:09 +0000 (00:27 +0200)]
Fixes: Initialize error variable in detailDefinitions().

RevBy: TrustMe

7 years agoChanges: Use ut_qtcontacts_common in ut_qtcontacts_trackerplugin.
Mathias Hasselmann [Wed, 9 Jun 2010 22:24:31 +0000 (00:24 +0200)]
Changes: Use ut_qtcontacts_common in ut_qtcontacts_trackerplugin.

RevBy: TrustMe
Details:

 * tests/ut_qtcontacts_common/ut_qtcontacts_common.cpp:
 * tests/ut_qtcontacts_common/ut_qtcontacts_common.h: Add resetEngine().

 * tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.cpp:
 * tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.h:
   Change base class from QObject to ut_qtcontacts_trackerplugin. Use engine()
   instead of trackerEngine field. Turn cluelessly added attributes into local
   variables. Generally fix error handling within the unit tests.

7 years agoFixes: Properly save subtypes for address detail
Mathias Hasselmann [Wed, 9 Jun 2010 20:52:25 +0000 (22:52 +0200)]
Fixes: Properly save subtypes for address detail

RevBy: TrustMe
Details:

 * src/engine/contactsaverequest2.cpp: collectFieldUpdates():
   Move object variable to proper scope to make sure even blank variant, as it
   happens for street address, is shared.

 * tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.cpp:
 * tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.h:
   testRemoveSubType(), testRemoveSubType_data():
   Also test subtypes for address detail.

7 years agoChanges: Give better control on which queries are shown on debugging
Mathias Hasselmann [Wed, 9 Jun 2010 21:11:57 +0000 (23:11 +0200)]
Changes: Give better control on which queries are shown on debugging

RevBy: TrustMe
Details:

 * src/engine/contactfetchrequest2.cpp:
 * src/engine/contactidfetchrequest2.cpp:
   Check ShowSelects debug flag instead of ShowQueries.

 * src/engine/contactsaverequest2.cpp:
   Check ShowUpdates debug flag instead of ShowQueries.

 * src/engine/engine.cpp:
 * src/engine/engine.h:
   Split ShowQueries into ShowSelects and ShowUpdates.

7 years agoChanges: Update OTHER_FILES for some project files
Mathias Hasselmann [Wed, 9 Jun 2010 20:50:45 +0000 (22:50 +0200)]
Changes: Update OTHER_FILES for some project files

7 years agoPrepare harmattan/4.6.9-1
Mathias Hasselmann [Tue, 8 Jun 2010 20:27:52 +0000 (22:27 +0200)]
Prepare harmattan/4.6.9-1

7 years agoChanges: Use propagate function in removeContacts().
Mathias Hasselmann [Tue, 8 Jun 2010 20:24:36 +0000 (22:24 +0200)]
Changes: Use propagate function in removeContacts().

RevBy: TrustMe

7 years agoFixes: Removal of phone number types
Mathias Hasselmann [Tue, 8 Jun 2010 12:07:58 +0000 (14:07 +0200)]
Fixes: Removal of phone number types

Bug: TrustMe
Details:

 * src/engine/contactsaverequest2.cpp:
 * src/engine/contactsaverequest2.h:
   Remove subtypes of shared entities before saving.

 * tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.cpp:
 * tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.h:
   Add unit test for subtype removal.

7 years agoChanges: Also support QStringList for default values
Mathias Hasselmann [Tue, 8 Jun 2010 12:07:29 +0000 (14:07 +0200)]
Changes: Also support QStringList for default values

RevBy: TrustMe

7 years agoChanges: Remove redundant DBus API
Mathias Hasselmann [Tue, 8 Jun 2010 12:06:48 +0000 (14:06 +0200)]
Changes: Remove redundant DBus API

RevBy: TrustMe
Details: tracker()->rawExecute() can be used instead.

7 years agoChanges: Slightly optimize contact fetching by id
Mathias Hasselmann [Mon, 7 Jun 2010 22:01:35 +0000 (00:01 +0200)]
Changes: Slightly optimize contact fetching by id

RevBy: TrustMe
Details:

 * src/engine/contactfetchrequest2.cpp: buildQueries():
   Apply LIMIT clause to queries when a plain local id filter is used.
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/300-localContactIdFilter.rq:
   Update reference query.

7 years agoFixes: Unit tests for new fetch request
Mathias Hasselmann [Mon, 7 Jun 2010 21:03:13 +0000 (23:03 +0200)]
Fixes: Unit tests for new fetch request

RevBy: TrustMe
Details:

 * src/dao/subject.cpp: isContentScheme():
 * src/dao/subject.h: isContentScheme(): Introduce isContentScheme() predicate.
 * src/engine/contactfetchrequest2.cpp: fetchBaseModel(), fetchDetailModel():
   Only set detail URI from tracker when the fetched detail uses content URIs.

 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/000-contacts.ttl:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/000-contacts.xml:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/101-contact-address.rq:
   Update reference data.

 * tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.cpp:
   Filter expected warning.

7 years agoChanges: Decrease spaghetti level in fetch request a bit
Mathias Hasselmann [Mon, 7 Jun 2010 20:23:41 +0000 (22:23 +0200)]
Changes: Decrease spaghetti level in fetch request a bit

RevBy: TrustMe
Details: Turn QContactDetailPointer into QContactDetailBuilder.

7 years agoFixes: Saving of Organization detail's Title and Department field
Mathias Hasselmann [Mon, 7 Jun 2010 11:12:27 +0000 (13:12 +0200)]
Fixes: Saving of Organization detail's Title and Department field

RevBy: TrustMe
Details:

 * src/engine/contactsaverequest2.cpp: collectFieldUpdates():
   Only apply the detail's explicit URI if the property's subject scheme
   matches the detail's scheme.

 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/000-contacts.xml:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-2.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-3.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-4.rq:
   Add job title and department to test data.

7 years agoAdd backlog item harmattan/4.6.8-1
Mathias Hasselmann [Mon, 7 Jun 2010 09:02:26 +0000 (11:02 +0200)]
Add backlog item

7 years agoPrepare harmattan/4.6.8-1
Mathias Hasselmann [Mon, 7 Jun 2010 09:00:29 +0000 (11:00 +0200)]
Prepare harmattan/4.6.8-1

7 years agoChanges: Enable new save request by default
Mathias Hasselmann [Fri, 28 May 2010 05:19:31 +0000 (07:19 +0200)]
Changes: Enable new save request by default

RevBy: TrustMe
Details:

 * src/engine/engine.cpp: parseParameters():
   Set params["query-builder"] = "save" by default.

7 years agoFixes: Properly save and fetch gender and presence-status
Mathias Hasselmann [Sat, 5 Jun 2010 21:56:41 +0000 (23:56 +0200)]
Fixes: Properly save and fetch gender and presence-status

RevBy: TrustMe

7 years agoFixes: Properly save names in old save request
Mathias Hasselmann [Sat, 5 Jun 2010 21:56:04 +0000 (23:56 +0200)]
Fixes: Properly save names in old save request

RevBy: TrustMe

7 years agoChanges: Skip testVCardsAndSync() for old requests
Mathias Hasselmann [Sat, 5 Jun 2010 21:13:12 +0000 (23:13 +0200)]
Changes: Skip testVCardsAndSync() for old requests

RevBy: TrustMe

7 years agoFixes: Capture warning when testing new local id filter
Mathias Hasselmann [Sat, 5 Jun 2010 21:04:05 +0000 (23:04 +0200)]
Fixes: Capture warning when testing new local id filter

RevBy: TrustMe

7 years agoFixes: Add minimal contact validation when saving
Mathias Hasselmann [Sat, 5 Jun 2010 21:03:31 +0000 (23:03 +0200)]
Fixes: Add minimal contact validation when saving

RevBy: TrustMe

7 years agoFixes: Also fetch honorific suffix with old fetch request
Mathias Hasselmann [Sat, 5 Jun 2010 21:01:39 +0000 (23:01 +0200)]
Fixes: Also fetch honorific suffix with old fetch request

RevBy: TrustMe

7 years agoChanges: Fix testSaveName() and extract testSaveNameUnique()
Mathias Hasselmann [Sat, 5 Jun 2010 20:59:28 +0000 (22:59 +0200)]
Changes: Fix testSaveName() and extract testSaveNameUnique()

RevBy: TrustMe

7 years agoChanges: OFNS: Activate tests which were skipped for no reason.
Mathias Hasselmann [Sat, 5 Jun 2010 20:56:03 +0000 (22:56 +0200)]
Changes: OFNS: Activate tests which were skipped for no reason.

RevBy: TrustMe

7 years agoFixes: OFNS: Properly mark exceptions for old requests in testDisplayLabel*()
Mathias Hasselmann [Sat, 5 Jun 2010 08:42:41 +0000 (10:42 +0200)]
Fixes: OFNS: Properly mark exceptions for old requests in testDisplayLabel*()

RevBy: TrustMe

7 years agoChanges: Update testDisplayLabelFetch()
Mathias Hasselmann [Fri, 4 Jun 2010 12:10:06 +0000 (14:10 +0200)]
Changes: Update testDisplayLabelFetch()

RevBy: TrustMe
Details: Some more details pass now for old fetch.

7 years agoChanges: Old Fetch request: More use of function instead of property.
Murray Cumming [Fri, 4 Jun 2010 11:59:23 +0000 (13:59 +0200)]
Changes: Old Fetch request: More use of function instead of property.

RevBy: people-review
Details:
* src/engine/contactfetchrequest.cpp: prepareIMAccountsQuery():
Use function() instead of property() in some more places to avoid
similar problems (omitting rows, as in the previous commit) when a
value is not present in just one column.

7 years agoFixes: NB#170812 : Old Fetch Request: Get details even if there is no modified time.
Murray Cumming [Fri, 4 Jun 2010 11:51:59 +0000 (13:51 +0200)]
Fixes: NB#170812 : Old Fetch Request: Get details even if there is no modified time.

RevBy: people-review
Details:
* src/engine/contactfetchrequest.cpp: prepareIMAddressesQuery():
Use function() instead of property() with nie::contentLastModified
to avoid omitting rows that have no value there.
This had the effect of providing near-empty contacts for these contacts.

7 years agoChanges: Minor cleanup.
Murray Cumming [Wed, 2 Jun 2010 11:30:46 +0000 (13:30 +0200)]
Changes: Minor cleanup.

RevBy: people-review
Details:
* src/engine/contactfetchrequest.cpp: Make local functions static.
* src/engine/engine_p.h: Make private methods private.

7 years agoFixes: Change old fetch request to support addresses from new save request.
Mathias Hasselmann [Fri, 4 Jun 2010 11:12:59 +0000 (13:12 +0200)]
Fixes: Change old fetch request to support addresses from new save request.

RevBy: TrustMe
Details: Use property functions for getting field values.

7 years agoFixes: Make testDisplayLabelFetch() pass for OFNS (old fetch, new save)
Mathias Hasselmann [Fri, 4 Jun 2010 10:19:32 +0000 (12:19 +0200)]
Fixes: Make testDisplayLabelFetch() pass for OFNS (old fetch, new save)

RevBy: TrustMe
Details: Skip details not properly supported by old fetch or old save.

7 years agoChanges: Make debug flag checking more readable in ut_qtcontacts_trackerplugin
Mathias Hasselmann [Fri, 4 Jun 2010 10:18:57 +0000 (12:18 +0200)]
Changes: Make debug flag checking more readable in ut_qtcontacts_trackerplugin

RevBy: TrustMe
Details: Introduce HAS_DEBUG_FLAG macro.

7 years agoFixes: Make testSavePhoneNumber() with old fetch and new save
Mathias Hasselmann [Fri, 4 Jun 2010 09:30:31 +0000 (11:30 +0200)]
Fixes: Make testSavePhoneNumber() with old fetch and new save

RevBy: TrustMe
Details: Fix broken assumptions. Abuse _data() slot for more informative test
case repetition.

7 years agoFixes: Permit fetching of all address details
Mathias Hasselmann [Fri, 4 Jun 2010 08:54:24 +0000 (10:54 +0200)]
Fixes: Permit fetching of all address details

RevBy: TrustMe
Details:

 * src/dao/contactdetailschema.cpp: defineAddressDetail():
   Make detail URI property for address detail.

 * src/dao/subject.cpp:
 * src/dao/subject.h: Add address scheme. Just wrap the anonymous one.

 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/000-contacts.xml:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-1.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.cpp:
   Test saving of addresses.

7 years agoFixes: Use proper maemo:localPhoneNumber for the save request's reference queries
Mathias Hasselmann [Fri, 4 Jun 2010 04:17:24 +0000 (07:17 +0300)]
Fixes: Use proper maemo:localPhoneNumber for the save request's reference queries

RevBy: TrustMe

7 years agoFixes: NB#162993 - <MemLeak> code review report/issues for application people & contacts
Tomi Lammi [Fri, 4 Jun 2010 08:45:47 +0000 (11:45 +0300)]
Fixes: NB#162993 - <MemLeak> code review report/issues for application people & contacts

RevBy: TrustMe

7 years agoFixes: testSaveContacts() for optimized save request
Mathias Hasselmann [Fri, 4 Jun 2010 02:54:24 +0000 (05:54 +0300)]
Fixes: testSaveContacts() for optimized save request

RevBy: TrustMe
Details:

 * src/engine/contactsaverequest2.cpp: buildQuery():
   Be more careful about removing properties: Don't kill local or global id.

 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-1.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-2.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-3.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-4.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-5.rq:
   Update reference queries.

 * tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.pro:
   Properly address the save request's reference queries.

7 years agoFixes: Properly clean db in unit test runner.
Mathias Hasselmann [Fri, 4 Jun 2010 02:53:13 +0000 (05:53 +0300)]
Fixes: Properly clean db in unit test runner.

RevBy: TrustMe
Details: Tell tracker-control to restart tracker.

7 years agoChanges: Consider enums in QTrackerContactDetailField::parseValue().
Mathias Hasselmann [Thu, 3 Jun 2010 21:02:14 +0000 (00:02 +0300)]
Changes: Consider enums in QTrackerContactDetailField::parseValue().

RevBy: TrustMe
Details: Just for completeness.

7 years agoFixes: Store normalized phone number with new save request
Mathias Hasselmann [Thu, 3 Jun 2010 20:58:30 +0000 (23:58 +0300)]
Fixes: Store normalized phone number with new save request

RevBy: TrustMe
Details:

 * src/dao/contactdetailschema.cpp:
   Apply phone number conversation to phone number detail.

 * src/dao/conversion.cpp:
 * src/dao/conversion.h:
   Add phone number conversion and cleanup a bit.

 * tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.cpp:
   Remove special casing for new request in testSavePhoneNumber.

7 years agoFixes: Avoid warnings
Mathias Hasselmann [Thu, 3 Jun 2010 20:56:54 +0000 (23:56 +0300)]
Fixes: Avoid warnings

RevBy: TrustMe
Details:

 * src/dao/contactdetailschema.cpp:
 * src/engine/contactfetchrequest2.cpp: Remove #warning directives.
 * src/engine/contactsaverequest2.cpp: Remove dead code.

7 years agoChanges: Permit usage of -Werror
Mathias Hasselmann [Thu, 3 Jun 2010 20:54:40 +0000 (23:54 +0300)]
Changes: Permit usage of -Werror

RevBy: TrustMe
Details: To use -Werror copy user.pri.example to user.pri. Probably not the
most Qt-ish approach, but it works.

7 years agoChanges: Make sure common.pri is included everywhere
Mathias Hasselmann [Thu, 3 Jun 2010 20:53:27 +0000 (23:53 +0300)]
Changes: Make sure common.pri is included everywhere

RevBy: TrustMe

7 years agoFixes: Preserve nco:PersonContact type when saving
Mathias Hasselmann [Thu, 3 Jun 2010 09:02:08 +0000 (12:02 +0300)]
Fixes: Preserve nco:PersonContact type when saving

RevBy: TrustMe

7 years agoChanges: Modify new save request to create more efficient update requests
Mathias Hasselmann [Wed, 2 Jun 2010 21:08:06 +0000 (00:08 +0300)]
Changes: Modify new save request to create more efficient update requests

RevBy: TrustMe
Details:

 * src/engine/contactsaverequest2.cpp:
   Just create few DELETE statements which remove the contact's type, instead
   of deleting all properties separately.

 * tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.cpp:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.h:
   Update regression test for save request query.

 * tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.pro:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-1.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-2.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-3.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-4.rq:
 * tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-5.rq:
   Add new reference queries.

7 years agoChanges: Hide mEngine field behind lazy initializing getter().
Mathias Hasselmann [Wed, 2 Jun 2010 20:15:56 +0000 (23:15 +0300)]
Changes: Hide mEngine field behind lazy initializing getter().

RevBy: TrustMe
Details: This change is needed because of QTBUG-11186 -
*_data() slots are called before init().