summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Redundant condition: tornoffZou Ya2021-03-041-1/+1
| | | | | | | | | | Redundant condition: tornoff. '!tornoff || (tornoff && scroll)' is equivalent to '!tornoff || scroll' Pick-to: 6.1 Change-Id: I8339faa4d53360db280173ee489e48eba4883b70 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Variable is Assigned a never used value in qt_make_filter_list()Huang Jie2021-03-041-11/+4
| | | | | | | | | Variable 'i' is assigned a value that is never used in qt_make_filter_list() Pick-to: 6.1 Change-Id: Id845ecb5231b97a899443bdcb9f49cccb7f20bea Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Don't access data in moved-from objectVolker Hilsheimer2021-03-031-2/+2
| | | | | | | | | | | | | | It's undefined behavior, esp since we leave it to the compiler to implement a move constructor for the ButtonInfo struct. So read the data that we need first. Fixes static analyzer warning de76eedae524c86f89d6369c0f5af8c7. Pick-to: 6.1 Change-Id: I8fc458b7e9ba8904ec7a3b1c26aac0628e336ea2 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QGraphicsWidget: don't dereference nullptrVolker Hilsheimer2021-03-031-1/+1
| | | | | | | | | | | | | Unlikely that one item is nullptr and the other item doesn't have a scene, but we do already test for the scene pointer, so don't continue if it's nullptr. Fixes static analyzer warning f59576ecf6618447c4f9c7be93fc737f Pick-to: 6.1 Change-Id: I6d436bb1211ddd412821d6978bab25192033f5e5 Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QGraphicsWidget: Check for nullptrs in focus chain handlingVolker Hilsheimer2021-03-031-2/+4
| | | | | | | | | | | | | | The while loops terminate if focusAfter becomes nullptr (unless we break earlier), so don't dereference those pointers without checking first. Fixes static analzyer warnings 979f2d508db4d5838f6c9b296120ce60 and 481f2ec7b5851bf19414478428f944b7 Pick-to: 6.1 Change-Id: I60fc5999907fe3b3146d7047ee1eff197719ab31 Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add nullptr checks to QGraphicsView classesVolker Hilsheimer2021-03-032-19/+23
| | | | | | | | | | | | | | The styleInfo parameter defaults to nullptr, and the scene can evidently be nullptr since we test for it before ungrabbing the mouse. Fixes static analyzer warnings fbd03604cc701651595a2ea33c5562b4 and 30fcb05194f3a2d121fc57b05e0ccf10 Pick-to: 6.1 Change-Id: I8e9d4fe4055115c366ada1cbb22a8f0839ba41da Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge "QLabel: simplify createStandardContextMenu"Volker Hilsheimer2021-03-021-7/+6
|\
| * QLabel: simplify createStandardContextMenuVolker Hilsheimer2021-03-021-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If control is nullptr in the beginning, then it will be nullptr later as well, and the function won't do anything. And if the effectiveTextFormat is Qt::PlainText, then the linkToCopy will be empty, and the function won't do anything, either. So we can just handle these cases right away, making the code simplier. Fixes static analyzer warning 43de3f3125108b4353afd94e94f59926. Pick-to: 6.1 Change-Id: I5b8eb94a1e40c2725de6a168298d8f3bcde748eb Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | cmake: disable snippets/graphicsview if "printdialog" is not availableRichard Moe Gustavsen2021-03-021-1/+1
|/ | | | | | | | | | | | | | | | | | | The graphicsview doc snippet has an explicit QT_REQUIRE_CONFIG(printdialog) check that will fail the build if Qt is not configured with "printdialog". This check should be mirrored in the cmake file, so that we skip building the snippet in the first place if the feature is not available. As it stood, we would build the snippet if "printsupport" was enabled. But this is too granular, as you can configure Qt to have general print support, but at the same time, skip the print dialog. This caused the build to fail on iOS. This patch will check the correct feature in the cmake file. Change-Id: I31acc1f7c257e08374ea7b84a7fc38c66f214271 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Font style name 'Normal' and 'Regular' have the same meaningOliver Eftevaag2021-03-021-0/+8
| | | | | | | | | | | | | | Some popular fonts on linux systems follow a naming convention, where font styles are named 'Regular', 'Italic', 'Bold' and 'Bold Italic'. Qt so far only accepts the words Italic and Oblique interchangably, but not with Regular and Normal. This change will make sure that Regular is interpreted the same as the Normal font style. Fixes: QTBUG-90396 Pick-to: 6.0 6.1 5.15 Change-Id: Ibbaf086de742c91f4d380c937ca80e846aa32a2e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix z-value of QGraphicsItems being ignored during drawQiang Li2021-02-281-1/+1
| | | | | | | | | | | | | | | In QGraphicsScene's function draw, don't copy the children into a const copy (to prevent detaching in the loops), as they might get sorted. Instead, use a const reference. Amends e349f787d595aa343ca86af94159b6730d55b8d5, which introduced the bug by making a copy of the unsorted list. Fixes: QTBUG-81316 Pick-to: 6.0 6.1 Change-Id: Iab9b87e75178a883806088a9db234c7a2aaa9301 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Assert that QWidgetPrivate::create creates a windowVolker Hilsheimer2021-02-251-0/+1
| | | | | | | | | | | | | Assert the expected side effect of createTLSysExtra, which might not allocate a window, but must do so in this case (as we have already returned if the QWidget is not a window). Fixes static analyzer warning 2f3bbfe8addb586445e96f8906d6769e Pick-to: 6.1 Change-Id: I4d5b8651b3510eff8e4a7b25889c0521ba6a4247 Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Consistently test for nullptrVolker Hilsheimer2021-02-251-2/+3
| | | | | | | | | | | m_view might be nullptr, which is checked before setting up the palette, so don't set the QTextCharFormat up without checking first as well. Fixes static analyzer warning 0ef07dd07bebe04b93d1fc802eddb57a Pick-to: 6.1 Change-Id: Ia1c92eb4183c9e368e92875775cff90e2883ddaf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add null pointer checkVolker Hilsheimer2021-02-241-1/+1
| | | | | | | | | | | | The detailsText widget might be nullptr even if detailsButton is not. Both are tested elsewhere in code, e.g. in the _q_buttonClicked private slot, so be consistent. Address static analyzer warning 00b85157447772462c3b8ffc1da0ae3a Change-Id: Ib8c31b79653a6e8a9011692cb84ffaa2fb8047e7 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Assert that we have a layout before dereferencingVolker Hilsheimer2021-02-241-0/+3
| | | | | | | | | | | | Since we test the pointer in the beginning, it might be nullptr. But if we receive events that require a layout, then it must not be nullptr. Assert that assumption. Address static analyzer warning 06f8cc945ead26f20c6b9599faf76c83. Pick-to: 6.1 Change-Id: I1c6eb9e9d2c9444fcb9bd1d1d9c345237dc72b33 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Assert that dereferenced pointer is never nullptrVolker Hilsheimer2021-02-241-0/+1
| | | | | | | | | | | | | It can't be, since then 'o' (which is never nullptr) would be different, and we'd return in the previous line. Since we test for d->popup a few lines above, help clang static analyzer to not report this with hash 27ff831d79d1779825fd964239cbefe7. Pick-to: 6.1 Change-Id: I9f0b14bd88418b897cee2d7a63e8a10fc4a0b01c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Initialize out-variablesVolker Hilsheimer2021-02-231-5/+8
| | | | | | | | | | | QSplitterPrivate::getRange might return early, and then the variables will contain garbage. Fixes warning from clang static analyzer. Pick-to: 6.1 Change-Id: I0081ad9847f158da4440b945ba2db7e7f5d4780b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Initialize QStyleOptionHeaderV2 with correct versionVolker Hilsheimer2021-02-221-1/+1
| | | | | | | | | Amends 4c6579eacded086ad014b0fd2432095362c1d131 Pick-to: 6.1 Task-number: QTBUG-91224 Change-Id: I9a41db9354bff2fa706cf6053aa229cdca16759e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Complete documentation for QStyleOptionHeaderV2Volker Hilsheimer2021-02-221-22/+33
| | | | | | | | | | | Document the isSectionDragTarget variable, and add \inmodule command. Put code and documentation together. Amends 4c6579eacded086ad014b0fd2432095362c1d131. Pick-to: 6.1 Change-Id: Id8837ca75cd6af13c8dc4c028b304b279e507ade Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QLineEdit: Fix editingFinished() not being emitted when pressing the clear ↵Dong Rui2021-02-221-1/+1
| | | | | | | | | | | | | | button When pressing the clear button, the editingFinished() signal was not received when focussing out. Call _q_textEdited(QString()) when pressing the clear button. Pick-to: 5.15 6.0 Fixes: QTBUG-83295 Change-Id: Ie4bc6d9a2f27f89163c05c4c15175540c7631a30 Reviewed-by: Liang Qi <liang.qi@qt.io>
* QAbstractFileIconProvider: Use platform theme iconsFriedemann Kleint2021-02-211-9/+1
| | | | | | | | Add code paths to use platform theme icons should icon themes fail. Task-number: QTBUG-66177 Change-Id: I9554637f5230b1f57faaeef6b2c04cf082271edb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Unbreak binary compatibility in QStyleOptionHeaderVolker Hilsheimer2021-02-195-17/+59
| | | | | | | | | | | | | | | | | 4d943846128118e1b9932a17ce6f977a0f4127a5 introduced a new data member to QStyleOptionHeader, and reduced the size of the orientation member. This changed the binary layout of class instances, and breaks ABI. 180c662b0790c6eceffdcb4661681d7df1541a2d added another member within the new bitfield. Introduce a new QStyleOptionHeaderV2 class instead with the new members, and use that in QHeaderView, and the styles using the new members. Fixes: QTBUG-91224 Pick-to: 6.1 Change-Id: I47e6841e6652e4b67f247b7b4514e90be5609156 Reviewed-by: David Faure <david.faure@kdab.com>
* QMdiSubWindow: Set correct ControlLabel sizeMorten Johan Sørvig2021-02-191-2/+2
| | | | | | | | | | | | The label pixmap may be a high-dpi pixmap. Set the ControlLabel fixed size to be the pixmap device independent size. Fixes: QTBUG-87871 Pick-to: 5.15 Pick-to: 6.0 Pick-to: 6.1 Change-Id: Ib836e322d25599cb5e79011ea597e32ee1f8d093 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use same version in deprecation macrosVolker Hilsheimer2021-02-181-1/+1
| | | | | | | | Address API review comment. Pick-to: 6.1 Change-Id: Ifd9f9dafc958ab8304f36e2ae6ab2fb5a01a29d8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* fix windows build when both whatsthis and tooltip are disabledNick Shaforostov2021-02-181-1/+5
| | | | | | | | | msvc produces warning there and it is treated as error Pick-to: 6.0 5.15 Change-Id: Ic386df615df591fa1563b147342d670bbec771d2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QHeaderView: pass sectionSize to createSectionItems()Christian Ehrlicher2021-02-122-8/+5
| | | | | | | | | | | | .. instead complete size for the affected range. The complete size was calculated before for every call of createSectionItems() and then the function calculated the size per section back for no reason. Passing the sum of all sections is therefore not needed and may lead to an integer overflow for big datasets. Task-number: QTBUG-88728 Change-Id: I8af0b0c3e97021ff0637fe1ee3ca3adfa23a2d0e Reviewed-by: David Faure <david.faure@kdab.com>
* CMake: Port the snippet project setup to CMakeVenugopal Shivashankar2021-02-109-2/+72
| | | | | | | | Change-Id: I411e58e94752f3b2d0a3e8aac0ab7c4c2272db89 Fixes: QTBUG-89826 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QPlainTextEdit: adjust scroll bars when showing upWang Chuan2021-02-091-0/+1
| | | | | | | | | | | The text of QPlainTextEdit might change when it is invisible, so an adjustment of scroll bars is needed when the QPlainTextEdit showing up, otherwise the range of scroll bars might be incorrect. Fixes: QTBUG-77937 Pick-to: 5.15 6.0 6.1 Change-Id: I45c686c7e09ca7b2944c36122e9157de0ec4f0e0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Canonical pointer usageHou Lei2021-02-091-1/+1
| | | | | | | | Other affected rows have also been fixed. Change-Id: Ie0a32f724bd2e40e7bfacfaa43a78190b58e4a21 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Windows: Fix flicker when resizing translucent windows with QSizeGripFriedemann Kleint2021-02-011-3/+15
| | | | | | | | | | | Do not use the startSystemResize() functionality in that case. Fixes: QTBUG-90628 Fixes: QTBUG-73011 Pick-to: 5.15 Pick-to: 6.0 Change-Id: I8d4843c1715c7f75f9b41c904e6f1aebbf0e02d7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QDial: fix painting QDial when the rect has an offsetChristian Ehrlicher2021-01-292-6/+6
| | | | | | | | | | When the QDial should be painted with an offset, the dial was not draw correct. Fixes: QTBUG-89574 Change-Id: I646c3d42fba34e8c603a8f81f363ed827f04d5de Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QHeaderView: Mark the drop section during section moveChristian Ehrlicher2021-01-295-5/+37
| | | | | | | | | | | Currently there is no visual feedback where the section move will end up. Therefore mark the drop section to show where the dragged section will be inserted. Fixes: QTBUG-673 Fixes: QTBUG-1114 Change-Id: I3e45a9a9c0604342bb0286fc7cd4c89c757c28cd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QLineEdit Cursor show white areaZhang Hao2021-01-281-2/+4
| | | | | | | | | | | | fix QLineEdit Cursor Rect and InputMask area overlapping, the cursor rect area is white. when inputMask is set,we don't need draw cursor. Fixes: QTBUG-89578 Pick-to: 5.15 6.0 Change-Id: Ibec7f8f1f7331a12438fd821c2002903260da10a Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix that the placeholdertext of QCombobox is not drawnChunLin Wang2021-01-271-2/+4
| | | | | | | | | If the current index is invalid,a placeholdertext will be displayed. Fixes: QTBUG-90595 Pick-to: 6.0 5.15.2 Change-Id: Id4c6b9c959242b96ee0944b8fc3131a9a2fdcccc Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Fix populating selection clipboard with keyboardVolodymyr Samokhatko2021-01-265-6/+23
| | | | | | | Task-number: QTBUG-59879 Pick-to: 6.0 5.15 Change-Id: I6948919fc90995c60a34b5bd6b4a225c1a59fd9b Reviewed-by: Liang Qi <liang.qi@qt.io>
* Bump copyright year to 2021Kai Köhne2021-01-251-2/+2
| | | | | | Change-Id: I18a9c2de391ca51655148b2e3cc9abdfbb8ddbcf Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QComboBox/Fusion style: elide text when it's too longChristian Ehrlicher2021-01-231-1/+2
| | | | | | | | | | The fusion style did not elide a very long text in a QComboBox as it's done in other styles / non-popup mode. Fixes: QTBUG-86632 Pick-to: 6.0 5.15 Change-Id: I356a61809220d41717a9039d2b33dd706d034941 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QPushButton: fix drawing pushbutton with a menuChristian Ehrlicher2021-01-201-8/+9
| | | | | | | | | | | | | | | | | Drawing a QPushButton with a menu results in a clipped label text and a wrong aligned decoration and menu button. The position of the menu button was calculated wrong (spacing has to be subtracted since the start position is the right side). Also the text label alignment was done before it was adjusted for the menu button which results in an unaligned (in constrast to a pushbutton without a menu) label and decoration. Fixes: QTBUG-89619 Change-Id: I872d39ff2d8eb685fe6843e38c7f727868e1ee9a Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Funning <huangyub@uniontech.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Make QStyle::proxy() always return the leaf proxySergio Martins2021-01-201-2/+4
| | | | | | | | | | | | | For example: fusion -> proxy1 -> proxy2 Now returns proxy2. Fixes: QTBUG-85556 Pick-to: 6.0 5.15 Change-Id: I2a60329f948b59ef7d0752d273bee3854a200547 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Correct item indent in checkable menus in stylesheet styleEirik Aavitsland2021-01-201-2/+2
| | | | | | | | | | Not only the checkable items need to be indented, but all items in the same menu, so that they line up. Pick-to: 6.0 5.15 Fixes: QTBUG-90242 Change-Id: I559005f753b5cd19eaeeeb6658178d62de93b4ef Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* control scrolling of QTabBar using StyleHintSophie Kums2021-01-194-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mouse wheel/touchpad scroll signals sent to the tab bar trigger cycling through the tabs. In applications where the tab bar is close to "mouse click hotspots", the cursor may accidentally be left over the tab bar instead of the main content of the window. When the user wants to scroll up/down the main conten, the scroll signals are thus sent to the tab bar and instead of scrolling, the focus switches to another tab. This is confusing to the user, because not only does the application not carry out the desired action (scrolling through the main content), it jumps to a different tab. Two common examples of applications affected by this nuisance are Konsole and any kind of browser (file browser or web browser), where the address bar is right below the tab bar. Moreover, on macOS, scroll events do not have an effect on the tab bar widget of the native UI. Currently, the code makes use of preprocessor directives to achieve consistent behavior on macOS (`#ifndef Q_OS_MAC`). This patch implements the check of a StyleHint in order to determine if scroll events on the tabbar should have an effect. This approach is more consistent with Qt coding style than OS-dependent preprocessor directives and, in addition, makes the behavior configurable according to the user's preferences. [ChangeLog][QtWidgets][QStyle] Added SH_TabBar_AllowWheelScrolling as a style hint to enable/disable cycling through tabs using the scroll wheel. This defaults to true in all styles except the macOS one so there is no change in existing behavior. Change-Id: I99eeb5a1aab03cbc574fac7187d85a8a2d60cf34 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* ItemViews: Don't remove items on internal moveChristian Ehrlicher2021-01-182-4/+8
| | | | | | | | | | | | | | When an itemview only allows internal moving of items it can happen that the target accepts the drag'n'drop operation since it's out of the control of Qt (e.g. Recycle Bin or an other application). Due to the nature of a move, the original item is deleted. Therefore check if the internal move target is the same as the source and don't delete it otherwse. Fixes: QTBUG-86020 Pick-to: 6.0 Change-Id: I69de4b8d76d1b0f57338b402aee87580226cd6cb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix small typo in the QMdiArea documentationOliver Eftevaag2021-01-181-1/+1
| | | | | | | | | Added missing whitespace character in the documentation for QMdiArea, in the 'detailed explanation' section. Pick-to: 6.0 Change-Id: I6be1d664bc15e3e461c5fc3d8f82311cc6ea60ea Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QHeaderView: fix moving sections with mouse in RTL modeChristian Ehrlicher2021-01-171-3/+4
| | | | | | | | | | | Moving sections in RTL mode did not work correctly - in contrast to LTR mode the secion must be moved much further to the left or right to actually move it. Found while implementing an indicator for QTBUG-673 Task-number: QTBUG-673 Change-Id: I5a82d3cdb39415a408b2884d0ee302e0547e884f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Windows: Fix dialog moving up after closing/reshowingFriedemann Kleint2021-01-151-1/+5
| | | | | | | | | | | | A resize event delivered after closing the platform window was causing the stored frame margins to be cleared. Bail out of QWidgetWindow::updateMargins() if the platform window is null. Pick-to: 5.15 Fixes: QTBUG-79147 Change-Id: Iebbc90c3cccafa209cd720baedf45affb3f3c2b8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* macOS: Mark QFileDialog::DontConfirmOverwrite as unsupportedMorten Johan Sørvig2021-01-151-0/+3
| | | | | | | | | | | | | | | | | The native NSSavePanel does not have an option corresponding to DontConfirmOverwrite. Qt has a workaround where the save-file-name is temporarily given a prefix in order do bypass the overwrite check, however this has stopped working on recent versions of macOS. (Confirmed on macOS 11) Users who want to use DontConfirmOverwrite should use Qt’s file dialog instead. Fixes: QTBUG-39791 Pick-to: 5.15 6.0 Change-Id: Id3b9e6de72c2afc9526c96f1d9fdbce78db92aeb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix setting active window as application's focus widgetSona Kurazyan2021-01-151-4/+5
| | | | | | | | | | | | | | | | | | | | | | 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>
* Fix the tips still show when cursor move to another actionQiang Li2021-01-151-0/+2
| | | | | | | | | | | | 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>
* 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-151-7/+11
| | | | | | | | | 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>