qtcontacts-tracker:murrayc-qtcontacts-tracker-for-merge-requests2.git
8 years agoFixes: NB#176881 : :~TrackerChangeListener(): read of deleted memory master
Murray Cumming [Tue, 29 Jun 2010 10:20:34 +0000 (12:20 +0200)]
Fixes: NB#176881 : :~TrackerChangeListener(): read of deleted memory

RevBy: people-review
Details:
* src/dao/trackerchangelistener.[h|cpp]:
Use libqttracker's SopranoLive::BackEnds::Tracker::ClassUpdateSignaler via
QWeakPointer, because it is sometimes deleted before our destructor runs.
This fixes a valgrind warning during app destruction.

8 years agoChanges: Extract QTrackerClassHierarchy
Mathias Hasselmann [Fri, 25 Jun 2010 12:12:56 +0000 (14:12 +0200)]
Changes: Extract QTrackerClassHierarchy

RevBy: TrustMe

8 years agoTests: Try to release libqttracker singletons when finishing.
Murray Cumming [Thu, 17 Jun 2010 07:09:50 +0000 (09:09 +0200)]
Tests: Try to release libqttracker singletons when finishing.

RevBy: people-review
Details:
* tests/ut_qtcontacts_common/ut_qtcontacts_common.cpp:
ut_qtcontacts_common destructor: Call
SopranoLive::BackEnds::Tracker::trackerRelease() as suggested by
Iridian.

8 years agoUpdate release timestamp
Mathias Hasselmann [Tue, 22 Jun 2010 22:45:25 +0000 (00:45 +0200)]
Update release timestamp

8 years agoPrepare harmattan/4.7.3-1
Mathias Hasselmann [Tue, 22 Jun 2010 22:44:16 +0000 (00:44 +0200)]
Prepare harmattan/4.7.3-1

8 years agoChanges: Properly place insertions of implicit values.
Mathias Hasselmann [Tue, 22 Jun 2010 22:37:09 +0000 (00:37 +0200)]
Changes: Properly place insertions of implicit values.

RevBy: TrustMe

8 years agoChanges: Skip testRemoveSubType for old fetch request
Mathias Hasselmann [Tue, 22 Jun 2010 22:30:41 +0000 (00:30 +0200)]
Changes: Skip testRemoveSubType for old fetch request

RevBy: TrustMe

8 years agoChanges: Properly update GUID and timestamps when save
Mathias Hasselmann [Tue, 22 Jun 2010 22:02:20 +0000 (00:02 +0200)]
Changes: Properly update GUID and timestamps when save

RevBy: TrustMe
Details:

 * src/dao/contactdetailschema.cpp: defineGuidDetail(), defineTimestampDetail()):
   Mark GUID and timestamp fields readonly again as we must treat them special.

 * src/engine/contactsaverequest.cpp:
   Context, collectInsertions(), collectDeletions(), buildQuery():
 * src/engine/contactsaverequest.h: Context:
   Permit overwriting of GUID and creation timestamp. Preserve existing GUID
   and timestamps when the save request gets an incomplete contact and
   errornously assumes GUID or timestamp must be generated.

 * src/engine/engine.cpp: saveContact(), saveContacts():
   Only update contact id after saving. All other information must be fetched.

 * tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.cpp:
   testSaveContacts(): Improve GUID and timestamp tests.

 * 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 for save requests.

 * tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.cpp:
   verifyQuery(), testSaveRequestQuery_data(): Add support for GUID
   placeholders. Strip GUID and timestamps for contacts to verify how the save
   requests is dealing with those cases.

8 years agoChanges: Don't start request a second time in waitForRequestFinished().
Mathias Hasselmann [Tue, 22 Jun 2010 21:06:47 +0000 (23:06 +0200)]
Changes: Don't start request a second time in waitForRequestFinished().

RevBy: TrustMe
Details:

 * src/engine/engine.cpp: waitForRequestFinished():
   Remove ContactTrackerRequestTask usage as we don't want to change the
   request's thread affinity and as we don't want to have spaghetti code in
   ContactTrackerRequestTask for figuring out wheither or not we must start
   the request. Reusing ContactTrackerRequestTask was a nice, but entirely
   wrong idea.

