summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | Fix a few test cases to not rely on QMultiHash only API for QHashLars Knoll2020-01-302-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If4a741adec6f93d14bd5b21baa1dd062b49898ec Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | Adjust QVariant autotest to prepare for upcoming QHash changesLars Knoll2020-01-301-24/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QHash won't contain an insertMulti() method anymore. Change-Id: I507e76d496c3a33a6e88d15aa30df06c07eeba9f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | Split QHash and QMultiHash in auto testLars Knoll2020-01-301-7/+60
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0f31feaca740abe33f36a8c117d64447ddcc8043 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | Make QTypeInfo::Tampered usableLars Knoll2020-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inheriting privately means QTypeInfo is unusable. This worked so far, as it wasn't used by anybody. Change-Id: I747fafce4ed83188dcb5d727bc65de9d041059d6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | Fix tests in QHash that would read beyond end()Lars Knoll2020-01-301-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A couple of tests in the QHash autotest could iterate beyond end(), leading to undefined behavior. This is bound to crash with the new upcoming QHash implementation. Change-Id: I977fc939e6e472f05b7cb2fa0a79c2d5f8782f45 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | Don't enforce C++11Lars Knoll2020-01-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We require C++17 in Qt6 Change-Id: I2dde485524208a1c7131869f4267f44ad2b32e9f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | Remove deprecated functionality from QSetLars Knoll2020-01-302-202/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove support for reverse iteration over a QSet. Change-Id: I1e9c986a118aea4ebeb7fcdceb41e9ce6593cdb6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | Adjust autotest to coming QHash changesLars Knoll2020-01-301-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QHash and QMultiHash are separate classes in the future, and the iterator is not random access. Change-Id: I7e1a4162ca964001c8da81a2fd7c41ccae27bdb3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | Some fixes to collection autotestLars Knoll2020-01-301-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split QHash and QMultiHash, and get rid of some compiler warnings. Change-Id: I48991f097f408ad5c1aa349443e26ab816e0b736 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | Prepare for separating QHash and QMultiHashLars Knoll2020-01-301-142/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepare the test cases so that QHash and QMultiHash are used as if they were fully independent classes. Change-Id: Iaf5d65c8f6321ec2edaef490e657b144619655a0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | Ensure we use UTF-8 for the emitted QLocaleXML data fileEdward Welbourne2020-01-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python helpfully uses a sensible locale when stdout is a tty but uses the system (not the filesystem) default encoding, which may be ascii and unable to encode some of the data we need to save. So brute force kludge it to ensure sys.stdout.encoding is UTF-8 when writing the output we'll read as UTF-8 anyway. Task-number: QTBUG-79902 Change-Id: I218dc0ec4c71a6b1b7181db55b018266d803bc58 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | | Use INSTALL_QMLDIR instead of Qt6_DIR for qmltypes propertiesLeander Beernaert2020-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic7e6230656670ebe925530eea5e34b16b6fea59b Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | | Use INSTALL_DOCDIR when possibleChristophe Giboudeaux2020-02-121-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardcoding 'doc' causes issues when installing qtbase but also when trying to build the other modules documentation. Change-Id: I5c57852add59d0dc0d067813feea0bbb0962c84b Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | | Add library mapping for QtShaderToolsMårten Nordheim2020-02-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ideefd13d75bdd4e0463c0f7b1e15c0781cfffe8c Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | | Add support for qt_helper_lib()Leander Beernaert2020-02-123-0/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add qt_add_3rdparty_library() function as a replacement for qmake's qt_helper_lib feature. All 3rdparty libraries will be available under the Qt:: alias when built through this method so that they can properly register as dependencies of a Qt module. This patch also adds Qt3rdPartyLibraryConfig.cmake.in to export the CMake configuration for static builds and shared libraries. Change-Id: I52bf3a95ca22fccd9ab54343468847bb1b570c28 Fixes: QTBUG-81969 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | | Only export public module link dependencies for shared buildsLeander Beernaert2020-02-122-2/+11
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unless we are building under a static library configuration there is no reason to export the dependency on private libraries. Change-Id: I724da38495dc55cc2783d4b19c01533fc0900d22 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | / Fix typo for Mtdev pkgconfig targetSamuli Piippo2020-02-111-1/+1
| |_|/ |/| | | | | | | | | | | | | | Change-Id: Id6e7057e8010f67ba1c8ce948abc59bc7abf7b7b Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Refactor Metatypes dependency propagationLeander Beernaert2020-02-104-139/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every metatypes.json files is now added as an INTERFACE source file to a target. This enables us later to correctly collect all the metatypes.json files from dependent targets. This information is also correctly exported via export()/install(). To avoid the metatypes.json appearing in every target's source list, the file path is wrapped in a generator expression which will only be evaluated when the consuming target has the property QT_CONSUMES_METATYPES set to true. At the moment this is limited to targets which need to interact with qmltyperegistrar. Change-Id: I0ffebcd069a923383f7ed11cde2c94ecf2fb13f3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Use posixpath when generating relative pathMårten Nordheim2020-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes generating some paths with the backslash in the beginning Change-Id: Ic7705d61f9362d3b854b2eb95f95a8951beca72d Reviewed-by: Qt CMake Build Bot Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* | | Fix cross compilation builds with template v2Alexandru Croitor2020-02-072-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure to split the command arguments after variable substitution like it is done in call_cmake.yaml. Amends d445112cc03d730d659d1eeaa84d963f85731ac5 Change-Id: Id23fcfa5b58c33e05495413fb10349fbcff1bfac Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | cmake: upload artifact for qtbase android build and etcLiang Qi2020-02-078-30/+210
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-78945 Change-Id: I3361e63ed4830ac0e1ebb9d4b9495df09c45f476 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Don't add private module headers for private modules when not neededAlexandru Croitor2020-02-061-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a module has the NO_MODULE_HEADERS option, we should not add the private module header paths to the BUILD_INTERFACE of private modules. This fixes building static non-prefix qtdeclarative builds on Linux, where non-existent QtXcbQpa headers failed the qtdeclarative generation step. Change-Id: Ic9fdd8c5688d3449576eb8a5dd852c252e29bf5b Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Add necessities for qtquick3dMårten Nordheim2020-02-061-0/+1
| | | | | | | | | | | | | | | Change-Id: I39aadda7ed2b088a475ba5f940d1cb65b5b62f94 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Remove qt_add_qml_module() from QtBuildLeander Beernaert2020-02-061-169/+0
| | | | | | | | | | | | | | | | | | | | | | | | This bit is being move to QtDeclarative as it is not required to build QtBase. Change-Id: I7b559b8b0e33e66d92c97c93bc43b650e7150237 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Load module specific extensions for QtBuildInternalsLeander Beernaert2020-02-062-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables each module to load their own Qt${version}ModuleBuildInternals.cmake to expose module specific features when building Qt. These scripts are only loaded when the package QtBuildInternals has been loaded. Change-Id: Ie58dd93ddd292cf106fe7ef147151a51fd5aa2b1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Safeguard against multiple definition of dbus-1 targetLeander Beernaert2020-02-061-0/+4
| | | | | | | | | | | | | | | | | | Change-Id: Ibba9ce7ce472fe2939386065087f0b07ad811c3f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* | | Fix qt_add_qml_module() for non-prefix buildsLeander Beernaert2020-02-051-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always set the installation directory for Qml modules as it is required for qt6_add_qml_module() to set the correct properties so that qml files can be copied to the right location. This patch also fixes the copy of qmldir. As it previously stood, the copied file was not complete as it is possible fore the contents to change after we exit this function. Change-Id: I974269cf0507664b005a93bf27ab19941d99f1d6 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Allow manually specification of moc.json files for metatype generationLeander Beernaert2020-02-053-51/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt6_generate_meta_types_json_file() has been extended to allow the generated moc_....cpp.json files to be manually specified. This now enabled the metatype generation to be used without resorting to AUTOMOC. Additionally, Core_qobject declaration order has been temporarily moved as it otherwise does not produce the correct metatypes dependency file for Core. This will be fixed in a follow up patch. Change-Id: I3266ab3073db478458a0c1dbc8b9fbab16622a64 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Regenerate projects to correctly handle private dependenciesAlexandru Croitor2020-02-05115-661/+344
| | | | | | | | | | | | | | | | | | | | | Change-Id: I7d84bc9962bff5c89a90367ae704974c6ce2ec89 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | pro2cmake: Handle QT += core-private correctly for modulesAlexandru Croitor2020-02-052-14/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a module project (Quick) contains QT += core-private, the qmake semantics translated to CMake would mean the following: target_link_libraries(Quick PUBLIC Core) target_link_libraries(Quick PRIVATE CorePrivate) target_link_libraries(QuickPrivate INTERFACE CorePrivate) Whereas a QT_PRIVATE += core-private only means target_link_libraries(Quick PRIVATE CorePrivate) without adding any public dependencies to QuickPrivate. To achieve that, we need a few modifications to both pro2cmake and QtBuild.cmake - pro2cmake doesn't automagically add public and private dependencies to targets when encountering a private module assigned to QT. Instead it generates the logic described above by passing correct LIBRARIES, PUBLIC_LIBRARIES, and PRIVATE_MODULE_INTERFACE values. - pro2cmake doesn't do any dependency magic for non-module targets anymore, like executables, plugins, internal_modules. This means that QT assignments are now regular public dependencies. - qt_add_module and qt_extend_target now accept a new PRIVATE_MODULE_INTERFACE option. - qt_extend_target does not automagically make private modules be public dependencies on other private modules. - qt_extend_target correctly assigns PRIVATE_MODULE_INTERFACE values to Private module only. For other target types, it's a no-op. The change requires regeneration of all projects. When we fix pro2cmake and QtBuild.cmake to properly handle internal_modules (create only Private modules without creating a non-Private counter part), we will need another project regeneration to correctly assign dependencies. Change-Id: I4c21f26b3ef3b2a4ed208b58bccb65a5b7312f81 Task-number: QTBUG-81780 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Add additional include path for DRMSamuli Piippo2020-02-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tegra has drm.h header in include/drm instead of include/libdrm Both paths are defined in libdrm.pc, but those are not used since this cmake file searches only for xf86drm.h. Change-Id: If1e979c7d5aec520b18eed5b3fcbb5ac2e15cc62 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | qtbase: don't use neon flags on arm64Samuli Piippo2020-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | NEON is mandatory for aarch64 and compiler doesn't recognize -mfpu=neon commandline argument. Change-Id: I36e9c40e3fd3604d4895da0526152e90b2165770 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | qtbase: use syncqt.pl from QT_HOST_PATHSamuli Piippo2020-02-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use syncqt.pl from QT_HOST_PATH if that is given, since qtbase sources might not be available and CMAKE_INSTALL_PREFIX doesn't check for sysroot. Change-Id: I165b17a5a02fd4dbb2340bf69a641b8aaab8fabd Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Remove retained quick compiler resource filesLeander Beernaert2020-02-051-22/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove retained file feature as the expected behavior now is for the compiled file to be retained by default. Change-Id: I5a791a182825b223eb4497970fbb1c47c70135cc Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Regenerate rest of qtbaseAlexandru Croitor2020-02-043-0/+33
| | | | | | | | | | | | | | | | | | Change-Id: I3a1ce255d26522d8ad6694c5b0daaa53fb694de3 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Regenerate examplesAlexandru Croitor2020-02-04276-466/+5714
| | | | | | | | | | | | | | | | | | Change-Id: I04b2adbe370ffea81d7787ad90e4ae69d2c165cb Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Update add_custom_command and add_custom_target dependenciesLeander Beernaert2020-02-036-20/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we don't add the executable used by the custom_target and/or custom_command to list of the command's/target's dependencies (DEPENDS) the generated file will not update should the executable change. Change-Id: Idce30f3dd4f756d9e8f6848c5e16f5dd6c7c8f0a Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Don't hardcode the include directory nameChristophe Giboudeaux2020-01-313-8/+8
| |/ |/| | | | | | | | | | | | | | | | | | | | | Hardcoding "lib" caused build issues and wrong INTERFACE_INCLUDE_DIRECTORIES paths in generated CMake configuration files if INSTALL_INCLUDEDIR pointed to a different location. Contributes to QTBUG-81289 Change-Id: I3276ecbb4bf5df1c0b4c496c0287b4a69586d683 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Don't hardcode the library directory nameChristophe Giboudeaux2020-01-311-3/+3
| | | | | | | | | | | | | | | | | | INSTALL_LIBDIR may point to a different directory than "lib". Contributes to QTBUG-81289 Change-Id: Ia8220515e3ee3703539aa28655e6c806736615ec Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Don't hardcode the binary directory nameChristophe Giboudeaux2020-01-312-14/+14
| | | | | | | | | | | | | | | | | | | | | | INSTALL_BINDIR may point to a different location than "bin". In order to avoid errors when trying to install qtbase, "bin" is replaced with "INSTALL_BINDIR" where necessary. Contributes to QTBUG-81289 Change-Id: I1d4f9fb2617547c9b0e44d6690caebb2b6768e2f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add INSTALL_MKSPECSDIR to the install locationsChristophe Giboudeaux2020-01-313-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | Linux distributions may want to install mkspecs files into a different subdir in order to make Qt6 co-installable with older versions. Contributes to QTBUG-81289 Change-Id: Ie4a64370d742948d5ca4f2eaed6ea550d2676707 Reviewed-by: Qt CMake Build Bot Reviewed-by: Christophe Giboudeaux <christophe@krop.fr> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix CMAKE_BUILD_TYPE to be force setAlexandru Croitor2020-01-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | Otherwise CMake sets an up an empty default value itself, and then the value in QtBuildInternalsExtra does not end up being used, and then QtSetup ends up setting a Debug value. Amends 34a112e383d4ce3f6fe7417c1873fd3b33176032 Change-Id: If97a1d8c19ad5e7f690283997ff80dd9588cd521 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Post-merge fixesAlexandru Croitor2020-01-3023-88/+151
| | | | | | | | | | Change-Id: I6acd29103f6cc550544e7422328d97ea0e2dcafb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-29432-2011/+12954
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/Qt5CoreConfigExtras.cmake.in src/corelib/Qt5CoreMacros.cmake src/dbus/Qt5DBusConfigExtras.cmake.in src/widgets/Qt5WidgetsConfigExtras.cmake.in Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
| * Merge "Merge remote-tracking branch 'origin/5.15' into dev"Simon Hausmann2020-01-28119-341/+9757
| |\
| | * Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-01-28119-341/+9757
| | |\ | | | | | | | | | | | | Change-Id: Ia5727ce68001bcaab467f5fae3a4933d1217015f
| | | * Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-01-2854-185/+9411
| | | |\
| | | | * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-2854-185/+9411
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qpnghandler.cpp Change-Id: I8630f363457bb613d8fb88470a71d95d97cdb301
| | | | | * Doc: Update the stylesheet reference for widgets and richtextVenugopal Shivashankar2020-01-272-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the Qt-specific properites to the list. Fixes: QTBUG-37938 Change-Id: I178de6cd5e17cd282a20ccee9ce8355f540c38a1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | | * QScrollArea: fix off-by-one error in ensureWidgetVisibleIndiana Kernick2020-01-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If focusRect was 5 pixels past the right side of the viewport, then the scroll area would need to be scrolled by 5 pixels. The error arises because of this: focusRect.right() - d->viewport->width() == 4 focusRect.right() is still inside the rectangle but width is not. So one has to be added. Likewise for focusRect.bottom() and height. Change-Id: Ice47a7758d136b2e4bdcbe25a33a015b37f500c1 Fixes: QTBUG-80093 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>