summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc
Commit message (Collapse)AuthorAgeFilesLines
* Add documentation how to formulate a property bindingAndreas Buhr2021-03-261-0/+38
| | | | | | | | | | | To correctly formulate a property binding, some rules must be followed. So far, these rules are not documented. This patch adds such documentation. Task-number: QTBUG-90511 Change-Id: Ibb509ea9098212c95f03433feb1f1aac751c4b2e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Beautify bindable properties documentationAndreas Buhr2021-03-261-13/+14
| | | | | | | | Some minor formatting changes Change-Id: I336a442d01cb048397b2a65977cfb96bb7179752 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add example to QObjectBindableProperty change handler docsAndreas Buhr2021-03-251-0/+41
| | | | | | | | | QObjectBindableProperty has a callback, which is called whenever the value changes. This patch adds an example showing this. Task-number: QTBUG-90511 Change-Id: I56c0bce15af8121159630b5c0922c287c15b7618 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add documentation on how to write a value to a bindable propertyAndreas Buhr2021-03-181-0/+52
| | | | | | | | | | Writing a value to a bindable property is a surprisingly dangerous operation. This patch adds a section to the documentation describing the pitfalls which exist when writing bindable properties. Task-number: QTBUG-90511 Change-Id: I73fea40756a1495d272bc46a7a51776ebcb07ea7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* The conditional statement is missing parenthesesZhang Yong2021-03-111-1/+1
| | | | | | | Add a ')' to the judgment statement. Change-Id: Iadfdfb7643bc5224cb3029a2abb42c3c14982eef Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QtGlobal docs: code tidiesZhang Yong2021-03-101-4/+2
| | | | | | | Reformat a couple of examples correctly. Change-Id: I2f0897267b4e3c4d7d2925f2d20cc45687278b0b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Doc: Fix section titles that confuse QDoc's autolinkerPaul Wicking2021-03-051-9/+9
| | | | | | | Fixes: QTBUG-91620 Pick-to: 6.1 6.0 Change-Id: I7c407c7158324d1fbbeb78e47d2198e8ddf5daa0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Document requirements for getters and setters of bindable propertiesAndreas Buhr2021-02-251-0/+30
| | | | | | | | | | | | | Getters and setters of bindable properties have to be carefully written to avoid several problems. This patch adds documentation for this. Task-number: QTBUG-89505 Task-number: QTBUG-90511 Change-Id: Ib25590b3d8d95c490d9555c0f258f48cb6cfe4a9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Improve docs for QFuture::then() with contextSona Kurazyan2021-02-251-0/+11
| | | | | | | | | | | | | Be more precise about attaching a continuation with the default (QtFuture::Launch::Sync) launch policy after a continuation with context. Pick-to: 6.1 Change-Id: I5b80063df2443e5742033864ba012bf34ed4cdf7 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* qt6_finalize_executable(): Enable finalizers to be set per-targetCraig Scott2021-02-241-8/+12
| | | | | | | | | | | | | | | | | | | | | Some plugins need to append additional processing to targets that use them. This is most commonly needed for static builds to identify additional plugins that need to be linked, but which cannot be determined automatically by CMake as part of its transitive dependency handling. Check for finalizers on directly linked targets as a way to help automate common scenarios. Because we need to lookup dependency targets and these may have visibility limited to the depender target's scope, we now formally document that finalizers should be called from the same scope as the one in which the target was created. This was loosely expected before, but is now made explicit. Task-number: QTBUG-90819 Task-number: QTBUG-86669 Pick-to: 6.1 Change-Id: I065a3f3a4ab6eeff6a98a655835427949e2fe0f1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix minor documentation typos in bindable propertiesJuha Vuolle2021-02-151-1/+1
| | | | | | Change-Id: I4f8474820db613a675950a858438337558f1c88f Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Revert "Remove the qmake project files" for snippetsNico Vertriest2021-02-123-0/+12
| | | | | | | | | | | This reverts a limited part of commit ad2da2d27a590333fc89a56fc58700a09c3017b3 that deleted .pro files for snippets compilation. Some .pro files which contain snippets used in the documentation itself should be restored. Task-number: QTBUG-90483 Change-Id: I1b03833c8ff17b5fca43a5b6c5417e8545b1711b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* CMake: fix typo in qt_finalize_executable snippetAssam Boudjelthia2021-02-101-1/+1
| | | | | | | Task-number: QTBUG-90943 Pick-to: 6.1 6.0 Change-Id: Idea90f1a5fdd2070102ebda85feed79abcba3f70 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Documentation improvements to JNI APIAssam Boudjelthia2021-02-092-15/+33
| | | | | | | | | | | Amends 4e60681c879a54cf5b34862a30e27c492ed36363. Fixes: QTBUG-89632 Pick-to: 6.1 Change-Id: I7856e9b63eea5ba68a5472575016540ae656ec5f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Create bindable property overview documentationAndreas Buhr2021-01-281-0/+102
| | | | | | | | | | | So far, all documentation about bindable properties was in the corresponding classes QProperty and QObjectBindableProperty. This patch creates one documentation page for a general introduction to bindable properties and information concerning all of those classes. Change-Id: Ib718dbeb385c3899fb34cc2ce03bec7a8d43a034 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make QJniObject and QJniEnvironment public APIAssam Boudjelthia2021-01-271-0/+133
| | | | | | | | | | | | | | | | | | | | As part of Qt 6 restructring for the extras modules, this change exposes the Jni APIs which are very important for Android platform. This patch adds the APIs QJniObject, QJniEnvironment, QJniExceptionCleaner based from private QtCore and QtAndroidExtras. The Jni interface is cross-platform which justifies the name, but currently, this API is used mainly for Android, and the naming comes generic without Android keyword to avoid any future limitation on supporting other platforms. [ChangeLog][QtCore] Add new QJniObject, QJniEnvironment and QJniExceptionCleaner APIs. Task-number: QTBUG-89482 Fixes: QTBUG-89633 Change-Id: I4382dd53a225375759b9d042f6035a4a9810572b Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* QBindable: add initial documentationFabian Kosmale2021-01-271-0/+12
| | | | | | Change-Id: I43681093c8819289037c76bd9c05b88a6da8311b Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update QMutexLocker documentationLars Knoll2021-01-262-1/+10
| | | | | | | | | And add an entry about the API changes to qt6-changed.qdoc. Pick-to: 6.0 Task-number: QTBUG-89429 Change-Id: I146574acd3e4aa5ed6f1629fc68888f009472f19 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Document the qt_no_entrypoint target propertyJoerg Bornemann2021-01-152-0/+19
| | | | | | Fixes: QTBUG-90031 Change-Id: Ib3e7e9d966ee64f97fdd3df48b3fa5325d19cc6c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Generalize timer docsKai Köhne2021-01-111-3/+3
| | | | | | | | The snippets do not talk about Qt Widgets specifically. Pick-to: 6.0 5.15 Change-Id: Icc4f243c93189f08124074e4918d535aa37e6560 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Add partial documentation for CMake API (tech preview)Craig Scott2021-01-114-1/+601
| | | | | | | | | | | | | | There are still other parts of the CMake API that are not yet documented. This change only addresses qt_add_executable() and the Android-related commands it uses. Fixes: QTBUG-88839 Task-number: QTBUG-84482 Pick-to: 6.0 Change-Id: I761b5ce908d1f62284baabe2d414cd37a0efe83d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-077-32/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* QRegularExpression: mention raw string literal in the docsAhmad Samir2020-12-281-0/+10
| | | | | | | | | | | | | | Raw string literals (since C++11 according to [1]), make writing/reading regex patterns easier, since one can just use e.g. "\w\d" without having to escape those backslashes e.g. "\\w\\d"; this is especially useful with longer/more complex regex patterns. [1] https://en.cppreference.com/w/cpp/language/string_literal Pick-to: 5.15 6.0 Change-Id: I119f9566d27222b915af931ee7e13e064baede61 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Bindable property with initializationIvan Solovev2020-12-171-0/+39
| | | | | | | | | | Implement Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS and Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS macros. They allow to directly initialize the property member. Task-number: QTBUG-85520 Change-Id: I76541d6785bbbf27976b9f0b865fb45be1e9beee Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add sections about std containers and algorithmsOle-Morten Duesund2020-12-172-0/+72
| | | | | | | | | | | Add section comparing Qt containers and std containers. Add snippets showing use of std algorithms with Qt containers. Task-number: QTBUG-86584 Pick-to: 6.0 Change-Id: I1133a5214a5acd086c37658ca11ab205a19a489b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QString: update documentationIvan Solovev2020-12-151-3/+3
| | | | | | | | | | | | | | The QString documentation is aligned with QList regarding common wording and ideas: - Extend general class description - Revise description of several methods - Fix examples to use qsizetype instead of int - Wrap descriptions at 80 characters Pick-to: 6.0 Task-number: QTBUG-87962 Change-Id: I7d5a7e829ce8b98a0a1a7fae6b7ae0dec4effbae Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Move QObjectBindableProperty documentation into snippet fileFabian Kosmale2020-12-151-0/+70
| | | | | | | | | | | The \Q_OBJECT macro has been removed but using Q_OBJECT in the file would erroneously trigger automoc. Avoid the issue by moving the snippet into its own file. Task-number: QTBUG-89505 Pick-to: 6.0 Change-Id: I6630ff4bfcbf33eae348ac3d92aae1878dc573ea Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add support of invoking QFuture continuations in a given contextSona Kurazyan2020-12-111-0/+31
| | | | | | | | | | | | Added overloads of .then()/.onFailed()/.onCanceled() which take a pointer of a context object, and invoke the continuations in the object's thread. Task-number: QTBUG-86794 Change-Id: I0f3cbb0500695673fc4087af5d4b96b416e3e1ce Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* QByteArray: update documentationIvan Solovev2020-12-051-13/+0
| | | | | | | | | | | | | The QByteArray documentation is extended to align with QList and QString regarding common wording and ideas: - Extend general class description - Revise description of several methods - Wrap descriptions at 80 characters Pick-to: 6.0 Task-number: QTBUG-87962 Change-Id: Ie9e8ef47a85d0867c2fa63889a60cafbe76ee47a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix broken link to Zstandard libraryAndreas Buhr2020-12-041-1/+1
| | | | | | | | | | | | The old link zstd.net is not working any more. Zstandard is now at http://facebook.github.io/zstd/. To ease maintenance in the future, those links now point to "Zstandard Site" which is maintained in external-resources.qdoc. Task-number: QTBUG-88533 Pick-to: 6.0 Change-Id: Ic8f067fd5d7ce1a088d0272797fca98fd506a26e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix link to qHash documentationVolker Hilsheimer2020-12-011-1/+1
| | | | | Change-Id: Idd72530464aae24fd0e5c144d0de663609632f68 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix qdoc warning about unknown commandsAndreas Buhr2020-12-011-3/+3
| | | | | | | | | | | Qdoc generated warnings like the following: qt6-changes.qdoc:771: (qdoc) warning: Unknown command '\w' This patch correctly escapes backslashes to fix these warnings. Task-number: QTBUG-88533 Pick-to: 6.0 Change-Id: I7849f49fd0e950c3c366cfa88b299f827b39c05a Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Discourage the foreach keywordOle-Morten Duesund2020-12-012-63/+110
| | | | | | | | | | Stop endorsing the foreach keyword, suggest C++11 range-based loops instead. Task-number: QTBUG-86584 Pick-to: 6.0 Change-Id: Icaf537aded6557b7864d731217e967ac56a84928 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Extend container overview documentation, mention Q_DECLARE_TYPEINFOAndreas Buhr2020-11-301-0/+23
| | | | | | | | | | | | The container overview documentation did not mention Q_DECLARE_TYPEINFO and the related optimizations. This patch adds a short paragraph about it. Task-number: QTBUG-86584 Pick-to: 6.0 Change-Id: I5b0b8ce92a47da5f0398cc413fbf3e07b0921e59 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Doc: Document BINDABLE attribute for Q_PROPERTY macroTopi Reinio2020-11-302-0/+7
| | | | | | | | Pick-to: 6.0 Fixes: QTBUG-87036 Change-Id: Ia6067d887b9b697dbcb8e02bce5a560a8ac5eaf3 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QHash: support std::hash as hashing functionGiuseppe D'Angelo2020-11-301-0/+10
| | | | | | | | | | | | | | | | | | | | In addition (and as a fallback) from requiring qHash, add support for std::hash specializations. This catches two birds with one stone: 1) users of Qt can simply specialize std::hash for their datatypes, and use them in both QHash and stdlib unordered associative containers; 2) we get QHash support for any (stdlib) datatype that is hashable without having to overload qHash for them. [ChangeLog][QtCore][QHash] QHash, QMultiHash and QSet now support for key types anything that can be hashed via std::hash, instead of always requiring a qHash() overload. Change-Id: Ib5ecba86e4b376d318389500bd24883ac6534c5f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPEAndreas Buhr2020-11-301-1/+1
| | | | | | | | | | | | | | Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in QtBase. As the two are synonymous, this patch should have no impact on users. Pick-to: 6.0 Change-Id: Ie653984363198c1aeb1f70f8e0fa189aae38eb5c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Doc: Use explicit linkage with target_link_librariesKai Koehne2020-11-301-1/+1
| | | | | | | | | | | | | | The Professional CMake book suggests always using explicit linkage with target_link_libraries, so let's use that. Whether to use PUBLIC or PRIVATE depends on the context. But let's be conservative and advise on using PRIVATE by default. Task-number: QTBUG-88935 Pick-to: 6.0 Change-Id: I12b80ee85be9f6916f1e4dea6b1c9cb29e03c20f Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Clean up QCollator's documentation and tell fewer liesEdward Welbourne2020-11-271-0/+58
| | | | | | | | | | | | | | | | | | | | Its collation strategy can't be passed to the constructor, so describing it as initialized with a strategy was misleading. The "Linux without ICU" disclaimer was poorly phrased and only mentioned on one of the options; it actually applies to all. The operator() was marked internal, but the class doc's claim that QCollator can be used with std::sort() relies on it being callable. Moved option descriptions to the getters and filled in the missing ones. Mention the default in all cases. Added a minimal illustration of how to use a QCollator. Fixes: QTBUG-72233 Change-Id: Ifa846eca05e8e42aaa08c4947a59a82d8a8a79bc Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Improve *_CAST_FROM_ASCII documentationKai Koehne2020-11-271-6/+0
| | | | | | Pick-to: 5.15 6.0 Change-Id: Iba73c0a38e2c4add740aab20036aa39c56eb4d98 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix broken \endcode marker in Qt 6 porting docsFlorian Bruhin2020-11-271-1/+1
| | | | | | | Change-Id: I8dfd72f6a00a6c91a38bb201b14524b0bc7cf100 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit e723f0aceb7de3b52fb40de3ef1fe0259fce47a8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove deprecated algorithms from documentationMarcel Krems2020-11-261-300/+3
| | | | | Change-Id: Ie1eff48696c62ed23fedda1a9e711aeb8264432f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Remove some examples from highlighted listVolker Hilsheimer2020-11-251-3/+0
| | | | | | | | | | The Local Fortune examples and the JSON Save Game don't need to be highlighted in Qt Creator. Pick-to: 6.0 6.0.0 Change-Id: I7c7c9997e9a1cfb61f94309f16be65c810b42e14 Reviewed-by: Tuukka Turunen <tuukka.turunen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Document removal of QEvent copyingVolker Hilsheimer2020-11-251-0/+39
| | | | | | Pick-to: 6.0 6.0.0 Change-Id: Ia4681fe5c5ae0953ba75f4ab24da4eec7461c719 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update container overview documentation - section on growth strategiesAndreas Buhr2020-11-241-30/+14
| | | | | | | | | | | | The Qt container overview documentation contained outdated information on container growth strategies. This patch updates the documentation to reflect the current implementation. Task-number: QTBUG-86584 Pick-to: 6.0 Change-Id: I8fd014138f9a2e73925dafaa270d4c98ab672d96 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Do not advise using AUTORCC anymoreKai Koehne2020-11-231-3/+0
| | | | | | | Task-number: QTBUG-87643 Pick-to: 6.0 6.0.0 Change-Id: Ib07586cc4206312044c0f0c154fa2ab2aada2c19 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Update CMake functions in Qt Core for Qt 6Kai Koehne2020-11-237-494/+115
| | | | | | Pick-to: 6.0 6.0.0 Change-Id: Ica6141f183c75f60e5b1031c0972f79de7821841 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update landing pages and module pages in qtbaseJerome Pasion2020-11-172-3/+4
| | | | | | | | | | -Qt SQL, Qt D-BUS, Qt GUI, Qt OpenGL, Qt Widgets, Qt Test, Qt Concurrent, Qt XML, Qt Network, Qt Core -language edits for consistency, add links Task-number: QTBUG-87155 Change-Id: Ic61350c9fa15090c802a42d8e9116219591eba73 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Update/scrub QString documentationKarsten Heimrich2020-11-112-13/+13
| | | | | | | Fixes: QTBUG-86554 Change-Id: I3d40295115207c430ec30bbac6fb241bf897e5fa Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Do not shrink on remove()Lars Knoll2020-11-091-4/+3
| | | | | | | | | | This is in line with Qt 5 behavior, how std::vector works and also how QString and QByteArray behave. If you need the shrink allocated storage, call squeeze() manually. Change-Id: I16cadd4f2a89bb2ec5de02fe69186f5da321cd06 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>