qtcontacts-tracker:qtcontacts-tracker.git
7 years agoFixes: NB#167342
Nathan Letwory [Sat, 8 May 2010 09:15:12 +0000 (12:15 +0300)]
Fixes: NB#167342
Fixes: NB#166255

Details:
* Move deletion of urls and email out of the save functions
* Fix the fetch for emails: overly restrictive query resulted in no emails fetched for affiliations

7 years agoChanges: Prepare for harmattan/4.5.9-1 harmattan/4.5.9-1
Nathan Letwory [Fri, 7 May 2010 15:40:19 +0000 (18:40 +0300)]
Changes: Prepare for harmattan/4.5.9-1

7 years agoChanges: move working on ut to branch until completed.
Nathan Letwory [Fri, 7 May 2010 15:37:30 +0000 (18:37 +0300)]
Changes: move working on ut to branch until completed.

7 years agoChanges: add url edits to ut
Nathan Letwory [Fri, 7 May 2010 07:49:28 +0000 (10:49 +0300)]
Changes: add url edits to ut

7 years agoChanges: add subtype and context edit support to address and phone
Nathan Letwory [Fri, 7 May 2010 07:37:45 +0000 (10:37 +0300)]
Changes: add subtype and context edit support to address and phone
Changes: move code a bit around and add comments

7 years agoChanges: Add context editing for email, add context and subtype editing for url
Nathan Letwory [Fri, 7 May 2010 06:10:26 +0000 (09:10 +0300)]
Changes: Add context editing for email, add context and subtype editing for url
todo: add edit tests for url

7 years agoFix saving url, address, email - important to process both work and home details
astojilj [Fri, 7 May 2010 02:35:08 +0000 (05:35 +0300)]
Fix saving url, address, email - important to process both work and home details

7 years agoMerge branch 'master' of git@gitorious.org:qtcontacts-tracker/qtcontacts-tracker
Aleksandar Stojiljkovic [Thu, 6 May 2010 13:32:42 +0000 (16:32 +0300)]
Merge branch 'master' of git@gitorious.org:qtcontacts-tracker/qtcontacts-tracker

7 years agoTest for changing context for details bug
Aleksandar Stojiljkovic [Thu, 6 May 2010 13:32:11 +0000 (16:32 +0300)]
Test for changing context for details bug

7 years agoMake testIMContactsAndMetacontactMasterPresence() pass
Mathias Hasselmann [Thu, 6 May 2010 12:56:29 +0000 (14:56 +0200)]
Make testIMContactsAndMetacontactMasterPresence() pass

* src/dao/contactdetailschema.cpp: defineOnlineAccountDetail():
  Correctly map the ServiceProvider field.
* tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.cpp():
  testIMContactsAndMetacontactMasterPresence(): Explicitely request
  Presence detail when fetching online contacts. Various small code cleanups
  like using QCOMPARE() instead QVERIFY() where it makes sense.
* tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.pro:
  OTHER_FILES: Add the Sparql support scripts to the project file.
* tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin_data/insertTpContact.sparql:
  Create all required properties and remove existing objects before working.
* tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin_data/updateTpStatus.sparql:
  Update nie:contentLastModified.

7 years agoImplement sorting for new fetch request.
Mathias Hasselmann [Thu, 6 May 2010 11:40:09 +0000 (13:40 +0200)]
Implement sorting for new fetch request.

* src/engine/contactfetchrequest2.cpp:
  fetchBaseModel(), fetchDetailModel(), modelUpdated():
* src/engine/contactfetchrequest2.h:
  Call QContactManagerEngine::sortContacts() on the fetch results.
  Use localId instead of contact IRI for storing contacts to fit that API.

7 years agoCheck contact and cid column name when fetching
Mathias Hasselmann [Thu, 6 May 2010 11:39:59 +0000 (13:39 +0200)]
Check contact and cid column name when fetching

7 years agoWorkaround for disposing requests before thread finished
Aleksandar Stojiljkovic [Thu, 6 May 2010 10:23:21 +0000 (13:23 +0300)]
Workaround for disposing requests before thread finished

7 years agoFetch nco:contactLocalUID property
Mathias Hasselmann [Thu, 6 May 2010 09:56:41 +0000 (11:56 +0200)]
Fetch nco:contactLocalUID property

* src/engine/contactfetchrequest2.cpp: bindDetails(), fetchBaseModel(),
  fetchDetailModel(): Create cid column to fetch nco:contactLocalUID via
  property function.
* tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.cpp:
  testPhoneNumberQuery(), testUrlQuery(): Also create cid column when testing.
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/*:
  Add cid column to reference queries.

7 years agoSilence the fetch request even more
Mathias Hasselmann [Thu, 6 May 2010 09:55:55 +0000 (11:55 +0200)]
Silence the fetch request even more

7 years agoRemove some qDebug() noise
Mathias Hasselmann [Thu, 6 May 2010 08:49:17 +0000 (10:49 +0200)]
Remove some qDebug() noise

7 years agoAdd nco:contactLocalUID to reference query
Mathias Hasselmann [Thu, 6 May 2010 08:54:00 +0000 (10:54 +0200)]
Add nco:contactLocalUID to reference query

7 years agoUse canonicalized filters in query builder.
Mathias Hasselmann [Thu, 6 May 2010 08:34:15 +0000 (10:34 +0200)]
Use canonicalized filters in query builder.

This gives the query builder gets a minimal filter optimizer, and more
importantly we gain action filter support as soon as the QtContacts team
implements canonicalization of action filters!

* src/dao/querybuilder.cpp: isCanonicalFilterSupported(), bindFilter(),
  isFilterSupported(): Extract canonical part of isFilterSupported() and
  canonicalize filters before binding or validating.

7 years agoFixed assert in save contact: addTag(service, ncoContact, "addressbook")
Aleksandar Stojiljkovic [Thu, 6 May 2010 07:17:06 +0000 (10:17 +0300)]
Fixed assert in save contact: addTag(service, ncoContact, "addressbook")

This method: mEngine->schema().changeLogTagIri()  shoudl nto be used inside transaction, because it doesnt use transaction's service but uses ::tracker and it is blocking on dbus roundtrip

7 years agorevert back commenting of addresbook flag - to be used until custom detail SyncTarget...
Aleksandar Stojiljkovic [Thu, 6 May 2010 06:14:28 +0000 (09:14 +0300)]
revert back commenting of addresbook flag - to be used until custom detail SyncTarget is not stored to tracker for all addressbook contacts

7 years agoChanges: Use actual customization point for number matching length
Nathan Letwory [Thu, 6 May 2010 04:46:10 +0000 (07:46 +0300)]
Changes: Use actual customization point for number matching length

7 years agoremove usage of asserting changelog iri query - Sync Target detail needed
astojilj [Thu, 6 May 2010 04:34:38 +0000 (07:34 +0300)]
remove usage of asserting changelog iri query - Sync Target detail needed

7 years agoMerge branch 'master' of git@gitorious.org:qtcontacts-tracker/qtcontacts-tracker
astojilj [Thu, 6 May 2010 04:12:16 +0000 (07:12 +0300)]
Merge branch 'master' of git@gitorious.org:qtcontacts-tracker/qtcontacts-tracker

7 years agoadded QContactFilter::MatchPhoneNumber filterring using maemo::localPhoneNumber ...
astojilj [Thu, 6 May 2010 04:09:19 +0000 (07:09 +0300)]
added QContactFilter::MatchPhoneNumber filterring using maemo::localPhoneNumber & unit tests

- ut_qtcontacts_trackerplugin::testFilterContactsEndsWithAndPhoneNumber for testing writing, reading filterring maemo::localPhoneNumber

7 years agoSupport phone number suffix matching.
Mathias Hasselmann [Wed, 5 May 2010 23:08:15 +0000 (01:08 +0200)]
Support phone number suffix matching.

* src/dao/querybuilder.cpp: bindFilter():
  Compare only last few digits when doing endsWith filtering on phone numbers.

7 years agoAvoid timezone issues when saving dates.
Mathias Hasselmann [Wed, 5 May 2010 21:29:58 +0000 (23:29 +0200)]
Avoid timezone issues when saving dates.

* src/engine/contactsaverequest2.cpp: collectUpdates():
  Apply UTC timezone when converting QDate to QDateTime before saving.
* tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.cpp:
  Use QCOMPARE instead of QVERIFY to verify fetched date.

7 years agoProperly implement filtering in the query builder
Mathias Hasselmann [Wed, 5 May 2010 20:29:31 +0000 (22:29 +0200)]
Properly implement filtering in the query builder

* src/dao/querybuilder.cpp: Use Sparql restrictions and unions instead of
  filters for filtering. It's the only proper way for doing it, and actually
  dramatically simplifies the code. Refactor and move around utility functions.
* src/dao/querybuilder.h: Cleanup bindFilter() signature. Remove now useless
  mQueryDetail field.

* src/engine/contactfetchrequest2.cpp: bindDetails(): Bind filters only once.
* src/engine/contactidfetchrequest2.cpp: run(): Update bindFilter() call.

* tests/ut_qtcontacts_trackerplugin_querybuilder/data/301-testIntersectionFilter.rq:
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/302-testUnionFilter.rq:
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/303-testDetailFilter-1.rq:
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/303-testDetailFilter-2.rq:
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/303-testDetailFilter-3.rq:
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/303-testDetailFilter-4.rq:
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/304-testDetailRangeFilter.rq:
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/305-testChangeLogFilter.rq:
  Update reference queries.

* tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.cpp:
* tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.h:
* tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.pro:
  Add dataset for testing filters being bound only once.

7 years agoOnly show query on error in silent mode
Mathias Hasselmann [Wed, 5 May 2010 20:29:14 +0000 (22:29 +0200)]
Only show query on error in silent mode

7 years agoUse #warning instead of qWarning() track missing features
Mathias Hasselmann [Wed, 5 May 2010 19:36:02 +0000 (21:36 +0200)]
Use #warning instead of qWarning() track missing features

7 years agoUse reliable method to attach "addressbook" tag.
Mathias Hasselmann [Wed, 5 May 2010 19:29:53 +0000 (21:29 +0200)]
Use reliable method to attach "addressbook" tag.

* src/engine/contactsaverequest.cpp: QTrackerContactSaveRequest(),
  saveContacts(), createTagIfItDoesntExistAlready(), addTag():
* src/engine/contactsaverequest.h: createTagIfItDoesntExistAlready(), addTag():
  Store reference to the tracker engine to permit using the schema's tag creation
  function. Remove old, broken tag creation function: It created a new tag
  instance with each save request over and over again.

7 years agoRestore birthday part of testFilterContacts()
Mathias Hasselmann [Wed, 5 May 2010 09:05:40 +0000 (11:05 +0200)]
Restore birthday part of testFilterContacts()

7 years agoMerge branch 'master' of git@gitorious.org:qtcontacts-tracker/qtcontacts-tracker
Aleksandar Stojiljkovic [Wed, 5 May 2010 07:56:24 +0000 (10:56 +0300)]
Merge branch 'master' of git@gitorious.org:qtcontacts-tracker/qtcontacts-tracker

7 years agoFix build issues.
Mathias Hasselmann [Wed, 5 May 2010 07:52:10 +0000 (09:52 +0200)]
Fix build issues.

Notice to myself: Don't do too much overtime!

7 years agoMerge branch 'master' of git@gitorious.org:qtcontacts-tracker/qtcontacts-tracker
Aleksandar Stojiljkovic [Wed, 5 May 2010 07:46:59 +0000 (10:46 +0300)]
Merge branch 'master' of git@gitorious.org:qtcontacts-tracker/qtcontacts-tracker

7 years agoAdded: QContactFetchRequest processing results in separate thread & event queue
Aleksandar Stojiljkovic [Wed, 5 May 2010 07:40:27 +0000 (10:40 +0300)]
Added: QContactFetchRequest processing results in separate thread & event queue

- fixed problem that queries' responses order is different from queries' starting order

7 years agoOnce again update detail filter reference queries
Mathias Hasselmann [Tue, 4 May 2010 21:49:40 +0000 (23:49 +0200)]
Once again update detail filter reference queries

7 years agoRename detail filter reference files
Mathias Hasselmann [Tue, 4 May 2010 21:36:04 +0000 (23:36 +0200)]
Rename detail filter reference files

7 years agoAdd trivial me contact test
Mathias Hasselmann [Tue, 4 May 2010 21:30:39 +0000 (23:30 +0200)]
Add trivial me contact test

Right now it only passes for the new requests,
but I this feature is way too essential to keep it untested.

7 years agoAlways write nco:contactLocalUID.
Mathias Hasselmann [Tue, 4 May 2010 21:07:20 +0000 (23:07 +0200)]
Always write nco:contactLocalUID.

This is needed to assign that property to a priori contacts like the me
contact.

7 years agoRecognize special self-contact URL.
Mathias Hasselmann [Tue, 4 May 2010 21:06:15 +0000 (23:06 +0200)]
Recognize special self-contact URL.

7 years agoAdd utility function to propagate values to pointers
Mathias Hasselmann [Tue, 4 May 2010 20:37:45 +0000 (22:37 +0200)]
Add utility function to propagate values to pointers

7 years agoStrip comments when normalizing queries
Mathias Hasselmann [Tue, 4 May 2010 12:19:28 +0000 (14:19 +0200)]
Strip comments when normalizing queries

7 years agoPermit bindFilterField to ignore subject roles.
Mathias Hasselmann [Tue, 4 May 2010 08:27:35 +0000 (10:27 +0200)]
Permit bindFilterField to ignore subject roles.

* src/dao/querybuilder.cpp: bindFilterField(), bindFilter():
  Set mError from bindFilterField to permit that function to return 0 if it
  wants to ignore a subject role.

7 years agoChanges: Prepare changelog for harmattan/4.5.8-1 harmattan/4.5.8-1
Nathan Letwory [Tue, 4 May 2010 09:41:17 +0000 (12:41 +0300)]
Changes: Prepare changelog for harmattan/4.5.8-1

7 years agoMake run-all script more robust
Mathias Hasselmann [Tue, 4 May 2010 08:00:57 +0000 (10:00 +0200)]
Make run-all script more robust

7 years agoChanges: add a few more edit structs and clean up tab usage
Nathan Letwory [Tue, 4 May 2010 05:31:15 +0000 (08:31 +0300)]
Changes: add a few more edit structs and clean up tab usage

7 years agoChanges: improve debug output, add comments
Nathan Letwory [Tue, 4 May 2010 05:19:46 +0000 (08:19 +0300)]
Changes: improve debug output, add comments

7 years agoChanges: Improve address saving and verification
Nathan Letwory [Mon, 3 May 2010 22:44:21 +0000 (01:44 +0300)]
Changes: Improve address saving and verification
RevBy: people-review

7 years agoChanges: Add a few more data units
Nathan Letwory [Mon, 3 May 2010 20:53:12 +0000 (23:53 +0300)]
Changes: Add a few more data units
RevBy: people-review

7 years agoChanges: move edit tests away from macros to function-based implementation
Nathan Letwory [Mon, 3 May 2010 20:46:09 +0000 (23:46 +0300)]
Changes: move edit tests away from macros to function-based implementation
RevBy: people-review

Details: The test data units now carry information about where they were
created and what they try to test. The existing cases and their
naming should speak for themselves. It should be easy to add more
data units to the edit tests (including the detail deletes).

7 years agoChanges: Add more edit combinations and better debug output to help in fixing
Nathan Letwory [Mon, 3 May 2010 14:24:44 +0000 (17:24 +0300)]
Changes: Add more edit combinations and better debug output to help in fixing
RevBy: people-review

7 years agoChanges: Add test cases for NB#161788 and its dependant bugs
Nathan Letwory [Mon, 3 May 2010 14:04:18 +0000 (17:04 +0300)]
Changes: Add test cases for NB#161788 and its dependant bugs
RevBy: people-review

7 years agoMerge branch 'master' of git@gitorious.org:qtcontacts-tracker/qtcontacts-tracker
astojilj [Mon, 3 May 2010 23:12:04 +0000 (02:12 +0300)]
Merge branch 'master' of git@gitorious.org:qtcontacts-tracker/qtcontacts-tracker

7 years agoFixed email, address and url saving - not deleting previous when editing
astojilj [Mon, 3 May 2010 23:08:11 +0000 (02:08 +0300)]
Fixed email, address and url saving - not deleting previous when editing

old save request fix to remove duplication and previous values when editing.

7 years agoAdd more detail filter tests
Mathias Hasselmann [Mon, 3 May 2010 21:02:58 +0000 (23:02 +0200)]
Add more detail filter tests

7 years agoConvert xsd:date and xsd:time to xsd:dateTime before saving
Mathias Hasselmann [Mon, 3 May 2010 20:54:06 +0000 (22:54 +0200)]
Convert xsd:date and xsd:time to xsd:dateTime before saving

7 years agoHandle LiveNodeModel errors in fetch request
Mathias Hasselmann [Mon, 3 May 2010 20:51:56 +0000 (22:51 +0200)]
Handle LiveNodeModel errors in fetch request

7 years agoExtract hasContext() function.
Mathias Hasselmann [Mon, 3 May 2010 20:50:17 +0000 (22:50 +0200)]
Extract hasContext() function.

7 years agoMerge branch 'master' of git@gitorious.org:qtcontacts-tracker/qtcontacts-tracker
astojilj [Mon, 3 May 2010 20:18:07 +0000 (23:18 +0300)]
Merge branch 'master' of git@gitorious.org:qtcontacts-tracker/qtcontacts-tracker

7 years agoFixed: Reading work email addresses. ut_qtcontacts_trackerplugin tests pass.
astojilj [Mon, 3 May 2010 20:08:31 +0000 (23:08 +0300)]
Fixed: Reading work email addresses. ut_qtcontacts_trackerplugin tests pass.

Fixed reading pobox and work address.

7 years agoAdd little script to run all important tests
Mathias Hasselmann [Mon, 3 May 2010 19:17:31 +0000 (21:17 +0200)]
Add little script to run all important tests

7 years agoWrite addressbook tag when saving contacts.
Mathias Hasselmann [Mon, 3 May 2010 18:08:53 +0000 (20:08 +0200)]
Write addressbook tag when saving contacts.

* src/dao/contactdetailschema.h:
* src/dao/contactdetailschema.cpp: setChangeLogTagLabel(), changeLogTagLabel(),
  changeLogTagIri(): Rename changeLogTag attribute to changeLogTagLabel. Add
  dynamic changeLogTagIri attribute which reads the changelog tag's IRI from
  tracker.

* src/engine/contactsaverequest2.cpp: appendUpdateStatements():
  Attach addressbook tag when saving contacts.

* src/engine/engine.cpp: parseParameters():
  Update attribute name.

* tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-update.rq:
  Add nco:hasTag to this reference query.
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/305-testChangeLogFilter.rq:
  Filter on tag IRI instead of tag label.
* tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.cpp:
  verifyQuery(): Replace placeholder for changelog tag.

7 years agoAdd functions for building tag management queries.
Mathias Hasselmann [Mon, 3 May 2010 18:08:02 +0000 (20:08 +0200)]
Add functions for building tag management queries.

* src/dao/querybuilder.h: createTagQuery(), tagVariable(), bindHasTag():
* src/dao/querybuilder.cpp: createTagQuery(), tagVariable(), bindHasTag(), bindFilter():
  Add functions for creating and fetching tags. Make function for binding tags public.

* tests/ut_qtcontacts_trackerplugin_querybuilder/data/204-create-tag.rq:
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/205-tag-variable.rq:
* tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.pro:
* tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.h:
  testCreateTagQuery(), testTagVariableQuery():
* tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.cpp:
  testCreateTagQuery(), testTagVariableQuery():
  Test the new tag relating query builder functions.

7 years agoMerge branch 'master' of git@gitorious.org:qtcontacts-tracker/qtcontacts-tracker
astojilj [Mon, 3 May 2010 18:08:14 +0000 (21:08 +0300)]
Merge branch 'master' of git@gitorious.org:qtcontacts-tracker/qtcontacts-tracker

Conflicts:
tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.cpp

7 years agoProperly update the requests contacts when saving.
Mathias Hasselmann [Mon, 3 May 2010 12:13:35 +0000 (14:13 +0200)]
Properly update the requests contacts when saving.

* src/engine/contactsaverequest2.cpp: makeContactUID(), applyDetailUri(),
  appendUpdateStatements(), createContacts(), mergeDetail(),
  mergeNewContact()): Update GUID, last modified timestamp and display label
  when saving. Set contact detail URIs.
* src/engine/contactsaverequest2.h: appendUpdateStatements():
  Remove const attribute.
* tests/ut_qtcontacts_trackerplugin_querybuilder/ut_qtcontacts_trackerplugin_querybuilder.cpp:
  verifyContacts(), testFetchRequest(), SaveRequestBuilder, testSaveRequestCreate(),
  testSaveRequestUpdate(): Introduce default filename for verifyContacts(). Store
  constructed contacts and subjects for SaveRequestBuilder. Check if save request
  updates the needed contact details.

7 years agoAvoid direct access of tracker's DBus API.
Mathias Hasselmann [Mon, 3 May 2010 12:01:31 +0000 (14:01 +0200)]
Avoid direct access of tracker's DBus API.

* src/engine/contactsaverequest2.cpp: createContacts(), run():
  Return to QtTracker API for saving contacts.
* src/engine/contactsaverequest2.h: onError(), mErrors:
  Add error handler stub. Must see first how errors get reported.

7 years agoExtract QContactTrackerEngine::updateDisplayLabel()
Mathias Hasselmann [Mon, 3 May 2010 11:16:51 +0000 (13:16 +0200)]
Extract QContactTrackerEngine::updateDisplayLabel()

* src/engine/contactfetchrequest2.cpp: modelUpdated():
  Use QContactTrackerEngine::updateDisplayLabel().
* src/engine/engine.h: QContactTrackerEngine():
* src/engine/engine.cpp: updateDisplayLabel():
  Add function for updating a contact's display label.

7 years agoCreate unique names for blank variables.
Mathias Hasselmann [Mon, 3 May 2010 11:37:58 +0000 (13:37 +0200)]
Create unique names for blank variables.

* src/engine/contactsaverequest2.cpp: collectUpdates():
  Append current number of insert statements to blank variable name.

7 years agoPrevent duplicates in local id fetch request.
Mathias Hasselmann [Mon, 3 May 2010 11:28:29 +0000 (13:28 +0200)]
Prevent duplicates in local id fetch request.

* src/engine/contactidfetchrequest2.cpp: run():
  Call modelQuery() with a distinct query instead of modelVariable().

7 years agoMark address properties as optional.
Mathias Hasselmann [Mon, 3 May 2010 10:51:50 +0000 (12:51 +0200)]
Mark address properties as optional.

7 years agoAdd minimum versions for build dependencies
Mathias Hasselmann [Mon, 3 May 2010 10:50:32 +0000 (12:50 +0200)]
Add minimum versions for build dependencies

7 years agoSet nco:contactLocalUID instead of nco:contactUID for online contacts
Mathias Hasselmann [Mon, 3 May 2010 09:53:10 +0000 (11:53 +0200)]
Set nco:contactLocalUID instead of nco:contactUID for online contacts

7 years agoOnly add implicit subtypes for new fetch request
Mathias Hasselmann [Mon, 3 May 2010 09:19:54 +0000 (11:19 +0200)]
Only add implicit subtypes for new fetch request

7 years agoDon't assume detailUri() would contain phone number, now really
Mathias Hasselmann [Mon, 3 May 2010 09:17:26 +0000 (11:17 +0200)]
Don't assume detailUri() would contain phone number, now really

7 years agoDon't assume detailUri() would contain phone number
Mathias Hasselmann [Mon, 3 May 2010 09:07:29 +0000 (11:07 +0200)]
Don't assume detailUri() would contain phone number

7 years agoAdd QTrackerContactIdFetchRequest2
Mathias Hasselmann [Sun, 2 May 2010 20:44:24 +0000 (22:44 +0200)]
Add QTrackerContactIdFetchRequest2

This new request directly uses the new QTrackerContactQueryBuilder for
accessing filters instead of messing arround with the fetch request.

* src/engine/contactidfetchrequest2.cpp: new file
* src/engine/contactidfetchrequest2.h: new file
* src/engine/engine.cpp: startRequest():
  Use new request when QueryBuilderFetch is set.
* src/engine/engine.pro: Add new request.

7 years agoMake changelog tag configurable.
Mathias Hasselmann [Sun, 2 May 2010 19:52:19 +0000 (21:52 +0200)]
Make changelog tag configurable.

Permit changing the label of the tag associated with each contact created by
this plugin. Pass an empty label to disable the feature.

* src/dao/contactdetailschema.cpp: QTrackerContactDetailSchemaPrivate(),
  setChangeLogTag(), changeLogTag():
* src/dao/contactdetailschema.h: setChangeLogTag(), changeLogTag():
  Introduce changeLogTag attribute.

* src/dao/querybuilder.cpp: bindFilter():
  Consider the schema's changelog tag when building a changelog filter.

* src/engine/engine.cpp: parseParameters():
  Introduce "changelog-tag" engine paramter.

* tests/ut_qtcontacts_trackerplugin_querybuilder/data/305-testChangeLogFilter.rq:
  Update order of restrictions to match the new code.

7 years agoChanges: Check for libqttracker with pkg-config instead of hard-coding.
Murray Cumming [Fri, 30 Apr 2010 13:06:41 +0000 (15:06 +0200)]
Changes: Check for libqttracker with pkg-config instead of hard-coding.

RevBy: people-review
Details: src/dao/dao.pri: Use pkg-config to depend on libqttracker,
now that https://projects.maemo.org/bugzilla/show_bug.cgi?id=161509
is fixed, instead of hard-coding the -l flag and implicitly using
the /usr/include header path.

7 years agoChanges: ut_qtcontacts_add_async: Use QContactTrackerEngine directly.
Murray Cumming [Fri, 30 Apr 2010 08:25:07 +0000 (10:25 +0200)]
Changes: ut_qtcontacts_add_async: Use QContactTrackerEngine directly.

RevBy: people-review
Details:
* tests/ut_qtcontacts_add_async/ut_qtcontacts_add_async.[h|cpp]:
Instantiate and use QContactTrackerEngine directly, instead of using
QContactManager, to ensure that we really test the locally-built engine
instead of the installed one.
* tests/ut_qtcontacts_add_async/ut_qtcontacts_add_async.pro:
Simplify this by including ut_qtcontacts_common.pri, which also makes
it link against the locally-built engine sources instead of using
the installed library, even though we don't use any of the common
test source files.

7 years agoUse createTransaction() instead of deprecated initiateTransaction()
Mathias Hasselmann [Sun, 2 May 2010 19:04:37 +0000 (21:04 +0200)]
Use createTransaction() instead of deprecated initiateTransaction()

7 years agoUse nco:contactLocalUID for storing contact ID
Mathias Hasselmann [Sun, 2 May 2010 18:50:29 +0000 (20:50 +0200)]
Use nco:contactLocalUID for storing contact ID

This dramatically increases compatibility of old fetch requests and old unit
tests with new save request. Backward compatibility is kept by still writing
the contact ID to nco:contactUID too.

Still this change makes old addressbook databases somewhat useless.
We should consider adding an upgrade script to the Debian package.

* src/dao/querybuilder.cpp: bindFilter():
  Filter on nco:contactLocalUID property instead of contact URL.

* src/dao/trackerchangelistener.cpp: onModelUpdated():
* src/engine/contactfetchrequest.cpp: applyFilterToContact(),
  preparePhoneNumbersQuery(), prepareEmailAddressesQuery(),
  prepareIMAddressesQuery(), run():
* src/engine/contactremoverequest.cpp: onRemoveRequest():
* src/engine/relationshipfetchrequest.cpp: QTrackerRelationshipFetchRequest():
* src/engine/relationshipsaverequest.cpp: nodesDataReady():
* tests/ut_qtcontacts_sparql/ut_qtcontacts_sparql.cpp: checkOntology():
* tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.cpp: testNcoTypes():
  Read contact ID from nco:contactLocalUID instead of nco:contactUID.

* src/engine/contactsaverequest.cpp: saveContacts():
  Write contact ID to nco:contactLocalUID and of nco:contactUID.

* tests/ut_qtcontacts_trackerplugin_querybuilder/data/000-contacts.ttl:
  Add nco:contactLocalUID tuple.

* tests/ut_qtcontacts_trackerplugin_querybuilder/data/300-localContactIdFilter.rq:
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/301-testIntersectionFilter.rq:
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/302-testUnionFilter.rq:
  Update for modified contact ID filter.

QT_CONTACTS_TRACKER="query-builder=fetch,save" ./ut_qtcontacts_trackerplugin
Totals: 19 passed, 10 failed, 3 skipped

7 years agoFix testWritingOnlyWorkMobile()
Mathias Hasselmann [Sun, 2 May 2010 14:34:59 +0000 (16:34 +0200)]
Fix testWritingOnlyWorkMobile()

Phone number types form a hierarchy in NCO, therefore saving a mobile number
will cause addition of implicit subtypes. The test must consider this.

QT_CONTACTS_TRACKER="query-builder=all" ./ut_qtcontacts_trackerplugin
Totals: 15 passed, 14 failed, 3 skipped

7 years agoToggle some behavior on bases of engine flags
Mathias Hasselmann [Sun, 2 May 2010 14:31:11 +0000 (16:31 +0200)]
Toggle some behavior on bases of engine flags

7 years agoRemove debug statement
Mathias Hasselmann [Sun, 2 May 2010 14:30:29 +0000 (16:30 +0200)]
Remove debug statement

7 years agoAlso remove affiliation and organization objects before testing
Mathias Hasselmann [Sun, 2 May 2010 14:02:22 +0000 (16:02 +0200)]
Also remove affiliation and organization objects before testing

7 years agoIntroduce Organization subject
Mathias Hasselmann [Sun, 2 May 2010 13:47:19 +0000 (15:47 +0200)]
Introduce Organization subject

7 years agoAutomatically derive subject domains.
Mathias Hasselmann [Sun, 2 May 2010 14:03:20 +0000 (16:03 +0200)]
Automatically derive subject domains.

Subject domains must be derived automatically because 1) explicitly specifying
it in the schema is boring 2) more complex properties need separate subject
domains for each property in the chain.

* src/dao/subject.h: fromResource(), makeIri():
* src/dao/subject.cpp: makeIri(): Introduce static functions to derive subject
  domain from RDF class. Also explicitly pass local contact id to makeIri() to
  make automatic IRI construction easier.

* src/dao/contactdetailfield.h:
* src/dao/contactdetailfield.cpp: Move subject handling from
  QTrackerContactDetailField to PropertyInfoBase.

* src/dao/contactdetailschema.cpp: Remove explicit subject domains.
  Mark optional organziation properties.

* src/dao/contactdetail.cpp: subjectDomain():
* src/dao/querybuilder.cpp: bindColumns(), bindFields(), bindDetailUri():
* src/engine/contactfetchrequest2.cpp: QContactDetailPointer, fetchBaseModel(),
  fetchDetailModel():
* src/engine/contactsaverequest2.cpp: collectEntities(), collectUpdates():
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/100-contact.rq:
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/103-contact-avatar.rq:
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/114-contact-organization.rq:
  Update to match the detail field refactoring.

* tests/ut_qtcontacts_trackerplugin_querybuilder/data/000-contacts.ttl:
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/000-contacts.xml:
* tests/ut_qtcontacts_trackerplugin_querybuilder/data/202-save-request-update.rq:
  Also test avatar and organziation fields.

7 years agoProperly collect entities for inverse properties
Mathias Hasselmann [Sun, 2 May 2010 13:55:45 +0000 (15:55 +0200)]
Properly collect entities for inverse properties

7 years agoCheck more column names in fetch request
Mathias Hasselmann [Sat, 1 May 2010 15:57:41 +0000 (17:57 +0200)]
Check more column names in fetch request

7 years agoGet RDF type from property instead of link.
Mathias Hasselmann [Sat, 1 May 2010 15:51:31 +0000 (17:51 +0200)]
Get RDF type from property instead of link.

Get the RDF type from target property domain instead of using the linking
property's range.

This is needed because the target property (e.g. nfo::fileUrl) can be more
specific about the required RDF type than the linking property (nco:logo).

7 years agoIntroduce LocalFile subject
Mathias Hasselmann [Sat, 1 May 2010 15:49:35 +0000 (17:49 +0200)]
Introduce LocalFile subject

7 years agoFail gracefully in testMergeTwoOnlineContacts()
Mathias Hasselmann [Sat, 1 May 2010 15:49:10 +0000 (17:49 +0200)]
Fail gracefully in testMergeTwoOnlineContacts()

7 years agoAvoid sign warning
Mathias Hasselmann [Sat, 1 May 2010 15:48:34 +0000 (17:48 +0200)]
Avoid sign warning

7 years agoRevert "Fixed Avatar saving/reading/testing in querybuilder approach"
Mathias Hasselmann [Sun, 2 May 2010 14:08:35 +0000 (16:08 +0200)]
Revert "Fixed Avatar saving/reading/testing in querybuilder approach"

This reverts commit 8e993584e0b0d07cddfafaf9f115d202e12fb826.

We should not create invalid RDF tuples just because it's easier.

7 years agout_qtcontacts_trackerplugin::testWritingOnlyWorkMobile
astojilj [Sun, 2 May 2010 13:02:12 +0000 (16:02 +0300)]
ut_qtcontacts_trackerplugin::testWritingOnlyWorkMobile

- tracker generates inherrited subtypes, fixing tests

7 years agoChanges: Added saving of maemo:localPhoneNumber property to QTrackerContactSaveReques...
Tomi Lammi [Sun, 2 May 2010 12:43:23 +0000 (15:43 +0300)]
Changes: Added saving of maemo:localPhoneNumber property to QTrackerContactSaveRequest::savePhoneNumbers().
Details: Still WIP as there are no test cases.

RevBy: People-Review

7 years agoFix saving/reading/unit tests for address (pobox was not saved)
astojilj [Sun, 2 May 2010 10:23:05 +0000 (13:23 +0300)]
Fix saving/reading/unit tests for address (pobox was not saved)

- active config: export QT_CONTACTS_TRACKER='query-builder=fetch;debug=queries,models'

7 years agoFix env variable parsing
astojilj [Sun, 2 May 2010 10:10:02 +0000 (13:10 +0300)]
Fix env variable parsing

7 years agoFixed Avatar saving/reading/testing in querybuilder approach
astojilj [Sun, 2 May 2010 07:56:49 +0000 (10:56 +0300)]
Fixed Avatar saving/reading/testing in querybuilder approach

- nco:photo URI is pointing to URI
- updated ut_qtcontacts_trackerplugin tests for avatar (22 pass, 7 fail)
- updates ut_qtcontacts_trackerplugin_querybuilder tests for avatar (all pass)

7 years agoUse localId as nco:contactUID during transition to nco::contactLocalUID
astojilj [Sat, 1 May 2010 20:10:09 +0000 (23:10 +0300)]
Use localId as nco:contactUID during transition to nco::contactLocalUID

- Use localId as nco:contactUID during transition to nco::contactLocalUID
- testSavePhoneNumber() unit test fixed in ut_qtcontacts_trackerplugin