summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Add missing full stops in briefsPaul Wicking2018-06-212-2/+2
| | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QHeaderView: Send the StatusTip events to itself if there is no parentAndy Shaw2018-06-141-1/+1
| | | | | | | | | | If there is a parent (typically an itemview) then StatusTip events should be sent to that. However in the case of there not being a parent then the event should be sent to the QHeaderView itself. Task-number: QTBUG-68458 Change-Id: I2a8c11c973210c7adf1bf29443f224f968a357a9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge 5.11 into 5.11.1Oswald Buddenhagen2018-06-073-1/+6
|\ | | | | | | Change-Id: I28f48e980a9e23ddde5251608dd9d1d83df65392
| * Fix build for Android with android-clang in r17Liang Qi2018-06-061-1/+1
| | | | | | | | | | | | Task-number: QTBUG-67464 Change-Id: Ib971a5da82b31bce9ac1c9ac623ad7d5302cfaec Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Fix building with -no-feature-dirmodel -no-feature-filesystemmodelJoni Poikelin2018-06-041-0/+1
| | | | | | | | | | Change-Id: I7ab90043b2bf6ee41412480f72eb701230cecb38 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QAbstractSpinBox: Add more documentation cross linksAndre Hartmann2018-06-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | stepUp() and stepDown() already linked to stepBy(), so add the reverse too. keyPressEvent() talks about stepBy() too, so add it to the cross reference. Change-Id: I22c841821331eaed9607cfb2807dcf0e2886d952 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Don't set the wasDeleted flag in ~QWidgetLars Knoll2018-06-072-1/+4
|/ | | | | | | | | | | | | | | | Setting it too early can cause issues, as we are still doing lots of work here as e.g. calling hide() on children. But the flag is required when we delete the declarative data, so set and reset it when destroying that data. Amends c579f49e2a80a55a4004ff8e5b2ee76bda146387 Task-number: QTBUG-68637 Change-Id: I7ed35828c26912aa6d703ba6025e46b7911353fa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Render QOpenGLWidget/QQuickWidget with AlwaysStackOnTopAllan Sandfeld Jensen2018-05-311-14/+16
| | | | | | | | | | | QWidget::render was ignoring QOpenGLWidget/QQuickWidget with AlwaysStackOnTop set, because normally they will be composited later, however when not doing a backing store render, they need to be painted right away as there is no later. Task-number: QTBUG-67533 Change-Id: I08e2eeee5e7a8f0dbbf43f659fcfa9068e8c46d1 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QAbstractSpinBox: Fix missing frame conditionGabriel de Dietrich2018-05-301-1/+1
| | | | | | | | Wrong check for SH_SpinBox_ButtonsInsideFrame in initStyleOption(). Change-Id: I35c6ff4d007f171fe44d7f3e5734c6f4586d871b Task-number: QTBUG-68238 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Make sure we can build with -no-feature-draganddropJoerg Bornemann2018-05-2945-133/+152
| | | | | | | | | We move QInternalMimeData to a separate file, because this class is used, even if draganddrop is disabled. From now on, include qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData. Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* QFusionStyle: Fix width of editable combo boxFriedemann Kleint2018-05-151-1/+1
| | | | | | | | Add a scaling overlooked in 63d08003cf06b84b871618ba800a7079ae6bf702. Task-number: QTBUG-68194 Change-Id: I97c771435e4316ec55aacc527335b62cb4dfd9ec Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Fix build without features.cursorTasuku Suzuki2018-05-151-11/+15
| | | | | Change-Id: I450bd9f160c64f718c49e87d274c1ccc4a657aca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix build without features.completerTasuku Suzuki2018-05-091-0/+2
| | | | | Change-Id: Idc79921f85a920bc8c1280513ce78ee0cb00d415 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix building with -no-feature-shortcutJoni Poikelin2018-05-081-0/+2
| | | | | Change-Id: I7576055a6d81d6a7a075ebff16ca6b0ced4e984e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix Clang 6 warning about comparing different enumsThiago Macieira2018-05-041-1/+1
| | | | | | | | | qdialogbuttonbox.cpp:862:14: error: comparison of two values with different enumeration types in switch statement ('QDialogButtonBox::ButtonRole' and 'QPlatformDialogHelper::ButtonRole') [-Wenum-compare-switch] Change-Id: I3840d727dee443318644fffd1529350b81678712 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash in QMacPanGestureRecognizerJan Arve Saether2018-05-022-2/+17
| | | | | | | | | | | | | | | | | | The reason it crashed was this: 1. Button was pressed => _panTimer started with the graphics view as destination. 2. Button was released => the graphicsview is destroyed 3. 300 ms later: Qt tries to deliver TimerEvent from _panTimer to the graphics view. Unfortunately, the graphics view is deleted, but Qt doesn't know that... (*crash*) We therefore chose to start the timer with a destination we are controlling the lifetime of: the QMacPanGestureRecognizer. Inside the timerEvent of that we can check if the actual target is already destroyed. Task-number: QTBUG-60404 Change-Id: Iff8f5b7217de42c4c5cf551ca507f0cff1c99a78 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Convert features.toolbar to QT_[REQUIRE_]CONFIGStephan Binner2018-05-0227-155/+160
| | | | | | | | Move declaration of pick/perp helpers up the dependency chain Change-Id: I7084ed829a057a0c45d60445c416fb07f2cb5624 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Remove assert from QFormLayout::takeRow()Sergio Martins2018-04-301-2/+0
| | | | | | | | | | Having rows without fields is a supported use case so it shouldn't assert. Code works quite well in release mode, but crashes in debug mode. Change-Id: I1c4f736318489bae09780fcdb56136181afcac17 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix for input method commit that ends with newlinePaul Olav Tvete2018-04-271-1/+6
| | | | | | | | | | | | | If the input method event contains a commit text that ends with a newline, text, the commit string is inserted first. This changes the current block. This change makes sure that we apply the formatting changes (including removing the old preedit text) to the old block in this specific case. Task-number: QTBUG-67836 Change-Id: Ia83963780fb14b3c571dbbe3eb81fbbe20fbf412 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QWidgetWindow: Immediately forward close events to QWindowUlf Hermann2018-04-271-0/+1
| | | | | | | | | This way the platform window is destroyed in a timely manner, preventing redundant close events from the window system. Task-number: QTBUG-43344 Change-Id: Ifdfca59ceacef54405f1c227c493dc514a1b27ea Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix build with -no-feature-graphicsviewPaul Olav Tvete2018-04-251-0/+1
| | | | | | Change-Id: Idddd353695d2a24ed90c29f557abfedf11d82fbc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Style sheets: detect and use font set on QHeaderViewsGabriel de Dietrich2018-04-241-5/+7
| | | | | | | | | | | We also ask the parent style to draw the header label instead of the base style which is more likely to respect other text related parameters. Change-Id: I6dd658fa4d016a76d7c450478dc42f07e4b807c4 Task-number: QTBUG-33855 Task-number: QTBUG-37153 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix QML integration of widgetsLars Knoll2018-04-231-1/+2
| | | | | | | | | | | | | We need to mark the object as deleted before destroying it's declarative data, otherwise all sorts of bad things can happen. This fixes the qwidgetsinqml autotest in qtdeclarative. Change-Id: I05a645ebe1ca7a50c8927e3dbd9ebb5aaf369a71 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 3e91625b58b4d7d2757678de9d77eef91e84df36) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Style sheets: Include margin while calculating QHeaderview section sizePeng Wu2018-04-221-2/+4
| | | | | | | | | Align with QCommonstyle QHeaderview section size calculation. Change-Id: I4c11e1881f48850ace3bdbb3c96f999cc298c91e Task-number: QTBUG-56457 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QTabWidget: clarify ownership after insertTab() and addTab()Anton Kudryavtsev2018-04-201-4/+8
| | | | | Change-Id: I7cd3aa5c092c99bbafd09c4bea7c6824d0b6740a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Send ShortcutOverride event when receiving a non-spontaneous key pressAndy Shaw2018-04-201-2/+14
| | | | | | | | | | | | | | | When a key press is received which is not spontaneous then it needs to be manually sent as a shortcut override event to ensure that any matching shortcut is triggered first. This enables emulation/playback of recorded events to still have the same effect. [ChangeLog][QtWidgets] Sending a key press event with sendEvent() now sends a ShortCutOverride event first to the widget to trigger any shortcuts set first. Task-number: QTBUG-48325 Change-Id: Iafcc2cdb1773bffe89edaeb0abc44cd5a51088e6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QToolTip: Hide tooltip on key event on macOSGabriel de Dietrich2018-04-181-7/+5
| | | | | | | | | This brings back Qt 4 behavior. The difference is that we only ignore modifier-only key events, as it's done natively. Task-number: QTBUG-49462 Change-Id: I02f2313e1164ba185336d80ac5cc16ce6d883b79 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QSplitter: fix doc for widget() and handle()Anton Kudryavtsev2018-04-181-4/+5
| | | | | | Change-Id: I7b8a0ba9f6b99eae22c2230c761d7a14045256db Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Don't ignore the shortcut when the QMenuBar is parentlessAndy Shaw2018-04-181-1/+8
| | | | | | | | | | | | With Cocoa it is possible to have a parentless QMenuBar so that the same one can be used for multiple windows. Therefore if the top level window is the QMenuBar when checking for the context then we can let it carry on as if the top level window is the same as the active window. Task-number: QTBUG-45453 Change-Id: Ifacf2111d5f9973afe8af30c6338918f130e51a4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* dockwidgets: Resize the rubber-band when our drop target is resizedSergio Martins2018-04-122-1/+18
| | | | | | | | Bug can be seen on the .gif attached to QTBUG-67611, the floating group window resizes, but the rubber band still has the old size. Change-Id: I7232a39574ea06fe036c75c21e7496c0f32f4632 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix grouped dock widget from shifting down when createdSergio Martins2018-04-111-0/+2
| | | | | | | | | | | | | | | | Animated .git attached to the bug report for easy understanding. Looks like we shouldn't set window flags after a setGeometry() and before having the window resources. If we do that, then the requested geometry won't be honoured. No idea if it can be fixable in the QPA and won't risk doing it there. Fixes the problem on macOS and Windows. On Linux it was OK, and still is. Task-number: QTBUG-67611 Change-Id: I8244b4956a5ac9afcf257bea762c2c3084b563f8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix z-order when dragging a dock widget over anotherSergio Martins2018-04-111-0/+1
| | | | | | | | | | | | | the drop target would create a floating group window, which would have higher z-order since it just had show() called on it. raise the window we're dragging when the target is mutated into group window. Bug can be seen on the .gif attached to QTBUG-67611. Change-Id: I5dad058468e24327b14d1e7f76c3ad0287d26ee8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix crash if dock widget gets deleted while draggingSergio Martins2018-04-101-2/+3
| | | | | | | | | By using a QPointer. Change-Id: I16832dadc9cd8cefc4f9f276b1242c0000097b95 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QSplitter::indexOf: fix documentationAnton Kudryavtsev2018-04-101-2/+2
| | | | | Change-Id: I2943c076879cbf229f209743b3b5c1f5fcd78302 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QTabBar: Repaint when releasing mouse on selected tabGabriel de Dietrich2018-04-051-1/+5
| | | | | | | | Some styles, most notably QMacStyle, require this to properly reflect the pressed state. Change-Id: Ie841d97afbe3cfdfde1254a7069876a1a0af2e52 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Improve QAbstractSpinBox::stepBy() docsMitch Curtis2018-04-051-5/+4
| | | | | Change-Id: I28e942b6b2952205641c751e4c120cb38ae13fd6 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix memory corruption in heightForWidth cacheHarald Brinkmann2018-04-051-1/+1
| | | | | | | | Overflowing q_firstCachedHfw caused memory to be overwritten before q_cachedHfws. Change-Id: Ibbcc72380f426550cc0569a05c54cd1acd878b33 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Check if the movie's current pixmap is null before drawing itAndy Shaw2018-04-041-1/+1
| | | | | Change-Id: I87ed9998108961775f8f424bfbb4b957c0b03d8a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QWidget: Fix typo in Mac size propagationGabriel de Dietrich2018-04-041-1/+1
| | | | | | | This amends commit f8b6d104b981ef420756c0c20f62b8013d93ae15. Change-Id: I77a48e68ec7db791b843fe4dfeddc4c6fedf6380 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QTableWidget: fix spelling errorRichard Moe Gustavsen2018-03-231-1/+1
| | | | | Change-Id: Ifd6f116a214d13328ccf0d070ef4517a3b53bf25 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* offscreen: Check that native interface is valid before using itAndy Shaw2018-03-211-1/+1
| | | | | | | | | If the offscreen platform plugin is used on Windows then it can end up crashing since there is no native interface. This prevents a crash from occurring when these functions are called. Change-Id: I526fc0703771fa5f85b26d182ad3b15ef1a3ada5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Modernize the "regularexpression" featureUlf Hermann2018-03-201-1/+1
| | | | | | | | | | | | | Use QT_CONFIG(regularexpression), disentangle it from QT_BOOTSTRAPPED, switch it off in the bootstrap build, remove the #ifdefs from qregularexpression.{h|cpp}, and add QT_REQUIRE_CONFIG(regularexpression) to the header. qregularexpression.{h|cpp} are already correctly excluded in tools.pri if !qtConfig(regularexpression). Change-Id: I21de154a6a118b76f99003d3acb72ac1e220d302 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* widgets: Add a QT_CONFIG(style_stylesheet) guardMikhail Svetkin2018-03-201-3/+7
| | | | | | | for isWindowsStyle in QDockWidget Change-Id: Id471b91a415f1a677ced6022bdd05b7e1b72aad2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QMenu: Realign submenu first action with its parent menu actionGabriel de Dietrich2018-03-161-0/+7
| | | | | | | | | | | There was an offset equivalent to all the margins we add to the action rectangles. We need to subtract it in order for both menu items, parent and sub-menu, to be aligned. This amount is given by the sub-menu's first action position relative to its popup. Change-Id: I141bbe3cfb81825a25b12e4059b93e61c29df518 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QFusionStyle: Fix compilation when qreal is floatAlexander Akulich2018-03-151-4/+4
| | | | | | Change-Id: I575d348915a7239a40b589012b4e9707bd15d1dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Revert "Set sharedPainter correctly for QGraphicsEffect"Laszlo Agocs2018-03-141-2/+2
| | | | | | | | | | | | | This reverts commit 7257862fb2edfab0219d6cd45c83677049404f7d. It has been reported that this patch causes widgets with certain effects become invisible. Task-number: QTBUG-60231 Task-number: QTBUG-66803 Task-number: QTBUG-66387 Change-Id: I9c3c4cf2f17ac639d1aee5489b665aa1e165af16 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Item views: Fix 5.11 API review findingsFriedemann Kleint2018-03-142-11/+10
| | | | | | | | | Rename getter QHeaderView::firstSectionMovable() to QHeaderView::isFirstSectionMovable(), turn into a property and fix \since. Change-Id: Ica2ca43d22f3fd78ff63178ba75014807fc9b823 Reviewed-by: David Faure <david.faure@kdab.com>
* widgets: Add a QT_CONFIG(messagebox) guardMikhail Svetkin2018-03-131-1/+3
| | | | | | | for initResources in QApplication Change-Id: Id083edbcba4b348ef78e55c788ea94f85b6f572b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Add doc to Graphics View Flow Layout exampleNico Vertriest2018-03-131-0/+0
| | | | | Change-Id: Id3965d099222607cee4252bbb33c6a1e9c17765a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix ambiguous shortcut warning messageSergio Martins2018-03-111-1/+1
| | | | | | | This is done in QAction::event(), not eventFilter(). Change-Id: Idc5d7864d259dcf035543c40c8e7b6acd86bde9b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>