summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add Q_OS_APPLE define on Apple operating systemsTor Arne Vestbø2023-06-082-0/+11
| | | | | | | | | | | | | It's quite common that macOS and iOS share backends, for example due to the functionality being part of one of the Apple core frameworks. In this case the support isn't directly tied to the Darwin kernel per se, so let's use a more general define to refer to the union of Apple based features. Pick-to: 6.6 Change-Id: I71cac5ec1d74cd86eba67a64b20846e48c9f05c5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Mimer SQL driver plugin: Reduce repetitive error messagesFriedemann Kleint2023-06-081-99/+45
| | | | | | | | | | | | | | | Introduce message helper functions for get/set, sparing the translators having to translate the data types. As a drive-by, use UUID/CLOB/BLOB consistently. Amends 0efd8854c4b32ec0b011efbf6b3a1990fe684e32. Task-number: QTBUG-111219 Pick-to: 6.6 Change-Id: I7a137c3797947523af5478b3add6ee0a26b295d7 Reviewed-by: Fredrik Ålund <fredrik.alund@mimer.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix some syntax errors in snippetsSzabolcs David2023-06-083-3/+3
| | | | | | | | | | | | - The following error occurs when trying to use these example codes: "error: expected primary-expression before ‘!=’ token" - Rename "map" to "hash" in the QHash snippet Amends 7d542e1daf09caadf6d3e36c4b09bdf94952c5a1. Pick-to: 6.6 6.5 Change-Id: I1ad5b799f444bf074dbfb44223c00770ecf456c7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QMimeData: de-duplicate some codeAhmad Samir2023-06-081-20/+23
| | | | | | | | | - Fix integral narrowing conversion issues by using range-for - Use QByteArrayView Change-Id: Ib45c7d6d8ca27c347324b4b259f25282bc84ff3f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <david.faure@kdab.com>
* QUrl: Add QUrl::fromEncoded(QByteArrayView) overloadAhmad Samir2023-06-083-4/+26
| | | | | | | | | | | Copy \note about backwards compatibility from QMessageAuthenticationCode (with minor changes). [ChangeLog][QtCore][QByteArray] Added QUrl::fromEncoded(QByteArrayView) overload. Change-Id: I8a190db2d50467e6191caf0abfe975b8fc656eb4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* forkfd: Add support for eventfd(2) in FreeBSDThiago Macieira2023-06-071-8/+8
| | | | | | | | Drive-by make the code slightly nicer. Change-Id: Idd5e1bb52be047d7b4fffffd174db9162cf697a4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QElfParser: use ELFOSABI_LINUX instead of ELFOSABI_GNUThiago Macieira2023-06-071-6/+1
| | | | | | | | | | | | | | | | | It seems to be the preferred constant in other OSes. In particular, OpenBSD does not appear to have ELFOSABI_GNU[1]. Found while researching if commit 9caac0f176040b4da48d3ea289683b0b082cf729 was still necessary for OpenBSD. This reverts commit ded2fd9ff4fea06af881229bacaeff5d0ecfa6de, which implied NetBSD 9 doesn't have ELFOSABI_GNU either. [1] https://github.com/openbsd/ports/blob/master/x11/qt6/qtbase/patches/patch-src_corelib_plugin_qelfparser_p_cpp Pick-to: 6.5 6.6 Change-Id: I63b988479db546dabffcfffd17662020d722af20 Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QElfParser: fix build if EM_S390 is not definedThiago Macieira2023-06-071-0/+2
| | | | | | | | | | | | Found in the OpenBSD ports patch collection[1] while researching if commit 9caac0f176040b4da48d3ea289683b0b082cf729 was still necessary for OpenBSD. They should upstream their changes instead of working around... [1] https://github.com/openbsd/ports/blob/master/x11/qt6/qtbase/patches/patch-src_corelib_plugin_qelfparser_p_cpp Pick-to: 6.5 6.6 Change-Id: I63b988479db546dabffcfffd17662042c7130f7c Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* CMake: apply OpenBSD patch to enable $ORIGINThiago Macieira2023-06-071-1/+1
| | | | | | | | | | | | | | | Found at https://github.com/openbsd/ports/blob/master/x11/qt6/qtbase/patches/patch-cmake_QtRpathHelpers_cmake There are a lot more patches there whose purpose I can't tell. This is the only CMake one that I do understand. They should upstream those changes to us with an explanation, instead of carrying patches... Found while researching if 9caac0f176040b4da48d3ea289683b0b082cf729 was still necessary for OpenBSD. Pick-to: 6.5 6.6 Change-Id: I63b988479db546dabffcfffd17661fdd376bf8c8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* tst_QProcess: move the crasher code to a headerThiago Macieira2023-06-072-42/+63
| | | | | | | | | | | | So I can use it in tst_QProcess itself. This also modernizes it a bit by using __builtin_trap() where available. On x86-64, this expands to the ud2 instruction. Pick-to: 6.6 Change-Id: Ib5ce7a497e034ebabb2cfffd176288433378731b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove the manual undef of the min/max macros, or def NOMINMAXAmir Masoud Abdol2023-06-088-35/+0
| | | | | | | | | | We now add NOMINMAX to PlatformCommonInternal target which will be linked to everything else, so min/max will not be defined upon the inclusion of `windows.h`, or other headers. Pick-to: 6.5 6.6 Change-Id: I10016720dac7ce015e929885b7368ee86d8b6918 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Resolve an issue when running `/qt-configure-module .`Amir Masoud Abdol2023-06-081-1/+4
| | | | | | | | | | | | | | Accounting for the case where `MODULE_ROOT` is set to `.` which then makes the `get_filename_component` command to return an empty string; consequently, we cannot find the `config_file.txt`, and cannot process the features correctly. Amend f4bf7982a679312146546fabfb086e801c2bbc37 Pick-to: 6.5 6.6 Fixes: QTBUG-114085 Change-Id: I55c7529be6caba4691adec80efca8021bd03c500 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove an unused variableAmir Masoud Abdol2023-06-072-12/+1
| | | | | | | Pick-to: 6.5 6.6 Task-number: QTBUG-109394 Change-Id: Ib1099e3d4091b0b222e405ce25b5e680f0514476 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix an issue with processing -prefix paths ending with \ on WindowsAmir Masoud Abdol2023-06-081-1/+7
| | | | | | | | | | | | In cases like `C:\` or `C:\D\E F G\`, we had the issue were Windows' path separator was acting as an escape and was corrupting configure arguments', so, we were ending up with `-DCMAKE_INSTALL_PREFIX=C`, or were cutting the argument list short, and ended up ignoring some of the arguments. Pick-to: 6.5 6.6 Change-Id: I433af61d5c143cc37a64dcf8ac82a1a78ce543a5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add Unity Build to config.summaryAmir Masoud Abdol2023-06-071-0/+8
| | | | | | | | | Unity Build was missing from the `config.summary`. This fixes that. Pick-to: 6.5 6.6 Task-number: QTBUG-109394 Change-Id: Icd9898956ec1a5332297272130bce27d4d2675ca Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QString: add STL-style assign() [2/4]: (it,it) overload for ↵Marc Mutz2023-06-074-0/+177
| | | | | | | | | | | | | | QChar-convertible *it Restrict the permissible value_types to those QStringView can take, plus QLatin1Char. All of these implicitly convert to QChar and give the correct result, even when converted char-by-char. Task-number: QTBUG-106198 Pick-to: 6.6 Change-Id: Icb44244cb08af391161c4309467d4e0d2d3d3d62 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
* Windows QPA: Fix restore geometry after dragging from maximised - FixTimothée Keller2023-06-072-9/+17
| | | | | | | | | | | | | Small adjustment made to previous patch to fix the following issues: - restoreGeometry not being updated after moving the window from one screen to the other with keyboard shortcuts. - restoreGeometry's size not being changed when moving screens if WM_GETDPISCALEDSIZE isn't sent. Pick-to: 6.6 6.5 Task-number: QTBUG-112814 Change-Id: I9dd2340137ce57a731f8881d476e902323887e62 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Change monitor index detectionTimothée Keller2023-06-071-7/+7
| | | | | | | | | | | Monitor index detection changed from comparing deviceNames to comparing serialNumbers, to prevent the case where two monitors with identical names might overwrite one another. Fixes: QTBUG-112829 Pick-to: 6.6 6.5 Change-Id: Ibfad08e178774396c4b347acfcfbdb83ed4fe332 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QDockWidget: Propagate window title when re-dockingAxel Spoerl2023-06-072-5/+24
| | | | | | | | | | | | | | | | When a floating dockwidget's title changes, it is rendered as a window title. When the title changes while floating, the change will be reverted to the pre-change title when the dockwidget is docked again. This patch explicitly propagates the window title, if it has been programmatically changed while the dock widget is floating. It adds test functionality in tst_QDockWidget::floatingTabs(). Fixes: QTBUG-113591 Pick-to: 6.6 6.5 Change-Id: I96fa69fb27ad1a85f4ea9ce44c0a22290259fca6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Clarify how to use QPainter with QTextEditSze Howe Koh2023-06-072-1/+3
| | | | | | | | | | | | | | | | | | | The documentation suggests that it is possible to reimplement QTextEdit::paintEvent(), but doing so might produce cryptic runtime warnings: QWidget::paintEngine: Should no longer be called QPainter::begin: Paint device returned engine == 0, type: 1 The correct way to reimplement this function is noted under QAbstractScrollArea::paintEvent(). This patch updates the note and copies it to QTextEdit for clarity. Pick-to: 6.6 6.5 6.2 Change-Id: Ib7d8dadeb2358475bcdb0b2e624857700f9a004e Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io> Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* rhi: vulkan: Fix swapchain format checkLaszlo Agocs2023-06-071-5/+3
| | | | | | | | | | | | | | Fix the treatment of the sRGB flag. That is independent from the value of format(), and should be checked regardless of wanting a HDR swapchain or not. On Android for instance Display P3 with RGBA8 or RGBA8_SRGB is one of the formats offered. While we do not support this right now, it is an example of a "HDR" format that still uses a color buffer format where a dedicated sRGB format is available and must be chosen according to the specified swapchain flags. Pick-to: 6.6 Change-Id: I2d97689fa5af7c08486702ae690f2230d06db469 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: d3d12: Fix swapchain format checkLaszlo Agocs2023-06-071-2/+4
| | | | | | Pick-to: 6.6 Change-Id: Ie2c19ce0aa2c30997a682ed25bc69b2b8e9f7ee0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: d3d11: Fix swapchain format checkLaszlo Agocs2023-06-071-2/+4
| | | | | | | | | | ...to only return true for HDR formats that are sensible for Direct 3D. There are currently no other formats, but new ones may get added in the future. Pick-to: 6.6 6.5 Change-Id: I4fc6d605da8f6bf2644a4e5c355ab8f1c62ad68d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add tst_QString::prependEventuallyProducesFreeSpaceAtBegin()Marc Mutz2023-06-071-0/+10
| | | | | | | | | | This seems to work with prepend(char), but not with prepend("data"), cf. QTBUG-114167. Task-number: QTBUG-114167 Pick-to: 6.5 6.6 Change-Id: I7aa4dca7c2b5938c2e5ad416231945c23140d659 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* macOS: Don't assume DnD is handled via internal drag loopTor Arne Vestbø2023-06-071-2/+3
| | | | | | | | | | | | | | | | If we have only one item, we're not using beginDraggingSessionWithItems which requires us to manage our own drag loop, and instead use good old dragImage, which takes care of the drag loop on our behalf. In both cases we end up in draggingSession:endedAtPoint, so we need to explicitly check for the existence of a manually managed drag session. Amends 8a359343621fa83941946cb4e661b54ca7a1c4cc. Fixes: QTBUG-114236 Pick-to: 6.5 6.6 Change-Id: Ifa9110945e191c4ffebe099e3e4edf9c571ab376 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* iOS: Don't invalidate a11y whenever UI elements are added or removedTor Arne Vestbø2023-06-073-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The UIAccessibilityScreenChangedNotification will result in iOS resetting its state, focusing the first a11y element on the screen. We shouldn't tie clearing the a11y cache to this notification, as those are two separate actions. In the case of adding or removing individual elements, we still likely need to clear the cache, but can inform the system of the more granular UIAccessibilityLayoutChangedNotification to have it re-read the a11y tree. We still handle additions and removal of a11y elements with Window or Dialog roles as UIAccessibilityScreenChangedNotification, as these likely involve major UI changes. The implicit UIAccessibilityScreenChangedNotification on QIOSWindow destruction has been removed, as it's assumed iOS will automatically refresh its a11y tree when a UIWindow is destroyed, and in any case it's up to the individual clients of QAccessible to send the relevant QAccessibleEvent to inform about the situation. Pick-to: 6.6 6.5 Fixes: QTBUG-100094 Change-Id: If7d5cb961743e5ca97d45553b05ae5e92f82d275 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add QOperatingSystemVersion::MacOSSonoma for macOS 14Tor Arne Vestbø2023-06-072-0/+7
| | | | | | Pick-to: 6.6 6.5 Change-Id: I22d4a2443e10ef40f498aa48aabad9aaa7aa8d1a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove conanfile.pyTor Arne Vestbø2023-06-071-300/+0
| | | | | | | | | The conan experiment has ended, and the file is only bitrotting nowadays. Pick-to: 6.5 6.6 Change-Id: I8408265f7db7e52803b1f532d08a11387ea978cb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Detect when Xcode is presenting os_log as structured log messagesTor Arne Vestbø2023-06-073-14/+32
| | | | | | | | | In that case, just like when os_log mirrors to stderr by itself, we want to disable Qt's fallback stderr handler. Pick-to: 6.6 6.5 Change-Id: Ia373b19788edbce616d4f0d3d9f0b217ddc1e5c0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove compatibility defines for Apple OS versionsTor Arne Vestbø2023-06-071-59/+0
| | | | | | | | | | | | | These are already defined in AvailabilityVersions.h in the SDK, and we expect people to build Qt against the latest SDK available. The corner case of requiring defines for upcoming/beta SDKs can easily be handled by using the version number directly, which is the recommended practice anyways. Pick-to: 6.6 Change-Id: Ica296118ee17608b8c43f9338c3083189083474c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macOS: Remove legacy SDK and deployment target check macrosTor Arne Vestbø2023-06-071-10/+1
| | | | | | | | These are no longer in use in Qt. Pick-to: 6.6 Change-Id: Id07bc0e09a414754493562d3a48df55cc28c5049 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macOS: Remove fallback defines for MAC_OS_X_VERSION_MIN_REQUIREDTor Arne Vestbø2023-06-071-11/+0
| | | | | | | | | Availability.h from the platform SDK should take care of this these days. Pick-to: 6.6 Change-Id: I23dd821682db66a1f22b1240d485f4a9cc877cd8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update mapping between Apple Clang versions and upstream ClangTor Arne Vestbø2023-06-071-1/+5
| | | | | | | | For Xcode 14.0 and 14.3 Pick-to: 6.6 6.5 Change-Id: Idd533e2d1f7b0feffa618ddf633165ce29043d5e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* rhi: metal: Fix a swapchain debug print crashLaszlo Agocs2023-06-071-1/+2
| | | | | | | | | | | | | | | When enabling the logs, printing hdrInfo() to qDebug in Qt Quick is something that is done before calling createOrResize() on the swapchain. (logically since this is still at the point of configuring the swapchain settings) Thus the correct thing to do is to only access m_window, not the backend data's window. Pick-to: 6.6 6.5 Change-Id: I3004b0c4a4fdb09cb07a9c0e3c503f79c699c562 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* rhi widget compositor: Use Nearest filteringLaszlo Agocs2023-06-071-1/+1
| | | | | | | | | To stay compatible what the OpenGL-based code did before Qt 6.4. Pick-to: 6.6 6.5 Fixes: QTBUG-113811 Change-Id: I80d89b21dcace9b5c361b964d56f29e996940c24 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* rhi: gl: Switch back to Nearest filtering when resolvingLaszlo Agocs2023-06-071-1/+1
| | | | | | | | | | | | ...for Qt 5 compatibility. It seems both Qt Gui and Quick calls the QOpenGLFramebufferObject helper for blitFramebuffer with the default GL_NEAREST argument for the filtering. In Qt 6 we must use the same if we want to ensure pixel-perfect compatibility. Pick-to: 6.6 6.5 Task-number: QTBUG-113811 Change-Id: I03c69448265e7b0d73f021d71135a1725e96fcbc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix deprecation warnings agains u"..."_qs in dnslookup.cppEdward Welbourne2023-06-071-5/+5
| | | | | | Pick-to: 6.5 6.6 Change-Id: I29a177c7d46304c5b494218f5862195eb92c7684 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QCoreApplicationPrivate::initLocale(): report correct encodingEdward Welbourne2023-06-071-4/+7
| | | | | | | | | | | | | | | We override the old encoding because it wasn't UTF-8, then we use a fresh call to nl_langinfo(CODESET) when reporting the encoding that "is not UTF-8", except that we've just fixed that so it is now. Store the old encoding in a std::string before we change it, so that we can report what it was rather than what we changed it to. Amends commit 3690c202f959a505e0f0bcd4a7b19f235b04d015 Pick-to: 6.5 6.6 Task-number: QTBUG-113371 Change-Id: I5f7c3648890cb0abf1d4769af24715686762c176 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace 0 with nullptr where the parameter is meant to be NULLEdward Welbourne2023-06-071-1/+1
| | | | | Change-Id: I2c9abf53fd20305903904fa45f620fe4c9d81047 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix what we can of macOS's divergence for pre-1900 datesEdward Welbourne2023-06-071-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The system locale backend on macOS uses system APIs to format dates and times in localized ways. Those system APIs appear to know more about time zones than the time_t functions (which artificially cut off before 1900) are willing to tell us. As a result, QDateTime is left to guess the offsets in use before 1900 but the locale-formatting takes a correct offset into account, which can lead to QDateTime and the locale-aware APIs using different offsets. This is further compounded by the system APIs taking into account the calendar transition from Julian to Gregorian. We can't do much about the latter. Previously we were formatting dates by passing the start of the day to the system APIs (which take a date-time, albeit using a "Date" name for the type), along with a date-format that ignores the time of day. For dates before 1900, if the system APIs know the offset in use was less than that in use in the early 1900s, QDateTime (using the latter) gets the start of the day slightly earlier than where the system APIs know it is, so the day before is the date at that time. Use noon on the day in question to avoid this problem, at least for zones that didn't do whole day offset-shifts (crossing the date line) before 1900. Document the problem and the limited extent to which we can solve it. Task-number: QTBUG-54955 Pick-to: 6.6 6.5 6.2 Change-Id: I5be1bfdb3013433ee248846533ef73af39f173f5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* tst_QTimer: ensure that timer activation respects start orderThiago Macieira2023-06-063-6/+122
| | | | | | | Task-number: QTBUG-114152 Change-Id: Iff484344171647888da4fffd17640daef56f2479 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Fix GCC 13 warning about freeing the global staticThiago Macieira2023-06-061-1/+1
| | | | | | | | | | I believe the problem is that QGlobalStatic::operator Type *() may return a null pointer, in which case the compiler is right that we could attempt to free the shared_null. Instead use QGlobalStatic::operator*, which doesn't ever return nullptr. Change-Id: I9201d9ecf52f4146bb04fffd17644782bf0eb9d1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add flag to hide eye dropper button from QColorDialogFabio Falsini2023-06-063-12/+17
| | | | | | | | | | | | | | | | | | | | | | There are cases where this eye dropper control is useful and other cases where it is useless. In case of an application connected with graphics it's useful because it allows to select a precise color in a very simple way. But in the case of a simple app where the user only has to choose a color for, example, a graph this control is useless and risks confusing the user (this kind of control is only present in graphics software, not all "normal" users know what it is for or understand its use). This patch add a flag to hide the button. As a drive-by change, the internal screenColorPickerButton pointer is renamed to eyeDropperButton to be more consistent with the qml ColorDialog. [ChangeLog][QtWidgets][QColorDialog] Added a NoEyeDropperButton option to hide the eye dropper button. Change-Id: Ib29d5343383af97c1f488f9e33749517181aead7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QTabBar: recalculate scroll offset when showingVolker Hilsheimer2023-06-062-0/+39
| | | | | | | | | | | | | | | | | | | | | | If an application sets the current index and resizes the tab widget before showing it, then the scroll offset might be calculated based on an old size. Since after ca15f650a1a914bb9a41131109c46c4e52c5ebb1, resizing explicitly avoids scrolling, this could result in tabs ending up scrolled outside of the tab bar when showing the tab widget. Fix that by explicitly making the current tab visible in the tab bar's showEvent handler, which recalculates the scroll offset based on the actual size. This is only reproducible with a tab widget, which lays out the tab bar for each change and resets the tab bar's layoutDirty flag. Add a test case there. Pick-to: 6.5 6.6 Fixes: QTBUG-114204 Change-Id: I1e9506b9dde1dd892291d108dd2c7b675ef99509 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Jonas Kvinge <jonas@jkvinge.net>
* Use parentheses for Xcode specific variablesAmir Masoud Abdol2023-06-061-3/+3
| | | | | | | | | If I'm not mistaken we would like to leave this to Xcode, if so, we can use `$()` to make our intention more clear in the code. Pick-to: 6.5 6.6 Change-Id: I3867f68f371a1cf1a5db5e639ec740f2546ccd75 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Remove local __PPS targetKai Köhne2023-06-061-5/+3
| | | | | | | | | | | | Remove the local __PPS target and make PPS::PPS itself the imported target. This is not only simpler, but also hopefully resolves an issue with static builds, where PPS::PPS was not properly promoted to a global target, leading to linker errors. Fixes: QTBUG-108794 Pick-to: 6.5 6.6 Change-Id: Ia9334a27312ba9bfeec964f6bd6a82652e5f9d37 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QFusionStyle: de-pessimize arrow paintingMarc Mutz2023-06-061-3/+2
| | | | | | | | | | | | Instead of holding three QPointF's in a QPolygonF, which will allocate them on the heap, use QVarLengthArray<>, which will allocate them on the stack instead. Pick-to: 6.6 6.5 Task-numbber: QTBUG-112200 Change-Id: If078e5a9a5cb82fd03b511e28cceb88bd42996f8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QFusionStyle: optimize cache-key generation for qt_fusion_draw_button():Marc Mutz2023-06-061-3/+4
| | | | | | | | | | | | | Instead of passing a QLatin1StringView to QStyleHelper::uniqueName(), which takes a QString, allocating, and then using QStringBuilder to append something to the result of uniqueHelper(), allocating again, pull the appends to before the call to uniqueName(), folding these two allocations into one. Pick-to: 6.6 6.5 Task-number: QTBUG-112200 Change-Id: I501dd4a3df4b9f5267ca931b550d521f4dafe493 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QPixmapCache: fix leaking of QStrings and Keys on clear()Marc Mutz2023-06-062-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | QPixmapCache maintains a mapping from QString to QPixmapCache::Key, in the form of the cacheKeys QHash, but QPixmapCache::clear() didn't touch it, leading to the string data (as well as the Keys) being retained after any possible use. This can lead to memory slowly being eaten up, as reported in QTBUG-112200, and prevents a periodic calling of QPixmapCache::clear() from being a work-around for the issue in the bug report. Fix by clearing cacheKeys in QPixmapCache::clear(). This is designed as a low-risk enabler of a work-around, not a fix for the issue. The work-around enabled by this is periodic calling of QPixmapCache::clear(). [ChangeLog][QtGui][QPixmapCache] Fixed QString key data not being freed on clear(). Pick-to: 6.6 6.5 6.2 5.15 Task-number: QTBUG-112200 Change-Id: Ica6fa0e27e1b47b8df58d5e996378a2ececa5f9c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Upgrade Harfbuzz to 7.3.0Eskil Abrahamsen Blomfeldt2023-06-0661-1129/+982
| | | | | | | Fixes: QTBUG-114098 Pick-to: 6.2 6.5 6.6 Change-Id: I7bc766e6edada6f964c2dc40f18ff710249fb159 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>