summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Rename "Porting" pages to "Changes"Jerome Pasion2020-11-092-3/+3
| | | | | | | | | | | | | | The content in the porting guides are closer to a changelog than a porting guide. At this point, it is easier for maintainers and contributors to write in a changelog than a guide. This change should help with readability and is closer to the usage of "Changes" in documentation. Part of a rename in other submodules. Task-number: QTBUG-87156 Change-Id: Ib59de7976fae19e7b39962e80161df6628e4070b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: mention that disconnecting all signals can be dangerousMitch Curtis2020-11-091-0/+34
| | | | | | | | Task-number: QTBUG-83387 Change-Id: I55c0a267e5490ba0226fd6858c18fd88cc3b8d59 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Fix mentioning of Qt5Core in overview pageKai Koehne2020-11-041-1/+1
| | | | | Change-Id: If6ae12117c95a6c843dfd93735590e17b8d2d2a3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Update the porting guide for QFutureSona Kurazyan2020-11-021-4/+40
| | | | | | | | | | Document the source compatibility breaks introduced by the recent changes (ff0ba7e2d7b91fd5809cb314935a1ca1a436f6c9 and 30a1683f65fa0d01eceb7e1293abc84108d76e7f) in the porting guide. Task-number: QTBUG-87096 Change-Id: I5b725c863b1077d59074d4bd17a4456e3d87918c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Prefer versioned CMake library targetsv6.0.0-beta3Kai Koehne2020-11-011-1/+1
| | | | | | | | The non-versioned one's do miss some properties. It's therefore best to not advocate using them. Change-Id: I53645e65ed4de4e0100e59905c024cdfe40be0c5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move porting guide for QtConcurrent to its designated pageSona Kurazyan2020-10-291-71/+38
| | | | | | | | | Also move the porting section for QFuture and related classes after the section for view classes, to make the order more natural for reading. Change-Id: I5ea816d7bb3dfdda2b74112418bf07954c9ec94c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Fix link issues for QtCoreTopi Reinio2020-10-293-16/+7
| | | | | | | | | - Fix linking to CMake manual. - Remove references to the state machine framework. Task-number: QTBUG-86295 Change-Id: I01a61088da8eb36760949f39be5e71d92de956f2 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix code snippet that abruptly ends the documentTopi Reinio2020-10-291-3/+3
| | | | | | | | | | Having the string '*/' appear in a quoted snippet ends the entire documentation comment. Use a parameter to the \code command to work around that. Task-number: QTBUG-86295 Change-Id: Ifcb21a4a0958724ebdb1c9e0eafdc767020d3a7b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove documentation for removed qHash overloadVolker Hilsheimer2020-10-291-4/+0
| | | | | | | | QPair is an alias to std::pair in Qt 6, so no need for two qHash functions. Also remove note and snippet from std::pair overload documentation. Change-Id: Ica8f6961af1eac493e909ad06fe46f8f68542bc5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Scrub QByteArray/QByteArrayView documentationKarsten Heimrich2020-10-291-7/+7
| | | | | | Fixes: QTBUG-86555 Change-Id: I3221e0de10e692ca767eeb69daa82da55b93e395 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add QVariant/meta-type system migration guideFabian Kosmale2020-10-281-0/+47
| | | | | | | Fixes: QTBUG-87100 Change-Id: Ib87b8d566f11bf226345101f665c675489a06d6a Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix QList snippets to use qsizetype instead of intAndrei Golubev2020-10-281-3/+3
| | | | | | Task-number: QTBUG-86553 Change-Id: I37e9607e014deaeebfa9fddf2e49a04ee2194cce Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix copy and past error, add minor doc updateKarsten Heimrich2020-10-271-4/+6
| | | | | | Change-Id: I50d58086bf20d96993ab7c5e4790f07bbfdb8089 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Doc: Add notes on how to use View classes in Qt6Karsten Heimrich2020-10-271-0/+130
| | | | | | | Task-number: QTBUG-87168 Change-Id: I631937ebaf7cfa3ed54c6c8a3641693fda910b36 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Store std::exception_ptr in QUnhandledExceptionSona Kurazyan2020-10-261-0/+16
| | | | | | | | | | | | | | | | For historical reasons Qt Concurrent reports QUnhandledException in case if an exception that is not derived from QException is thrown from a worker thread. Changing this behavior may not be a good idea, since the existing user code may rely on it. Changed QUnhandledException to wrap the std::exception_ptr to the actual exception, so that the users can obtain the information about the thrown exception if needed. [ChangeLog][QtCore][QUnhandledException] Improved QUnhandledException to store the std::exception_ptr to the actual exception thrown from a QtCocnurrent worker thread. Change-Id: I30e7c1d3e01aff6e1ed9938c421da0a888f12066 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make STL iterators the preferred styleOle-Morten Duesund2020-10-252-178/+212
| | | | | | | | | | | Emphasize STL iterators over Java style iterators. Details about Java style iterators moved to it's own page and only briefly mentioned on the containers page. Task-number: QTBUG-86584 Change-Id: Id54863f79f90214aaae87e60cee1a66f53a044ab Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* doc: fix description in doc_src_containers.cppHiweed Mandriva2020-10-251-1/+1
| | | | | | Change-Id: Iade0a8ea7fc51df1ee624c4059f93d470abb9b08 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: <hiweedmandriva@163.com>
* Doc: Add porting Guide for QRegExpKarsten Heimrich2020-10-231-0/+251
| | | | | | Fixes: QTBUG-87101 Change-Id: I370c79e295489f4eaf8418bbd53b326f0a8e5123 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Deprecate QVariant::TypeLars Knoll2020-10-231-1/+1
| | | | | | | | | It's been obsolete for a long time already. Make sure the compiler now warns about it and remove all remaining uses in qtbase. Change-Id: I0ff80311184dba52d2ba5f4e2fabe0d47fdc59d7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>