summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc
Commit message (Collapse)AuthorAgeFilesLines
* Rename QPermission namespace to QApplicationPermissionAssam Boudjelthia9 days1-16/+16
| | | | | | | | Pick-to: 6.2 Task-number: QTBUG-94407 Change-Id: Ie9c05dbe498cd372c015b5125e6cb8d59ca96b59 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QObject: optimize the common case of findChildren(QString())Marc Mutz10 days1-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Outside tests, all in-tree callers of QObject::findChildren() pass no name to match, and in my experience that is also true for the vast majority of out-of-tree users. Avoid the temporary QString creation in the caller and the repeated QString::isNull() checks in the implementation by overloading findChildren() without a name argument and checking for name.isNull() only once, forking off into separate helper functions. Adjust in-tree callers that used an explicit `QString()` argument in order to pass options, which goes to show that `name` should never have been the first argument of findChilden() in the first place, even though I appreciate the symmetry with findChild() (the use-cases of which, however, are radically different). Change a `findChildren().size() == 0` call found while scanning for findChildren() calls to `!findChild()` as a drive-by. Modernize loops in the various qt_qFindChild{,ren}_helper() overloads to match how the new code looks. [ChangeLog][QtCore][QObject] Added findChildren() overload taking no name (thus optimizing this common case). Change-Id: Ifc56e5438023d079b40c67f11ae274a3e128ad5e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix QStringEncoder code exampleNicolas Fella2021-07-061-1/+1
| | | | | | | | Make sure the right variable is used Pick-to: 6.2 Change-Id: Iec6d8392b320b704423ecbd4434270883fa9fd96 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Use https for links to unicode.orgPaul Wicking2021-06-251-1/+1
| | | | | | | | | | * Change all outbound links in user-facing documentation. * Reflow lines that exceed 100 cols as mandated by clang-format. * Add unicode.org as a global \externalsite. Pick-to: 6.2 6.1 5.15 Change-Id: I2ba1e434aa913e678406d62c2801f1a8b2d9e4f4 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Extend documentation for QFile:copy()Paul Wicking2021-06-231-0/+11
| | | | | | | | | | | | - Add information about symlinks and file metadata. - Reflow text. - Extract text common to both overloads to a .qdocinc file for consistency and to avoid duplication. Pick-to: 6.2 6.1 5.15 Fixes: QTBUG-94706 Change-Id: I3c730fd63f4018a1a573bb56751fedd2270a3247 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix typosKai Köhne2021-06-211-1/+1
| | | | | Change-Id: I852fec49b23acaefb61284e347e63d86ba8331ae Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Porting Guide: Mention that also QSet is affected by stability of referencesKai Köhne2021-06-171-2/+2
| | | | | | | | | QSet is internally implemented by a QHash. Therefore the change in reference stability affects QSet, too. Pick-to: 6.1 6.2 Change-Id: If1879d5a027211bca0beeff16ffbc77f2f4fce26 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Porting Guide: Mention deprecation of QLibraryInfo::locationKai Köhne2021-06-171-0/+2
| | | | | | Pick-to: 6.1 6.2 Change-Id: I998a4575ce7fb56ab51d49715071e682a440360b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Porting Guide: Mention changed behavior of QCApplication::quit()Kai Köhne2021-06-171-0/+12
| | | | | | | | Mention change of behavior introduced by 89f7a2759c6b in the porting documentation. Change-Id: I3c282362f5852cc7768e6655fc7b3901d68f2b10 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Bindable property docs: mention virtual setters and gettersIvan Solovev2021-06-151-0/+33
| | | | | | | | | | Update the bindable property docs to explain how to deal with virtual getters and setters. Task-number: QTBUG-92994 Pick-to: 6.2 Change-Id: I6c29011817e83623414b39afee0f39ad4cc5c1c9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Doc: Fix snippet for QRandomGenerator64 docsPaul Wicking2021-06-141-1/+1
| | | | | | | Pick-to: 6.2 6.1 5.15 Fixes: QTBUG-94347 Change-Id: Iaf007534214cffc83858833e80dad447df9b297a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Doc: Mention that you cannot order QVariants anymoreKai Köhne2021-06-121-0/+4
| | | | | | | Pick-to: 6.1 6.2 Task-number: QTBUG-87263 Change-Id: I3d1332c43e4c06d47b249e4b9adb32685070f56a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix QVariant documentationKai Köhne2021-06-091-9/+5
| | | | | | | | | | Update documentation to not reference API that is obsolete in Qt 6. Also fix documentation for changed behavior (isNull()), and fix snippets. Pick-to: 6.1 6.2 Change-Id: I526efeff63d907bbadd5e8a539ccf237cb992125 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add a const JNINativeMethod[] overload for registerNativeMethods()Assam Boudjelthia2021-06-021-2/+3
| | | | | | | | | | | The JNI interface expects a const JNINativeMethod[] and our wrapper takes a non-const. Also, this was causing refactoring of exisisting code with a const JNINativeMethod[] to fail because the call expects a non-const. Change-Id: If790c401650cb33fe31f93bafe41aab7714488e9 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix QSettings documentationFriedemann Kleint2021-06-011-4/+6
| | | | | | | | | | QMainWindow::saveGeometry()/restoreGeometry() should be used to save and restore geometries instead of saving pos/size since it also works in multiscreen settings. Pick-to: 6.1 Change-Id: I27cc5ec13e69266367f035796e208d214f84b043 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: QtCore: Fix documentation issuesTopi Reinio2021-06-013-0/+5
| | | | | | | | | | | | | | | | | | * Add module header wrapper that loads the real QtCore header and qandroidextras_p.h to generate docs for those types * Add missing dummy typedefs to doc/include/jni.h * Use the correct \namespace name (QtAndroidPrivate) and mark it as \preliminary * Add missing 'const' specifier for Q[Untyped]Bindable methods * Drop documentation for removed method QProperty::markDirty() * qmath.h: Fix \fn commands for qFloor(), qCeil() * QHashSeed: Drop incorrect usage of \relates Fixes: QTBUG-93942 Task-number: QTBUG-93995 Change-Id: If76b5aa4b79a64add3cb6275eac82ec44ef10319 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Android: Add runOnMainAndroidThread() under QNativeInterfaceAssam Boudjelthia2021-05-261-0/+5
| | | | | | | | | | | | This replaces QtAndroidPrivate::runOnAndroidThread{Sync} calls. This also now allows passing std::function<> that can return values, and not only an std::function<void()>. This adds some tests for this calls as well. Fixes: QTBUG-90501 Change-Id: I138d2aae64be17347f7ff712d8a86edb49ea8350 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Replace qt_finalize_executable with qt_finalize_targetAlexandru Croitor2021-05-202-12/+12
| | | | | | | | | | | | | | | | | | It's very likely that we'll have to run certain finalizer code for targets other than executables. Rename qt_finalize_executable to _qt_internal_finalize_executable so it's internal. Introduce a new function qt_finalize_target which will call the above internal one when the target is an executable. This should future proof the API so we have a hook to call code for any user CMake project that intends to use Qt CMake API. Change-Id: I03f6f4dcba22461351c247a20241ca7de1a59c1d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Doc: Extend qt_add_resource documentationJoerg Bornemann2021-05-193-4/+83
| | | | | | | Pick-to: 6.1 Change-Id: Ia76b1e681eb15cc8ad9de04bb80654e35442c82b Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Add CMake to the "Resource System" documentationJoerg Bornemann2021-05-162-4/+43
| | | | | | Pick-to: 6.1 Change-Id: I4c6a7cfb2f6351e9587d47ab6708d92a1a4e42a4 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix documentation warnings for QJni* classesTopi Reinio2021-05-052-0/+64
| | | | | | Pick-to: 6.1 Change-Id: Iab836fbdf649f1b3b60e88d32266361299ac4bb2 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add new app permissions API under QCoreApplicationAssam Boudjelthia2021-05-052-0/+146
| | | | | | | | | | | | | | | | | | | | | The API allows users to request and check the status of various permissions. A predefined enum class of the common permission types on different platforms is used to allow requesting permission with a common code. Platform specific permissions are defined only on their relevant platform. For permissions that are not predefined, they can be requested via a string variant of this API. This adds the Android implementation only. [ChangeLog][QtCore] Add new API for handling app permissions with an initial implementation for Android. Task-number: QTBUG-90498 Change-Id: I3bc98c6ab2dceeea3ee8edec20a332ed8f56ad4f Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Remove mention of no longer supported formatPaul Wicking2021-04-271-3/+1
| | | | | | | Pick-to: 6.0 6.1 Fixes: QTBUG-92826 Change-Id: I35950523e41ceaa1ddc59782c4b527707289013b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Create link from property overview documentation to bindable propertiesAndreas Buhr2021-04-271-1/+2
| | | | | Change-Id: I906d304b3e04a96da5d90e1baa46776bd3debbc9 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add QT_ANDROID_TARGET_SDK_VERSION target propertyJoerg Bornemann2021-04-262-0/+19
| | | | | | | | | | | This is the counterpart of the qmake variable ANDROID_TARGET_SDK_VERSION. Pick-to: 6.1 Task-number: QTBUG-86033 Change-Id: Idd64ee06eb94826430e6be5d9d878631db67c949 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Add QT_ANDROID_MIN_SDK_VERSION target propertyJoerg Bornemann2021-04-262-0/+19
| | | | | | | | | | This is the counterpart to the qmake variable ANDROID_MIN_SDK_VERSION. Pick-to: 6.1 Task-number: QTBUG-86033 Change-Id: I4e1434a794f3a8345f9b4e045ab4366d486221af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Add QT_ANDROID_VERSION_{NAME|CODE} target propertiesJoerg Bornemann2021-04-262-0/+44
| | | | | | | | | | Those are the CMake counterparts of the qmake variables ANDROID_VERSION_{NAME|CODE}. Pick-to: 6.1 Task-number: QTBUG-86033 Change-Id: I57534ff04db0c78871fe7ba81bedaf377422054b Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Remove lazy binding evaluationLars Knoll2021-04-161-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Too much of the existing code in Qt requires eager evaluation without large scale modifications. Combined with the fact that supporting both eager and lazy evaluation has a high maintenance burden, keeping lazy evaluation, at least in its current state, is not worth it. This does not diminish other benefits of the new property system, which include - a C++ API to setup and modify bindings and - faster execution compared to QML's existing bindings and the ability to use them without having a QML engine. We do no longer benefit from doing less work thanks to laziness. A later commit will introduce grouping support to recapture some of this benefit. [ChangeLog][Import Behavior Change][QProperty] QProperty uses always eager evaluation now when a dependency in a binding changes. Change-Id: I34694fd5c7bcb1d31a0052d2e3da8b68d016671b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Add documentation links for some JNI entitiesAssam Boudjelthia2021-04-161-1/+11
| | | | | | | | | | Add doc page link for: * AttachCurrentThread call. * Interface Function Table which describes JNIEnv. Pick-to: 6.1 6.1.0 Change-Id: I12b41429c40838e5133e58132930aede287e2e71 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Make QLocale documentation more honestEdward Welbourne2021-04-151-4/+0
| | | | | | | | | | | | | | Documented the fall-back process by which QLocale selects an actual locale based on what it is asked for. The prior documentation was wrong. In the process, removed some out-of-date claims about QString's toInt() and toDouble() caring about the default locale; and caught a few more cases (in \internal docs) of country -> territory. Fixes: QTBUG-90962 Change-Id: I5e7cfa66443c9335a71fb2048c3f2ebf7af64573 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Document how bindable properties can be used in a multithreaded contextAndreas Buhr2021-04-131-0/+6
| | | | | | | | | | | | Add documentation which specifies that bindable properties cannot be used in a multithreaded context. Actually, they can be read when the owning thread is suspended completely, but this should only be used by Qt internally. Task-number: QTBUG-90511 Change-Id: I87effac3aea35205f05151cba3c95816da9a5c9d Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* 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>