summaryrefslogtreecommitdiffstats
path: root/src/imports/organizer/qdeclarativeorganizermodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove usages of deprecated QQmlListProperty constructorsChris Adams2021-03-181-15/+17
| | | | | | Change-Id: I2cc20b69fb5e7bc491f1d29a2ce6905d618ff27e Reviewed-by: David Llewellyn-Jones <david.llewellyn-jones@jolla.com> Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Remove invalid method overload which confuses the QML engineChris Adams2020-11-021-20/+0
| | | | | | | Related to QTBUG-87616 Change-Id: I4752364d85fb1057e5778e14ba4576815e6246e3 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove usage of deprecated API from the declarative pluginsChris Adams2020-11-021-5/+7
| | | | | Change-Id: Id2f9f936faf687ed51ab9adfca915711f1e65b9b Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Eradicate Java-style iterators and mark the module free of themMarc Mutz2019-06-181-11/+7
| | | | | | | | Java-style iterators are scheduled for deprecation, or at the very least banned from use in Qt code. Change-Id: I58491db446ecaba2007f7e3fb45a9784635391db Reviewed-by: Christopher Adams <chris.adams@jollamobile.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>
* QtPim: Use the newly-introduced qmlWarning instead of qmlInfoRobin Burchell2017-01-131-1/+1
| | | | | | | | qmlInfo will shortly be returning info-level messages (as the name hints), rather than warning level messages. Change-Id: I19e18b4015d4974366fdbc3c28b9da8e90754f86 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Coalesce signals from QDeclarativeOrganizerModelChris Adams2016-06-151-17/+43
| | | | | | | | | | | | This commit ensures that signal handling and emission within the declarative organizer item model is coalesced, to avoid unnecessary processing, and to avoid accidentally duplicated signal emission. It then fixes the unit tests to enforce this behavior. Change-Id: I011221a832f932360ad965a1b97fb8e309fb0e63 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Renato Araujo Oliveira Filho <renato.filho@canonical.com>
* Populate declarative Item id with the new id after it be created.Renato Araujo Oliveira Filho2016-03-171-0/+22
| | | | | | | | | | We need to update declararive organizer item id with the new id value after creation to make possible to edit or delete it in the future, without need to fetch a new item. Change-Id: I5da7e6fb6a52416b97312a3179f8db3b6d65e3d7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* 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/+5
| | | | | | | | | | | 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>
* Remove unnecessary \inqmlmodule parameterAlejandro Exojo2014-12-081-1/+1
| | | | | Change-Id: Ib9207074048c0368977f5e3db276f1ec8c7d2eaf Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Added list of imported ids as argument for importItems.Renato Araujo Oliveira Filho2014-08-261-9/+19
| | | | | | | The ids can be used to know which items was successful imported/inserted into the model. Change-Id: I3fd66377d53844dfd8ad377304893c7f3413ad1a Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* [OrganizerModel] Don't delete fetchHint we don't ownKonstantin Ritt2014-05-091-3/+4
| | | | | | | Do generally what we're doing for m_filter. Change-Id: I12c54eae27b342b01cd16a6aea714664bde62694 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* [OrganizerModel] Don't track the inactive filterKonstantin Ritt2014-05-091-1/+3
| | | | | Change-Id: If36d05f4c2e729704f8d64cb2f9732dba61e48da Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Do not delete m_filter on the destructorAlbert Astals Cid2014-04-171-2/+0
| | | | | | | | | It is totally unexpected that QDeclarativeOrganizerModel takes ownership of the filter passed in setFilter given that filter will coming from the QML side. Change-Id: Ib0e7453961fdadab40b38acbdda147c462e321db Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QmlOrganizer: delete removed collection safelyMichael Krasnyk2014-04-041-1/+1
| | | | | | Change-Id: Id41e1dad1f26d185cfdef038da7cd2839cd8ae0b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Normalize signal & slot signatures in connectionThiago Macieira2014-02-041-1/+1
| | | | | | | Profiling shows Qt Creator spends 2% of its load time normalizing Change-Id: I46826476f25e7d60a93a0697378dabc442c9e364 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* whitespace fixesOswald Buddenhagen2014-01-191-3/+3
| | | | | | | remove trailing whitespace & expand tabs Change-Id: I7dd5aca1f157d7798227302b315bfb0e9f2e9f77 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Emit dataChanged() on item modificationsMichael Krasnyk2014-01-171-0/+2
| | | | | | Change-Id: I1783128465ec56edf8bd67692beefde23715ad9c Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Check that the request don't get deleted in a slotKonstantin Ritt2014-01-101-7/+7
| | | | | | | | | 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-9/+12
| | | | | | | | | | | 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>
* Move the declarative bindings out of the module namespaceKonstantin Ritt2014-01-061-2/+3
| | | | | | | | | | | | | | This fixes a broken types in QML (the typical error from engine is like "QMetaProperty::read: Unable to handle unregistered datatype 'QDeclarativeOrganizerItemType::ItemType' for property 'QtOrganizer::QDeclarativeOrganizerEvent::itemType") This reverts 75d049f770f86 and magically fixes related issues missed in it. Task-number: QTBUG-35276 Change-Id: I792cf2bb3ff8f5ea7b59438ddf3107009eb2bc63 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix declarative model update for items with a modified orderMichael Krasnyk2013-12-121-0/+14
| | | | | | | | | | | | | Remove an item from the model internal list if it is notified and has changed own position. Otherwise the duplicate item will be inserted and an arbitrary item can be deleted from the list, causing m_items list corruption. Change-Id: I66766ded115d21b64e2f6265215045eae8cc525b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* 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>
* Fix the qml list interfaceMarco Bubke2012-10-231-16/+2
| | | | | | | | | | | | | The qml list interface was changed, so that there is now a read only constructor and the default properties are removed. This is because the original interface was very runtime centric, like other parts in qml. The new interface was changed for the needs of the qml designer and debugger. Task-number: QTBUG-9390 Change-Id: I52e9e946e4986107677a130f4e46e820f000b55e Reviewed-by: Thomas Hartmann <Thomas.Hartmann@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>
* Doc: add landing page for Qt OrganizerLeena Miettinen2012-09-111-1/+2
| | | | | | | | | Move information from other pages. Basic style and language edits. Change-Id: I857296a4bc8c902f82b3b13fcbd249dcdc853e50 Reviewed-by: Martin Smith <martin.smith@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Removed storage location related APIs from QtOrganizer.Xizhi Zhu2012-08-151-76/+11
| | | | | | | | | | | | It's a JSONDB specific feature, and should not be exposed as a public API. TODO: 1) Pass partition as a parameter to the JSONDB plugin. 2) Improve the error handling. Change-Id: I131d4d300110f9e5b80aa8aa933de61d60c796c1 Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>
* Adjust handling of fetch request ids in the organizer modelMikko Suonio2012-08-151-4/+10
| | | | | | | | | | | | | | The backend may complete the request and call onFetchItemsRequestStateChanged() within the call to start(), so the fetch request id needs to be in the hash before start() is called. Also, model should remove the request from the hash when the request is finished. Otherwise, those will stay there and the hash will grow out of bounds. Change-Id: Ib0e3003445d98c659700d1406c8a4c540cd4bb9d Reviewed-by: Iiro Kause <iiro.kause@nokia.com> Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>
* Organizer - Improving Qml documentationikause2012-08-071-18/+15
| | | | | Change-Id: I9fd6ae5e2d35ecaa5bae484c71a42f083aadb5cb Reviewed-by: Xizhi Zhu <xizhi.zhu@gmail.com>
* Doc: Changed \qmlclass to \qmltype and added \instantiatesJerome Pasion2012-07-301-1/+2
| | | | | | | | | -\qmlclass is now \qmltype -\instantiates is for QML types implemented in C++ Change-Id: Ic16ff5d625529fc31680978d2e5f1700b7858345 Reviewed-by: Peter Yard <peter.yard@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* updated OrganizerModel fetchItems methodacox2012-06-051-13/+13
| | | | | | | | | | | Additional comments after review included here -Re-arrange method parameters into more useful default order -Use better cleanup test method which includes recurrences -Include missing plugins.qmltypes Change-Id: I60e050c9eff528818be5b2b1828e352deea2c475 Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com> Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>
* Adding fetchItems to QML Organizer Modelacox2012-06-011-5/+80
| | | | | | | | | | This addition allows the fetchItems in QML to run the equivelant of fetch request outside the OrganizerModel to retrieve specific information that is not in the model. This is asynchronous. It does allow corner use cases to be achieved outside the model. Change-Id: I3885748d503564000f8e16938a017487191741a8 Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
* Use QStringLiteral macro instead of QLatin1String where possible.Cristiano di Flora2012-05-311-17/+17
| | | | | Change-Id: I283e72fa94ac08f2ac40db285b8607f3170b9d5b Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
* Fix the error propagation on OrganizerModel backend creationikause2012-05-251-1/+5
| | | | | | | | | QDeclarativeOrganizerModel was hiding the error if plugin loading fails. Now OrganizerModel users get the information if there is problems on plugin loading. Change-Id: I47f0dc37b3a1ea0f82c2f75eea05fa5b511d7e5b Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>
* Finetune Organizer storage location errorsikause2012-05-231-2/+4
| | | | | | | | | | | | | | | | | StorageLocationsNotExistingError is removed from QOrganizerManager. It is replaced by 2 new error codes: InvalidStorageLocationError - This is returned in cases when non-mandatory but not existing storage location is tried to be accessed. MissingPlatformRequirementsError - This is for cases when organizer cannot operate due missing organizer backend requirements. For jsondb backend such case is that User- partition is not present at all. Change-Id: I8f1aa51dcd21a3a3b3f8e939ba22f18f2180869f Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>
* Add qml module version to \inqmlmodule referencesMikko Suonio2012-05-221-1/+1
| | | | | | | | Unspecified version causes qdoc to assume '1.0' and generate a warning. Change-Id: Ia1c69952c4019cec2f0f9d0f4eab130bf0320fdb Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com> Reviewed-by: Andy Cox <andrew.cox@nokia.com>
* Split OrganizerModel update()ikause2012-05-111-14/+68
| | | | | | | - Separate item and collection updates as separate methods Change-Id: Ic2243ce2f646eaa1eb3aafec5c5c1d8350236acf Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>
* Small improvement to OrganizerModel filter documentationikause2012-05-111-0/+2
| | | | | Change-Id: I368794d22902388200004af1498cb213743f0153 Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-101-1/+1
| | | | | | | | Ensure comma between elements (2 missing), single space and curly- braces around title elements, etc. Change-Id: Ib9f1c733709730b2ddb0b7e9992770278fabe4d3 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Improve OrganizerModel.containsItemsPäivi Rajala2012-04-301-28/+46
| | | | | Change-Id: I9fd1df6bd300e84af526e8d595b7e29d6bf95626 Reviewed-by: pengwu <peng.1.wu@nokia.com>
* Fix for OrganizerModel.containsItems methodPäivi Rajala2012-04-201-3/+2
| | | | | Change-Id: I3f165579c2fbe8e975168ef93f3ec05a4fdfb625 Reviewed-by: Iiro Kause <iiro.kause@nokia.com>
* Improving OrganizerModel versit related documentationikause2012-04-161-0/+35
| | | | | Change-Id: Ide91a63ab1566927c575327196f2ed76d36a9e65 Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>
* Improve the storage location documentation of OrganizerModelikause2012-04-121-10/+11
| | | | | Change-Id: I466b78f562ce67ea968272ed84d415bbf709bee8 Reviewed-by: Andy Cox <andrew.cox@nokia.com>
* Fixing the handling of "date-only" parameters in Organizer QML APIPäivi Rajala2012-04-051-4/+2
| | | | | | | | | | | | | | Setters and getters of some Organizer item detail fields, such as originalDate in Parent detail, have "date-only" parameters. The type of the parameter is JavaScript Date, but since only date part of the Date object was needed, the type of the C++ parameter was QDate. This resulted in implicit conversions from QDateTime to QDate where timezone offsets were not handled correctly. Now type of C++ parameters has been changed to QDateTime in order to allow more control over the conversion between QDateTime and QDate. Change-Id: I9357b0935bf6a041829bcaaa273dcf9bb662d72e Reviewed-by: Iiro Kause <iiro.kause@nokia.com>
* Treats backend version as a normal parameter.Xizhi Zhu2012-04-051-2/+0
| | | | | | | | | | | | | | | | QOrganizerManagerEngineFactory::supportedImplementationVersions() is removed, since QOrganizerManagerEngineFactory::engine() should check the version parameter if any. QOrganizerManager::managerVersion() is not often used by developers, and same information can be parsed from managerParameters(), so marked as obsoleted and to be removed soon. Macro QTORGANIZER_VERSION_NAME is removed, because developers can get the version of QtOrganizer through qtorganizerversion.h. Change-Id: I8d19c74efd6896eff5d38d9f15ef69267c8ddaf2 Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>
* Removal of hardcoded update() -callikause2012-04-041-9/+3
| | | | | | | | | Declarative model should update itself based on notifications coming from backend, not by direct update() calls. Change-Id: I4d6730f4c7a4e2f4a0d761533e76bb5667258445 Reviewed-by: Päivi Rajala <paivi.rajala@nokia.com>