summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Don't rely on QWidget::internalWinId in QWidgetBackingStoreTor Arne Vestbø2019-08-071-9/+15
| | | | | | | | | | | | | | | | | | QWidget does not handle QWindow and QPlatformWindow being destroyed behind its back, and the QWidget state for internalWinId and the Qt::WA_WState_Created attribute can easily get out of sync with reality. To avoid QWidgetBackingStore mistakenly thinking that a widget does not have a platform window it can operate on we use the QWindow and QPlatformWindow handles directly, instead of relying on the winId. This is a stop gap until we can teach QWidget to deal with dynamic changes to its underlying window handles. Change-Id: Ib09bea2ad62c42e9667a20ca6b5faf0f957288da Fixes: QTBUG-74559 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Add trailing "." to all \brief commands in QLineEditPaul Wicking2019-07-161-16/+16
| | | | | | | | Minor housekeeping. Task-number: QTBUG-77063 Change-Id: I9c04dd4220c0c2ad2afa51f88df197f5992752ff Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Remove unused arguments from QWidgetPrivate::create_sysTor Arne Vestbø2019-07-123-25/+13
| | | | | | | | | | | | | The public QWidget::create still has them, but we don't need to propagate them on - that just makes debugging the window creation flow harder. The window argument to QWidget::create is technically used to guard an early exit in the function, but to keep behavior the same we leave it for now. Change-Id: Ic0287575aa25f1272e216adc1b75e34d6f55f6d9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Revert "Reset QWidget's winId when backing window surface is destroyed"Tor Arne Vestbø2019-07-121-6/+0
| | | | | | | | | | | | | | | This reverts commit a9246c7132a2c8864d3ae6cebd260bb9ee711fcb. The QWidget machinery is way to fragile to reset the winId under the feet of QWidget like that. We would potentially need to include all the logic in QWidget::destroy. This also ties into the flow between QtGui and QtWidgets during window closing, which is still unresolved. Change-Id: I168048a63c89796398eb5331a80ce3e5c8d9a208 Fixes: QTBUG-76588 Task-number: QTBUG-69289 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Don't set the mouse cursor for items that are disabledVolker Hilsheimer2019-07-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | As with widgets, items that are disabled should not receive any input events. Similar to QGraphicsScene, which ignores disabled items when handling mouse presses, the view should also ignore them when handling mouse moves to update the cursor. Since QGraphicsView only adjusts the cursors on mouse moves, reenabling an item that is currently under the mouse will not change the cursor. This is consistent with other changes of item attributes that would position the item under the mouse (such as moving it). The overhead of hit-testing items for every such attribute change would be too large, and applications can generate a mouse move event if they really need to adjust the cursor in all situations. [ChangeLog][QtWidgets][QGraphicsView] Ignore disabled items when setting the mouse cursor. Fixes: QTBUG-76765 Change-Id: Ifcd31fc0581e8421e58eeb436a55b031909eed7e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix compilation with C++20Marc Mutz2019-07-063-3/+3
| | | | | | | | | Implicit capture of 'this' in [=] is deprecated in C++20. Fix by using explicit captures. Change-Id: I1633446f4670202b0d1aca938d8c27dbc0c1411e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QWidget::restoreGeometry(): Fix Windows being restored out of screen areaFriedemann Kleint2019-07-051-6/+13
| | | | | | | | | | Factor out the screen area check to a separate helper and apply to restoredGeometry, too, fixing an oversight of 2f2bfc4e59cecfdd210663fbf81c000ecddfb822. Change-Id: I795d8d5e3cddb5e986c96c08a342d69063d04970 Fixes: QTBUG-76900 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* QWidget::restoreGeometry(): Remove code related to restoredFrameGeometryFriedemann Kleint2019-07-051-11/+1
| | | | | | | | | restoredFrameGeometry is only used for a sanity check in format version 0, add a comment and remove code. Task-number: QTBUG-76900 Change-Id: I797b07d069f8568cb39541bcbe9009935a4a79f7 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Fix the appearance of QSpinBox arrows on high-DPI displaysAndre de la Rocha2019-07-051-1/+1
| | | | | | | | | | | | | A previous change to QLineEdit::sizeHint() has caused the QSpinBox arrows to break the widget frame on a high-DPI display with some particular scale values like 150 or 175%. This change updates QLineEdit::sizeHint() so that it has a minimum height, using the same values used in 5.11. Fixes: QTBUG-76047 Change-Id: I21f3e736da473b10fdf52e5a60e5fc5d07f270a1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Update visible window's alpha when toggling WA_TranslucentBackgroundVolker Hilsheimer2019-07-021-3/+2
| | | | | | | | | | | | | | | | | | QWidgetPrivate::updateIsTranslucent sets the surface format of the window with the alpha based on the translucency attribute, so we need to call this function when the attribute value changes. The test can confirm that the window's requested surface format has changed, we can't rely on what is actually set, and don't have to rely on hard-coded values like 8bit alpha. While WA_NoSystemBackground needs to be set for WA_TranslucentBackground to have an effect, we can't clear the attribute when clearing translucency (as it might have been set explicitly). Change-Id: I238d6930b7e0488397467a4e035b5f530566a1ff Fixes: QTBUG-60822 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix window shortcuts when a completer popup has focusVolker Hilsheimer2019-06-251-4/+9
| | | | | | | | | | | | | | | | | The completer popup has focus, making QShortcut direct to it's window rather than to the window the completer belongs to. As QShortcut handles the case for Tool windows that have a parent, but doens't do the same for popups. And they shouldn't be treated the same way, as a context menu popup for a e.g. text edit should in fact block the text edit's shortcuts while open. However, the completer popup is special, in that it explicitly makes the widget completes for its focusProxy, which is what we can use to fix this issue. Change-Id: Ie7177d39668b3af14a1d9e0ee5d93eca9c67c8af Fixes: QTBUG-4485 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QWidget: fix setTabOrder for compound widgetsChristian Ehrlicher2019-06-101-28/+32
| | | | | | | | | | | | | | | | | | | | 81e298a51d08c510457b4a26b37c0d4aac5eba65 fixed a case where the focus chain was screwed up when the order was already correct. This worked correctly in most cases but not when the next focus widget of the first one had Qt::NoFocus. The optimization check if lastFocusChildOfFirst is the same as second is thrown away since it now does not longer screw up the focus chain and the save would only be four pointer assignments. Fixes: QTBUG-75388 Task-number: QTBUG-10907 Task-number: QTBUG-68393 Task-number: QTBUG-69619 Change-Id: I581ed532156c34ea970123afd063194aab016304 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QApplication: clarify and unify global static usageTor Arne Vestbø2019-06-211-11/+5
| | | | | | | | | Explain why there are two accessor functions for the global statics, and use the global statics directly inside qapplication.cpp for consistency. Change-Id: Ibf3952052c1d0e780a8aab220a72f05af0c070a5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove duplicate call to QApplicationPrivate::setPalette_helperTor Arne Vestbø2019-06-211-1/+0
| | | | | | | initSystemPalette() already takes care of this. Change-Id: I6521763a74ec3ec629d9fcf05aa2a7cd71a7f26d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove duplicate call to QApplicationPrivate::initializeWidgetPaletteHash()Tor Arne Vestbø2019-06-211-1/+0
| | | | | | | | initSystemPalette() already calls this when there's a platform theme, which is the only case where initializeWidgetPaletteHash will have an effect. Change-Id: I814ea2bb17ef40aee769f2c36f8ef4296cfca020 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Squash un-needed qt_init function into callsiteTor Arne Vestbø2019-06-211-15/+4
| | | | | | | | Only uses a single place and avoids following the init logic through multiple layers when trying to debug it. Change-Id: I8fc119385edf407f69fb5431dc6584288022a7fe Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove dead code from QApplicationPrivate::setSystemPaletteTor Arne Vestbø2019-06-211-20/+2
| | | | | | | The code was added in 2005, ifdefed out already, and never used. Change-Id: Ic5d070dd031665a4429739278851b50646694bf9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Always fill the background of a tabbed QMdiSubWindowVolker Hilsheimer2019-06-211-5/+11
| | | | | | | | | | | | | | QMacStyle polishes QMdiSubWindows to have autoFillBackground set to false. If the QMdiSubWindow's widget also doesn't fill the background (like QLabel), then nobody fills the window in a tabbed QMdiArea, and the other subwindows show through. This change makes sure that all pixels are painted in that situations, using the styled frame. Fixes: QTBUG-76214 Change-Id: Iae025d15d36a8bc0d0c5838ac43c9d54944bcc83 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Deal with multi-display scenarios when positioning menu popupsShawn Rutledge2019-06-215-8/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to support rare setups involving an X11 server with multiple independent displays ("zaphod heads" on which the DISPLAY env var is different), possibly with multiple outputs forming a virtual desktop on each display. QMenu::popup() has been assuming that it should show on the screen where the mouse cursor is. That's good most of the time; but with multiple independent screens, QGuiApplication::screenAt(pos) cannot tell us which screen to use (it's ambiguous), but rather will choose the first screen that _could_ contain that position (as documented). In the example in QTBUG-76162, the QMenu has been constructed with a QDesktopScreenWidget as its parent specifically for the purpose of telling it which screen to pop up on; so we need to respect that. But QWidgetPrivate::init() sets the QObject::parent() to null (because the widget isn't actually shown as a child of the QDesktopScreenWidget), and QWidgetPrivate::create_sys() sets initialScreenIndex back to -1 to provide freedom to change the screen later; so QMenu has to remember the screen index for itself. QMenuBarPrivate::popupAction() searches the siblings of the screen on which the menubar is claiming to be (rather than all screens on all displays), to find the screen containing the point at the middle of the bottom edge of the clicked menubar item. It then sets initialScreenIndex so that QMenu::popup() will respect it rather than trying to decide for itself. Fixes: QTBUG-76162 Change-Id: I7a8f8e7aa2e9cf5340d446dc12726369ebe2589a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QSS/MenuItem: only draw checkbox if no item is availableChristian Ehrlicher2019-06-171-37/+23
| | | | | | | | | | | | | QTBUG-66380 introduced a behavior change drawing a checkable menu item with an icon. After this path the checkmark and icon was drawn. Revert this regression so the stylesheet style matches the behavior of all other styles. A checkable item should have two different icons (QIcon::On and QIcon::Off). Fixes: QTBUG-74655 Task-number: QTBUG-66380 Change-Id: I32ac2f397087a1c3d5d07400372109703c00c1ba Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add neglected connect()s to Q{Date,Time}Edit constructorsEdward Welbourne2019-06-111-2/+4
| | | | | | | | | Pointed out by Daniel Teske. This amends commit c3e1abad4e141e6e9d876e5cff194c473a2654eb. Change-Id: Ia6c6f41bf28e846152f9f86322f20a1b99e57201 Reviewed-by: David Faure <david.faure@kdab.com>
* Document that QHeaderView rendered with themed style might ignore rolesVolker Hilsheimer2019-06-051-1/+4
| | | | | | | | | While this is generally true for widgets, QHeaderView's documentation about how appearance related data roles are respected can be misleading. Fixes: QTBUG-31804 Change-Id: I93c6562e59ecf771d938d282723169202ac15bc2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Q(Plain)TextEdit: Observe color hints from style sheet depending on focus stateFriedemann Kleint2019-05-242-0/+13
| | | | | | | | | | | Ask the style sheet style to adapt the palette in WidgetTextControl::getPaintContext() as is done for QLineEdit. Use the palette color in QPlainTextEdit. Change-Id: I67758716b66feaeac8c2433c2a4d3744cd0d5327 Fixes: QTBUG-72100 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fusion: Fill the rect with base brush when drawing the combobox frameAndy Shaw2019-05-271-1/+9
| | | | | | | | | | | | | | Instead of doing this directly inside the PE_FrameLineEdit as this can be used directly when a stylesheet is set the rect of the lineedit used in the combobox in fusion style is filled directly with the base brush. This ensures it still renders the background correctly when using fusion style, but enables stylesheets to work as it will not override that if the background is set in a stylesheet for a combobox. Fixes: QTBUG-75816 Change-Id: I50a0600b500088ebcf1d70a02f9c74c6040d34d9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QMenu size fix - Mark items dirty on screen changeThorbjørn Lund Martsum2019-05-223-6/+12
| | | | | | | | | | | | | It seems like an optimization on the itemsDirty flag caused a bug to be re-introduced. When a popup is shown on a new screen, the itemsDirty must however be set to ensure that new correct sizes are calculated. Task-number: QTBUG-59794 Change-Id: Ifb5c233b1f9d4d38bd0cd7a9a71cc32ad3212f8c Reviewed-by: Morten Kristensen <msk@nullpointer.dk> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Avoid rounding of the size in QGraphicsPixmapItem::boundingRect()Alexander Volkov2019-05-091-2/+2
| | | | | | | Fixes: QTBUG-75458 Change-Id: Ib240ddc0b490ae3c0348b6bfa290ad1f51b1e071 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QCompleter: Fix completion on QFileSystemModelFriedemann Kleint2019-05-211-5/+35
| | | | | | | | | | | | | | | Fix the condition introduced by that determines whether a completion is started on signal QFileSystemModel::directoryLoaded() (introduced by 416ec00e7c859a844a5bcb24c7a31147aed974c / Qt 4). Observe case sensitivity and the native separator and return true for root directories. Task-number: QTBUG-38014 Task-number: QTBUG-14292 Change-Id: Ie425c04d2df256248e84250ba777793a8106a738 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* dockwidgets: Unbreak moving floating dock widgets with custom titlebarSergio Martins2019-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f1033567aa4 improved resize of windows with custom titlebar by adding more margin, but the check was too tight. d2d6c6f7813 tried to fix the regression, but not totally The mode is only set *after* the mouse press. It will always be NoWhere the first time, so that check will always discard the mouse press, making moving the window always fail the first time. Also, if the rect+range contains the press, then surely the mode won't be nowhere once set. There's still room for optimization, like bailing out early it was the right button instead of the left button, but that's out of scope for this bug fix, and also not worth for 5.12 branch. To reproduce the bug, simply: - Run examples/widgets/mainwindows/mainwindow - Click the red button of the blue dock widget, to make it float - Drag the title bar (not too slow). Fixes: QTBUG-66454 Change-Id: I0eebfb932dab95267ebadccd757de11a8bfe419d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Nathan Collins <nathan.collins@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Emit QMenu::aboutToShow() before platform specific codeMassimiliano Gubinelli2019-05-161-2/+2
| | | | | | | | | | | | | Send the aboutToShow() signal to QMenu before synchronising the widgets for the menu items. This fixes a bug where if new QWidgetActions are added to the menu from a slot triggered by the menu's aboutToShow() signal, then such new actions do not shows up correctly on Mac. Other platforms are not affected by the change. Fixes: QTBUG-75826 Change-Id: Ic245d3fbc7ddde6944cca6cdb8e8951380c846ec Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Don't try to retranslate strings for native color dialogsTor Arne Vestbø2019-05-161-0/+3
| | | | | | | | | | | | If the native color dialog is in use we haven't created any of the widgets and will crash when trying to update them. Change-Id: I6c43cc47359110c3b9db7cacb62581446cc6f7a3 Fixes: QTBUG-75858 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Qt Widgets: Document CMake macrosKai Koehne2019-05-162-0/+65
| | | | | | | Task-number: QTBUG-72159 Change-Id: Ib9fdf852583964cf07c4d26e0a6c74f0058e29f1 Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Don't render PE_PanelItemViewRow under tree decoration if style says noShawn Rutledge2019-05-151-1/+2
| | | | | | | | | | | | | | | Fusion style's SH_ItemView_ShowDecorationSelected hint is hard-coded to 1, but in QCommonStyle::drawPrimitive (which QFusionStyle inherits) it only asked its own QFusionStyle::styleHint() before drawing the background that happens to be under the tree row decoration (arrow thingy or +/- symbol). And the style doing the rendering does not know about QStyleSheetStyle so by the time we get to QCommonStyle::drawPrimitive() it's too late to check. Therefore QTreeView needs to avoid calling it in this case. Fixes: QTBUG-73251 Change-Id: I2d0ed4d3b2ee805a5602122273387982caa564f8 Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Make sure QAccessibleTableCell is valid before referenceFrederik Gladhorn2019-05-131-6/+19
| | | | | | | | | | There are some cases (model resets in weird positions) where we would crash due to accessing invalid model indices. Fixes: QTBUG-61416 Fixes: QTBUG-71608 Change-Id: Ibfedcbd921a3145f3e1596ac424a77f2319a5c46 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Reset QWidget's winId when backing window surface is destroyedTor Arne Vestbø2019-05-111-0/+6
| | | | | | | | | | | We already reset it though e.g. QWidget::destroy, but if the backing window is destroyed spontaneously or via another API we need to catch that and send a WinIdChange event so clients who pulled out the original winId will not think the pointer is still valid Change-Id: I8556940ee871e81a51f73daeb2064f95bf41371c Fixes: QTBUG-69289 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QWidgetTextControl: Emit cursorPositionChanged() when handling IM eventVova Mshanetskiy2019-05-071-0/+4
| | | | | | | | | | | | | | | QWidgetTextControl and consequently QTextEdit did not emit cursorPositionChanged() signal when cursor position was changed by a QInputMethodEvent with a QInputMethodEvent::Selection attribute. This is especially important on Android because QAndroidInputContext uses such events extensively to move the cursor and also relies on cursorPositionChanged() signal being emitted by the focus object. If the signal is not emitted, QAndroidInputContext does not notify the virtual keyboard about cursor position change which results in various glitches. Change-Id: I7edd141258c483e6f103adcd6e40049b49c13387 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Accessibility: Improve handling of read-only stateFrederik Gladhorn2019-05-073-2/+15
| | | | | | | | | | | We have been rather sloppy in how read-only versus editable is handled. According to the definition, editable signifies that in principle a widget allows the user to change its text. Read-only means that this ability is (currently) disabled. Task-number: QTBUG-75002 Change-Id: I5d71843abcdaac52f4a60a1abcac2604341f6c96 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* fix compilation with various -no-feature-* optionsNick Shaforostov2019-05-053-1/+9
| | | | | Change-Id: Ic1975db497613e3efe50be4246c167efe10d8e31 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Reduce amount of tracepoints required for event trackingMilian Wolff2019-05-022-14/+10
| | | | | | | | | Encode the consumed/filtered state in the _exit tracepoint and remove the separate tracking of receiver event handling. Combined, this reduces the size of the trace file. Change-Id: Icb3cb2dd47798543905cea450046d6fad559a15b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't pass scope args to _exit trace pointsMilian Wolff2019-04-301-1/+1
| | | | | | | | | | | | | | When we trace a scope, then we pass the scope args to the _entry trace point. There is no need to do that also for the _exit trace points, it just blows up the trace data for no obvious gain. Any decent tracing consumer can easily find the args for the _exit call by matching it to its _entry call. Note that this is standard practice in trace points, and also done like this in the Linux Kernel trace points for example. Change-Id: I273293b0c7e799767acc1960b50ab675fc765a36 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSystemTrayIcon/X11: Create tray icon window when system tray appearsAlexander Volkov2019-04-232-22/+57
| | | | | | | | | | ... and destroy it otherwise. Fixes: QTBUG-61898 Fixes: QTBUG-73459 Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I6bd8f397f7ccdb123f6a60d4fa466f7b0d760dfc Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* QStyleSheetStyle::repolish: only run on direct childrenFrederik Gladhorn2019-04-121-1/+4
| | | | | | | | | | | | | When re-parenting, some widgets change their children. For example QLabel, when set to rich text, will not update, until receiving a polish call, at which time getting a list of all children recursively and then trying to call functions on them will crash, since the children change in the middle of this operation. Fixes: QTBUG-69204 Fixes: QTBUG-74667 Change-Id: I95dd83ebeed14c017e22552ddd47658ae8a09353 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix effects for highdpi graphical itemsAlexander Volkov2019-04-103-6/+9
| | | | | | | | Create a highdpi pixmap as a source for graphical effects. Fixes: QTBUG-74963 Change-Id: Ie144df3dbe61421fb28e639e640857aca6e6320f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Note Q[Plain]TextEdit keeping formatting in some casesKai Koehne2019-04-102-8/+31
| | | | | | Fixes: QTBUG-72427 Change-Id: Ifddabb175c480b64282bd8c8fdb9edab4c7ecf44 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Fix context loss in QOpenGLWidget upon tlw change with AA_ShareOpenGLContextsLaszlo Agocs2019-04-091-1/+2
| | | | | | | | | | The logic introduced in 2ea90c56 has an issue: it resets (destroy the context and co.) upong TLW change even when AA_ShareOpenGLContexts is set, and that is just wrong and goes against what the docs claim. Fixes: QTBUG-74307 Change-Id: Ib519045c1d9842664cbe602d4e6425660cf638b5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QTableView: don't draw additional grid lines top and leftChristian Ehrlicher2019-04-091-23/+0
| | | | | | | | | | | | | | QTableView drew additional grid lines on the top and left side when the corresponding header was not visible and the ScrollMode was ScrollPerItem. After 8f2bacea41443af8564ff78f284016b6615a001b they were also drawn for ScrolPerPixel for consistency. But they are not needed at all and only create visual artifacts. Therefore remove the drawing of the additional lines completely. Fixes: QTBUG-74706 Change-Id: I5c77d53a2eeefab9b9bfe0efea6439f5afede4ac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QTableView: fix Ctrl+End behavior with disabled columnsChristian Ehrlicher2019-04-091-1/+1
| | | | | | | | | | | | | | | | Ctrl+End moves the visual index to the bottom left index. This does not work correctly when the item in the bottom left is disabled. It should be fixed with 7863be311570fa219066df5fe8720d5b92ddb680 but does not due to a typo. Fix the typo by using the newly calculated visualColumn instead the initial column. There are cases where the algorithm still does not work as expected when there are more disabled items but fixing them would add a lot of complexity with no (much) gain. Fixes: QTBUG-72400 Change-Id: Ie90f6b3e41e00f54e826c2b4e7303e85ac1e4115 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QMenu/QComboBox: Extract helper for determining the pop up geometryFriedemann Kleint2019-04-085-24/+30
| | | | | | | | | | Move the code returning whether a popup should use the full screen to QStylePrivate and use for QMenu and QComboBox. Task-number: QTBUG-73231 Change-Id: I1901ecedfa90edf16329ce3b13ef4abea5ab44e8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'origin/5.12.3' into 5.12Qt Forward Merge Bot2019-04-081-2/+0
|\ | | | | | | Change-Id: Id60d508c0f25fd5e67be07daafd2d4c56ae73934
| * Drag'n'Drop: fix dnd regressionGatis Paeglis2019-03-261-2/+0
| | | | | | | | | | | | | | | | | | | | DragEnter events always should start with the default state, which is accepted = false. This was a copy-and-paste error introduced by f8944a7f07112c85dc4f66848cabb490514cd28e. Fixes: QTBUG-73977 Change-Id: I34b3ea97c9b4f4fc040a9e6f1befd6124533361d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Add missing _exit tracepoints for event handlingMilian Wolff2019-04-052-1/+2
| | | | | | | | | | | | | | | | | | | | | | This allows tools that look for matching `foo_entry/exit` pairs in the trace data to work properly. An unmatched `_entry` would otherwise confuse them, making them think that the call stack is continuously increasing. Change-Id: Idff7f587ea25c46ec86ad623cc82d503db34a194 Reviewed-by: Christoph Sterz <christoph.sterz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>