summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Clean up ShortcutOverride handlingFrederik Gladhorn2014-10-302-3/+34
| | | | | | | | | | | | | | | Instead of sending the event from random places, send it from QWindowSystemInterface. This allows to send override events on OS X to menus before doing other key processing and reduces the number of ShortcutOverride events on all platforms to exactly one per key press event. Additional test by Friedemann Kleint. Task-number: QTBUG-38986 Change-Id: I6981bb776aba586ebc7c3daa5fd7a0d84c25bc3e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-2717-6/+763
|\ | | | | | | | | | | | | Conflicts: src/gui/text/qfontdatabase.cpp Change-Id: I6ac1f55faa22b8e7b591386fb67f0333d0ea443d
| * QGraphicsScene: stabilize stacking order of toplevel itemsaavit2014-10-241-0/+37
| | | | | | | | | | | | | | | | | | Removing and adding toplevel items could result in invalid stacking order (not corresponding to insertion order). Task-number: QTBUG-19316 Change-Id: Ia8646784a2181cfa936b101e2adaf7e7e73bb83d Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
| * Fix rubberband selection in rotated GraphicsViewaavit2014-10-241-0/+43
| | | | | | | | | | | | | | | | | | | | Selection rectangle was incorrectly mapped to scene space when the view was rotated. It became a rotated rectangle instead of the correct polygon (rhombus). Task-number: QTBUG-42008 Change-Id: Ib7b366bec7e1f83109e03c434268ad6897138f30 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| * QStyleSheetStyle: Don't interfere with QFontDialogPierre Rossi2014-10-243-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | The sample lineedit in Qt's own font dialog shouldn't have its font affected by stylesheets. Not only does this hampers the ability to preview the font, it actually overrides the font selection as that one is taken directly from the widget. Task-number: QTBUG-41513 Change-Id: I11d0bef8c7bf7bdae4cc08b6b9276d0fc14a75fb Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| * Correctly update QComboBox appearance on editable changeEskil Abrahamsen Blomfeldt2014-10-241-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The updateDelegate() function checks isEditable() which in turn checks if d->lineEdit != 0, so we need to make the call after the lineEdit has actually been set/unset, otherwise the change to the delegate will not come until the next time you update the delegate. [ChangeLog][QComboBox] Fixed updating appearance of popup menu when changing the editable state of the combo box. Change-Id: Ib32f36cabd53c2c30d6256484a1eae131419960a Task-number: QTBUG-33537 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * QMainWindow: respect the maximum size of the central widgetPaul Olav Tvete2014-10-241-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | Make sure the dock widgets get the available space when the central widget cannot expand any more. [ChangeLog][QtWidgets][QMainWindow] Dock widgets will now be resized properly when the central widget has a fixed size. Task-number: QTBUG-40410 Change-Id: Id06c07b79aa3102aa41212fa2c621f5fa426fe02 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * QSwipeGestureRecognizer: Fix gesture cancel on direction change.Friedemann Kleint2014-10-231-0/+6
| | | | | | | | | | | | | | Task-number: QTBUG-12736 Change-Id: I6d8d09843b45df17cb9158070f63b3397c5b4c07 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| * Add autotest for QGestureRecognizer.Friedemann Kleint2014-10-234-0/+341
| | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-12736 Task-number: QTBUG-15768 Task-number: QTBUG-40461 Change-Id: Ib6dfaa9336f615e17d41444f7aa686cb93d04fca Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * Adjust the layout if a QGraphicsWidget is explicitly hiddenJan Arve Saether2014-10-233-0/+150
| | | | | | | | | | | | | | | | | | Since layout items can now be hidden, this also makes sure we respect the QSizePolicy::retainSizeWhenHidden Task-number: QTBUG-20132 Change-Id: Iab59fc9b61d4ca1bb2208c479a027da6eb0283a9 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
| * Fix QWidget::mapTo/FromGlobal() when embedded in QGraphicsView.Friedemann Kleint2014-10-231-0/+28
| | | | | | | | | | | | | | | | | | | | Map the positions via QGraphicsScene and the first QGraphicsView (as is done in existing code). Fall back to the previous code path when no QGraphicsView exists, which is hit in the tests. Change-Id: I0754765d05cded6bc1b64045f2513fef8afde337 Task-number: QTBUG-41135 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| * Respect contents margins when calculating the size hintLars Knoll2014-10-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | Without this part of the calendar widget get cut off when put in a layout and the contentsMargins are non zero. Task-number: QTBUG-40352 Change-Id: I9ce90476c59c270d92e876a5dc81ea8ce325848c Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * Fix height of combo popup when the list view has non-zero spacing.Friedemann Kleint2014-10-221-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | QListView::spacing() is the space around the item (layout margin), so the effective spacing is twice as big. This differs conceptionally from QTableView, which has a spacing of 1 and a line on top/bottom. Split up QComboBoxPrivateContainer::spacing() into functions return spacing and top/bottom margins to reflect this. Task-number: QTBUG-37865 Change-Id: I1ff812e7856e00a53f1119ef3304956cbb7cbfca Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * Set correct transient parent in q_createNativeChildrenAndSetParent().Friedemann Kleint2014-10-211-0/+17
| | | | | | | | | | | | | | | | | | | | | | Fix warning: void QWindow::setTransientParent(QWindow*) ... must be a top level window. which occurred for example when parenting a QMenu onto a native child widget. Task-number: QTBUG-41898 Change-Id: Icc25fb2108bd68b2d9c0e551949b90fc7a82d358 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-202-0/+160
|\| | | | | | | Change-Id: If7e51514ed6832750e3ad967e4d322ccf920d2bb
| * Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Gabriel de Dietrich2014-10-181-0/+159
| |\
| | * Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-10-141-0/+159
| | |\ | | | | | | | | | | | | Change-Id: Ic01820f2390e419a5b286643e7351e85ae032473
| | | * QAbstractItemView: fix CTRL+A select all behaviorMaximilian Hrabowski2014-10-131-0/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The check for Qt::Key_A to handle selectAll was changed to directly compare to QKeySequence::SelectAll as this will only match Ctrl. The former implementation also triggered when e.g. Shift was pressed. Added a check that selectAll is only called when selection is not disabled, i.e. selectionMode=NoSelection. Added a unit test for selectAll(). Task-number: QTBUG-26687 Change-Id: I721e7ab590b55d7d754b3b74ef01756fa5aa1315 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * | | Fix use-after-delete bug in tst_QWidget::taskQTBUG_27643_enterEvents()Marc Mutz2014-10-181-0/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ASAN report: READ of size 8 at 0x606000011990 thread T0 #0 0x505e3b in EnterTestMainDialog::eventFilter(QObject*, QEvent*) tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp:10294 [...] 0x606000011990 is located 48 bytes inside of 56-byte region [0x606000011960,0x606000011998) freed by thread T0 here: #0 0x2b8df3551c79 in operator delete(void*) ../../../../gcc/libsanitizer/asan/asan_new_delete.cc:92 #1 0x418ab5 in EnterTestMainDialog::buttonPressed() tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp:10276 previously allocated by thread T0 here: #0 0x2b8df3551739 in operator new(unsigned long) ../../../../gcc/libsanitizer/asan/asan_new_delete.cc:60 #1 0x4188cf in EnterTestMainDialog::buttonPressed() tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp:10272 EnterTestMainDialog::eventFilter() checks for nullness of 'modal' before accessing it, but buttonPressed() did not reset 'modal' to nullptr after deletion. Change-Id: I65562a29f8264a6996d7d615e06de1d1afb5af53 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-097-100/+121
|\| | | | | | | | | | | Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
| * | Removing a few unneeded "? true : false"Alessandro Portale2014-10-092-3/+3
| | | | | | | | | | | | | | | | | | | | | Change-Id: Ib13f0ddd65fe78f5559f343f2fc30756b1d3ef76 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | Merge remote-tracking branch 'origin/5.3' into 5.4Oswald Buddenhagen2014-10-061-0/+25
| |\| | | | | | | | | | Change-Id: I132bb6cce68e9f8413200f7ee75586bd1cada38c
| | * QPlainTextEdit: Fix crash on complex undo w/full width selectionEskil Abrahamsen Blomfeldt2014-09-301-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Say you have a document of two blocks of text. When you select a block of text in the document and then replace this with a new empty block (by pressing enter) and then subsequently undo this action, the following three steps are performed as a chain of undo commands: 1. Remove the empty block at the beginning of the document 2. Insert a new empty block at the beginning of the document 3. Insert the text back into the first block Since a block is removed and inserted in the same go, both blocks require a relayout, since the accumulated change spans both blocks. However, in QPlainTextDocumentLayout we would only look at the max of either removed chars or added chars. This would match the text length of the first block at this point, so we would only relayout that block. However, since we are also removing characters, the actual accumulated change to the document is larger. We should relayout any block touched by the sum of the added and removed character counts. Missing this, the paint event would later query block.layout()->lineForTextPosition(0) which would give an invalid line despite the fact that the block.length() > 0. This caused a crash in the paint event when the full width selection was turned on. Note that the logic here was only recently updated to include the removed characters at all in the logic, by the SHA1: 2983cb9531d47e5826540ca79e3066a8ed0db30c. [ChangeLog][QPlainTextEdit] Fixed a crash when using full width selections and issuing a complex undo command chain which removes and inserts an empty block in one go. Task-number: QTBUG-36415 Change-Id: Iafe8a69e455e0c713a48714f10f0cace69c84f51 Reviewed-by: Axel Rasmussen <axel.rasmussen1@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Stabilize tst_qwizard.Friedemann Kleint2014-10-031-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Ensure top level widgets are cleaned up. - Place wizards beside each other for comparison. - Use classic style on Windows to avoid interference by Vista style. Change-Id: I223a40ea14eefe65dc2e9e8ddee44b0f0c806e3d Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
| * | tst_QFiledialog::completer(): Avoid directories starting with 'c'.Friedemann Kleint2014-10-031-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, this causes problems with the completer due to the fact that it matches the root drive "C:\" on Windows. Task-number: QTBUG-41681 Change-Id: Iaf96675067e22e679371139a1a2fbf011a5edbdc Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
| * | Enable the qmdiarea test on X11Paul Olav Tvete2014-10-032-13/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-25298 Change-Id: Iec7591e9e84951a1aea47590aaedaac877cd111e Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * | Refactor tst_QFiledialog::completer().Friedemann Kleint2014-10-031-48/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Streamline code and remove code that has no effect. - Create temporary directory and files only when it is actually required (empty start path). - Remove try/catch as it is not commonly used in Qt autotests. Its original purpose was apparently to ensure temporary file cleanup, but that should now work since smart pointers are used for temporary files and directories. - Introduce variable for case sensitivity. Task-number: QTBUG-41681 Change-Id: Ie5f621c30fc461b880292b853e0660b8fba316eb Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * | QMdiArea: Fix positioning of cascaded sub windows.Friedemann Kleint2014-09-301-20/+18
| | | | | | | | | | | | | | | | | | | | | | | | Take PM_FocusFrameVMargin into account. Task-number: QTBUG-35146 Change-Id: I1499790537ddf9fbb912ab764b7d049ee11af95d Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | | Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-29137-2484/+1830
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/image/qimage.cpp src/gui/image/qppmhandler.cpp src/gui/kernel/qguiapplication.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I7c1a8e7ebdfd7f7ae767fdb932823498a7660765
| * | Widgets: remove references to QStyleOptionFrameV<n>Marc Mutz2014-09-262-4/+4
| | | | | | | | | | | | | | | | | | | | | They're gone since Qt 5.0 and only exist as typedefs for QStyleOptionFrame. Change-Id: Icff45cbd3a47db8618a7f7a80f7252651969237c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * | Generate Show/Hide events for widgets when minimized state changes.Friedemann Kleint2014-09-241-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a regression against Qt 4, where Show/Hide events were received when the minimized state changed. It is restricted to QWidget so as not to introduce additional events to QWindow (which already has signal visibilityChanged()) and cause unexpected side effects in QQuickWindow. Task-number: QTBUG-41312 Change-Id: Ib165a5daf7a7e5d8231ef8a94b70e8a2a3253057 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | Update license headers and add new license filesMatti Paaso2014-09-24131-2476/+1428
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
| * | Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Frederik Gladhorn2014-09-248-1/+180
| |\ \
| | * | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-238-1/+180
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
| | | * QToolButton: properly reset the size hint when a menu is set on itGiuseppe D'Angelo2014-09-161-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QToolButton::sizeHint() takes into account the presence of a menu. However, setMenu() doesn't retrigger a size hint recalculation. Hence, (un)setting a menu on an already sized tool button won't properly reset the size hint. Since the calculated size hint is cached, delete the cached value and call updateGeometry to cause a recalculation. Task-number: QTBUG-38949 Change-Id: I6e79e5e70e31afdfd129282b3668875eca86f51d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | | * QSizeGrip: use a QPointer to the tracked TLWGiuseppe D'Angelo2014-09-151-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And not a normal pointer. The problem is that in certain scenarios, if the TLW containing a QSizeGrip changes and the old TLW gets immediately destroyed, then the mechanism which updates the tracked TLW is run too late, and ends up accessing a dangling pointer. Therefore, we need to protect that pointer via a smart pointer. Task-number: QTBUG-22867 Change-Id: Icfb051132bacde604f660ac7a98bc0a9d1022c68 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | | * Avoid adding widget to its own layoutThomas Fischer2014-09-053-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Widgets and layouts added or inserted to a layout are checked for: - Not being NULL - Not being the parent widget of a layout or the layout itself, respectively Without this commit, adding a widget to its own layout would result in a CPU-hogging infinite loop. Now, a warning is written to stderr and the add or insert function call is ignored. The checks are implemented as public functions of QLayoutPrivate and thus accessible in QLayout's descendants to be used in various "addWidget", "insertWidget", etc functions. Unlike 'classical' layouts like QGridLayout, QFormLayout does indeed accept widgets that are NULL. To not break this behavior, any call for the check functions first tests if the widget or layout, respectively, to test is NULL or not and calls the check only in the latter case. Automated tests for QBoxLayout, QGridLayout, and QFormLayout were added. For an unpatched Qt 5.3, each of those automated tests will freeze as explained in QTBUG-40609. For a fixed version, warning messages about invalid parameters to addWidget/addLayout/... calls will be read by QTest::ignoreMessage, resulting in a passed test. Change-Id: I1522d5727e643da3f7c025755975aca9f482676d Task-number: QTBUG-40609 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | | * Recreate child windows when changing screensDyami Caliri2014-08-282-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When setting a new screen, the code calls QWindow::destroy(), which recursively destroys all child windows. It then calls create() on the top-level window, leaving child windows destroyed. This causes crashes if you have embedded native widgets. Task-number: QTBUG-40817 Change-Id: Iaace2589f48bbfd5faaf5ff95357ff43b310504a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | | * Show the correct cursor for QLineEdit's side buttons.Marcel Krems2014-08-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-40708 Change-Id: I5869f42bab3a27085b5572a4b83b16c39a67f733 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | | Blacklist constantly failing test cases on OS XKalle Viironen2014-09-235-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_qcolumnview fails on OS X # QTBUG-41341 tst_qaccessibility fails on OS X # QTBUG-41340 tst_qnetworkreply fails on OS X # QTBUG-41320 tst_qfontcombobox fails on OS X # QTBUG-41318 tst_macplist fails on OS X # QTBUG-41314 tst_qgraphicsitem fails on OS X # QTBUG-41342 tst_qmdiarea fails on OS X # QTBUG-41343 tst_qtableview fails on OS X # QTBUG-41344 Change-Id: I2626aa61417336805872a807c4a6065b7e0ddb02 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | | Fix too fast zooming in QTextEdit with smooth scrolling eventsAllan Sandfeld Jensen2014-09-231-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not zoom 1pt on every single wheel-event, but instead scale the zoom with the size of the angle delta. Change-Id: Idbe17356c7845ebd0039f655d3e611e71c6f0dd6 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * | | Fix spin box with fine grained wheel eventsAllan Sandfeld Jensen2014-09-231-0/+32
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only step the value in the spin box when we have accumulated one wheel tick worth of wheel delta. Also fixes the obsolete contructors of QWheelEvent so they set the non obsolete properties. Change-Id: Ic6ea4b37afa8eec85a6ca7bdc0d919bf8fb02608 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * | Update widget winId when screen changesDyami Caliri2014-09-192-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a window's screen changes it may recreate the platform window. In that case, update the winId in the widget to keep it in sync. Task-number: QTBUG-40681 Change-Id: Iec815320214832bb63952de3a5bd1340a04dacd4 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * | Fix saving handle width in QSplitter::saveState()Alexander Volkov2014-09-161-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSplitter::handleWidth() returns either a style dependent value if d->handleWidth is negative or the value of d->handleWidth itself. So to preserve this choice after calling saveState()/restoreState() we should save and restore the value of d->handleWidth rather than a result of handleWidth() which is non-negative. Change-Id: Idc11f8063d34b6c4a5f9b0a0032868679766dfb9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | Make the default value of QTreeView::indentation() be style dependentAlexander Volkov2014-09-151-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new PM_TreeViewIndentaion enum value to QStyle and get the corresponding pixel metric in QTreeView. [ChangeLog][QtWidgets][QTreeView] Indentation is now style-dependent by default. [ChangeLog][QtWidgets][QTreeView] Added resetIndentation(). Change-Id: Ifad7987b8f3c6cd32987b89d95390f33043d8f19 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Adam Majer <adamm@zombino.com>
* | | QAbstractItemView: add iconSizeChanged signal.David Faure2014-09-121-0/+5
|/ / | | | | | | | | | | | | | | | | | | | | This is useful when writing a generic preview-icon-generator which should work with different type of views, itemviews and QML views. A way to be notified of a change of icon size was missing on the itemview side. [ChangeLog][QtWidgets][QAbstractItemView] Added iconSizeChanged signal. Change-Id: I19b3049961002ca27d71aefbb6980d1e6f225c79 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | GraphicsView: Fix resolvePalette() for QGraphicsItem's childrenMaks Naumov2014-09-051-0/+17
| | | | | | | | | | | | | | Use a proper function for that. Change-Id: I166ce44b8987d522cb01bae57009b2b862851b92 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | QListView: Catch stack overflow on mutual scrollbar calculation.Christoph Schleifenbaum2014-08-291-0/+25
| | | | | | | | | | | | Task-number: QTBUG-39902 Change-Id: Ie850371098070e8ce485d5cb122aa89c18d97359 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QLineEdit: Disable standard key 'cut' when there is no selection.Friedemann Kleint2014-08-281-1/+32
| | | | | | | | | | | | Task-number: QTBUG-40477 Change-Id: I0741a1a769c9e7e0d19e8aec231acc29461d44ea Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | tst_qstatusbar: Allow a little more leeway in timer checking.Robin Burchell2014-08-281-1/+6
| | | | | | | | | | | | | | | | | | Timer granularity means that sometimes this won't wait the full timeout before vanishing the message. Add some extra tolerance so we don't unnecessarily fail integrations. Change-Id: I203ac16cda7bd1f0437dd3febc0509c17e86c25a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>