summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/src/objectmodel
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix QDoc syntax in bindable properties overviewPaul Wicking2024-03-201-2/+2
| | | | | | | | | Drop the \c command when in front of \l commands as that doesn't work. Pick-to: 6.7 6.6 Change-Id: I0aa092461807e068e9c2368f5d6f04e77b56c910 Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io> Reviewed-by: James DeLisle <james.delisle@qt.io>
* Documentation: Rename 'Qt Designer' to 'Qt Widgets Designer'Friedemann Kleint2024-02-191-1/+1
| | | | | | Task-number: QTBUG-122253 Change-Id: I04ab521decaf908b1c1491987f6de1e816a42a33 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Use Qml DefaultProperty as example for Q_CLASSINFOKai Köhne2023-12-201-2/+4
| | | | | | | | | | | Setting a DefaultProperty is arguably something more useful to people than the 'made up' version example. Also add more links to the relevant QML pages. Pick-to: 6.6 6.7 Change-Id: Id967df7ddf81511299f95b9fd24f56af671fb855 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* doc: improve property example slotSamuel Gaist2023-10-141-1/+4
| | | | | | | | | | | The current example shows a minimal implementation. However, neither this example nor the documentation explains what happens without the guard. Although it's not mandatory, the large majority of the time it's a good practice to have it. This patch improves this part. Change-Id: I411a9d66bd7d8ba16aac87e28b5cab219fd71a5d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Revamp Bindable Properties exp: Revisit documentationRym Bouabid2023-10-051-1/+1
| | | | | | | | | | Remove "Example" from the title. Add \examplecategory Data Processing & I/O Fixes: QTBUG-114689 Pick-to: 6.6 6.5 Change-Id: I695df195819cc371d404c4c5f01a0c4830d9c438 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Doc: All overviews list categorizationJaishree Vyas2023-09-113-4/+3
| | | | | | | | | | | | The \generate list names are added for each categorized section with some explanation. Here, calling the overviews as explanations-(name of the section). The idea is to give general terms instead of specific phrases like 'core' etc, for better understanding. Task-number: QTBUG-115347 Pick-to: 6.5 6.6 Change-Id: I673e38c0e9193b7f7d54008bfcf82c2d3a10be3f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: remove erroneous statement that signals can't have return typesThiago Macieira2023-09-061-2/+1
| | | | | | | | | They can (it's just very, very unusual). Fixes: QTBUG-116695 Pick-to: 6.5 6.6 Change-Id: I2b24e1d3cad44897906efffd178178f1542e67f2 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Doc: List of all Qt overviews which are now termed as explanationJaishree Vyas2023-07-193-2/+3
| | | | | | | | | | | | | The autogenerated list of overviews was adding the \group command which included all the groups instead of overviews. The idea here is to categorize the overviews later on once we have the list of all overviews. Task-number: QTBUG-114762 Pick-to: 6.5 6.6 Change-Id: I3cf53886be277abc86b5ec54d399cd6933fbe882 Reviewed-by: Kai Köhne <kai.koehne@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Move tetrix example to manual testTor Arne Vestbø2023-06-291-1/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: Ie73d9e35df8513d05d55ffbad1f02584359e3bd0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix qdoc link warnings after moving a few examples to manual testsTor Arne Vestbø2023-06-271-1/+1
| | | | | | Pick-to: 6.5 6.6 Change-Id: I81a6e9d52e858c3f733d4c527c70408772813b56 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QBindable: Make ordinary Q_PROPERTYs bindablePatrick Stewart2022-11-301-0/+14
| | | | | | | | | | | Implements an adaptor from the notification signal of a Q_PROPERTY to QBindable. The Q_PROPERTY does not need to be BINDABLE, but can still be bound or used in a binding. [ChangeLog][Core][Q_PROPERTY] Q_PROPERTYs without BINDABLE can be wrapped in QBindable to make them usable in bindings Change-Id: Id0ca5444b93a371ba8720a38f3607925d393d98a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: be more explicit about when a MEMBER property NOTIFY signal is emitted ↵Albert Astals Cid2022-07-271-2/+3
| | | | | | | | automatically Change-Id: Ied5eb0c218d11872fbf590d735a88a11b5cd1c3e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* moc: Allow writing properties through bindablesUlf Hermann2022-07-081-1/+6
| | | | | | | | | | | | | BINDABLE should generally behave the same as MEMBER if "WRITE default", except where it cannot. In particular we cannot know if any NOTIFY signal should be sent from the synthetic WRITE accessor. [ChangeLog][QtCore] moc will now synthesize WRITE accessors for properties with BINDABLE if you specify "WRITE default". Task-number: QTBUG-97249 Change-Id: I883c40ba0dda7989c840971860addaeaa75a8c83 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: Allow reading property values through bindablesUlf Hermann2022-06-221-1/+3
| | | | | | | | | | | | | The behavior is similar to MEMBER: If the READ accessor is "default", synthesize it using the bindable. [ChangeLog][QtCore] You can now specify "READ default" in a Q_PROPERTY if you also specify a BINDABLE. moc will synthesize a READ accessor in that case. Task-number: QTBUG-97249 Change-Id: I4a275adabaed12df95dac505095f847c4be65dfe Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-166-156/+12
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Doc: Document QT_NO_[SIGNALS_SLOTS_]KEYWORDS definesJoerg Bornemann2022-03-291-3/+22
| | | | | | | Pick-to: 6.2 6.3 Fixes: QTBUG-70564 Change-Id: I8ed1a30567dabdcb95cdfce009f1d9e0645d3226 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Document the example showing the benefits of using bindable propertiesSona Kurazyan2021-12-021-0/+14
| | | | | | | | | | | And mention the example in the bindable properties docs. Pick-to: 6.2 Task-number: QTBUG-97655 Change-Id: I676e90dbda66c2e718c7f6c2240fac608a8653df Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Extend documentation for bindable propertiesIvan Solovev2021-10-291-0/+17
| | | | | | | | | | | | | Extend the general property system page with a section on how to use bindable properties. Add some cross-references to improve the user experience. Task-number: QTBUG-97656 Pick-to: 6.2 Change-Id: I2520cdc168e3a8a66ea387e4ab717f4e0f969424 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* corelib: Fix typos in documentationJonas Kvinge2021-10-121-1/+1
| | | | | | Pick-to: 5.15 6.2 Change-Id: I64d63af708bc6ddaabd12450eb3089e5077f849e Reviewed-by: Edward Welbourne <edward.welbourne@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>
* 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>
* 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>
* 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 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>
* 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>
* 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>
* 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>
* Doc: Document BINDABLE attribute for Q_PROPERTY macroTopi Reinio2020-11-301-0/+6
| | | | | | | | 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>
* Remove traces of QObject::trUtf8 from documentationVolker Hilsheimer2020-09-251-1/+1
| | | | | | | | ... and from the duplicated Q_DECLARE_TR_FUNCTION macro for QXmlStream. We expect source code to be utf8 encoded in Qt 6, so the function is gone. Change-Id: Ie25329a54e709dc92a22893ad5ab023852300d81 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Qt6: remove support for property flags being functionsLars Knoll2020-06-111-4/+2
| | | | | | | | | | | | | | | Property flags should be compile time booleans, not something to be determined at runtime. We've been using this to dynamically disable some properties in QWidget based classes dependent on the state of a different property, but this should better get implemented on top of our widgets. Change-Id: I6296e8761303ecdf24d9e842142e8596304c015d Reviewed-by: Simon Hausmann <hausmann@gmail.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* moc: Extend revision markers to allow for major and minor versionUlf Hermann2020-02-071-2/+2
| | | | | | | | | | | | | As we want Qt's own revisions to follow the Qt versioning scheme, we need to allow for the minor version to reset to 0 now. In order to facilitate this, we interpret the argument passed the current Q_REVISION macro as major version and allow for an optional minor version. Both are encoded it into the resulting revision number. Change-Id: I3519fe20233d473f34a24ec9589d045cdd162a12 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Introduce Q_PROPERTY attribute REQUIREDFabian Kosmale2020-01-231-0/+6
| | | | | | | | This is meant to correspond to required properties in QML. Change-Id: I2645981e13f7423bc86b48370c165b3cfe2aaa62 Task-number: QTBUG-81561 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-151-2/+2
|\ | | | | | | Change-Id: I2bf3b4ceb79364330eae4cbf3cdee9a82d1be46d
| * Doc: Use nullptr in Signals & SlotsKai Koehne2019-03-131-2/+2
| | | | | | | | | | Change-Id: I9b377e00ce177ae33972479bde11dd03061224d7 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | QtCore: replace 0 with \nullptr in documentationChristian Ehrlicher2019-01-281-1/+1
|/ | | | | | | | | | | Replace 0 with \nullptr in the documentation. As a drive-by also replace some 0 with nullptr in the corresponding code. Change-Id: I101a61f5fad71cadb73bba9a8fd5dce6cc0836d0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* qdoc: Fix several minor errors to reduce qdoc warningsMartin Smith2018-08-141-2/+2
| | | | | | | | | | This update corrects several minor documentation errors that cause qdoc warnings. These include incorrect or missing \fn commands, incorrect uses of \e and \a commands together, incorrect spellings, etc. Change-Id: Ib26edef541fa3440025490bcf79cc101623e7f7b Reviewed-by: Martin Smith <martin.smith@qt.io>
* Doc: Update signals and slots introduction pagePaul Wicking2018-07-311-22/+26
| | | | | | | | | | | Use this as context in connect to functors/lambdas. Add description of the use of context in connects. Update the simple example to make it slightly less confusing for (new) readers. Task-number: QTBUG-69483 Change-Id: Ibbbe98c4282cea4ebd860b1d174871559b7f195b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Fix typo in The Property System sectionKai Koehne2018-04-121-1/+1
| | | | | Change-Id: Ie31c56369baf26f5592c95dacea60ae58fdbccfe Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Deprecate QSignalMapperOlivier Goffart2017-03-141-17/+5
| | | | | | | | | | Does not make much sense now that we can connect to lambda functions [ChangeLog][QtCore][QSignalMapper] QSignalMapper is now marked as deprecated. Change-Id: I89135f23fdf16b42142a125eb7c9a86084c90bfc Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Doc: Remove references to pre-C++11 recommendationsOlivier Goffart2017-03-011-3/+0
| | | | | | | | | Compiler support for lambda functions and variadic templates is required since Qt 5.7, so no need to mention in the documentation what happens if the compiler doesn't support it. Change-Id: I5caeaa0bd7f0edce81e22e22964e0b7dd042c719 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Unify license header usage.Jani Heikkinen2016-03-295-25/+25
| | | | | | | | | Update files using old header.LGPL3 to header.LGPL Update files using old FDL template to use new one Update files using old BSD template to use new one Change-Id: I36a78272516f9953d02956522f285b40adfc8915 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Doc: Add the missing \l command and the target section titleVenugopal Shivashankar2016-03-011-1/+2
| | | | | | | Change-Id: I8478467a074ecff9834850c36961ae8e218cea02 Task-number: QTBUG-51290 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
* Doc: replace \target with \keyword if at start of pageNico Vertriest2015-10-022-2/+2
| | | | | | | | | | | | | A \target whose purpose is to link to the top of a page (and not to a section within a page) works better as a \keyword, because \target generates a new html anchor which, in this case, is not tied to any title element on the page. A \keyword links to the page itself, as expected. Task-number: QTBUG-48482 Change-Id: I957551edd0eb7e665358d04b37dab41e2686b851 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Allow types with a comma in Q_PROPERTYOlivier Goffart2015-06-121-7/+2
| | | | | | | | | | | | This allows for example properties with QMap<Foo, Bar> [ChangeLog][QtCore] Types in the Q_PROPERTY macro can now contain commas (for example, QMap<Foo, Bar>) Change-Id: Ibf5c8c9cf20a7c8b3dfec9e891fb8a9ca1bdba7c Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Document Q_ENUM and Q_FLAGOlivier Goffart2015-03-031-5/+5
| | | | | | | | | | | | [ChangeLog][QtCore] Q_ENUMS and Q_FLAGS have been deprecated, and replaced by Q_ENUM and Q_FLAG macros. These two new macros automatically register the enum with the Qt metatype system, allowing automatic conversion to or from string in QVariant, or to show the strings by QDebug operators. They also enable the new QMetaEnum::fromType function. Change-Id: I80cccd7ad3fc46b11aee2fe50681a8126debf972 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Update copyright headersJani Heikkinen2015-02-115-30/+30
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* doc: Clarify NOTIFY emission with MEMBER variablesAlejandro Exojo2014-12-101-1/+4
| | | | | | | | Document that NOTIFY signals should be emitted only when really needed, and that such is the case with MEMBER variables. Change-Id: Icc38a0790aa43ffe8f24d124da966b4240a41a6f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Doc: Corrected autolink errors corelibNico Vertriest2014-11-201-6/+4
| | | | | | Task-number: QTBUG-40362 Change-Id: I551c2af94bb61fcc2494792761dab92d537e5068 Reviewed-by: Martin Smith <martin.smith@digia.com>