summaryrefslogtreecommitdiffstats
path: root/src/plugins/organizer/memory/qorganizeritemmemorybackend.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Accessors should be constChris Adams2021-03-181-2/+2
| | | | | Change-Id: I5316640c5645eddc4078898a67f54dd984ffd29a Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove usage of deprecated QtAlgorithmsChris Adams2020-11-021-1/+2
| | | | | Change-Id: Ia64e2e81cc070932137d7183503d390b90c78b49 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Add ; to Q_UNUSEDLars Schmertmann2020-11-021-1/+1
| | | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: Ie8bdf9b2100826beb2bdb0934d3f36e6a8df13a6 Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Christopher Adams <chris.adams@jolla.com>
* Don't include mocs inside namespacesChris Adams2018-10-261-2/+2
| | | | | | | | See commit 5b99f3a3 in qtbase dev. Task-number: QTBUG-71300 Change-Id: I38b281f8990baa9b8ea9969e52b8a7b80b5e7da9 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Fix licensingJani Heikkinen2017-05-041-14/+20
| | | | | | | | | | Currently tests are licensed under GPL-EXCEPT, examples under BSD and src under LGPL so replase old license headers with new & proper ones. Also remove old & unused license files & add missing ones Task-number: QTBUG-57147 Change-Id: I07f7b555a3766ad1c4f57d662fc3326522885abe Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* More license test fixesAlex Blasche2015-04-161-1/+1
| | | | | | | | | This change should have really been part of I4a4c08123be144a0f3c2c9ce987f5ce1e9ff8bb4 but resolving the conflicts across 300+ files is no fun. Change-Id: Ic14b52c6e27c1924419446b7f876954dc7bf1450 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Update contact URLAlex Blasche2015-04-161-1/+1
| | | | | | | QtProject is no more. Change-Id: I2b1d6ff8ed40deec419c51757a539b40cc78b42f Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Fix licenses for QtPIMAlex Blasche2015-04-161-21/+13
| | | | | | | | | | 1.) Use QtCompany in each header and update copyright year 2.) All tests are LGPLv21 (some test files were BSD) 3.) Convert doc snippet to BSD (some were LGPL) 4,) Convert example code from FDL to BSD Change-Id: I4a4c08123be144a0f3c2c9ce987f5ce1e9ff8bb4 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Replace defaultCollection() with defaultCollectionId()Konstantin Ritt2015-02-121-5/+3
| | | | | | | | | | | This assumes the id of a default collection is known at the engine initialization time, but makes it possible to defer fetching the default collection's content up until it is needed. This also greatly simplifies the initialization process for the async-only engines. Change-Id: I5116ffdd22d7fa6cc5f8a8eed7f94518e6db7089 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* PIM ID local components do not need to be human-readableMatt Vogt2015-01-051-2/+4
| | | | | | | | | | | | | The PIM ID objects compose two elements: the URI of the manager that owns them, and a local component meaningful only to that manager. The URI is composed from human-readable elements and benefits from a string representation, but the local element has no requirement on readability, and can consume less storage by using a binary representation. Change-Id: I56d553f6d9debf0486310688006b0be8728c1c90 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Simplify contact and organizer ID representationsKonstantin Ritt2014-08-011-209/+13
| | | | | | | | | | Simplify contact and organizer IDs to simply contain a manager URI that identifies the owner of the identified object, and an engine- specific string that identifies the object to that manager. Change-Id: Ic14c419df264e91c61e0f3d474d846289e1aaa82 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Extend changed signals to optionally report changed typesMatt Vogt2014-07-181-9/+10
| | | | | | | | | | | | Add a parameter to the contactsChanged and itemsChanged signals, which allow a manager to optionally report the extent of changes involved in a contact or organizer item modification. If no changes are explicitly reported by the manager, the receiver must assume that any or all details of the contacts or organizer items may have been modified. Change-Id: Ie8a0d051c3f82a5911dea68213d78c2b173e762e Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Fix organizer tests in outlying timezonesMatt Vogt2014-06-241-8/+15
| | | | | | | | | | Fix test failures resulting from incorrect handling of local and UTC time, which fail only in timezones some distance from UTC. Change-Id: I8ddecf501a4db46aca07a1e5d5db7dc5eb804b78 Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* [Memory backend] Allow to modify the default collectionKonstantin Ritt2014-01-211-6/+0
| | | | | | | | | | ...just like JsonDB backend did. It sounds odd that one can not change the default collection's content, i.e. replace the default name with a localized one or change the collection's color. Change-Id: If7d5ced0351416c430277908c1b6c43ed7eb576d Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* [QOrganizerItemMemoryEngine] Optimize work with collectionsKonstantin Ritt2014-01-171-72/+58
| | | | | | | | Use QHash instead of QList, thus reducing access time. Change-Id: I87f7f0561d0fb1bc67fa78f5cc3e703f17addba1 Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Require the request be non-nullKonstantin Ritt2014-01-101-3/+0
| | | | | | | | | | | Handlers shouln't silently ignore a null requests; if the request is null, then something went wrong and must be fixed. Change-Id: Ic0691fd87e0c8b2e3081e539d75db247b6d4ae78 Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Check that the request don't get deleted in a slotKonstantin Ritt2014-01-101-3/+1
| | | | | | | | | Deleting sender() in a slot isn't allowed, really. Produce an assert for now to help the existing users fix their code. Change-Id: I784ec6f7bc0116b4bf5be8da086dae9492bf3aea Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Use the installed headersKonstantin Ritt2014-01-081-5/+8
| | | | | | | | | | | This fixes synqt warnings about incorrect inclusions in public headers. Also deals with extra- and duplicate includes, forward declaration, namespacing issues, and circular dependencies... ...and Qt-ifies the headers after all. Change-Id: Ia373d6fb93e0fecedd2a2334fbeb4c2005a67a4c Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* [QOrganizerItemMemoryEngine] Reduce code duplication in saveItem()Konstantin Ritt2014-01-061-73/+34
| | | | | | | | This greatly improves the code readability. Change-Id: I3aa7456b49d5366f1489b774ef546a6e9c923254 Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* [QOrganizerItemMemoryEngine] Decrease code duplicationKonstantin Ritt2013-12-281-6/+5
| | | | | | Change-Id: I6d5430b75fe09c335c92d253d56a27940dc7af15 Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* [QOrganizerItemMemoryEngine] Fix collection change notificationsKonstantin Ritt2013-12-281-4/+3
| | | | | | | | | Since the backend could share the data across instances, all instances that share changed data must be notified (do exactly the same as for QOrganizerItemChangeSet). Change-Id: Iff50b8f0c8b67ed102128ff0a64854c3856aa7f3 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* [QOrganizerItemMemoryEngine] Don't keep anonymous store in hashKonstantin Ritt2013-12-281-14/+15
| | | | | | | | This solves a possible issue when "id" parameter value equals to some existing anonymous store's UUID. Change-Id: I5608310f02674e6b2e54512cc5c6c06a3ff94aba Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* [QOrganizerItemMemoryEngineData] Get rid of extra ref counterKonstantin Ritt2013-12-281-5/+3
| | | | | | | | QOrganizerItemMemoryEngineData is a QSharedData successor and thus already ref-counted; simply use existing counter. Change-Id: I2c6f34215dd1149d33cbccfd8e85288f5e5ec241 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Qt Organizer: do not emit unnecessary collectionsChanged signalsMichael Krasnyk2013-12-151-4/+7
| | | | | | | | | | | Prevent emitting of unnecessary collectionsChanged signals without collections modifications. These signals lead to a reset without real changes of collections models based on QList. Change-Id: I7d36209e40c62a2c7d43340e645b3567754470b3 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Adjust QT*_{BEGIN,END}_NAMESPACE macroSergio Ahumada2013-03-261-2/+2
| | | | | | | | Changed to QT_{BEGIN,END}_NAMESPACE_* to match syncqt and tst_header's checks. Change-Id: If41721bf6be1294c9e0068af74917afc246603e9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-241-24/+24
| | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I2d9a4538442adcebf58fe50bf47c5e5c8b3b526a Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use QPointer instead of QWeakPointer for tracking QObjects.Stephen Kelly2012-05-311-1/+1
| | | | | | Change-Id: Ia79fd891946a93f47a76fb97bfe07d9cc37da27e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
* Use QStringLiteral macro instead of QLatin1String where possible.Cristiano di Flora2012-05-311-7/+7
| | | | | Change-Id: I283e72fa94ac08f2ac40db285b8607f3170b9d5b Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
* Fix handling of multiple recurrence rules in organizerPäivi Rajala2012-05-221-8/+13
| | | | | | | | | Previously, if an item had multiple recurrence rules and they produced duplicate recurrence dates, there were duplicate occurrences. Now duplicate occurrences are not generated anymore. Change-Id: Ic95e7d5c832234866936fee8cf04082787e910d2 Reviewed-by: Iiro Kause <iiro.kause@nokia.com>
* Fix for determining occurrence end date in OrganizerPäivi Rajala2012-05-091-20/+28
| | | | | | | | | | | | | - When generating occurrences for multi-day recurring items, the end date was always set to be the same as start date. Now the delta between original start and end dates is used instead. - Improved the robustness of generating occurrences for recurring items, which are missing either start date or both start and end dates. Change-Id: I1f441f55190383aef143e03051f5cc7cb055f3dc Reviewed-by: pengwu <peng.1.wu@nokia.com>
* Change uses of {to,from}Ascii to {to,from}Latin1Thiago Macieira2012-05-041-1/+1
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I66177403322c7b2d15556f7a56750ac35a639aad Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
* Fix Organizer memory backend fetch for export requestPäivi Rajala2012-04-191-1/+3
| | | | | | | | | Fetch for export failed because when iterating through QHash containing all events, it assumed the QHash to be ordered and expected to handle all recurring parent items before handling occurrences. Change-Id: I4c58aeaf64d0699558e745c053823f29d9e70de6 Reviewed-by: Iiro Kause <iiro.kause@nokia.com>
* Fix various coding style issues.Xizhi Zhu2012-04-051-2/+5
| | | | | Change-Id: I9c027e3640aeedde0216849495762881ae20cd3c Reviewed-by: Xizhi Zhu <xizhi.zhu@nokia.com>
* Remove the obsolete definition name for organizer details.Päivi Rajala2012-03-201-61/+62
| | | | | | | | They have been marked as obsolete for a while, so should be safe to remove now. Change-Id: I79ae9b0c3088477786e4b8fc34138b37d4df10f0 Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>
* Taken from 261 documentation errors down to 246acox2012-03-151-2/+2
| | | | | | | | | | -Still 16098 in gerrit is needed and this does not affect it. -#ifndef Q_QDOC needed around all macros where enums follow to make qdoc recognise them. -A number of \variables replaces with methods needed updating. Change-Id: Ia49ddcceb00889182c5fc3a840d0c8a1af4450d9 Reviewed-by: Simo Kivimäki <simo.kivimaki@nokia.com>
* Adapt QtOrganizer to the new plugin mechanism.Xizhi Zhu2012-03-121-2/+0
| | | | | Change-Id: Ie97a0deac5b66719b2b1b0a690888fa2aad5705a Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>
* Organizer recurrence support, jsondb and memory backend supportPäivi Rajala2012-02-291-380/+168
| | | | | | | | | | | - Jsondb backend support for generating occurrences - Recurrence related fixes in memory backend - Handling of new C++ API feature in both backends: remove item "by item" (previously it was possible to remove only "by id") - Added new recurrence related tests Change-Id: Ie99994e692715e76ce9fc7e1e5f280c9f9c8a9e8 Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>
* Simplify the interface for QOrganizerManager.Xizhi Zhu2012-02-061-51/+75
| | | | | | | | | | | | | | Some APIs were added only to maintain backward compatibility back in QtMobility days, thus marked as obsoleted. Some convenience APIs are marked as obsoleted since the internal implementation is just a wrapper, and the use of synchronous APIs are not encouraged. All the obsoleted APIs will be removed later. Change-Id: I6643299b088fa17b5ae89c0cb7d470ae458c5bc0 Reviewed-by: Xizhi Zhu <xizhi.zhu@nokia.com>
* Fix the module names in the file headers.Xizhi Zhu2012-02-061-1/+1
| | | | | | Change-Id: Ibe0e92da12770e8dedc503788edad1f0d129a5f1 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Andy Cox <andrew.cox@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I063dff80c66d3f4d1dfd07c27478b9d5b1bfe0d8 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-201-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I981663bb2eec3d39a40bbec70bc064d0abec98ba Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Update copyright year in Nokia copyright headers.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Update copyright headers from before 2011, and a few new ones that were merged after the previous change to copyright headers. Change-Id: I6d14a19ca1f3d257c05aaf26abc6bc2f3fb0489f Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove access constraints of item detail.Xizhi Zhu2012-01-091-2/+0
| | | | | | | | If certain detail is removable, read-only, or unique, etc. is a back-end specific feature, and should not be handled in the common code. Otherwise, it's difficult to handle cases where one item is retrieved from one back-end, modified, and saved to another back-end, where the access constraints are different. Change-Id: I31873e7dc3278200b937cc03da3607cc1f3375ae Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Xizhi Zhu <xizhi.zhu@nokia.com>
* Use enumeration for detail types.Xizhi Zhu2012-01-091-12/+12
| | | | | | | | Introduce TypeUndefined as the default type. Change-Id: I4b2dccc7be127b4eef9544dd56ce19bc1f3e7faa Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Xizhi Zhu <xizhi.zhu@nokia.com>
* Removed all since references from Organizer, contacts and Versitacox2011-12-221-27/+0
| | | | | | Change-Id: Ibef3ab2b77f896779cc09a68aa249f98aad620d4 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Iiro Kause <iiro.kause@nokia.com>
* Use enumerations for organizer item types.Xizhi Zhu2011-12-131-4/+3
| | | | | | | | | | qlatin1constant.h is moved to the versit organizer module as a temporary solution. Introduce TypeUndefined as the default type. Change-Id: I6c644c416be6742755b8fb8cbe7e7693d2dbbcd1 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Xizhi Zhu <xizhi.zhu@nokia.com>
* Classification -detail to Organizer C++ APIikause2011-12-081-0/+1
| | | | | | | | | | | - Classification API and implementation - Related tests Change-Id: Ib5ee088430723fd4fc8f74f48c27f7c1a61d2c4a Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: pengwu <peng.1.wu@nokia.com> Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com> Reviewed-by: Xizhi Zhu <xizhi.zhu@nokia.com>
* Merge organizer mgr engine v2 into v1.Xizhi Zhu2011-11-161-2/+178
| | | | | | | | | | | The V2 class was added only to maintain binary compatibility in QtMobility, so not needed in QtPim 5.0. Plugin developers are responsible to implement those functions, while a reference implmentation is copied to the memory plugin. Change-Id: I0a26884eb9e05e3a745d95abbdb31d981873636c Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Iiro Kause <iiro.kause@nokia.com> Reviewed-by: Andy Cox <andrew.cox@nokia.com> Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>
* Organizer memory backend as a plugin.Xizhi Zhu2011-11-111-0/+1768
Change-Id: I5bd0bb269f2b0d99d988e088d40701aa80b0f37e Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: pengwu <peng.1.wu@nokia.com> Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>