8 years agoChanges: Restore request affinity when ContactTrackerRequestTask was run.
Mathias Hasselmann [Tue, 22 Jun 2010 21:01:54 +0000 (23:01 +0200)]
Changes: Restore request affinity when ContactTrackerRequestTask was run.

RevBy: TrustMe
Details: This avoids some "cannot move to thread" warnings.

8 years agoChanges: Cleanup direct D-Bus usage a little bit
Mathias Hasselmann [Tue, 22 Jun 2010 08:30:05 +0000 (10:30 +0200)]
Changes: Cleanup direct D-Bus usage a little bit

RevBy: TrustMe

8 years agoChanges: Avoid some compiler warnings in QT_NO_DEBUG mode
Mathias Hasselmann [Mon, 21 Jun 2010 22:24:13 +0000 (00:24 +0200)]
Changes: Avoid some compiler warnings in QT_NO_DEBUG mode

RevBy: TrustMe

8 years agoChanges: Rename ContactSaveRequest2 to plain ContactSaveRequest
Mathias Hasselmann [Mon, 21 Jun 2010 10:03:41 +0000 (12:03 +0200)]
Changes: Rename ContactSaveRequest2 to plain ContactSaveRequest

RevBy: TrustMe

8 years agoChanges: Remove old save request
Mathias Hasselmann [Mon, 21 Jun 2010 09:53:01 +0000 (11:53 +0200)]
Changes: Remove old save request

RevBy: TrustMe

8 years agoChanges: Directly use tracker's batch API for saving contacts
Mathias Hasselmann [Fri, 18 Jun 2010 16:16:18 +0000 (18:16 +0200)]
Changes: Directly use tracker's batch API for saving contacts

RevBy: TrustMe

8 years agoChanges: Print ellapsed time in save request's debug messages
Mathias Hasselmann [Fri, 18 Jun 2010 15:56:57 +0000 (17:56 +0200)]
Changes: Print ellapsed time in save request's debug messages

RevBy: TrustMe

8 years agoChanges: Add getter for the engine's requestTimeout field
Mathias Hasselmann [Fri, 18 Jun 2010 15:50:28 +0000 (17:50 +0200)]
Changes: Add getter for the engine's requestTimeout field

RevBy: TrustMe

8 years agoChanges: Add batch-size parameter
Mathias Hasselmann [Fri, 18 Jun 2010 15:49:45 +0000 (17:49 +0200)]
Changes: Add batch-size parameter

RevBy: TrustMe

8 years agoFixes: Delete base type for contact mediums instead of individual subtypes
Mathias Hasselmann [Fri, 18 Jun 2010 09:41:46 +0000 (11:41 +0200)]
Fixes: Delete base type for contact mediums instead of individual subtypes

RevBy: TrustMe
Details: This saves time, and also is more robust in case tracker stores
malformed resources, e.g phone numbers where nco:phoneNumber is not normalized.

8 years agoChanges: Run few update requests in parallel for reduced latency
Mathias Hasselmann [Fri, 18 Jun 2010 08:45:32 +0000 (10:45 +0200)]
Changes: Run few update requests in parallel for reduced latency

RevBy: TrustMe

8 years agoNew: Introduce concurrency parameter
Mathias Hasselmann [Sat, 12 Jun 2010 21:53:29 +0000 (23:53 +0200)]
New: Introduce concurrency parameter

RevBy: TrustMe

8 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.

8 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

8 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.

8 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

8 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

8 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.

8 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.

8 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.

8 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

8 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.

8 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

8 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

8 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.

8 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

8 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.

8 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

8 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.

8 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.

8 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

8 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.

8 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().

8 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.

8 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

8 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

8 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

8 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

8 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

8 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

8 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.

8 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

8 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

8 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

8 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.

8 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

8 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.

8 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

8 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

8 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

8 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.

8 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

8 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

8 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

8 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

8 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

8 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.

8 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.

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

8 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

8 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!

8 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

8 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.

8 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.

8 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().

8 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

8 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.

8 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.

8 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.

8 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

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

8 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

8 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.

8 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

8 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.

8 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.

8 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.

8 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.

8 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.

8 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

8 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

8 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.

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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