summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
* QMenu: clear popup screen after exec()Axel Spoerl2024-03-271-0/+1
| | | | | | | | | | | | | | | | 8cd7a3d4723ca414f3fe544704a0ccb752da94b8 remembered the current screen in QMenuPrivate::popupScreen. This QPointer member is not reset, after QMenu:exec(), which makes a re-used menu remember the wrong screen, if its next usage happens on another screen. Reset the member variable at the end of QMenuPrivate::exec(). This amends 8cd7a3d4723ca414f3fe544704a0ccb752da94b8. Fixes: QTBUG-118434 Pick-to: 6.7 6.6 6.5 Change-Id: I7457ca72166346f01cf71b2706ebc20ecd71173c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QMainWindowLayout: rewrite validateToolBarArea() to return by valueMarc Mutz2024-03-261-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity complains that QToolBarAreaLayout's addToolBarBreak(QInternal::DockPosition) could access QToolBarAreaLayout::docks out of bounds if passed QInternal::DockCount. That is correct, but a valid pos seems to be a precondition for this function, judging from its sister functions, e.g. addToolBar(DockPosition, .) or insertItem(DockPosition, .), which also don't validate `pos`. All in-module callers of addToolBarBreak() only pass valid positions, and use validateToolBarArea() to ensure that. So it seems that Coverity doesn't grok the pass-by-in/out -parameter used by that function. That, or it doesn't track back far enough. Before attempting more drastic measures, first try rewriting the function to return-by-value instead, and see what Coverity has to say afterwards. As a drive-by, make validateToolBarArea() constexpr. Pick-to: 6.7 6.6 6.5 6.2 5.15 Coverity-Id: 444141 Coverity-Id: 444135 Change-Id: I5fcc664c3cea608429036cad75c37f5c38059733 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix multiscreen menu popup positioning corner caseMorten Sørvig2024-03-251-2/+9
| | | | | | | | | | | | | | | | | | | | | A QMenuBar may span multiple screens. Its menus will then open on the screen which the bottom middle of the action rect is at, and will snap to that screen's geometry if needed. However it can happen that the bottomLeft() of the action rect is on a different screen from the selected popup screen, in which case mapping this point to global coordinates can give incorrect coordinates if the screens have different scale factors. The x value will be corrected by the screen snapping if needed. Use the y from the screen test point, which will be correct for the selected screen. Task-number: QTBUG-73231 Change-Id: If9a39f6b832a64f2f701868f2be0d3a6468fe553 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Doc: Remove table for listing imagesVenugopal Shivashankar2024-03-221-15/+12
| | | | | | | Task-number: QTBUG-122580 Pick-to: 6.7 6.6 Change-Id: I7ca3d677262b48ce9e1d85bd9347ad5b15d1598f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Don't accept QFileDialog when disabled item is activatedKeith Kyzivat2024-03-211-2/+3
| | | | | | | | | | | | | On macOS, entries that do not match the filter are shown in the directory listing. Do not accept the dialog when these entries are double-clicked (activated). Pick-to: 6.7 6.6 6.5 Fixes: QTBUG-120768 Change-Id: If8ff6c56f1d21861b4e30051c212c9497042ed0f Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QGraphicsProxyWidget: use focus abstraction instead of focus_next/prevAxel Spoerl2024-03-181-5/+5
| | | | | | | | | | | Focus abstraction in QWidgetPrivate makes direct access to QWidget::focus_next and focus_prev an antipattern. Remove usage. Task-number: QTBUG-121478 Change-Id: I741e6875e686a9cfb4e6a113e7575c911a38e80c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QApplication: use focus abstraction instead of QWidget::focus_next/prevAxel Spoerl2024-03-181-2/+2
| | | | | | | | | | | Focus abstraction in QWidgetPrivate makes direct access to QWidget::focus_next and focus_prev an antipattern. Remove usage. Task-number: QTBUG-121478 Change-Id: Iaab97024c20b97a0d9850dce43816a432d4bc7a1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Documentation: Clarify palette/font/stylesheet inheritance/propagationAxel Spoerl2024-03-181-4/+13
| | | | | | | | | | | | | | | | Palette and font changes made by a style sheet are propagated to existing widgets and their children at change time. Palette and font changes made by setPalette() and setFont() are inherited by all existing and future children of the widget to which the call was made. Clarify this in the documentation. Fixes: QTBUG-122588 Pick-to: 6.7 6.6 6.5 6.2 5.15 Change-Id: Ic40d96fc1e5e4507f84a33138303b7193948d3fe Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QWindows11Style: HighDPI aware qDrawPlainRoundedRectWladimir Leuschner2024-03-151-2/+5
| | | | | | Pick-to: 6.7 Change-Id: Ic9562a20bce59c265c539a1378f5f8fd8e9e9a17 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Move qt_blurImage to Qt GUIKai Uwe Broulik2024-03-141-307/+2
| | | | | | | | | | | | Allows to use it without Qt Widgets or Qt Graphics Views. Since anyone having imported this through Qt Widget will also be linking Qt Gui this should be compatible. qt_halfScaled is also unexported for lack of known users. Change-Id: I39406dfd4839ed46f8cbfd4651577ab6ece9932c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Reparent QWindow children when reparenting QWidgetTor Arne Vestbø2024-03-142-39/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QWidget was reparented, we would take care to reparent its backing QWidgetWindow as well, into the nearest QWindow of the new QWidget parent. However we would only do this for the reparented widget itself, and not any of its child widgets. In the case where the widget has native children with their own QWindows, the widget itself may not (yet) be native, e.g. if it hasn't been shown yet, or if the user has set Qt::WA_DontCreateNativeAncestors. In these scenarios, we would be left with dangling QWindows, still hanging off their original QWindow parents, which would eventually lead to crashes. We now reparent both the QWindow of the reparented widget (as long as it's not about to be destroyed), and any QQWindow children we can reach. For each child hierarchy we can stop once we reach a QWindow, as the QWindow children of that window will follow along once we reparent the QWindow. QWindowContainer widgets don't usually have their own windowHandle(), but still manage a QWindow inside their parent widget hierarchy. These will not be reparented during QWidgetPrivate::setParent_sys(), but instead do their own reparenting later in QWidget::setParent via QWindowContainer::parentWasChanged(). The only exception to this is when the top level is about to be destroyed, in which case we let the window container know during QWidgetPrivate::setParent_sys(). Finally, although there should not be any leftover QWindows in the reparented widget once we have done the QWidgetWindow and QWindowContainer reparenting, we still do a pass over any remaining QWindows and reparent those too, since the original code included this as a possibility. We could make further improvements in this areas, such as moving the QWindowContainer::parentWasChanged() call, but the goal was to keep this change as minimal as possible so we can back-port it. Fixes: QTBUG-122747 Pick-to: 6.7.0 6.7 6.6 6.5 Change-Id: I4d1217fce4c3c48cf5f7bfbe9d561ab408ceebb2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QMessageBox: Respect explicit accept/reject after closing dialogTor Arne Vestbø2024-03-141-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the dialog is closed by pressing a button, the button will be reflected via clickedButton(), and the result() will reflect either the QMessageBox::StandardButton value, or an opaque value for custom buttons. Depending on the role if the buttons, the accepted or rejected signals are emitted. If the user called accept() or rejecct() on a dialog that had already been closed by a button, we would as a result of 1f70c073d4325bc0eb9b0cec5156c3b89ce1b4df emit a signal based on the original button that was clicked, instead of respecting the newly triggered function. It's a questionable use-case, as the clickedButton() is still the original button e.g., but we should still avoid regressing this, so we now emit the signals based on the newly stored result code instead of using the clicked button as the source of truth. To allow this we had to change the opaque result() value for custom buttons to stay out of the QDialog::DialogCode enum, but this should be fine as the documentation explicitly says that this is an opaque value. Fixes: QTBUG-118226 Pick-to: 6.7 6.6 6.5 Change-Id: Ia2966cecc6694efce66493c401854402658332b4 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QMessageBox: ensure setTextFormat() also apply to informative textWang Zichong2024-03-141-2/+9
| | | | | | | | | | | QMessageBox::setTextFormat can set the text format for its text label, but the informative label will still use its default text format. This change allow the setTextFormat also apply to the informative label, thus user can use their preferred format like Markdown in the informative label. Task-number: QTBUG-122712 Change-Id: I6f7487b29712ca07cee27171453312ff1707eea3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QDoc: Drop default arguments from some \fn documentation stringsPaul Wicking2024-03-131-1/+1
| | | | | | | | | | | | | | | | | | | In the \fn commands for a limited number of methods in the documentation for Testlib and Widgets, `= 0` is passed as default argument instead of `= Qt::KeyboardModifiers()`. Until QDoc with Clang 17, inclusive, QDoc generated the correct signature. However, with Clang 18, QDoc outputs `= 0` in the documentation. While strictly speaking still correct, this change impacts the documentation negatively in terms of readability. Dropping the default argument from the \fn command ensures that QDoc generates the right signature with both Clang 17 and Clang 18. Task-number: QTBUG-123130 Pick-to: 6.7 Change-Id: I94ccec2f2c9a02241095fb5b18feb74aa55f97e1 Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Don't show mnemonics in dockwidget titlesChristian Ehrlicher2024-03-091-1/+1
| | | | | | | | | | | | Dockwidget title accelerators doesn't work in dock widgets, so don't show them. This amends cc67b25579c1bb5ea9f5c1ca4c9b7997e66f19b9. Fixes: QTBUG-86407 Pick-to: 6.7 6.6 Change-Id: I83fb2da1304d1e2b5eedfc127e5db3d322756d06 Reviewed-by: Sune Vuorela <sune@vuorela.dk> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QStyleSheetStyle: don't draw check indicator twiceChristian Ehrlicher2024-03-091-3/+5
| | | | | | | | | | | | | | When the styled check indicator is smaller than the one from the base style, then the clip region was to small and the check indicator from the base style was also drawn. Therefore add both check rects to the clipRegion. Pick-to: 6.7 6.6 6.5 Task-number: QTBUG-102820 Fixes: QTBUG-122821 Fixes: QTBUG-122825 Change-Id: I1b5b8d70d66475bbfa4a40652dc3fdd4cc670c32 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Delete QComboBoxPrivateContainer while the combo box is still aliveTor Arne Vestbø2024-03-092-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Destroying the QComboxBox will, once it reaches the QWidget destructor, close all popups, including the QComboBoxPrivateContainer, which emits signals on behalf of the QComboBox, that is now gone. Regression after d8e110054876b1cbf186e95bac5561a237ee1c13. The old-syle signal-slot syntax had the advantage of not delivering signals to slots in derived classes after that derived class's destructor had finished running (because we called via the virtual qt_metacall). The new syntax made no checks, so a conversion from the old to the new syntax may introduce crashes or other data corruptions at runtime if the destructor had completed. See 0e72a846d379ba02ff80ecac2526640a05b872b6. We also need a QPointer for the QComboBoxPrivateContainer, as the container may be deleted from outside QComboBox, as seen in the tst_QGraphicsProxyWidget::bypassGraphicsProxyWidget() test, where the QGraphicsProxyWidget proxies the QComboBoxPrivateContainer. Pick-to: 6.7 6.6 6.5 Change-Id: I7590cc2821c73a6762f281504aa62f0c2b472252 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Avoid QRubberBand leaving artefacts in QListViewEirik Aavitsland2024-03-081-2/+7
| | | | | | | | | | | | On hidpi screens, the painted edges of the rubberband can extend beyond the selection rect because of scaling. Extend the area to be updated by 2x frame width, when the rubberband changes. Fixes: QTBUG-113432 Pick-to: 6.7 6.6 6.5 Change-Id: Ie7aec1fefdc3fbf71c63952b693f462697adf849 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QDockWidget: add notification signal to floating propertyAxel Spoerl2024-03-081-1/+1
| | | | | | | | | | The toplevelChanged signal notifies about changes of the floating property. Add it in property declaration. Change-Id: I06be59a24e2732030be26d87ce38f6ce58bdebbc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QDialogButtonBox: Don't set focus in a dialog with StrongFocus childrenAxel Spoerl2024-03-073-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A QDialogButtonBox with the first accept button becoming default, didn't explicitly set focus on such a button in a QDialog. d44413d526ec12ed83acd7343c2005782178c7ad implemented this missing functionality. It set focus to the automatic default button, unless the QDialog had a focusWidget() set. That has caused a regression, in cases where - the QDialog has a QWidget child with a Qt::StrongFocus policy, and - the QDialog is not yet visible, so focusWidget() returns nullptr. Amend d44413d526ec12ed83acd7343c2005782178c7ad: Implement a helper in QWidgetPrivate, that returns true, if a child with a given focus policy is found. Do not set focus to a QDialogButtonBox's automatic default button, when - not located inside a QDialog, or - a focusWidget() exists, or - the dialog has QWidget child with Qt::StrongFocus, that is not a child of the QDialogButtonBox. Add an autotest function. Pick-to: 6.7 6.6 6.5 Fixes: QTBUG-121514 Fixes: QTBUG-120049 Change-Id: I3c65ae36b56657f9af4a3a4b42f9b66e8bc5c534 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix menu size in multiscreen setupsFriedemann Kleint2024-03-073-4/+25
| | | | | | | | | | | | | | | | | | During QMenuPrivate::popup() and QMenuBarPrivate::popupAction(), QMenuPrivate::popupGeometry() is called from updateActionRects() with screen = 0 several times (from sizeHint() and various event handlers triggered), which causes it to return the primary screen geometry always. To fix this for the non-QGraphicsView case, use the screen of the menu when it is visible or the screen stored in a newly introduced popupScreen member variable, which is set from a few places in QMenuPrivate::popup(). Fixes: QTBUG-118434 Pick-to: 6.7 6.6 6.5 Change-Id: I6b18593d313719d628b0856004197ac59f46c270 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Map drag event positions to global during dock/toolbar dragDavid Redondo2024-03-051-1/+2
| | | | | | | | | | | Drag event positions are window relatives, QMainWindowLayout::hover expects global coordinates however. Fixes: QTBUG-122949 Pick-to: 6.7 6.6 Change-Id: I28469ba1b5ef88661e744d4cf87f6acab3eb2c72 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Handle drag leave when performing platform drag of docks or toolbarsDavid Redondo2024-03-051-0/+5
| | | | | | | | | | | | | The existing widget machinery works through mouse positions. In order to correctly update state when a drag moves outside of a window it needs to see a move outside of the window. When the platform drag leaves the window a move to the outside of the window is now faked to not keep the layout in the hovered state of the last move event. Fixes: QTBUG-122944 Pick-to: 6.7 6.6 Change-Id: I348f5281a200b78e6be4f11b3c25339d052783a5 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Mention QChronoTimer in API docsAhmad Samir2024-03-032-6/+8
| | | | | Change-Id: Iaf9fb31994f1580b2051dbd0b1b8eef2a218aa39 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Disconnect QWindowContainer::focusWindowChanged on destructionTor Arne Vestbø2024-03-031-0/+3
| | | | | | | | | | | | | | | | | | Regression after 9e78256579e8dc704066a98cb4816a1aab0e7e3b. Apparently the string based connection syntax is more lenient, as with PMF-style connects, we (correctly) get: ASSERT failure in QWindowContainer: "Called object is not of the correct type (class destructor may have already run)" when the QWidget destructor closes the QWindow and we get a synchronous callback from the platform that we've lost the focus window. Pick-to: 6.7 Change-Id: I8f25b3b050e11913ec0f0941eaf831c88b4249f9 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QDockWidget: Use resizer without native window decorationAxel Spoerl2024-03-021-4/+4
| | | | | | | | | | | | | | 975c0bdf732ea7c5f7632913a27a1b6ae5cd5b26 has disabled usage of a resizer on Windows. This has caused a regression, when a dock widget was rendered frameless. Use a resizer in that case. Fixes: QTBUG-120694 Task-number: QTBUG-102196 Pick-to: 6.7 6.6 6.5 6.2 Change-Id: I9fbcb1a8b1d8869995093bc1da7524ec81e9f02d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Add QWidgetPrivate::rhi() helper methodTor Arne Vestbø2024-03-013-8/+11
| | | | | | | | For accessing the RHI managed by the widget compositing machinery. Pick-to: 6.7 6.6 6.5 Change-Id: Ia3c1227cc2d9cfebe95611cad3dbcd7aa6f6f8c7 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Add QWidgetPrivate::closestParentWidgetWithWindowHandle helper methodTor Arne Vestbø2024-03-012-0/+20
| | | | | | | | | In contrast to nativeParentWidget(), we return the closest widget with a QWindow, even if this window has not been created yet. Pick-to: 6.7 6.6 6.5 Change-Id: Icac46297a6052a7a5698d752d4aa871bd5c2bdd8 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Remove QWindowPrivate::compositingTor Arne Vestbø2024-03-011-2/+0
| | | | | | | | | | | It was added for Android in a4f50269f82695fbd0dd344f87b4b355feff4333, for the case of QSurface::RasterGLSurface, but since 6.4 we no longer use QSurface::RasterGLSurface for composition. And the Android usage was removed in 2020ce5fd2478389c56f34742fdeee9cd24ca8a5. Pick-to: 6.7 6.6 6.5 Change-Id: I8dafe959c54e09b3a974253e15d184365141d559 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QTextEdit::event: refactor into switch statementVolker Hilsheimer2024-03-011-16/+26
| | | | | | | | | | | Replace if/else snake, made more complex by handling of QT_NO_* configurations. Move the unconditional cases to the top, which also fixes the handling of ShortcutOverride and ToolTip events when Qt was built with QT_NO_CONTEXTMENU. Pick-to: 6.7 Change-Id: I1e2cc2c39e3cef9fe29a71e48595756cff0d2949 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Fix QTextEdit/QPlanTextEdit palette not updatedMike Chen2024-03-012-9/+9
| | | | | | | | | | QPlainTextEdit/QTextEdit, etc. never received ActivationChange when used as child widget. Set palette to control on WindowActivate/WindowDeactivate Pick-to: 6.7 6.6 6.5 Change-Id: Iae75d9dcfba0c6171c556626551b37d4549006c7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix -Wimplicit-fallthrough for clangTim Blechmann2024-03-0117-0/+19
| | | | | | | | | | | | | | | | | | | Clang's `-Wimplicit-fallthrough` warnings are a little stricter than gcc's interpretation: switch (i) { case 0: foo(); case 4: break; } While gcc accepts the implicit fallthrough, if the following statement is a trivial `break`, clang will warn about it. Pick-to: 6.7 Change-Id: I38e0817f1bc034fbb552aeac21de1516edcbcbb0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QApplicationPrivate::dispatchEnterLeave: remove dead codeAxel Spoerl2024-02-291-13/+0
| | | | | | | | | Remove #ifdef 0 section added in 2011. Task-number: QTBUG-121478 Pick-to: 6.7 Change-Id: I2154cd5616e2695af89cf4fc5ec9d1b3ae5572d5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Refactor and fix QMainWindow::tabifiedDockWidgets()Axel Spoerl2024-02-293-28/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The method traversed QDockAreaLayoutInfo::item_list, to identify dock widgets tabbed with the QDockWidget argument in a tab bar It relied on bool QDockAreLayoutInfo::tabbed, which is set to true, when a QMainWindowTabBar is to be added to a QDockAreaLayoutInfo. This flag isn't cleared, when the second last dock widget is removed from the tab bar. It can't be replaced by QMainWindowLayout::isDockWidgetTabbed, because the flag also represents intermediate states, where e.g. a dock widget is hovered over, prepares to become a floating tab and then rolls back, because hovering doesn't result in a drop. In that case, tabbed must become true, which the dock widget isn't actually tabbed. Furthermore, the way to traverse item_list didn't find dock widgets in a floating tab. In that case, tabifiedDockWidgets() wrongly returned an empty list. To fix both issues, refactor QMainWindow::tabifiedDockWidgets() to read the list of dock widgets directly from the QMainWindowTabBar. Add tests in tst_QDockWidget::floatingTabs() and updateTabBarOnVisibilityChanged() Fixes: QTBUG-122001 Pick-to: 6.7 6.6 6.5 Change-Id: Ia9eb3711be642101261f34ee447521cc6accc20c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Implement Qt::ImEnabled by isEnabled() and isReadOnly()Yansheng Zhu2024-03-013-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, querying Qt::ImEnabled only returned the value of isEnabling(), which is incorrect for edit widgets with read-only properties set, as Qt::ImEnabled indicates whether text can be *input* through the input method, which results in the IM being able to insert text into read-only edit widgets. The fixed version uses both isEnabling() and isReadOnly() values to determine whether input methods need to be enabled. For some platforms (like iOS and Android) that rely on IM to select text, a check for ImReadOnly has been added to their QPA plugins to enable handles on read-only input boxes. At the same time, the imEnabledNotImplemented function in the test file tst_qwidget was modified, since ImEnabling should give a _false_ value when a lineedit is read-only. Task-number: QTBUG-105009 Task-number: QTBUG-110838 Task-number: QTBUG-119182 Pick-to: 6.7 6.6 6.5 Change-Id: Ia2abcdb3200826d567f90447d4f8b71d0ef1fbf0 Reviewed-by: Yansheng Zhu <670429759@qq.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Further replace 'Qt Designer' with 'Qt Widgets Designer'Kai Köhne2024-02-295-14/+14
| | | | | | | | | | Use \QD macro wherever possible. Amends 8aceccc7eb075 Task-number: QTBUG-122253 Change-Id: I276dabd40fb81486f6380fd90cf9968990932a24 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QMessageBox: Forward helper checkbox state via lambdaTor Arne Vestbø2024-02-291-2/+7
| | | | | | | | | | | | There may not be a checkbox when the helper is initialized, and we want to support the case of a checkbox being added at a later stage. Regression from e5c40ec5c117376f401c01069f05780046d07094. Pick-to: 6.7 Change-Id: I397c3b3a101b249aab17804bd90085cfd4ab7dbb Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QAbstractItemView: Release tab focus when hiddenViktor Arvidsson2024-02-291-1/+1
| | | | | | | | | | | | | | When hiding a widget that has focus we try to focus the next widget in the focus chain by running focusNextPrevChild. The abstract item view overrides this to step the items but does not account for this hide case which makes focusing not only not work, but also by hiding the widget the selection in the item view gets changed. Pick-to: 6.7 6.6 6.5 Change-Id: I29d40a1fb86ced60ec742b2753a87383846a89b3 Reviewed-by: Viktor Arvidsson <viktor.arvidss@gmail.com> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QDialogButtonBox: fix crash when adding a QToolButtonDavid Faure2024-02-281-1/+1
| | | | | | | | Introduced by commit d4f38a363251fcb5cdfb24d7a1aceb7b630f7e8f Pick-to: 6.7 6.6 6.5 Change-Id: I99385249a454c75eeae13c1d17670b356427cb70 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Correct doc snippet licenseLucie Gérard2024-02-289-9/+9
| | | | | | | | | | | | | | All file under doc/snippet should be license as Documentation snippets and according to QUIP-18 [1] this is LicenseRef-Qt-Commercial OR BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I76eedfb6b15c4091f726a5652e3530001d7cdaf7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Prevent re-replacing state in setGeometryTomi Korpipää2024-02-271-1/+3
| | | | | | | | | | | Do not allow replacing a state again if it is already being replaced. Cleaned up from the patch provided in QTBUG-121126. Fixes: QTBUG-121126 Pick-to: 6.6 6.7 Change-Id: Icca932b0e5cccd2f39ac18f29d8f7707887d147f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QWidgetRepaintManager: Use textureChildSeen to determine deferred updateTor Arne Vestbø2024-02-271-3/+3
| | | | | | | | | | | | We want to get rid of the QWindowPrivate::compositing member, as it is no longer needed for the Android backingstore, which it was first added for in a4f50269f82695fbd0dd344f87b4b355feff4333. We can use textureChildSeen instead to check if we're compositing. Pick-to: 6.7 Change-Id: If85b21f92c8253bf89543a7e81e03730023f8095 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* qmessagebox.h: Remove redundant semicolon after Q_ENUMAxel Spoerl2024-02-271-1/+1
| | | | | | | | | | | | A redundant semicolon after Q_ENUM(StandardButton) caused a compiler warning. Remove it. Fixes: QTBUG-122637 Pick-to: 6.7 6.6 6.5 Change-Id: I959c0c6d56bc312ad40f18c9455f4e6118b1c7c2 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Revert "QHeaderView: relayout on resetDefaultSectionSize"Jonas Karlsson2024-02-262-13/+14
| | | | | | | | | | | | This reverts commit a8df174369cecd90f14dac85bf162353b7cb25d1. Reason for revert: Caused QTBUG-122109 Pick-to: 6.5 6.6 6.7 Fixes: QTBUG-122109 Fixes: QTBUG-120699 Change-Id: Iea185c00f35e17d8eb8e8da70dc2d808ea274b04 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Doc: Use QDOC_PROPERTY for QRhiWidget::autoRenderTargetPaul Wicking2024-02-262-3/+4
| | | | | | | | | | `autoRenderTarget` is a private bool that very much looks like it's used as a Q_PROPERTY. Use QDOC_PROPERTY for it to generate warning- free documentation. Pick-to: 6.7 Change-Id: Ia6255287f139ff23172c4fac96950e1a37eeef83 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Text widgets: document find() behavior with QRegularExpressionGiuseppe D'Angelo2024-02-262-4/+10
| | | | | | | | | | | | | | The various find() overloads that take a QRE *ignore* the case sensitivity option set on the QRE object itself. They instead apply the case sensitivity passed in the flags (see QTextDocument::find). I think it was an historic mishap, but it's too late to change now. Amend the documentation. Change-Id: I526650d89a98777c7bb839b27d2f2e536a43ca4f Pick-to: 6.7 6.6 6.5 6.2 5.15 Fixes: QTBUG-88721 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* Fusion icons: fix artifacts in media iconsChristian Ehrlicher2024-02-1921-35/+12
| | | | | | | | | | | The fusion svg icons had some unneeded transparent objects which lead to artifacts during png export/pngcrush optimization. Fix it by removing the unused objects and re-export the pngs again. Pick-to: 6.7 Fixes: QTBUG-122272 Change-Id: I13c670a90e88dd31cb7a066c3565cf30c42e83b5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QErrorMessage: Honor devicePixelRatio for SP_MessageBoxInformationChristian Ehrlicher2024-02-191-1/+3
| | | | | | | | | Use QStyle::standardIcon() and retrieve the best icon based on the current dpr instead standardPixmap() which does not know anything about the dpr. Change-Id: Icbc6fd0e7b14808aaa4f081ed5079c319207828a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QWindowsStyle: remove unused code in QWindowsStyle::standardPixmap()Christian Ehrlicher2024-02-191-40/+0
| | | | | | | | | | The code in QWindowsStyle::standardPixmap() is reimplemented in QCommonStylePrivate::iconFromWindowsTheme() in a better way (as it honors the dpr) so no need to leave it here. Change-Id: Icc418d2bd0cff06a8a8e5bc6c14a99bfb34cfc68 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Windows style: remove unused function and memberChristian Ehrlicher2024-02-192-13/+0
| | | | | | | | | | | Remove the two unused functions devicePixelRatio() and appDevicePixelRatio() from QWindowsStylePrivate. Also remove an uneeded forward declaration and the member menuBarTimer. Change-Id: I18347744054fe9c904b0ee48e45788dc4d2a8233 Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>