summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc
Commit message (Collapse)AuthorAgeFilesLines
* Document how to use CMake on Qt Core, Qt GUI's central pagesKai Koehne2019-05-074-71/+14
| | | | | | | | | | | | | | | Add documentation on how to use a module from CMake, alongside the existing documentation about qmake. Separate generic info from module-specific examples, to make it possible to use one include file in all modules. While at it, also remove the mentioning of the central include; it is not something we should actively advocate anymore. Instead, the documentation of every class gives the correct include to use. Task-number: QTBUG-73058 Change-Id: I6b3c0e5ea218dd9c06a491c8fb799a7fcf42dd92 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Use nullptr in Signals & SlotsKai Koehne2019-03-132-3/+3
| | | | | Change-Id: I9b377e00ce177ae33972479bde11dd03061224d7 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix a couple of small doc things in relation to QScopeGuardAndy Shaw2019-03-091-1/+1
| | | | | | Change-Id: I6e61a18697b95d9e3f534d1d71ebf32fdff4a04f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.12.1Liang Qi2019-01-0832-487/+753
|\ | | | | | | | | | | | | Conflicts: src/widgets/kernel/qtooltip.cpp Change-Id: Ic2f9a425359050eb56b3a4e5162cf5e3447058c8
| * Doc: Update page Tamil Script Code for Information InterchangeNico Vertriest2019-01-021-4/+4
| | | | | | | | | | | | Task-number: QTBUG-56668 Change-Id: I173d73ef5e9b08e865cb75fa03849665fcda652e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * QtCore: Unify license headersKai Koehne2018-12-2231-498/+773
| | | | | | | | | | Change-Id: Iff4f6da9f0bbf7a0627101f455dd8467681b2783 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Doc: fix null pointer passing to fprintfThiago Macieira2018-12-141-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When these docs were written, the context.file and context.function pointers were never null. But in commit d78fb442d750b33afe2e41f31588ec94 (Qt 5.4), we made the logging pass null pointers in release builds. The C standard does not say that passing null pointers is permitted. In fact, it says "If no l length modifier is present, the argument shall be a pointer to the initial element of an array of character type." and that's pretty explicit that it needs to point to the initial element of a string. Fixes: QTBUG-72478 Change-Id: I4ac1156702324f0fb814fffd156f624ffefa1445 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Doc: Restore documentation for QTest functions in other modulesTopi Reinio2019-01-042-52/+3
|/ | | | | | | | | | | | | | Qt Test library sources specific to Core, GUI and Widgets modules were moved around in commit 88867e39b. The new source locations must be referenced in Qt Test documentation configuration. The same sources are excluded in their original doc projects, and the related snippet file is moved over to qttestlib. The commit also fixes the remaining documentation issues for Qt Test. Change-Id: Ibe011aa83639e574d647f12bc9e53e618781bce6 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Documention: Use const-ref in the snippets for qOverload()Friedemann Kleint2018-11-271-7/+7
| | | | | | | | | This makes it clearer that const-ref needs to be specified in the template arguments of qOverload() and related. Change-Id: I527c8ca853be159af8665e9759d9549df10573b3 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Documentation: update Q_DISABLE_COPY documentationChristian Ehrlicher2018-11-191-11/+9
| | | | | | | | | | Q_DISABLE_COPY annotates the functions as deleted but this was not mentioned in the documentation. As a drive-by adjust some indentations. Change-Id: I808fe3f1ce9f949d2ba41436661569ab0f2a9f73 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Move literal code block to a separate fileCristian Maureira-Fredes2018-10-1535-0/+2080
| | | | | | | | | | | We need to override this snippet for the documentation we generate for Qt for Python, and it is easier to have it on a separate file. Task-number: PYSIDE-801 Task-number: PYSIDE-691 Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: fix QRegularExpression::wildcardToRegularExpression snippetSamuel Gaist2018-10-021-1/+4
| | | | | | | | The sample output from wildcardToRegularExpression was from an earlier version of the implementation. This patch fixes this. Change-Id: I48108add01aafed69490ef2527c1ea6a209b220b Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Doc: Add link target to fix QDoc warning in Qt DeclarativePaul Wicking2018-09-271-0/+1
| | | | | Change-Id: Iddaef1ce3f739c3dfb98eb87430fe85e3b2bd01c Reviewed-by: Martin Smith <martin.smith@qt.io>
* Doc: Fix QEasingCurve code snippetsTopi Reinio2018-09-251-2/+6
| | | | | | | | | Commit ff2a71e3 accidentally removed a code snippet used in documenting EasingCurve::EasingFunction. This commit restores it and fixes other minor issues in QEasingCurve code snippets. Change-Id: Ib19f602a4abbca3511d3d26c5f6da4910f7104a3 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-072-3/+14
|\ | | | | | | Change-Id: I66c7f18a2abd13601da0947919436f7da3549ae9
| * QString: Fix snippet explaining "non-spaced numbered place markers"Andre Hartmann2018-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The snippet tries to explain the advantage of str.arg("Hello", QString::number(20), QString::number(50)); over str.arg("Hello").arg(20).arg(50); which only makes sense, if str contains the same formating sequence, namely "%1%3%2". That also matches the belonging comment. Amends 8481500f639e3d5e2259db57847a2e7068e30650 Task-number: QTBUG-44044 Change-Id: Ic2595107bc599c6d244ebf88184a5cc5569ed4f1 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Doc: Move the literal code blocks to a separate fileVenugopal Shivashankar2018-09-031-2/+13
| | | | | | | | | | | | | | | | It's easier to override the code blocks this way. Change-Id: I98d40626a94fdb70a95c50332c2da141e9277070 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-1712-22/+22
|\| | | | | | | Change-Id: I8bb8227f9da982e7d5ebe5324fc27abd9ac0d4fc
| * doc: Add missing override and remove redundant virtual for snippetsAlexander Volkov2018-08-1612-22/+22
| | | | | | | | | | Change-Id: I2395fd01b93c4ea364225e0cf1a5f59908b691d0 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Refactor wildcard support in QRegularExpressionSamuel Gaist2018-08-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API originally proposed was flawed in the sense that the setter function would use a modified version of the parameter given which would have make it a black box for the user. This patch fixes that by removing that setter and providing a static method that will return the pattern suitably modified to be used by QRegularExpression the same way the escape method does. [ChangeLog][Core][QRegularExpression] Implemented support for wildcard patterns through a static method. Change-Id: I0054bcaffd7525dac569f54fa81f73b7e4544b2e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | 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>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-08-071-23/+25
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-071-23/+25
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/doc/src/objectmodel/signalsandslots.qdoc src/plugins/platforms/cocoa/qcocoamenuloader.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp tests/auto/gui/image/qimage/tst_qimage.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
| | * 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 QByteArray::toFloat snippetAndre Hartmann2018-08-071-1/+1
|/ / | | | | | | | | | | | | Amends dc133765ec47e9625c49701f0ffd762b0ee1ad48 Change-Id: I0550e94651dcf2434a7b57b7ae845a5b40cb5cc4 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Merge branch '5.11' into devEdward Welbourne2018-07-311-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp src/plugins/platforms/windows/qwindowstabletsupport.h src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Done-With: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
| * Doc: Remove erroneous comma in snippetPaul Wicking2018-07-201-1/+1
| | | | | | | | | | | | Task-number: QTBUG-51719 Change-Id: I0621b872642aa8ad14f6af4bf1b9588450dfbb64 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Introduce QScopeGuardSérgio Martins2018-07-211-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | A RAII style class which calls a function at end of scope. Example usage: auto cleanup = qScopeGuard([] { <my cleanup code> ; }); [ChangeLog][QtCore] Introduced QScopeGuard. Task-number: QTBUG-62894 Change-Id: Ife67f5c76255a1fafbae03367263da0bac9a0070 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Use context when connecting to functors in docsFrederik Gladhorn2018-07-161-1/+3
| | | | | | | | | | | | | | | | | | This is the introduction text to signals and slots and should rather show best practices. Using context is generally advisable to have life-time of connections under control. Change-Id: I213b13d978a38e13834cdbccf1bea06d53ba8320 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Doc: harmonize toDouble() and toFloat() for QString and QByteArrayAndre Hartmann2018-07-142-1/+18
| | | | | | | | | | Change-Id: Ic81461899c73c8a68bc3b8bdc1de4be4dd6bdf27 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Add QT_TR*_N_NOOP() macrosMateusz Starzycki2018-05-151-0/+48
|/ | | | | | | | | | [ChangeLog][QtCore][Global] Added the QT_TR_N_NOOP(), QT_TRANSLATE_N_NOOP(), and QT_TRANSLATE_N_NOOP3() macros for numeral dependent delayed translation. Change-Id: I57c5b1ad4006267f49a57b0cbc40216b8e0399ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* improve documentation, mostly of the QT_TR*_NOOP macrosOswald Buddenhagen2018-04-251-8/+8
| | | | | | | | Change-Id: I65ccddec84a01945a6aee2a859d4f92ea830785b Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Mateusz Starzycki <mstarzycki@gmail.com> Reviewed-by: Martin Smith <martin.smith@qt.io>
* Doc: Advocate use of std::initializer_list constructor in Q[String]ListKai Koehne2018-04-232-9/+15
| | | | | | | | | We're relying on C++11 since a while, so lets not advertise creating lists of strings with operator<<() anymore. Change-Id: I14a3442ff852ac2c106d90c63504eb9ebb737609 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: hjk <hjk@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>
* doc: Improve QByteArray::fromRawData snippetSamuel Gaist2018-03-291-3/+3
| | | | | | | | | The current snippet uses integer literals that will trigger the Wnarrowing warning with recent version of gcc. This patch replaces them with character literals to fix this warning. Change-Id: Iffad495f24cc9d4c1674a7fe3f6b45c46a625ff8 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Revert "JSON doc: update the RFC we link to"Thiago Macieira2018-02-211-1/+1
| | | | | | | | | This reverts commit 71090f09509d52451e68b33e3e26807822849721. Changing the link was wrong because we do not actually comply with the new RFC. Task-number: QTBUG-66470 Change-Id: I940917d6763842499b18fffd15147cb93c27b7f4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-142-4/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| * Doc: Mention exact Qt version the third party attributions apply toKai Koehne2018-01-191-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do add, remove or update third party code in minor releases, sometimes even in patch level releases. However, the documentation is supposed to be valid for all existing Qt 5 versions, but doing this for attributions would require infrastructure we don't have. Therefore rather make it explicit which Qt version the attributions apply to. Also mention since when Qt is available under LGPLv3 (starting with Qt 5.4). Task-number: QTBUG-65665 Change-Id: I328b5bf0c143f78ea61aad51f0644c3cbb6dee49 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * QThreadPool: Add missing semicolon after class in documentationAndre Hartmann2018-01-171-1/+1
| | | | | | | | | | | | | | Makes it easier to copy and paste the snippet into a code editor. Change-Id: I27c0a7aa268bd4fd0af885e929f67a28f083dabf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Documentation: don't suggest abort() in qInstallMessageHandler()Thiago Macieira2018-02-111-1/+1
| | | | | | | | | | | | | | | | | | The backend will do the aborting. The handler doesn't need to do it. Task-number: QTBUG-66295 Change-Id: I3debfc11127e4516b505fffd151166d4a8e9ec53 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Add doc explaining the gotcha when connecting a signal to qApp->exitd3fault2018-01-091-1/+1
| | | | | | | | | | | | Change-Id: I981e4bfdf679bf755665748e9d3b389a94561e55 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-301-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| * QString: fix documentation of NUL-termination of unicode(), data(), constData()Marc Mutz2017-12-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (or lack thereof). * `QString::utf16()` reallocates if `*this` has been constructed using `fromRawData()`. * `QString::data()` ensures a writable string, so will detach from raw data. * `QString::unicode()`, `constData()`, and `data() const` do not. They just return `QStringData::data()`, which may point to raw, non-NUL-terminated data. These functions can therefore not possibly have the same behavior, but were documented the same. Fix. Also drop the discussion of operator[](size()), as that, too, was not correct, and anyone who indexes with op[] beyond size() - 1 should not rely on proper behavior. [ChangeLog][QtCore][QString] QString::unicode(), constData() and `data() const` do not return a NUL-terminated string. This was true before, but the documentation claimed the opposite. Change-Id: I1437f57cd02bdf80264e8559608b46aa749c23a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.10.0' into 5.10Liang Qi2017-12-081-0/+3
|\ \ | | | | | | | | | Change-Id: I6dcf85067ec226136c207ea69ca9d66736c84db5
| * | Doc: Update the list of highlighted examplesTopi Reinio2017-11-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the list of highlighted examples for modules in qtbase, based on which examples have been updated to use C++11 features, the new signal/slot connection syntax, and documentation improvements. Not all the modules have highlighted examples yet as some of the work is still ongoing. Task-number: QTBUG-60641 Change-Id: If28d59c10ca1a30e5db408970f20159434ac94f8 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-12-051-0/+12
|\ \ \ | |/ / |/| / | |/ | | | | | | Conflicts: src/plugins/platforms/ios/quiview.mm Change-Id: I88384c70047391c75d9ff166c8d9881ff6751dbf
| * [doc] Document QString{,Ref}::split() behavior with empty 'sep'Marc Mutz2017-11-291-0/+12
| | | | | | | | | | | | | | We actually test for this already in tst_QString::split(). Change-Id: I35fe8f90900ea9c8e6251facdb3326b9226348d0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Mark the previously public qstringalgorithms.h functions privateThiago Macieira2017-10-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Discussed during Qt Contributor Summit 2017. We concluded that we don't want to make these functions public, as they do not follow Qt coding style API. Specifically, qStartsWith(a, b) is not easily understood which argument is the needle and which argument is the haystack (same problem memcpy() has). Compare that to a.startsWith(b) which can clearly be read in English as a subject-verb-object sentence. This commit removes the unit tests that called compare(). Discussed-on: http://lists.qt-project.org/pipermail/development/2017-October/031060.html Change-Id: Icaa86fc7b54d4b368c0efffd14ee6205eb9043fb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/corelib/global/qglobal.h src/corelib/tools/qcryptographichash.cpp src/corelib/tools/qcryptographichash.h src/corelib/tools/qmessageauthenticationcode.cpp src/plugins/platforms/windows/qwindowswindow.h tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST Change-Id: Ib68112de985a3d714c2071f47c10e907e4f0229a
| * doc: fix code snippet of qConstOverload usageGatis Paeglis2017-09-251-1/+1
| | | | | | | | | | Change-Id: I11628d2f9372f21f371ccf93000c26079eb9ef72 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>