summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Prefer versioned CMake library targetsv6.0.0-beta3Kai Koehne2020-11-0111-11/+11
| | | | | | | | 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>
* Use (void) instead of Q_UNUSEDAndré Klitzing2020-10-311-7/+7
| | | | | | | | | | | | This change allows the user to use -Wextra-semi-stmt without a warning. A macro should never include a ; by it's own. Macro Q_UNUSED already adds semicolon. Fixes: QTBUG-82978 Pick-to: 5.15 Change-Id: I6d8d009cf89f0c8bbb6a9fee986e81302ebd7459 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* testlib: Add private API to add test loggerTor Arne Vestbø2020-10-313-8/+25
| | | | | | | Allows adding test loggers outside of testlib. Change-Id: Iabcc780e441de96032a05fc0a386dd52e2f2f404 Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* Performance improvement for integer->QString conversionAndreas Buhr2020-10-311-4/+43
| | | | | | | | | | | | | The compiler can generate better code when the base is known in integer to string conversion. This patch creates separate branches for known bases and leaves generic code as a fallback. Saved about 12ns per conversion of 12345678 in one measurement. Task-number: QTBUG-87330 Change-Id: I44c9bb467cf211f7e617ed55104476062296bba6 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* testlib: Let logger report whether it is logging to stdoutTor Arne Vestbø2020-10-313-5/+13
| | | | | Change-Id: I7df61b4fdc8c431a73c4b399e2f620923a7c7217 Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* Make QScopedPointer comparison operators hidden friendsVolker Hilsheimer2020-10-312-51/+40
| | | | | | | | Reduce overload resolution noise. Fixes: QTBUG-87979 Change-Id: I52f96e016ffaf1b4f2235a05c1175c5af3eebe36 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Fix various documentation issues for Qt CoreTopi Reinio2020-10-3113-36/+42
| | | | | | | Task-number: QTBUG-86295 Change-Id: I3bf7d4b1533d4fc81114d353b19beaf4ea9b93b2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Minor improvements in qrgba64_p.hAllan Sandfeld Jensen2020-10-311-31/+104
| | | | | | | | | | Adds SIMD acceleration for the blend_pixel, and raw interpolate methods, and cleans up other SIMD code. Gives minor speedups in text rendering and various fallbacks. Change-Id: Ib0ad8b408450e4e73f3c1d50e9caaed0098acb94 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Cleanup module and plugin define situationAlexandru Croitor2020-10-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QT.<module>.DEFINES assignment in pri files needs to take into account the module name when computing the define name. This is the MODULE value that qmake specifies. In CMake that would be the value of CONFIG_MODULE_NAME. Previously the value of the define was computed in qt_internal_module_info() without taking into account the module name. While qt_internal_module_info() ended being used also for plugins and other target types, the defines computed by it were meant to be used only for Qt modules. Thus remove the <result>_define assignment from qt_internal_module_info and move its computation directly into qt_internal_add_module, taking into account the value of CONFIG_MODULE_NAME. The only other use of module_define was in qt_internal_add_plugin but that was merely a long overdue copy-paste error, qmake doesn't propagate QT_FOO_LIB defines for plugins. As result, a define special case in testlib is not needed anymore, because the define is now computed properly. Finally, QT_FOO_LIB should not be used while building the Qt module itself, so instead of using PUBLIC_DEFINES option of qt_internal_extend_target, use target_compile_definitions(INTERFACE) directly. Change-Id: I4d44f7461bac2f0c09aec3e995d02dfe36e00883 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Get rid of QInputDevicePrivate::extraShawn Rutledge2020-10-301-1/+0
| | | | | | | | | | | | | | | Since QPA plugins own the input device objects that they create, they can also subclass to add arbitrary extra data (as was done with QWinTabPointingDevice in abb5f0d3768a817b7e30639107210e64b8dbc138); so this pointer seems unnecessary. It's unused so far AFAIK. Retaining it also brings up the possibility of a memory leak: ~QInputDevice() doesn't delete it, and whatever code stores something there would need to make sure it gets deleted. Change-Id: I7ec264c23c74b83db1f37f64f31857caf551fdae Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Regenerate qtbase projects to use correct CONFIG_MODULE_NAMEsAlexandru Croitor2020-10-3015-3/+16
| | | | | | | | Also sneak in testlib's misisng QMAKE_MODULE_CONFIG values. Task-number: QTBUG-88025 Change-Id: I76a37b8d8dbf7f294f91e32a5edbc52f5c83555b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate qtbase projectsAlexandru Croitor2020-10-3013-33/+382
| | | | | | | | | | In preparation for some further regeneration. Also modify pro2cmake to add forgotten mapping for the Qt::EglFsKmsGbmSupportPrivate module. Change-Id: I92425c566c2b275b40eec8c652496290754ac385 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix QScreen orientation not being updated when setting a platform screenFriedemann Kleint2020-10-301-1/+1
| | | | | | | | | | | | ScreenPrivate::updatePrimaryOrientation() depends on the geometry being set which is calculated by updateHighDpi(). Move the call up. Amends 370289bef68d8505b66cb27150a3f596e23c5ed3. Task-number: QTBUG-76902 Change-Id: I8188e04ad4a2ef7d414a2b78ecb3dd6c64528fa6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit d10c34b0cc896c711fce8ae5629e3cc3d74b6452)
* Offscreen QPA: implement a native interfaceGiuseppe D'Angelo2020-10-306-17/+50
| | | | | | | | | | | | | | | | Many code paths simply expect to have a native interface available, and won't check if a plugin is returning nullptr for it. This leads to crashes or local workarounds (e.g. 3197932e6fb03fb9c0ff669af858cb94e3836d79). Instead, have offscreen implement a dummy native interface. This requires shuffling some code for the X11 integration. Pick-to: 5.15 Change-Id: I2bdceee379e4ded9b085ebbb4d03d1e074f60726 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Hide comparison operators for QtOpenGLVersion types from ADLVolker Hilsheimer2020-10-302-22/+23
| | | | | | | | | | Make hidden friends. Also add noexcept. No documentation to adjust. Fixes: QTBUG-87978 Change-Id: I6e757b7c37fb8aabdfd395ab057a84696104e640 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Hide comparison operators for QtNetwork value types from non-ADLVolker Hilsheimer2020-10-3012-98/+130
| | | | | | | | | Make them hidden friends, add a private isEqual helper where needed. Adjust and add documentation. Fixes: QTBUG-87976 Change-Id: If7c19eeab5be7452364eb76193981100f5516d6b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Cleanup qimage.hAllan Sandfeld Jensen2020-10-301-33/+34
| | | | | | | | Mark routines returning new QImage as [[nodiscard]] and make inlining consistent. Change-Id: I76b6045cfef69498d74d86c38dca2331000dd219 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Don't use pointers or references to functions from std libraryJarek Kobus2020-10-301-7/+11
| | | | | | Task-number: QTBUG-87719 Change-Id: I7331b7a0095fd41261173d309215f897542669ed Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Hide QTypeRevision comparison operators from ADLVolker Hilsheimer2020-10-301-46/+46
| | | | | | | | | | | | | | Make them hidden friends, follow up on 72ccb4fa7b88243064867b23713384e14cef6087 which did the same for QVersionNumber. Also add [[nodiscard]]. The operators are not documented, so nothing to adjust. Adding documentation should be done in a separate commit. Task-number: QTBUG-87973 Change-Id: I65e889a2d0a222f3318b77965e84f3220f1542c7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix qdoc issues in QListVolker Hilsheimer2020-10-301-2/+2
| | | | | | | | | Amends 3afd06cd43d78ef0992eaa6a458572eea6769297, member comparison operators are const. Change-Id: I10d1da4faabb6cfd528fc653ff138ab8878b32b6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Hide comparison of QHostAddress with SpecialAddress from ADLVolker Hilsheimer2020-10-302-9/+8
| | | | | | | | | Make global operators hidden friends. No change to the member-operators. Task-number: QTBUG-87976 Change-Id: If7b08a30700d4e2f1a304d4b6cc4b5d02ee5e251 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adapt QDate::fromString() to accept negative year numbersAndreas Buhr2020-10-301-44/+80
| | | | | | | | | | | | | The documentation states that QDate::fromString() accepts negative year numbers, but it did not. This patch adds support for negative year numbers to QDate::fromString() and corresponding unit tests. Furthermore, tests are added for positive signs (+) in date strings. Fixes: QTBUG-84334 Task-number: QTBUG-84349 Change-Id: I575291e7b8317055d4bb530011d7b10c9cd37ae1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* CMake: Fix unnecessary rebuilding upon reconfigurationAlexandru Croitor2020-10-303-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The following MR in upstream CMake makes sure that the autogen targets depend on the CMakeLists.txt file associated with the autogen target, as well as any files it includes. https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5166 When doing a no-op reconfiguration in the build dir (call 'cmake .') we used file(WRITE) to prepare the contents of a file to be used with configure_file() for creation of a .qrc resource file. Because this file was always rewritten on reconfiguration, its timestamp was newer than then autogen target's timestamp which caused the autogen targets to-be rerun, as well as some compilation and relinking. To avoid this, instead of using file(WRITE) ship a template file next to the Qt6CoreMacros.cmake file, and use it as a template for the qrc configure_file() call. This ensures that a reconfiguration doesn't necessarily rebuild things it shouldn't rebuild. Amends 113f1ad324202ea2b861a3dbdec2ee7ef716c283 Task-number: QTBUG-88004 Change-Id: Icd95b28ca3642434cf21e5c49dcbd1ec65d76252 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Use universal references for passing callables in QtConcurrentSona Kurazyan2020-10-307-543/+682
| | | | | | | | Task-number: QTBUG-87596 Change-Id: I219f08d73b97317820ec6e329ab1e6c89c0545f1 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Forbid implicit conversions between QFuture and other typesSona Kurazyan2020-10-302-21/+1
| | | | | | | | | | | | | | | | | | | | | - Remove the casting operator of QFuture<T> to T. It calls QFuture::result(), which may lead to undefined behavior if the user has moved the results from QFuture via QFuture::takeResult() before trying to do the conversion. - Disable implicit conversion of QFuture<T> to QFuture<void>, by making the constructor explicit. If the users really intend to do the conversion, they should do it explicitly. [ChangeLog][Source-Incompatible Changes][QFuture] Implicit conversions of QFuture<T> to T and to QFuture<void> have been disabled. Use QFuture::result() or QFuture::takeResult() where you need to convert QFuture<T> to T. Use the explicit QFuture<void>(const QFuture<T> &) constructor to convert QFuture<T> to QFuture<void>. Change-Id: I153d4137d36365b1611ac934fb3ac2eb667fdd6c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Add noexcept to QLine comparisonsAllan Sandfeld Jensen2020-10-301-3/+3
| | | | | Change-Id: Id75a8511c66d9fe23450043a9230f8dc8925be28 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove Q_IS_ENUMAllan Sandfeld Jensen2020-10-303-53/+0
| | | | | | | Deprecated since 5.8 already. Change-Id: I01ea32b5f4b922cecb18c5760a1b5fa49c4e54c0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make QVarLengthArray comparisons hidden friendsAllan Sandfeld Jensen2020-10-301-40/+77
| | | | | | Task-number: QTBUG-87975 Change-Id: Iaebb237b3d5d3e881caf9a93153e295af051e2ab Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add unit tests for QDateTimeParser internalsAndreas Buhr2020-10-301-0/+2
| | | | | | | | | | | | | | | | | | | | So far, the internals of QDateTimeParser and especially the handling of 'Intermediate' values were only tested implicitly by tst_qdatetimeedit. 'Intermediate' values are values which are not valid according to the specified format, but could become valid by adding more characters. This patch adds unit tests which tests parsing of these intermediate values directly. These tests will help implement handling of negative year numbers, where additional complications arise because of possible ambiguities between the minus sign '-' and the separator '-'. Task-number: QTBUG-84334 Change-Id: Ia6ba08df198288b8b11d3b2d2052c194f04fe8a1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Hide QList comparisons from ADLAllan Sandfeld Jensen2020-10-302-78/+60
| | | | | | | | | | Makes them member methods instead of hidden inline, as those actually gets listed in documentation, and two were already documented as such. Task-number: QTBUG-87975 Change-Id: I382ff8b701753f1fe150a38f4c530a52c98ad292 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Fix documentation warnings for Qt SQLTopi Reinio2020-10-302-2/+6
| | | | | | Task-number: QTBUG-86295 Change-Id: Ia8c0daabcf79e56d51de801cb2be1b83bf03276b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix documentation warnings for Qt OpenGLTopi Reinio2020-10-304-5/+14
| | | | | | Task-number: QTBUG-86295 Change-Id: I4fff2d61f8f0513181150954440c9357acf73c1d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix links to the CMake manualTopi Reinio2020-10-307-7/+7
| | | | | | Task-number: QTBUG-86295 Change-Id: I7b2208284d65ec9182352490bd4c92458c5e5e37 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix documentation warnings for Qt Print SupportTopi Reinio2020-10-302-2/+2
| | | | | | Task-number: QTBUG-86295 Change-Id: I8121f7c127896e57ec2e7636828af36bb83acfe3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix documentation warnings for Qt NetworkTopi Reinio2020-10-303-6/+10
| | | | | | Task-number: QTBUG-86295 Change-Id: Ib8bcf0a6e2af8a589b44e56b19641f4d2fe6f800 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix two missing conversions from in to qsizetypeAllan Sandfeld Jensen2020-10-293-3/+3
| | | | | Change-Id: I08ac9a0eb5dfb17f2b6cfaca9e3f3d7375c02bd4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove do-not-use warning in Qt OpenGL landing pageJerome Pasion2020-10-291-10/+2
| | | | | | | | | -Qt OpenGL is part of Qt 6.0 and graphics offering -Edited introduction Task-number: QTBUG-87155 Change-Id: I1581d5d962c62a3731d77e4e4dd58154257dc1fe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make QMap and QMultiMap comparisons hidden friendsAllan Sandfeld Jensen2020-10-293-67/+35
| | | | | | Task-number: QTBUG-87975 Change-Id: I3c84a188cdbb0d09e0e7c66588c7638c8a8328fd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move porting guide for QtConcurrent to its designated pageSona Kurazyan2020-10-292-72/+69
| | | | | | | | | 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 documentation warnings for QIterable and related classesTopi Reinio2020-10-293-25/+38
| | | | | | Task-number: QTBUG-86295 Change-Id: I1d4c851ae7d2910ab6276ab2215b5f6e550a12c8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix documentation warnings for string classesTopi Reinio2020-10-294-80/+42
| | | | | | Task-number: QTBUG-86295 Change-Id: I13033635eecd495b32c98c7ec9318a0102b6f23e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix documentation issues for QStringTokenizerTopi Reinio2020-10-292-21/+10
| | | | | | | | | | | Add documentation-specific variants of lvalue/rvalue-this overloads that QDoc manages to parse as separate entities. Document begin() and cbegin() iterator getters in one go. Task-number: QTBUG-86295 Change-Id: I2768dc6525bbf067e1597aa12e2e727f6d9fc35a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix link issues for QtCoreTopi Reinio2020-10-294-18/+9
| | | | | | | | | - 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>
* Move QPolygonClipper to XCB native paintingAllan Sandfeld Jensen2020-10-298-7/+5
| | | | | | | It is the only code using it. Change-Id: I30060a63b6621ea94ae487ec93cd857117e12a46 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Avoid doing kill(-1) in QProcess destructorDimitrios Apostolou2020-10-291-4/+5
| | | | | | | | | It can happen under unspecified conditions, see relevant ticket. Task-number: QTBUG-86285 Pick-to: 5.15 Change-Id: I1f77bf0061a0faaa60283bb93fc3d82031247d54 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qfloat16: make comparison and arithmetic operators hidden friendsVolker Hilsheimer2020-10-291-82/+84
| | | | | | | | Reduce ADL noise. The operators are not documented, so nothing to adjust. Change-Id: I02a8bdad6138758106283495098c72770ea74e52 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* You can't disable SSE2 for x86-64Allan Sandfeld Jensen2020-10-291-4/+11
| | | | | | Fixes: QTBUG-88013 Change-Id: Iec571ef3fccbec46145617ca8d983c3a333090e4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove the comparison operators of QFutureSona Kurazyan2020-10-293-15/+1
| | | | | | | | | | | | | | These operators don't do what the user might expect and may lead to confusing results. [ChangeLog][Source-Incompatible Changes][QFuture] The comparison operators of QFuture have been removed. They were comparing the underlying d-ptrs instead of comparing the results (as the users might expect), which is not very helpful for the users point of view. Change-Id: I80a887610eac38b60329128cca52cdb5fb515207 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Purge deprecated language and country codes from QLocaleEdward Welbourne2020-10-292-151/+0
| | | | | | | | | | | | | | | | | | | | Requires subsequent re-numbering of the enum tables to eliminate gaps, before locale data can be regenerated. However, it will work with the present locale data, since it merely loses the means to use some names for which the available data was just the name and code. This implies a transient issue of recognising some codes for which there is no actual enum member; but relevant code will work as before, finding nothing but the code and its name. This shall be resolved by a coming BiC change to resort the language, country and script codes, changing the numbering (almost) completely. [ChangeLog][QtCore][QLocale] Various obsolete language and country codes have been removed. Some lacked locale data, others were obsolete aliases. All have been deprecated in 5.15. Task-number: QTBUG-84669 Change-Id: I45fc76a5f2f6c3b0ea3c1bb61e917da984183783 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>