summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Brush up QTestlib/generate_expected_output.pyFriedemann Kleint2021-01-151-72/+78
| | | | | | | | | | | | | | | - Generate the expected files in the source tree, removing the need to copy them over - Add proper option parsing, add options for formats and to skip the callgrind test, which locks up - Determine the script location by __file__ - Determine the Qt version by reading the .cmake.conf file - Introduce f-strings - Print the usage when invoked in the wrong directory Task-number: QTBUG-86540 Change-Id: Idabb50a14db60127374b7a1271951dbbbc85d131 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix missed feature evaluation errors in reportAlexey Edelev2021-01-152-4/+10
| | | | | | | | | | | | Add an optional argument to store the report command while feature evaluation-only stage. This is necessary, because according to the actual feature evaluation process, evaluation happens only once and it's impossible to record any command during the evaluation-only stage. Fixes: QTBUG-90319 Change-Id: I215fbe0a28a2661cd2d97d253b2e2c787d295cbd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Fix setting active window as application's focus widgetSona Kurazyan2021-01-152-4/+45
| | | | | | | | | | | | | | | | | | | | | | When setting the application's focus widget we search for the next child widget that can hold the focus and call its setFocus() method, which also updates focus widgets of all its parent wigets. In case if the focus widget is the active window itself, we only set it as the application's focus widget, but we don't update the focus widget of the active window itself. Because of this the focusWidget() method always results nullptr for the active window. This prevents from setting the focus back to active window after the focus has changed (for example after a context menu is closed, as in the bugreport). Transfer the focus to active window by calling the setFocus() method, as it is done in case of transferring the focus to any other widget. Pick-to: 6.0 5.15 Fixes: QTBUG-85846 Change-Id: I91ebf182fd5bb7d451a1186e2f3e38c8d48acc4e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tst_qdom: clean-up the code enabled only before Qt 6Sona Kurazyan2021-01-151-153/+4
| | | | | Change-Id: Ifcf863ccb2094661b43bd5ccf8387960447ddd8e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Document QOpenGLWidget limitations without an alpha channelLaszlo Agocs2021-01-151-0/+13
| | | | | | | Pick-to: 6.0 5.15 Task-number: QTBUG-85869 Change-Id: I20fb70a451fc1ed93089ed699539fa12ac38fe73 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* qvkgen: Skip command elements with aliasLaszlo Agocs2021-01-151-2/+5
| | | | | | | | | | | | | | | | | | Otherwise we end up with generating broken qvulkanfunctions cpp and h files. For example, encountering the following command element should lead to taking no action, this is not something we want to emit a corresponding wrapper function for: <command name="vkResetQueryPoolEXT" alias="vkResetQueryPool"/> This is required to be able to upgrade the bundled vk.xml to something newer. Fixes: QTBUG-90330 Task-number: QTBUG-90219 Change-Id: Ie6e3a8794207e30a172820eb055238bf52a0c0b9 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix convertToRGBA64PM for Grayscale16Allan Sandfeld Jensen2021-01-151-2/+1
| | | | | | | | | | The input has been fetch into a set of uint32s, so no longer a string of ushorts. Pick-to: 6.0 5.15 Fixes: QTBUG-90246 Change-Id: Id52a6824317b0744310008cc2ce2f726539b4c8c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* CMake: add CoreLocation framework for macOSIvan Solovev2021-01-151-0/+1
| | | | | | Task-number: QTBUG-89854 Change-Id: Icd52a6dd0ae36ae91599ab9a583e6920f2d2ba4c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* RHI: Use QT_BEGIN_LICENSE:LGPL headerKai Köhne2021-01-1529-318/+405
| | | | | | | Task-number: QTBUG-90321 Pick-to: 6.0 Change-Id: If3b0841f3e9139bb1911c6a5d03a16daf8c1b3d6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc: Clarify setLibraryPaths behaviorPaul Wicking2021-01-151-3/+4
| | | | | | | Fixes: QTBUG-89130 Pick-to: 6.0 5.15 Change-Id: Id8460fd00dcfdcca174d523f8d97baef1a764f6f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Prevent compiler and linker flags from growing every cmake runCraig Scott2021-01-154-161/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Functions in QtFlagHandlingHelpers.cmake try to update the CMake cache variables for compiler and linker flags. These were using the current value of those variables and writing the modified ones back to the cache every time CMake ran. If a toolchain file sets or modifies any of these variables, that updated value is used and written back into the cache instead of the original cache variable's value. The next time CMake executes, the toolchain file re-applies the same change and the variable grows longer each time with flags repeated. With Ninja, this causes a complete rebuild every time CMake is re-run. The Android NDK toolchain file is one example where this behavior is triggered (the fault is shared, one could argue that the NDK should only be setting ..._INIT variables, but that's out of our control). Another related bug in the previous implementation was that the flags used to build after the first CMake execution could be different to those used for all builds after the second and later CMake runs. This is because the CMake cache was being updated, but not always the calling scope of the functions that modified them. If a toolchain file set any of the compiler or linker flag variables as non-cache variables, then updating the cache variable would have no effect on the calling scope. The non-cache variable would continue to take precedence for that scope for that run. The next time CMake executes though, the updated cache variable would now have been used by the toolchain file and the change *will* be part of the non-cache variable's value. The above are examples of why you should try to avoid updating these cache variables from project code. We could leave the cache alone and always update only non-cache variables, but then a developer looking at the cache may wonder why the values they see there don't match the values being used in builds. Or worse, they think the cache values are being used and don't realize the builds are using something different. Ultimately, we have to choose which downside we are happy to live with. The changes here preserve the previous intent of updating the cache, but it's still a bit fragile. Fixes: QTBUG-89821 Task-number: QTBUG-85992 Task-number: QTBUG-86866 Change-Id: I8a16753e159bde338e6d2e5dd2ce91fc8ac5c39d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update vkmemalloc to 2.3.0Laszlo Agocs2021-01-159-1169/+2292
| | | | | | Task-number: QTBUG-90219 Change-Id: I382f59edbc869fd4f3557411264f290e9fd5dee5 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix the tips still show when cursor move to another actionQiang Li2021-01-153-1/+59
| | | | | | | | | | | | In this case, the previous action's tip is still displayed when the cursor moves from one action with tip to another action without tip. Fixes: QTBUG-89082 Pick-to: 5.15 Pick-to: 6.0 Change-Id: I0a00595dc3d716725678487be9cbb363c4d3b392 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Document the qt_no_entrypoint target propertyJoerg Bornemann2021-01-152-0/+19
| | | | | | Fixes: QTBUG-90031 Change-Id: Ib3e7e9d966ee64f97fdd3df48b3fa5325d19cc6c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QTabBar/Windows: Fix close button icons being too small on high-res screensFriedemann Kleint2021-01-156-11/+32
| | | | | | | | | | Add 32x32 versions. Move the icon creation to a helper function. Fixes: QTBUG-88230 Pick-to: 6.0 Pick-to: 5.15 Change-Id: I6dda2084e0122234eacea17ac191a19f6855f466 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix QApplication::font returns the font unstable according to the objectChunLin Wang2021-01-152-7/+53
| | | | | | | | | If a default font was not registered for the widget's class, it returns the default font of its nearest registered superclass. Fixes: QTBUG-89910 Pick-to: 5.15 6.0 Change-Id: I6e6b2c6a0044462f84db9f76a03be0c6cfaaae8e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* If available, use a version-specific qt<major-version>.confRalf Habacker2021-01-142-4/+14
| | | | | | | | | | | To enable the current Qt version to use a qt.conf that is independent from the previous version, a file named 'qt<major-version>.conf' is searched for first. If this file does not exist, a file with the name 'qt.conf' is searched for. Task-number: QTBUG-88635 Change-Id: If75b63f72a7bdbdf1de7729ea4ecb00810b58d12 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Interbase: Don't error out if closing an already closed cursorAndy Shaw2021-01-141-1/+7
| | | | | | Pick-to: 6.0 5.15 Change-Id: If6964f5ae45c5ca4c0b34e417326fea1f33d7628 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Widgets: fix setTabOrder for QAbstractSpinBox-like widgetsIvan Solovev2021-01-142-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setTabOrder was not considering the case, when a child widget has its focus proxy set to its parent widget. This happens, for example, for the QLineEdit that is nested inside the QAbstractSpinBox. For such cases the lastFocusChild was calculated incorrectly, and, as a result, such child widgets were not correctly positioned in the focus chain. This could lead to an error while backtabbing. Here is a brief example. Suppose we have 3 widgets arranged like this: auto spinBoxOne = new QDoubleSpinBox; auto spinBoxTwo = new QDoubleSpinBox; auto button = new QPushButton; Then the default widget focus order is: - spinBoxOne - lineedit (from spinBoxOne) - spinBoxTwo - lineedit (from spinBoxTwo) - button Before this commit setting the explicit tab order changed the focus order in the following way: QWidget::setTabOrder(spinBoxOne, spinBoxTwo); QWidget::setTabOrder(spinBoxTwo, button); - spinBoxOne - spinBoxTwo - button - lineedit (from spinBoxOne) - lineedit (from spinBoxTwo) In this case, backtabbing from spinBoxOne actually leads us to lineedit (from spinBoxTwo), which refers to spinBoxTwo. And so we're stuck in a loop. This commit fixes the issue by handling such special case, and preserving correct focus order. Note: the actual unit-test in this patch uses QLineEdit instead of QPushButton, because one can't tab to buttons on macOS by default. However the general idea is the same. Pick-to: 6.0 5.15 Fixes: QTBUG-81097 Change-Id: I5d16da7733a4d63f809cab28b8ca9e116b87cffa Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* AA_SynthesizeTouchForUnhandledMouseEvents: keep correct coordinatesShawn Rutledge2021-01-142-7/+14
| | | | | | | | | | | | | | | | | | | | | QGuiApplicationPrivate::processMouseEvent() sends a QWindowSystemInterfacePrivate::TouchEvent if the mouse event is not accepted and AA_SynthesizeTouchForUnhandledMouseEvents is enabled. A QPA TouchEvent always contains native touch points, which is why it calls QWindowSystemInterfacePrivate::fromNativeTouchPoints to translate the QMouseEvent's device-independent position back to the raw position that it would have had if it came from a real touchscreen. Therefore we must give that function touchpoints that are actually in native coordinates. It may be that some of this transformation could be avoided entirely, but here we prove that the existing way works correctly, by adding coordinate checking to the tst_QWindow::mouseToTouchTranslation() test. Pick-to: 6.0 Task-number: QTBUG-86165 Change-Id: I4c9ca2b11e9eb76d79712c187db3eb9865da581a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QPushButton/fusion style: don't ignore QIcon::On iconChristian Ehrlicher2021-01-141-8/+0
| | | | | | | | | | | | | | | The fusion style did ignore the QIcon::On icon because it reset State_On to avoid the visual shift of a pressed button. But it's not needed to reset this flag - the shift does not happen because the fusion style does return 0 as offset for PM_ButtonShiftHorizontal/PM_ButtonShiftVertical so no shifting will happen. Fixes: QTBUG-86736 Fixes: QTBUG-82110 Change-Id: Ie2aaddb14bc67874f5a9a23d9f04d7a08c6d070f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Lower the CMake minimum required version for single-config buildsJoerg Bornemann2021-01-142-1/+11
| | | | | | | | | | | | | | | | | | | | Ubuntu 20.04 is a supported platform and comes with CMake 3.16. The current state of the Qt build works fine with this CMake version, mainly because the default build on Linux is single-config. For multi-config builds we have higher version requirements as documented in cmake/README.md. This lowers the barrier for users using single-config builds who don't want or cannot upgrade to CMake >= 3.18. For Ninja Multi-Config builds, which were introduced by CMake 3.17, we yield a warning that 3.18.3 is the lowest supported version. Pick-to: 6.0 Change-Id: Ia918b9f2b494508e86301ffc0e138d3ad4dbaf86 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Skip tst_qhighdpi when offscreen is not builtMorten Johan Sørvig2021-01-142-4/+3
| | | | | | | | | | | | Android and Wasm do not build the offscreen platform plugin (see src/plugins/platforms/CMakeLists.txt). Skip building the tst_qhighdpi test as well in this case. Remove the BLACKLIST entry. Task-number: QTBUG-88505 Change-Id: I172198c8c24759b14f73ad07260c449fc6ab893f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add API for creating QColorSpace with multiple color-transfer tablesAllan Sandfeld Jensen2021-01-143-15/+157
| | | | | | | One table per color channel, as is possible from many inputs. Change-Id: I9fc723c68f222a228dd2b1458207b028422913bf Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Disable copying of QUrlResourceProvider to avoid slicingAlexander Volkov2021-01-141-0/+2
| | | | | | | Amends 376e3bd8ecf40881685714f6f19e12d68e92127e Change-Id: Ib7b0de900c009f3bdb3f699a218444aafbe2eabe Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QCache: when overwriting, store the new cost instead of the deltaMårten Nordheim2021-01-142-1/+16
| | | | | | | | | | | The delta was clearly intended to be used on the total (and still is) but it also wound up getting stored in the cache, which wouldn't be a big problem unless the object was removed, in which case we could incidentally 'free up more space' than intended. Pick-to: 6.0 Change-Id: Ib2b0f072d30da6d16a93dce60e4c5f6080c109fc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add some error handling for the inotify file system watcherLu Zhen2021-01-141-1/+3
| | | | | | | | | | In the readFromInotify() function, add a check whether the ioctl function is successful or not. In the case of failure, continuing to execute the following code would cause errors in the read function because there is no data in the buffer. Change-Id: Id53037e9e48c97c9eb75835048143875275b6370 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QODBC: Preserve the whole value when using HighPrecisionAndy Shaw2021-01-142-1/+37
| | | | | | | | | | | | Some ODBC drivers do not properly handle SQL_NO_DATA and therefore decimal values returned with HighPrecision are cut off because the decimal point is not taken into account. Fixes: QTBUG-73286 Pick-to: 6.0 5.15 5.12 Change-Id: I905c947b4d0266a3245d5735300300ca00f77480 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QStyle: add name() to return the name of the styleChristian Ehrlicher2021-01-146-17/+49
| | | | | | | | | | | | Currently there is no way to get the name of the current style to e.g. create a QProxyStyle for a specific widget only. Therefore add QStyle::name() so QProxyStyle(const QString &) can be called without hard-coding the style name. Remove an unused doc snippet as drive-by. Fixes: QTBUG-8004 Change-Id: I466c5e870a5392b238365bdc930f6a2ecee50cdb Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix VNC format conversionAllan Sandfeld Jensen2021-01-134-8/+9
| | | | | | | | | | | | Pass the right from depth to the conversion function, and set the right format before creating the compositor image for RGB16 support. Pick-to: 6.0 5.15 Fixes: QTBUG-85621 Change-Id: I76f46a3c2d8f1d2b040b790035dbdb0a960ff1a7 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* a11y: Do not cache classes that don't have a factory pluginJan Arve Sæther2021-01-131-5/+4
| | | | | | | | | | | | | | | | | | | For Qt Widgets we thought it was a good idea to also store in the cache if a class didn't have a factory plugin. This worked fine there, since the number of QWidget classnames is quite limited (so the factory plugin cache will soon reach a limit) In QML however, classes are often suffixed with e.g. Button_QMLTYPE_123, Button_QMLTYPE_124 etc. This number suffix is just increased continuously. This could lead to that the factory plugin cache will grow ad infinitum, which will cause "memory leaks" in addition to a performance penalty. Pick-to: 6.0 Pick-to: 5.15 Fixes: QTBUG-75106 Change-Id: I9ba189f989f0b90ab62a2c54a2e9230236a998d8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Fix build with GCC and ltcgChristophe Giboudeaux2021-01-131-13/+18
| | | | | | | | | | | The porting script could not handle this special case. To achieve the same thing, we'll use an intermediate 'OBJECT' library which will get the '-fno-lto' build flag if the conditions are met. Fixes: QTBUG-89426 Pick-to: 6.0 Change-Id: Ied62502ce9c7f7fd6b89fab166f7bccfcd6e7433 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Use -ffat-lto-objects for static libraries with ltcg and GCCChristophe Giboudeaux2021-01-131-0/+8
| | | | | | | | | | | | | | CMake <= 3.19 adds the '-fno-fat-lto-objects' compiler flag unconditionally when CMAKE_INTERPROCEDURAL_OPTIMIZATION is enabled. This is fine for shared libraries but static ones need the opposite compiler flag. Task-number: QTBUG-89426 Pick-to: 6.0 Change-Id: Ie5f48178803a270f6d94408f7a8e85d379eb123c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix warning in generated test wrappersAlexey Edelev2021-01-131-1/+2
| | | | | | | | | | | | | Since test command variable may contain quotes, there is a warning in generated test wrappers related to 'message(FATAL_ERROR', that should display full command in log in case of error. To avoid any complicated quoting of command to only display it, join command into single string in wrapper script and pass resulting variable to 'message(FATAL_ERROR'. Pick-to: 6.0 Change-Id: Ie990fc0b0bf2c19b119c7c4e2aeec092e5200103 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QComboBox: fix select all columns in the viewChristian Ehrlicher2021-01-131-2/+4
| | | | | | | | | | | | | | | When the QComboBox gets a custom view with multiple columns, only the first one is selected even the selection mode of the view is SelectRows. The selection changes afterwards properly honor the mode though. Therefore check for the selection mode and call setCurrentIndex() with the appropriate flags. Fixes: QTBUG-86776 Pick-to: 6.0 Pick-to: 5.15 Change-Id: Ieba7b9e009358e7b6e802b7847640161ec776c64 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix read-only pseudo-state in QTextEdit/Browser stylesheetEirik Aavitsland2021-01-131-0/+13
| | | | | | | | | Was implemented for QLineEdit but not QTextEdit. Fixes: QTBUG-83056 Pick-to: 6.0 5.15 Change-Id: I1e67ad0f1c230a062a1e12e8bc0b209c5289dc32 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Add more padding to width of non-editable comboboxesVolker Hilsheimer2021-01-131-2/+2
| | | | | | | | | | | | | | | The width of the combobox took the space for the checkmark and the contents into account, but didn't provide any padding on the right side, resulting in the text hitting the right side of the combobox popup. Add another 12 pixels padding to the sizeFromContents implementation, which results in a symmetrical padding on both sides of the text. Fixes: QTBUG-88715 Pick-to: 6.0 5.15 Change-Id: I811da73d11ce935c1fb83efabbe799f9a882e1d7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QTestLib: Show the values of unregistered enumsChristian Kandeler2021-01-137-6/+25
| | | | | | | ... on a failed QCOMPARE. Change-Id: I653894927e49fad92c21409d03ed70880ca510f6 Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Windows font engine: Silence warnings about not being able to enumate font ↵Friedemann Kleint2021-01-131-2/+2
| | | | | | | | | | | families Turn the warning into a qCDebug() statement and add explanatory comment. Fixes: QTBUG-85683 Pick-to: 5.15 6.0 Change-Id: I2a6a7a089a660294f3e9c3096299c75635b3b215 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* rhi: gl: Add some enablers for supporting GL_TEXTURE_EXTERNAL_OESLaszlo Agocs2021-01-136-1/+130
| | | | | | | | | | | | | | | | | | | | | | | | From QRhi's perspective this consists of two things: - A shader with samplerExternalOES in it cannot go through the standard pipeline. Rather, a QShader with suitable GLSL code in it has to be constructed manually. As this is something useful as an autotest anyway, add a test case to the qshader autotest that demonstrates this. - When it comes to correctly calling glBindTexture, add a QRhiTexture flag. The expectation is that an OpenGL-only client sets this in combination with QRhiTexture::createFrom(), thus wrapping an existing texture that then gets bound to the GL_TEXTURE_EXTERNAL_OES target instead of our usual GL_TEXTURE_2D. For completeness we also add a SamplerExternalOES variable type to QShaderDescription, but the sampler type is not actually used by the QRhi OpenGL backend, as it is the QRhiTexture that defines the texture target. Change-Id: I36b52325deb3703b59186ee3d726d0c3015bfc4b Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: Expose device name, type, and IDsLaszlo Agocs2021-01-1314-2/+225
| | | | | | | | | | | | | | | | ...to the extent it is sensible. We have to make compromises still, meaning some fields will only be applicable with certain APIs. Most of this is already shown upon QRhi::create() as info debug prints, when enabled. Now expose it all through the QRhi API as well. This is useful for printing in qtdiag, and, while it should be avoided as much as possible, to make decisions about disabling 3D rendering features depending on the driver and GPU in use. Change-Id: Iebe1e192965c928b82a094d1c7c50ddf4b38b9a2 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-12240-10435/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Set the PlaceholderText color in the palette from the stylesheet as wellAndy Shaw2021-01-122-0/+17
| | | | | | | | | | The color should be used across the board, so the PlaceholderText color should also be respecting the one passed for Text and so on. Fixes: QTBUG-89815 Pick-to: 6.0 5.15 Change-Id: I2accb3db35488f95a1c8ebacf2316a08ee416fac Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Add details to QFont::toStringPaul Wicking2021-01-121-1/+20
| | | | | | | | | Add details that explain the return value. Pick-to: 6.0 5.15 Fixes: QTBUG-81467 Change-Id: Ifad407a27259711fc9abe1bacc7ba9db105bdcc0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* macOS: Don't try to close already-closed/closing file dialogTor Arne Vestbø2021-01-121-1/+7
| | | | | | | | | | | | | | | | | Doing so results in a warning about "modalSession has been exited prematurely - check for a reentrant call to endModalSession:", and on Big Sur will also result in the file failing to save because the return code from runModal will no longer be NSModalResponseOK. This would happen when the completion handler for beginSheetModalForWindow would call QNSOpenSavePanelDelegate_panelClosed, resulting in calls to QDialog::done(), which in turn tries to hide the dialog, via QCocoaFileDialogHelper::hideCocoaFilePanel(). Pick-to: 6.0 5.15 Fixes: QTBUG-89959 Change-Id: I048afe3dcc7fe62e0d0273f12b4b2c0237abb052 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Introduce QUrlResourceProvider to load resources for HTMLAlexander Volkov2021-01-1213-3/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | QTextDocument and the text editor classes suggest to override their loadResource() methods to provide data associated with a text document. This approach has the following drawbacks: - it requires subclassing - there is no way to set a global resource provider - QLabel is missing virtual loadResource() method and it can't be added without breaking ABI QUrlResourceProvider is designed to solve these issues. One should create a derived class that implements QUrlResourceProvider::resource(). The objects of the derived class then can be set for any text document. The default resource provider can be set with QUrlResourceProvider::setDefaultProvider(). This change also adds QLabel::setResourceProvider(), which doesn't break ABI. [ChangeLog][QtGui][Text] Introduced QUrlResourceProvider that allows to load resources for HTML. It is intended to replace the use of QTextDocument::loadResource(). Change-Id: Iaf19b229f522a73508f20715257450fe58f68daf Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QtDBus includesDavid Skoland2021-01-1251-235/+339
| | | | | | | | | | | | | | Per the discussion of QTBUG-88831, we determined that module-wide imports are unfortunate, especially for compile times. Following this, all QtDBus includes have been replaced with the headers for the classes actually used in each file. Additionally, some cleanup of header file order and format has been performed in the changed files. Pick-to: 6.0 Change-Id: I62c1b75682a48422f0ba1168dd5d7bd0952808ac Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use design metrics when adding text to QPainterPathEskil Abrahamsen Blomfeldt2021-01-121-0/+5
| | | | | | | | | | | | | | | | | | | | | When we add text to QPainterPath, we will add the design metrics (unhinted glyphs) and scale these down to match the target font size. But the glyph positions we pass in are based on the hinted metrics, samples at the target font size. Thus, on fonts/systems with hinting, these do not match the scaled design metrics outlines. To fix this issue, we make sure the text layout uses design metrics when determining the glyph positions. [ChangeLog][QtGui][Text] Fixed an issue where QPainterPath::addText() would get inconsistent kerning for smaller font sizes when hinting is enabled. Fixes: QTBUG-20900 Pick-to: 5.15 Pick-to: 6.0 Change-Id: I651997d1a6a86e6271557438afa2cdad078a83ca Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Windows QPA: Fix crashes when using screen reader with Q(Plain)TextEditFriedemann Kleint2021-01-121-2/+6
| | | | | | | | | Make sure the search start with valid values. Pick-to: 6.0 5.15 Task-number: QTBUG-89354 Change-Id: I5b5100db89c62f23748b5c88e9188cfe3811e6e8 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QSql/QSqlite: return extended error codes by defaultChristian Ehrlicher2021-01-112-0/+5
| | | | | | | | | | | | | SQlite allows to return fine-granulated error codes but this behavior is not enabled by default (due to backwards compatibility concerns). Enable them for the SQLite driver by default but provide an option to disable them when needed. [ChangeLog][QtSql][QSQLITE] The plugin now returns the extended error codes by default. Change-Id: I59cec9aea46eb03f1e7ca02903d769c003a1ae30 Reviewed-by: Andy Shaw <andy.shaw@qt.io>