summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Close popup widgets when wheel events are receivedFriedemann Kleint2014-08-261-0/+28
| | | | | | Task-number: QTBUG-40656 Change-Id: I134b07705744c23af9718dee486ab5e9ad4352cf Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* tst_qtreewidget: Skip test that crashes on Wayland.Robin Burchell2014-08-251-0/+3
| | | | | Change-Id: I6cc2eb90df57eb5c33d3a93920ea719b5e2cfc0d Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* tst_qtreeview: Skip test that crashes on Wayland.Robin Burchell2014-08-251-0/+3
| | | | | Change-Id: Iff2499dff1906a7c65fc5c007b96675f4bac2b42 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* OS X: Fix pan gestures.Morten Johan Sørvig2014-08-251-1/+3
| | | | | | | | | | | | | | | | | | The QPanGesture recognizer requires single-point touch events. The touch implementation in Qt 4 would test Qt::WA_TouchPadAcceptSingleTouchEvents and forward single touch events if set. Making this work in Qt 5 is a little bit more involved since the platform plugins don't know about widgets. Change the Cocoa touch implementation to send single-point touch events to QWidgetWindow windows only. Make QApplication forward single-point touch events only if the target widget has the Qt::WA_TouchPadAcceptSingleTouchEvents attribute set. Task-number: QTBUG-35893 Change-Id: I68712a5e3efb4ece7a81ca42f49c412e525eeb3a Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* tst_dialog: Skip test that doesn't pass on Wayland.Robin Burchell2014-08-231-0/+3
| | | | | | | Wayland does not support QCursor::setPos. Change-Id: Ic50bc31944db70605af01529cc2b7483dfc334a5 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* tst_QWidget: Skip tests that don't pass with qwindow-compositor.Robin Burchell2014-08-201-0/+43
| | | | | | | Everything else passes, after some pending fixes in QtWayland. Change-Id: Ibd8efcaab8c5210111854f1a7362434046a62898 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Giuseppe D'Angelo2014-08-191-6/+6
|\
| * Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-121-6/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually included changes from 3a347a4e70e5a10ee92dd2578316c926a399e894 in src/opengl/qgl.cpp. Conflicts: src/opengl/qgl_qpa.cpp src/plugins/platforms/android/androidjnimain.cpp Change-Id: Ic26b58ee587d4884c9d0fba45c5a94b5a45ee929
| | * Uncomment some tests which accidently got commentedAndy Shaw2014-08-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | With SHA1 47b3ecf3f49933f2a7e3a9dd98f0641d513822bb some tests got commented out by accident. This re-enables those tests. Change-Id: If9c7d8a672b66086895a0383fe87d3101fb146fb Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | tst_qstatusbar: Use a timer and remove some unnecessary waits to reduce test ↵Robin Burchell2014-08-181-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | time. Time taken by this testcase reduced from 7 seconds to 5.1 seconds for me. Change-Id: I93b1c5fbc7d9d6515c9ce51a64fdd5c2ffbd54c8 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | | tst_qwindowcontainer: Convert some QVERIFYs to QCOMPAREsRobin Burchell2014-08-181-3/+3
| | | | | | | | | | | | | | | | | | | | | So when they fail it's easier to figure out why. Change-Id: I7e76a6e0b8076ede30a6bb9049a031063c569dfc Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | tst_dialog: Convert some QVERIFY to QCOMPARE.Robin Burchell2014-08-181-2/+2
| | | | | | | | | | | | | | | Change-Id: Ibca62cf9dd2e19e32388d19f0c7b34fb7fd81268 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | tst_qlistview: Convert some qWaits into QTRY_* usage.Robin Burchell2014-08-181-8/+4
|/ / | | | | | | | | | | | | | | This takes the total runtime of tst_qlistview for me from ~47 seconds to ~10 seconds. Change-Id: Ie6fe95fe0852c2de37e99c2ad02230de78e0995e Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | OS X: Remove mnemonics in parenthesesTakumi Asaki2014-08-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | In some language, mnemonics put after label text within parentheses. e.g. "&Open" is translated to "開く(&O)" in Japanese. OS X doesn't use mnemonics and '&' in label text is removed. Mnemonics in parentheses (and spaces before them) also should be removed. Change-Id: I88c0a1f60af7e148b3cf24a4e215ce807d62bce3 Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | QProgressDialog: fix setBar() not properly adopting the new QProgressBarMarc Mutz2014-08-061-7/+0
| | | | | | | | | | | | | | | | The "adoption" code is taken from setLabel(). Task-number: QTBUG-40503 Change-Id: Id512b28eb756b4a80e5701e599e2cbdf5346ff62 Reviewed-by: David Faure <david.faure@kdab.com>
* | QHeaderView::restoreState(): Add sanity check.Friedemann Kleint2014-08-061-0/+1
| | | | | | | | | | | | | | | | Read data into local variables and apply only after a check. Task-number: QTBUG-40462 Change-Id: Id06060d0d5b0eafc2d303526a86d552ff5747a72 Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-08-041-4/+10
|\| | | | | | | | | | | | | | | | | Conflicts: config.tests/arch/arch.cpp src/opengl/qgl_qpa.cpp src/widgets/kernel/qapplication.cpp Change-Id: I80b442a4c2c9632743a5b5c7319ff201ec5bc4fd
| * Merge remote-tracking branch 'origin/stable' into 5.3Oswald Buddenhagen2014-07-301-4/+10
| |\ | | | | | | | | | Change-Id: I2a044d44ca991ba20ddd710053b85afb51e362d3
| | * QNX: Fix QMdiWindow autotestsFabian Bumberger2014-06-251-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In "setOpaqueResizeAndMove" this patch makes sure that the content of a subwindow actually fits into the window, otherwise the resize does not work properly. The content is dpi dependent and thus the pixel size of it increases with the display dpi value. Furthermore when moving the QMdiSubwindow this patch makes sure that we actually grab the window's header and not one of it's tool buttons (minimize, maximize, close). Change-Id: I88314994957c5883f57c09c9240a3b83f1ee42ed Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
* | | Make QOpenGLWidget publicLaszlo Agocs2014-08-013-0/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QOpenGLWidget is now public. In addition Qt::WA_AlwaysStackOnTop is introduced to support the special case of semi-transparent QOpenGLWidget or QQuickWidget on top of regular widgets. hellogl_es2 becomes the qopenglwidget example. This example performs painting both via QPainter and native GL commands and has the OpenGL widget combined with other, normal widgets. The widget stack receives some changes when it comes to renderToTexture widgets like QQuickWidget and QOpenGLWidget. Calling update() will now result in a paint event, which is essential for QOpenGLWidget since we want it to behave like a regular widget. The dirty region handling is extended specially for such widgets due to performance reasons. (an OpenGL content update must not result in any backingstore painting, and is thus handled as a different kind of dirtiness) [ChangeLog] Added QOpenGLWidget. This widget serves as a replacement for QGLWidget. Task-number: QTBUG-36899 Task-number: QTBUG-40086 Change-Id: Ibf7f82fea99b39edfffd2fc088e7e0eadbca25cf Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | | tst_qwidget: Fix geometries.Friedemann Kleint2014-07-311-73/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use sizes relative to the test widget size; move windows relative to the top left point of the available screen geometry. Set a window title on widgets to be able to identify them. The test now passes on Windows using a 4K monitor. Task-number: QTBUG-38858 Change-Id: I5df9198e390befeb3ca18796e24180135a084aad Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | | QProgressDialog: make the cancel button retranslate on LanguageChangeMarc Mutz2014-07-301-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is documented to be, and the LanguageChange event is caught and processed. However, retranslateStrings() uses QProgressDialog::setCancelButtonText(), which unconditionally sets useDefaultCancelText=true, blocking any further changes to the button text by subsequent LanguageChange events. The fix is to use extracted QProgressDialogPrivate::setCancelButtonText() which - quite intentionally - doesn't set useDefaultCancelText. Task-number: QTBUG-40504 Change-Id: I6e701deda10c454cb088c0b0778ac2d6adff574a Reviewed-by: David Faure <david.faure@kdab.com>
* | | QProgressDialog: don't crash when setting the same {bar,button,label} againMarc Mutz2014-07-301-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The associated test has unearthed that setBar() fails to make the new bar a child of the progress dialog. This will be fixed in a separate commit. Task-number: QTBUG-40502 Change-Id: I2d09ebb07ae6395449a4efe38a638df831eebdd7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | | tst_QProgressDialog: enable topLevelWindows() check in cleanup()Marc Mutz2014-07-301-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Detects widget leaks. Change-Id: Ia2287debc96a5b87b224b887661679eba8622dc0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | | Clean up tst_QProgressDialogMarc Mutz2014-07-301-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | Remove empty ctor and dtor. Change-Id: Ib89f463eb2623bbb66cc3faa2ab2d5992810f153 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | | QMdiArea: Store focus widget when new QMdiSubWindow is added.Friedemann Kleint2014-07-301-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce function QMdiSubWindowPrivate::storeFocusWidget() to store focus widget and call this when de-activating a sub window. Change restoreFocus() to return a bool and call it from QMdiSubWindowPrivate::setActive(). Task-number: QTBUG-38378 Change-Id: I18dbe66ce85213ca5b4907b5a09126544415351a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | tst_qgraphicsproxywidget: Fix widget leaks.Friedemann Kleint2014-07-251-16/+24
| | | | | | | | | | | | | | | Change-Id: I953e308e2380c87a69ca1d22e6ac036c57deccda Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | | tst_qmdiarea: Fix widget leaks.Friedemann Kleint2014-07-251-2/+13
| | | | | | | | | | | | | | | Change-Id: If2ecf2c080f9eb8416b9a3d4104584681862c266 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | | tst_qwidget: Fix top level widget leaks.Friedemann Kleint2014-07-251-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix tests widgets leaking widgets and ensure it stays that way by adding a check to cleanup(). Task-number: QTBUG-38858 Change-Id: I77a81d823c68cf0b4e51c2da55b1c473d6e4170b Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | | QLineEdit: Emit textEdited() when the clear button is clicked.Friedemann Kleint2014-07-241-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtWidgets][QLineEdit] The signal textEdited() is now emitted when the user clicks the clear button created by setClearButtonEnabled() as well. Task-number: QTBUG-40287 Change-Id: Iacd303ffd1533f27cfa68a6120cdd370e3d31ddc Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/devFrederik Gladhorn2014-07-242-1/+60
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-222-1/+60
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qwidget_qpa.cpp src/widgets/widgets.pro Change-Id: I697eec936c4e1a6c360edc8f0b472e23c0461ecb
| | * | Ensure transient parents are top level widgets.Friedemann Kleint2014-07-181-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a dialog was parented on a native child widget, its window handle was used as a transient parent. This confused QPlatformWindow::initialGeometry() among other things. Use top level window as is in Qt 4. Task-number: QTBUG-40195 Change-Id: Ic82adc276175f92adde825fb2551274351e41f30 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| | * | QSplitter: Exclude top level widgets from child event handling.Friedemann Kleint2014-07-151-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent the splitter from adding them to the layout or showing them. Task-number: QTBUG-40132 Change-Id: Ife2be0bbd7e489570ef41f6f72a034b356c65f18 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | | Add checks for widget/window leaks to kernel tests.Friedemann Kleint2014-07-242-1/+8
| | | | | | | | | | | | | | | | | | | | Change-Id: I52af87279e37e49ce2206c5c823fe8fb4caef338 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | | | tst_qfiledialog: use QStandardPaths test modeDavid Faure2014-07-231-11/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | Otherwise, when interrupting the test half-way (e.g. in gdb), the user's ~/.config/QtProject.conf would be modified. Change-Id: Id582c4a3fbf0acbed460126fccf0d39b3a09758a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | QGroupBox: Exclude top level widgets from child event handling.Friedemann Kleint2014-07-151-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent the QGroupBox from changing the enabled state of dialogs parented on it. Task-number: QTBUG-40132 Change-Id: I91cc6ccf5ade0b3a491020ed947d4aceca62d7b6 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | tst_qfiledialog: ease debugging of "directoryEntered not emitted".David Faure2014-07-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | It can happen when the sidebar only has only one item, due to "My Computer" being missing. Change-Id: I2b38fef45139f1dfa20d88059e56185c3163a833 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | tst_qfiledialog: extend reject-test to test getOpenFileNames etc.David Faure2014-07-141-2/+14
| | | | | | | | | | | | | | | | | | | | | So that this method is at least called once in the test :) Change-Id: I3b5fc6b7c464d9e56264c709cfa313d475004207 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Stabilize tst_QMenu::statusTip().Friedemann Kleint2014-07-141-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | Instantiate the timer on the stack to prevent it from interfering with other tests. Change-Id: I91ffe23b502fcddaeb6d6d3f89ea3d27b083cdb0 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Revert "Session management for OS X"Olivier Goffart2014-07-131-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Broke tst_QMenu::statusTip by closing the menu while it should not. (and therefore, a QTimer::singleShot that fires while following test are running is making the test fail) This reverts commit 50c04d631858639c630e85456e7e003a80e33493. Change-Id: Ib4ef8190f945b915fe268745cc64d471994c5e2d Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Session management for OS XSamuel Gaist2014-07-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch aims to implement the session management available on OS X. Currently applicationShouldTerminate is just a go through that closes everything and ends the application. The new implementation calls first appCommitData and cancels the termination properly if required. This means that if a user wishes to logout, Qt applications can now cancel that like e.g. answering to Safari asking whether it is ok to close because of a number of opened tab/window. Task-number: QTBUG-33034 Change-Id: Icedc8590a1c0934d9bc87d3a43d6702a9903bfb8 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* | | Update QVariant testsJędrzej Nowacki2014-07-101-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | Remove old message handler hack as we have a new and better api to ignore warning messages. Change-Id: Id967b2672fe3e3638db9977500118a19c2afb730 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Added autoHide property to QTabBarIvan Komissarov2014-07-101-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | This property is used to automatically hide tab bar if it has only one tab. Originally-by: Denis Kovalskiy <denimnumber1@gmail.com> Change-Id: I6967f760010fa55bad6a5986c29abe7ccf625cf8 Reviewed-by: David Faure <david.faure@kdab.com>
* | | Reduce repetitive invocations of QFINDTESTDATA.Friedemann Kleint2014-07-101-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Store the file names in variables instead. Task-number: QTBUG-38890 Change-Id: I65f28bb62674f14aa099e935a9d7a4e9e6e90ba9 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-031-62/+72
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/accessible/qaccessiblecache_mac.mm src/gui/accessible/qaccessiblecache_p.h src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/widgets/kernel/qwidget_qpa.cpp Manually moved change in qwidget_qpa.cpp to qwidget.cpp (cd07830e3b27da7e96a0a83f91ba08c168b45e62) Change-Id: Ia51f471f9b53de2f3b07d77ea89db9303ac8961d