summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* testlib: Spit out crash backtraces to stderrTor Arne Vestbø2020-10-231-2/+2
| | | | | | | | Ensures that the backtrace is interleaved with the header and footer that we print ourselves. Change-Id: I728f4a05be31e345687cbb5fefe49f76dbe8ae36 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* CMake: Fix deprecation defines not being set properlyAlexandru Croitor2020-10-233-3/+3
| | | | | | | | | Instead of propagating the deprecation wranings, we compiled all code with -Ddeprecations. Change-Id: I0233ddc85bdbdcb93d366073b2cea5d47bdbe52a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* QList/QVLA: fixup the docsGiuseppe D'Angelo2020-10-232-8/+8
| | | | | | | | | I'm not 100% sure that qdoc needs this, but in case it does, here's the commit. Change-Id: Ia3e17a56fd5df766c250f4875ba5e19e12b98d11 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Make entry point module an internal moduleTor Arne Vestbø2020-10-233-2/+4
| | | | | Change-Id: I9eaadc7ce8ca03d64ff3a33c7b6641b073570a61 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Produce internal module pris like qmake doesTor Arne Vestbø2020-10-231-33/+37
| | | | | | | | | | qmake treats internal modules as just the regular module file, but with a _private suffix, as opposed to the current cmake logic, that treats it as the private module file, resulting in missing e.g. the Qt.foo.module entry. Change-Id: Id55ca4c23921656d5abfd1d0fdf6430d4fe120bf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QList/QVLA: default the parameter for indexOf/contains/remove/etc.Giuseppe D'Angelo2020-10-232-8/+8
| | | | | | | | This allows to use list-initialization when calling these functions, for instance list.removeAll({}). Change-Id: I2828d900a44bd0bc5aea5fba4777304b09190bc9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QList: make (last)IndexOf and contains function templatesGiuseppe D'Angelo2020-10-235-93/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no reason why they shouldn't be; one might want to do a lookup passing an object which is comparable with the list's value type (e.g. search with a QByteArrayView needle into a QByteArrayList haystack). Insofar we've had to add overloads to QListSpecialMethods for all these cases, which clearly doesn't scale and creates top-tier and low-tier lists. There is one downside, namely, calling QList<A>::indexOf(B) for a B for which there isn't an operator==(A, B) but only a conversion towards A. Before, B was converted only once (at call site), now it's converted at every call of operator==. In general: such types are broken and should be fixed on their own. However let's avoid a possible regression in client code, so I've left the QString overloads in QStringList in. To get there: centralize the implementation of those methods in a empty base class, which gets then inherited by QListSpecialMethods, which is inherited by QList. This is there are still special methods that may want to overload contains, e.g. QStringList which also passes a case sensitivity). The only breakages comes from code that was already broken, for instance mixing signed and unsigned types, and the beauty of this is that now we *detect* that instead of silently ignoring. QVLA and other QList methods will be tackled in future commits. [ChangeLog][QtCore][QList] The indexOf, lastIndexOf and contains methods now take an object of any datatype -- and not just the list's own value type. This allows for heterogenous lookup in QLists. Change-Id: Ib34812217eb2b0f926fad1fc195b33758196941c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix QSaveFile always failing on content: URLsVolker Krause2020-10-232-2/+14
| | | | | | | | QSaveFile needs QFileInfo::isWritable() to work, which 7e5f38aec667 caused to always return false for content: URLs. Change-Id: If839331e4bd176765ed242791cb253c2064f5f6d Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Fix tst_qsslkey to compile when SSL is disabledFriedemann Kleint2020-10-232-3/+5
| | | | | | | | Move it to the section requiring SSL tests since it requires QSslConfiguration. Change-Id: I5c807976ce75fa5967bddb8edd7788dbfbb89375 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: Allow docs generation without installing in top-level buildsJoerg Bornemann2020-10-232-5/+13
| | | | | | | | | | | | | | This patch allows in top-level prefix builds to build Qt and to generate the documentation without running cmake --install first. For top-level builds we now always use the qdoc binary from the build directory, not the installation directory. We also have to copy the global doc files to the build directory to make them accessible to the generate_docs target. Change-Id: I2251603418fc3df9a21c7f2892789e9ff6c8cc21 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Respect NO_PRIVATE_MODULE when generating module pri filesTor Arne Vestbø2020-10-232-50/+59
| | | | | Change-Id: Id5816d6598a0a484c20674f34f6f809e68671e6b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Don't add include paths to module pri if there are no headersTor Arne Vestbø2020-10-231-0/+6
| | | | | Change-Id: I8fa01f45410805399a511a87c6f04192ce42d374 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QSplitter: Respect managed widget's growth/expand size policyAles Erjavec2020-10-231-5/+5
| | | | | | | | | | | Use qSmartMaxSize to get the maximum size a widget can take. [ChangeLog][QtWidgets][QSplitter] Respect QSizePolicy::Maximum and QSizePolicy::Fixed layout policy of child widgets. Fixes: QTBUG-87133 Change-Id: I166ef3f6608303b8695f5c05a7bf0d1be4653f4a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove usage of deprecated QStandardPaths::DataLocationKarsten Heimrich2020-10-235-28/+15
| | | | | | | | | * Rearrange the documention to match the enumeration order. Fixes: QTBUG-87037 Change-Id: Iad001351e0f309e694b8bbd503813017e6586a21 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* 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>
* Make Q(Multi)Map equality operators documentation-friendlyVolker Hilsheimer2020-10-232-3/+16
| | | | | Change-Id: I1a84c437bb19dd3c667596c59e1404bbbf39978e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix documentation for QVariantRef and QVariantPointerVolker Hilsheimer2020-10-231-10/+10
| | | | | Change-Id: I86b749ec14876df98d5d873cf2274facea49f0c5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix documentation warnings for QProperty and related classesTopi Reinio2020-10-231-128/+43
| | | | | | Task-number: QTBUG-86295 Change-Id: I547f4cf34d9721f56ba1cd665218f66597ffbb5c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Deprecate QVariant::TypeLars Knoll2020-10-2362-673/+702
| | | | | | | | | 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>
* Fix and run the qlocalsocket autotest with cmake buildLars Knoll2020-10-233-32/+13
| | | | | Change-Id: I79691fe97e1373ffdc6a1b9b929f8a3fc2ef863d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Do not store non relocatable types in QVariants internal storageLars Knoll2020-10-233-5/+33
| | | | | | | | | | | This mostly reverts change 76e8e8e9c8093f093cb9f37d61d273f43398fefb. The reason is that storing non relocatable types inline in QVariants storage would implicitly make QVariant non relocatable. Fixes: QTBUG-87686 Change-Id: I2a09b1dcdd907d60085dccf17f987086dcba878c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make some QMetaType members constexpr and inlineLars Knoll2020-10-232-35/+35
| | | | | | | | | Since QMetaType::fromType() is constexpr, it makes sense to also make some of it's members constexpr. Change-Id: Ia2d63a904abb680ed63c1f88cb68f1d0309d029c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Rename the QMetaType::MovableType flag to RelocatableTypeLars Knoll2020-10-235-7/+11
| | | | | | | Keep this in sync with the changes we have done in QTypeInfo. Change-Id: Iaacb0f3cc5c46d3486084a1f6eca480a233d5e1a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Support Java style iterators for QMultiHashLars Knoll2020-10-232-134/+65
| | | | | | | | | Take the opportunity to clean up the implementation for QHash and use the standard macro there instead of an inlined copy. Fixes: QTBUG-86986 Change-Id: Iea846ca97bd8b9be5d6534b31d4c7707fd1a53e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Export gbm device integration to build it outsideElvis Lee2020-10-2340-113/+280
| | | | | | | | | | | Support external build for device integration which uses kms and gbm. QKmsScreenConfig supports inheritance to consider platform specific screen configuration. Task-number: QTBUG-85268 Change-Id: Iac58898a9cf0bb1d53237a719667a6ebd53d88b9 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QPaintDevice: Remove reserved without reservationsFabian Kosmale2020-10-232-4/+0
| | | | | | | | | | | | It was not during all of Qt 5, and nobody found a use for it when transitioning to Qt 6. It's probably safe to assume that we will not need it during Qt 6's lifetime either. This changes shrinks QPaintDevice to 16 bytes (on 64bit systems), and its child classes like QImage to 24 bytes, meaning that they fit into QVariant's SSO buffer. Change-Id: Ic3b020ad43afe45c76ca0c4056a440345a4e139e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Make QPointer comparisons hidden friendsAllan Sandfeld Jensen2020-10-233-44/+26
| | | | | | | Reduces ADL noise. Change-Id: Id0aa4b32b7bb6d70ed9106b949452d895d9060a9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add benchmark for QString::number(int)Andreas Buhr2020-10-231-0/+9
| | | | | | | | Add a almost trivial benchmark for QString::number(int). Change-Id: Ice67eaf28e8d7b235fd5ec5e0b87b3b9053ae61e Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QRectF/QPointF/QSizeF: document that operator== and != are fuzzyGiuseppe D'Angelo2020-10-233-8/+37
| | | | | | | | | | This has been the case for a _very_ long time, and I can't believe this hasn't been documented anywhere. Change-Id: Ib157edf14e87a6f546c155496f70a760ab218cca Pick-to: 5.15 5.12 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* CMake: Check for system_xcb_xinput featureAlexandru Croitor2020-10-231-1/+1
| | | | | | | | | | | | | | When compiling the xcb qpa plugin we should check the value of the 'system_xcb_xinput' feature to decide whether to use the system library or the bundled one, instead of checking for the existence of the XCB::INPUT target. This fixes -DINPUT_bundled_xcb_xinput=yes aka -xcb-native-painting to influence what gets built into our release Linux packages. Task-number: QTBUG-86053 Change-Id: I78c5eaacb7b6bd6e46afea49189e6111e198fb27 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix headersclean to build with proper flagsAlexandru Croitor2020-10-231-11/+74
| | | | | | | | | | | | | | | | It's not sufficient to pass -I{prefix}/include when doing the header clean check. We need to propagate all target include directories and compile definitions, and also the compile flags for good measure. For macOS frameworks we also need to explicitly pass an -iframework flag (qmake passses -F instead), to ensure that <QtGui/qfoo.h> style includes are found when building other repos than qtbase. Task-number: QTBUG-82615 Change-Id: I76d12340bc01c5c948ff04df9a3df384dcb7e076 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Use compiler launcher for headerclean rulesAlexandru Croitor2020-10-231-2/+8
| | | | | | | | | This ensures ccache or sccache is used to cache the compilation of the headerclean checks. Task-number: QTBUG-82615 Change-Id: Ie944eb1d643e7271551c9f8337609741e419e9d8 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Fix headersclean to work on macOSAlexandru Croitor2020-10-231-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears there's a difference between the chosen macOS compiler path in the CI versus the compiler path on my local machine. In the CI the chosen compiler path ends up 'being /usr/bin/clang++' whereas for me locally it's /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ For some reason the headersclean commands succeed in the CI, but locally they fail for me saying that standard library includes can not be found, unless an explicit sysroot flag is specified. I assume that in the CI the '/usr/bin/clang++' compiler shim chooses some implcit sysroot, whereas the longer Xcode compiler expects an explicit sysroot. It's probably also affected by the fact that in the CI we pass an explicit CMAKE_OSX_SYSROOT to a non-standard Xcode location e.g. /Applications/Xcode11.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk Note the '11' in the Xcode app name. Locally I don't pass a custom CMAKE_OSX_SYSROOT, and my Xcode is installed in a regular location e.g /Applications/Xcode.app. The sysroot flag and path is added to regular CXX compilation rules inside CMake's core (in cmLocalGenerator.cxx). Reuse the same variables that CMake uses and add them to our headersclean command rules. Task-number: QTBUG-82615 Change-Id: Ic03ea27e39471f5fa168eb5970bf3d3f1d1be251 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Add convenience custom targets to build Qt pluginsAlexandru Croitor2020-10-223-0/+26
| | | | | | | | | | | | | | Add 3 new convenience custom targets: 'qt_plugins', 'qpa_plugins' and 'qpa_default_plugins'. Additionally, if we detect that an internal executable / test links against Gui, add a dependency on the 'qpa_default_plugins' custom target, so that if a developer configures Qt for the first time and then calls ninja 'tst_foo_check', we ensure the test will launch successfully because the default QPA plugin will also be built. Change-Id: If6dd70844b5effdf8a293f65f8785855cc85b132 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Prepare for having multiple highdpi manual testsMorten Johan Sørvig2020-10-2312-10/+10
| | | | | | | | Move the existing “kitchen sink” test out of the way, and rename it to “kitchensink” Change-Id: I121260e640bb2810a94f8112fcea212e97055fb3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qWaitFor: check predicate before sleepingMorten Johan Sørvig2020-10-221-4/+3
| | | | | | | | | | | | | | | | Return immediately if processing events caused the predicate to become true. This gives us a nice speedup on tests with call qWaitForWindowExposed() or qWaitForWindowActive(), for example tst_QGraphicsView::itemsInRect_cosmeticAdjust: cocoa 1164ms -> 825ms ~30% decrease offscreen 296ms -> 15ms ~95% decrease Change-Id: Ifbab0ca662c082e7dfb609d0cb4bc1161709067b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix documentation for QIterable and related classesVolker Hilsheimer2020-10-231-81/+80
| | | | | | | | Correctly specify template parameters, fix typos, add \fn where missing, explicitly specify scope in see-also references. Change-Id: I8b04a2b76033b206098e816d1d07d105b838c260 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix documentation for hidden friend operatorsVolker Hilsheimer2020-10-2311-177/+80
| | | | | | | | At least for qdoc, hidden friends are class members. Change-Id: I6eaa21565937cd49c0905ee47b8b82b0c1765bc1 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* doc: Fix table bottom marginTor Arne Vestbø2020-10-231-2/+2
| | | | | | | | | | It was way too small, and should match the margins for other content such as paragraphs, so that an inline table in between two paragraphs has a balanced spacing. Change-Id: I2adb434ac7773e9796199f40d5318368ca380aca Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Use parameter_type in QList methodsAndrei Golubev2020-10-224-30/+32
| | | | | | | | | QList::parameter_type is defined and used to give better performance e.g. for arithmetic types. Let's use it consistently in QList API instead of const T & Change-Id: I2e12bd83f55679b55a14fbb23ab6172a9cf7bbcc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Remove superfluous del call in qt-configure-module.batJoerg Bornemann2020-10-221-1/+0
| | | | | | | We're ensuring its existence right in the next line. Change-Id: If7a55511c9ef839a9f9ae70a7928b58ad768ae65 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix running qt-configure-module without argumentsJoerg Bornemann2020-10-221-1/+1
| | | | | | | | | We need to make sure to create a config.opt file, even if it's empty. This is the same fix we did for the .bat file in dad9550305831784f124c44d08e1e20983415bda. Change-Id: I79c507cfe0f9517d3033a773d3a5cf69eb13cfe6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Do not prepend -l to libs starting with dash in prl filesJoerg Bornemann2020-10-221-1/+1
| | | | | | | | For example, we must not prepend -l to -pthread, -framework and -lfoo. Fixes: QTBUG-87760 Change-Id: Ie1bc7a76183c2c4980c519b5f23dde6c47ec85a9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Advertise qt-configure-module in configure outputJoerg Bornemann2020-10-221-1/+5
| | | | | | | | | ...instead of qt-cmake-private. Also, add ".bat" on Windows. Change-Id: I2aa94ac76f2dadfb8e94d68b19bb379b3d45a93d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix CMake generator auto-selection on WindowsJoerg Bornemann2020-10-221-1/+1
| | | | | | | The variable to check for a Windows host system was mis-typed. Change-Id: I25b14b80d25bfec0c1a00e99833520b6fb6a4b02 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Allow paths with backslashes in qt-configure-module.batJoerg Bornemann2020-10-221-0/+1
| | | | | | Fixes: QTBUG-87730 Change-Id: I93172062ec8dfd86529491ffb031edbd2e24592a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* tests: blacklist tst_QGraphicsAnchorLayout::layoutDirection()Liang Qi2020-10-221-0/+2
| | | | | | | | | | | on Ubuntu 20.04 There is some issue with the glib event dispatcher. Task-number: QTBUG-87728 Pick-to: 5.15 Change-Id: I4d64206898dd2c8356d5fc51a68c2e5759b38aac Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* tests: blacklist tst_QMdiArea::tileSubWindows() on CentOSLiang Qi2020-10-221-0/+1
| | | | | | Task-number: QTBUG-87768 Change-Id: Iad86e3114e546c0cab92f0fccdc7a265575a687e Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* CMake: Pad the configure summary string with one more dotAlexandru Croitor2020-10-221-1/+1
| | | | | | | | This makes the diff-ing of the config summary between qmake and CMake builds correct. Change-Id: I720b69572c23afd78e6d0bea6cdf0740980c3b36 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Fix INPUT_* names with dashesJoerg Bornemann2020-10-221-1/+2
| | | | | | | | | | | | In configure.json files we have inputs with dashes, e.g. bundlex-xcb-xinput. In configure.cmake files, these are read in their normalized form, e.g. INPUT_bundled_xcb_xinput. Normalize the input names in QtProcessConfigureArgs.cmake like we already do for feature names. Change-Id: Iece414d40a0e9e2920580f2fda68e25cd32674c9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>