summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Set MODULE_VERSION to 6.0.0HEADdevLuca Weiss2021-04-091-1/+1
| | | | | | | | | | | | | Without this the generated pkg-config files are invalid. Qt6Contacts.pc gets generated but e.g. Qt6Versit.pc references 'Qt0Contacts' as dependency which can't be found. As the libraries are also called libQt6* by the build system, let's set MODULE_VERSION to 6.0.0. Change-Id: I8f0bcb7cbdfef04e9c0a2416085832254342bc3d Reviewed-by: Christopher Adams <chris.adams@jolla.com>
* Set PLUGIN_CLASS_NAME in .pro filesLuca Weiss2021-04-096-0/+6
| | | | | | | | | | This resolves the erronous generation of Qt5Contacts_.cmake, Qt5Organizer_.cmake & Qt5Versit_.cmake by setting proper names to the plugins. Change-Id: I094ce93b53fc2e56b45bf5edf05d6da17ed435e3 Reviewed-by: Christopher Adams <chris.adams@jolla.com> Reviewed-by: Marius Gripsgard <marius@ubports.com>
* Enforce detail access constraints in contact operations by defaultChris Adams2021-03-184-16/+79
| | | | | | | | | | | | | | | | Previously, Irremovable constraints were enforced but ReadOnly constraints were not, for in-memory contact detail operations. While it is simple to work around any constraints simply by recreating an identical contact (including id) in-memory, and then saving the modified detail into that contact, we should enforce the constraints consistently, and provide API to allow the user to ignore the constraints for the in-memory operations if they desire (thus leaving enforcement up to the backend). Change-Id: I75909b743a150c0786d9b7f0080817de0166c353 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Accessors should be constChris Adams2021-03-1814-28/+28
| | | | | Change-Id: I5316640c5645eddc4078898a67f54dd984ffd29a Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Provide interface for accessing all extended metadata from collectionsChris Adams2021-03-186-0/+22
| | | | | | Task-number: QTBUG-75550 Change-Id: Ic07dccd5aa46174a235f24cc5c7fc60c8039348f Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Add label group field to display label detailChris Adams2021-03-183-7/+45
| | | | | | | | | | | | | Modern UIs often display contacts in sections grouped by the first letter of their first (or last, depending on platform and locale preferences) name. This commit adds a label group field to the display label detail which allows a locale-specific label group to be stored for each contact and exposed to clients. Change-Id: I40f20fd7e8861e74618c5d0a76fc3c2b8119dfc0 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Ensure we throw away the BOM in the qversitreader testChris Adams2021-03-181-1/+1
| | | | | | | | | | | | | | | The BOM will only be emitted from the very first call to encoder->fromUnicode(), and thus since we compare the output from one invocation to the output of another, we need to ensure that the BOM is not included in the result of either. However, previously we attempted to do this by passing a null QString into fromUnicode(), however it seems that now it ignores such input. Hence, we need to give it some dummy input in the first call to fromUnicode() to force it to "spend" its BOM output. Change-Id: I74d8bd53604044ba1e82d48668d9570505fef491 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Fix some deprecated QChar constructor issues in unit testsChris Adams2021-03-181-2/+4
| | | | | Change-Id: Iac3c14fa14e930370f5e2ffeebb58b91d8fa2dda Reviewed-by: Bea Lam <bea.lam@jollamobile.com>
* Remove usages of deprecated QQmlListProperty constructorsChris Adams2021-03-1815-162/+142
| | | | | | Change-Id: I2cc20b69fb5e7bc491f1d29a2ce6905d618ff27e Reviewed-by: David Llewellyn-Jones <david.llewellyn-jones@jolla.com> Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Bump sha1s in dependencies.yamlChris Adams2021-03-181-2/+5
| | | | | | Change-Id: I3a424fda0851cdd6cf08b3fe5a7917576f187f07 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christopher Adams <chris.adams@jolla.com>
* Turn use of old QHash::insertMulti() into uses of QMultiHash::insert()Edward Welbourne2021-02-010-0/+0
| | | | | | Change-Id: I4c999cc1cc13443cdf013e0a58cdd84c110a15af Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add dependencies.yaml for CIChris Adams2020-11-021-0/+7
| | | | | Change-Id: Iee6e342427502dba98254eb05847720ea40a27a3 Reviewed-by: Christopher Adams <chris.adams@jolla.com>
* Make the tests pass on big endian systemsDmitry Shachnev2020-11-022-0/+4
| | | | | | | | Make sure the generated item IDs are the same as on little endian systems, e.g. 05000000 and not 00000005. Change-Id: Iafa16f616a4ef56905e177e2509e1e02c3de0e9c Reviewed-by: Christopher Adams <chris.adams@jolla.com>
* Fix calendardemo exampleChris Adams2020-11-022-5/+5
| | | | | Change-Id: I335707590afec9b39e7813c7a6acc2499fce22dd Reviewed-by: Christopher Adams <chris.adams@jolla.com>
* Mark virtual methods with override keywordChris Adams2020-11-0233-131/+131
| | | | | Change-Id: I2adb66316d6d1943d591d2538ea2b7f93280118c Reviewed-by: Bea Lam <bea.lam@jollamobile.com>
* Update qHash methods to return size_t instead of uintChris Adams2020-11-0233-57/+57
| | | | | Change-Id: Ic2166212908b7f2e2033e80fbe9e9ce1633d164e Reviewed-by: Bea Lam <bea.lam@jollamobile.com>
* Don't use QStringRefChris Adams2020-11-021-2/+2
| | | | | | | | Use QStringView instead in Qt6 Change-Id: I6e5f80542aceb1084634ec8bd7e4e674f161bdc9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Remove unused method in unit testChris Adams2020-11-021-5/+0
| | | | | Change-Id: If709fe88c4669af3e119855a686fb18b0ea0459f Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Use QMetaType::Type instead of the deprecated QVariant::TypeChris Adams2020-11-0224-124/+125
| | | | | Change-Id: I8b4ee32e36ea024392f85d5cf1b7b03a84a56e7b Reviewed-by: Bea Lam <bea.lam@jollamobile.com>
* Specify enum flag type properly in unit testChris Adams2020-11-021-1/+1
| | | | | Change-Id: I6b52e7691fa266b316f14840ba648a52e0e50741 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Adapt to string-to-datetime conversion behavior change in Qt6Chris Adams2020-11-021-18/+18
| | | | | | | | Qt6 now correctly takes into account the timezone specification, whereas Qt5 did not. See QTBUG-87652 for more information. Change-Id: I36f1193faf0ffed3310c0436967c4e287e1d9a9c Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Work around JS Date constructor limitation in Qt6Chris Adams2020-11-024-25/+25
| | | | | | | See QTBUG-87610 Change-Id: Ib5ee1199c46f2c92cd736f14b58b53f587d1813b Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Adapt to Qt6 behavior changesChris Adams2020-11-029-50/+67
| | | | | | | | | | | | | | - QVariant comparison now doesn't perform type conversion - Null QDateTime now compares less than other QDateTime values, rather than being equal to epoch. - Sequence type name is printed by default in warnings - QMultiHash::operator==() can return false for empty hashes in some cases (QTBUG-87575) - QJsonValue will expose input like "2.0" as an integral type as the value can be perfectly expressed as an integral (QTBUG-87443) Change-Id: I848888ecc74b5fb790488181a0d62a04138fcd81 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove invalid method overload which confuses the QML engineChris Adams2020-11-022-21/+0
| | | | | | | Related to QTBUG-87616 Change-Id: I4752364d85fb1057e5778e14ba4576815e6246e3 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Adjust unit test to account for QList index from int to qsizetype changeChris Adams2020-11-021-1/+1
| | | | | Change-Id: Ibf2984c572674639ef2f91678640f10ec540b8c9 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Fix construction of QVariant for datatypeChris Adams2020-11-022-2/+2
| | | | | Change-Id: I134e3ecfd3ccae880212e420cf3099b306234af7 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* More QDateTime(QDate) -> QDate::startOfDay() fixesChris Adams2020-11-024-6/+6
| | | | | Change-Id: I39585d6de01e0850f21277e2d952167cc0cc78dc Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove use of deprecated QTypeInfo traitsChris Adams2020-11-0211-51/+6
| | | | | | | Also adjust expected size of types due to changes in Qt6 Change-Id: I98e5c6c7710637fe5c239743f102f9951ac66914 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove usage of deprecated API from the declarative pluginsChris Adams2020-11-028-22/+33
| | | | | Change-Id: Id2f9f936faf687ed51ab9adfca915711f1e65b9b Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Add missing includeChris Adams2020-11-023-0/+3
| | | | | Change-Id: I1edc88c2768921373e2c0b30737996a9946338e9 Reviewed-by: Christopher Adams <chris.adams@jolla.com>
* Remove usage of deprecated QtAlgorithmsChris Adams2020-11-025-8/+13
| | | | | Change-Id: Ia64e2e81cc070932137d7183503d390b90c78b49 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Fix QList-from-QSet conversionsChris Adams2020-11-0211-33/+37
| | | | | Change-Id: I93a8500e4555bb33760f4bd73be8d0af0f1422f4 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove usage of deprecated QLatin1LiteralChris Adams2020-11-021-1/+1
| | | | | | Change-Id: I55f270d2fcdaf48aea6e058553c19db517abe2a8 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
* Use QRegularExpression instead of the deprecated QRegExpChris Adams2020-11-021-1/+2
| | | | | Change-Id: Ic1d40b3e57038ecdc0ad14abc47120c6bfaa15ce Reviewed-by: Christopher Adams <chris.adams@jolla.com>
* QTextCodec is now part of the Qt5Compat libraryChris Adams2020-11-0218-47/+69
| | | | | | Change-Id: I9d6a6d46822d4f82debb1446a90443857f27c962 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
* Remove use of deprecated QString methodsChris Adams2020-11-022-5/+5
| | | | | | Change-Id: I05ba170c38ef8e4b109f1c36e12a7a5f7cba1d6f Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
* Use QMultiHash where appropriateChris Adams2020-11-026-12/+12
| | | | | | Change-Id: I58e75ba3463415b7642a25345715609516e93aa1 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
* Add missing break in switchLuca Weiss2020-11-021-0/+1
| | | | | | | Change-Id: Iac53dd6368a06a825cdf46829f33ee52d1d7cdff Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Christopher Adams <chris.adams@jolla.com> Reviewed-by: Marius Gripsgard <marius@ubports.com>
* Deprecation fix: conversions between QList and QSetEdward Welbourne2020-11-0211-36/+40
| | | | | | | | | | Replace QSet's toList() with values() and QList::toSet() with suitable QSet construction from begin()/end(). Change-Id: Ibb815ff5043640aad1cb1feeb6391824db5d108f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
* Use non-static data member initialization for default constructorEdward Welbourne2020-11-021-11/+4
| | | | | | | | | | The flags parameters were exercising the deprecated construction from int; simply leaving them defualt-constructed does what that intends. Two other member initializations could be set with NSDMI, so do that. Change-Id: I60a825999e82af712cda9e45f63c783aaef8df2f Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Christopher Adams <chris.adams@jolla.com>
* Prefer QDate::startOfDay() over QDateTime(const QDate &)Edward Welbourne2020-11-0211-157/+156
| | | | | | | | | The latter is deprecated, the former does something sensible. Also use startOfDay() and endOfDay() rather than QTime(0, 0) or QTime(23, 59, 59). Change-Id: Id1bc510833bfd2274e9945ab24c16ae07f3bd14e Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Christopher Adams <chris.adams@jolla.com>
* Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-11-024-13/+13
| | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. De-UKified spelling of "behavior" in the process. Change-Id: I13b4fdc82fdee779b2e4d03ce287b749dadd1b71 Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Add ; to Q_UNUSEDLars Schmertmann2020-11-0229-198/+198
| | | | | | | | | 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>
* QVersitContactImporter: read X-FOLKS-FAVOURITE propertyAlberto Mardegan2020-11-027-10/+73
| | | | | | | | Make the importer understand the X-FOLKS-FAVOURITE property, set by the libfolks library used in GNOME. Change-Id: I819a1c3da35972c556e3628f29a20dba15ed6448 Reviewed-by: Christopher Adams <chris.adams@jolla.com>
* Eradicate Java-style iterators and mark the module free of themMarc Mutz2019-06-187-38/+25
| | | | | | | | 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>
* Enable parsing of VCARDs with mixed line endingsTempura San2019-02-273-79/+109
| | | | | | | | | | | | | | VCARDs should use the CRLF line ending. Some parties may nonetheless deliver mixed line endings in a single VCARD. The QVersitReader should be able to parse these non-standard VCARDs as well as the content is still valid. Change-Id: Ia8ba810d96d59aeab2dd49a1c37989082cb54993 Reviewed-by: Tempura San <tempura.san@gmail.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Don't build QtPIM for WebAssembly platformChris Adams2019-02-221-0/+1
| | | | | | | wasm doesn't support QtSql etc Change-Id: Ib30c6b1c17fe5213851b31a1254b56d86d3f4301 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Improve handling of malformed Versit documentsChris Adams2018-11-292-2/+110
| | | | | | | | | | | The previous fix only handled cases where the empty lines were interior to an outer document. This commit adds handling for leading empty lines, and whitespace-only lines within nested documents. Change-Id: If0f99442c315509a0df95279b299150d7339bc07 Reviewed-by: Tempura San <tempura.san@gmail.com> Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Work around malformed Versit documents with empty interior linesChris Adams2018-11-082-0/+22
| | | | | | | | | | If a Versit document is encountered which has empty lines in between two property definitions, we should ignore the empty lines and continue parsing the document. Change-Id: Ic1165f056dd040d26d3b40e26a47c16f8e173e3f Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Fix bug in QRegularExpression usageChris Adams2018-10-261-1/+1
| | | | | | | | | | | The separator pattern can be different depending on the format of the data given as input to the method, so the regexp cannot be instantiated as a method static variable. Change-Id: I0346956316795ed22246a8cb6ce24f5d1337bf51 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>