summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix qgraphicswidget::initStyleOption autotestLars Knoll2015-06-061-14/+4
| | | | | | | make sure it'll work with the new mouse handling as well. Change-Id: Ia2d567e618b77b0fa3532ee6c335cbdf5e496241 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* QGraphicsWidget: call normal "setParent" when setting a parentGiuseppe D'Angelo2015-05-051-0/+32
| | | | | | | | | | | | QGraphicsWidgetPrivate::init had a special code path for setting the item's parent. For some reason that code path caused the ItemChildAddedChange notification not to be sent to the parent element, which is wrong. Instead use the "normal" path, which is what the QGraphicsItem constructor does anyhow. Change-Id: Iad84cae05d797022a45977d35ca00c80c17c306a Task-number: QTBUG-45867 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Fix QGraphicsWidget window frame section logicDyami Caliri2015-02-021-0/+29
| | | | | | | | | CppCat detected duplicate sub-expressions in the code that checked for BottomLeftSection and BottomRightSection. It was fairly obvious to see what the values should be. Change-Id: Id45ca5bbd26c92b800c60867fef5170578216eee Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Stabilize tst_QGraphicsWidget::updateFocusChainWhenChildDie().Friedemann Kleint2013-11-201-2/+10
| | | | | | | Position windows, use QTRY_VERIFY. Change-Id: I185bcd91bcdffbc0460a4d24f685d3dde84338a7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Remove XFAIL from tst_qgraphicswidget::initialShow2().Friedemann Kleint2013-05-271-3/+0
| | | | | | | | The test now passes on Ubuntu, Lucid, too. Task-number: QTBUG-20778 Change-Id: Id7ddc4b34d03f8fb9af977c0f40615d544934f13 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Stabilize QGraphicsWidget test.Friedemann Kleint2013-05-091-15/+12
| | | | | | | | | | | | | | | The test showed frequent failures with XCB in initialShow2() (line 3200) after 01bc34088eb8e7fb4842fa1c2117cddbac086136 (QTBUG-30923) which can be fixed by ensuring the widget from the HFW-test is deleted. Use QScopedPointer to ensure widgets are always deleted in case of test failures, too. Task-number: QTBUG-20778 Task-number: QTBUG-30923 Change-Id: I2af7737b604820463f760d6b6787dd5a5a93d602 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Fix tabFocusFirst when that item is removed from QGraphicsSceneMiikka Heikkinen2013-05-081-0/+18
| | | | | | | | | | If tabFocusFirst is not cleared or set to another valid item, there will be crash later if the removed item is deleted after removal. Task-number: QTBUG-30923 Change-Id: Iba9a6ce9334c52f8e552b0accda95ebb5fcfcdb1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Fix XPASS in tst_qgraphicswidget (Windows).Friedemann Kleint2013-05-071-1/+1
| | | | | | | Task-number: QTBUG-20778 Change-Id: I90c8135fab85872cae22630c53fef7aed835a19c Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge branch 'stable' into devFrederik Gladhorn2013-01-071-1/+0
|\| | | | | | | | | | | | | Conflicts: tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp Change-Id: I6b8d505fc22f052c307ca27f58f7d16f98965f47
| * Widgets: Remove declaration of built-in and automatic metatypes.Stephen Kelly2013-01-041-1/+0
| | | | | | | | | | | | | | | | These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. Change-Id: Ibe8e2ec867afb4051a3c7eef806d9cd86945928b Reviewed-by: David Faure <david.faure@kdab.com>
* | Make sure panels always gain focus when activated or tab is pressed.Andreas Aardal Hanssen2012-12-171-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes behavior, but I would argue it's a good change. If you create a panel and activate it (e.g., by simply showing it or reparenting it onto an already-visible item), you expect the panel to gain focus / which is sort of the whole point of activating it. Prior to this change, you had to have explicitly called setFocus() on one of the panel's children, which would give that item subfocus, for that item to auto- gain focus when the panel was activated. This change makes it more automatic. If the panel itself or any of the widgets in its focus chain can gain focus, they will gain focus when the panel is activated. So the new logic is - if the panel already has a focus item, so if someone explicitly set subfocus on an item before the panel is shown, that item gets focus. Otherwise, if the panel itself can gain focus (e.g., someone makes a line edit / text edit panel), it gains focus when activated. Otherwise, we search the focus chain until we find the first item that can gain focus. This last case is the file dialog case, where the dialog itself can't gain focus but typically the first item in the focus chain is the primary focus widget, such as the search field or the directory list view. The change also fixes this for the first Tab. If you clear focus on a panel, the user expects to be able to press Tab to regain focus. Prior to this change that didn't happen. Now, the panel or the first in the focus chain that can get focus gets focus on first tab. Task-number: QTBUG-28194 Change-Id: Id7ec1741d0d5eb4ea845469909c8d684e14017f1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Repair QGraphicsWidget focus chain when used with ItemIsPanel.Andreas Aardal Hanssen2012-12-071-1/+102
|/ | | | | | | | | | | | | | | | | Add handling of the focus chain to QGraphicsItem::setFlags(), so that the focus chain is repaired (panels pop out of the chain and non-panels merge back in) when the ItemIsPanel flag is toggled. Add handling focus chain to QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting for panels. Before this fix, you must enable the ItemIsPanel flag before adding the item as a child to a parent panel, and you lose focus when using the tab key to focus around a panel after it has been reparented into another panel. Task-number: QTBUG-28187 Change-Id: I1d0d81a90697eaf715a8a337c8bf6c2159329e68 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Made QFusionStyle internalJ-P Nurmi2012-11-211-8/+7
| | | | | | | | | | | | | We will take this opportynity to remove various QStyle specializations from the public API in Qt5. This gives us much more freedom, for example changing the inheritance hierarchy, pluginizing etc. without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QFusionStyle directly. Change-Id: I37d8acb13b6fd328a9cd53c74df971428bbbe443 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove Cleanlooks and PlastiqueJens Bache-Wiig2012-10-221-6/+10
| | | | | | | | | We have a new style Fusion that will replace these styles. They will be moved to a separate module rather than included in platforms that do not need them. Change-Id: I51ebbcad5406e99130e5b12e62ba624d1489088c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Auto tests: revise cursor dependant testsJ-P Nurmi2012-10-131-0/+5
| | | | | | | | | | | | | | | | | | Cursor dependant auto tests are currently skipped in various ways. Some are checking PlatformQuirks::haveMouseCursor() that tries to detect if the desktop environment is MeeGo, using obsolete Q_WS_X11. Some are skipped if QT_NO_CURSOR or Q_OS_WINCE is defined and some are actually missing the approriate guards. => unify by defining QTEST_NO_CURSOR in qtest-config.h when appropriate ie. for platforms that have no regular mouse cursor support or when QT_NO_CURSOR is defined. Task-number: QTBUG-22551 Change-Id: I9a1e0e3156617945ae46226c79268955454c8a9a Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Auto tests: remove PlatformQuirks::isAutoMaximizing()J-P Nurmi2012-09-261-5/+1
| | | | | | | | | | Use QStyleHints::showIsFullScreen() where necessary. Notice that QWidget::show() already calls showFullScreen() if appropriate, and Qt::X11BypassWindowManagerHint doesn't do anything in the XCB platform plugin. Change-Id: Ib8f61188c075170d646894388561cbb3f72daee8 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Revert "Implement automatic mouse grabbing on mouse button press."Friedemann Kleint2012-09-071-0/+3
| | | | | | | | | | | | | | | | This reverts commit 6b5bbc531b30d8ece25425e39843c6ae1af1d045. Autograbbing mouse shouldn't be done in crossplatform code, as X11 does this automatically. Windows needs platform specific solution. Task-number: QTBUG-26962 Task-number: QTBUG-27039 Task-number: QTBUG-23699 Change-Id: I911df92c4a34deb50b729f50681497046657948b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove some dead code wrapped in Q_WS_QWS.Stephen Kelly2012-08-031-2/+2
| | | | | Change-Id: Ie1ee8c4af603b924abe40145041357981d174445 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Remove usage of deprecated qWaitForWindowShown(QWidget *) method.Friedemann Kleint2012-08-011-14/+14
| | | | | Change-Id: I445d24a09dbb7abb62a37bd9914284f21a4f08f1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Implement waitForWindowExposed and friends for widget windows.Friedemann Kleint2012-07-201-24/+15
| | | | | | | | | | | | | | - Implement waitForWindowExposed() for toplevel windows. - Implement waitForWindowShown(QWidget *) and mark as deprecated in line with waitForWindowShown(QWindow*). - Use in tests. - Simplify tests (collapse waitForExposed, setActive into setActiveWindow, waitForActive), remove most hard-coded timeouts. - Stabilize graphicsview tests by using waitForWindowActive. Change-Id: Ic7c061e2745b36f71a715ee4e47c0346b11a91e8 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix focus handling when the application has QAxWidgets.Miikka Heikkinen2012-07-031-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Removed old defunct platform specific code from QWidget::isActiveWindow() and added call to QPlatformWindow::isActive() instead. This is done because the embedded native windows inside QAxWidgets can have focus but are not part of the parent application's Qt window hierarchy, so native methods are required to determine if they are part of the active window or not. QWidgetPrivate::setFocus_sys() was implemented to activate the window of the focused widget if the focus was elsewhere. This is required because embedded native windows can steal the focus from the main application window. Focus event handling in Windows platform adaptation plugin was fixed to correctly identify the active window in cases where the are embedded native widgets that can have focus. Also fixed three test cases that were affected by these changes. Task-number: QTBUG-25852 Task-number: QTBUG-23699 Change-Id: I817e0ce4317e88955bb49b034eacd630a876ccf0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtWidgets]Thiago Macieira2012-05-031-2/+2
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: Ie8ac500f2f8ebe99b7525feaa7b39247e641a461 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Don't use obsolete qVariantValue, qVariantCanConvert, etc.Debao Zhang2012-05-021-4/+4
| | | | | | | | | | qVariantValue and qVariantCanConvert are Compatibility members, while in Qt4.8 they are marked as Qt 3 Support Members. qVariantFromValue and qVariantSetValue are Obsolete members. Change-Id: Ie8505cad1e0950e40c6f6710fde9f6fb2ac670fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix XPASS in QGraphicsWidget test on Ubuntu 11.10.Jason McDonald2012-04-231-1/+1
| | | | | | | | | | | This test was marked insignficiant on Ubuntu 11.10, but the only failure was an XPASS. Make the test significant again, and only include the QEXPECT_FAIL for CI platforms where the test is known to fail, i.e. Windows and Ubuntu 10.04. Task-number: QTBUG-20778 Change-Id: I24af3dab45118758382ba03c8c7a310f16301f8c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove WA_PaintOutsidePaintEventDebao Zhang2012-03-281-3/+0
| | | | | | | | | WA_PaintOutsidePaintEvent is only suggested to be used when porting Qt3 code to Qt 4 under X11 platform. and it has been broken now. Change-Id: Ie4297b2a449f1055ca10ada9efb930e6018b1efb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QCursor: Associate cursor with screen.Friedemann Kleint2012-03-071-3/+0
| | | | | | | | | | | | | | | | | | | | | | - Introduce cursor() accessor to QPlatformScreen. - Remove screen member of QPlatformCursor (a cursor can be shared by multiple screens of a virtual desktop). - Add QCursor::pos()/ QCursor::setPos() taking a QScreen-parameter, use primaryScreen() for old overloads. QCursor::pos() can then query the platform cursor for the position and return the position even if the mouse position is outside the windows owned by the Qt application. - Fix tests Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Task-number: QTBUG-22457 Task-number: QTBUG-22565 Task-number: QTBUG-20753 Change-Id: Ia69f37343f95772e934eab1cd806bd54cbdbbe51 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove XFAIL in QGraphicsWidget test for WindowsMiikka Heikkinen2012-02-151-1/+3
| | | | | | | | | The XFAILed initStyleOption() case passes on Windows, so do not XFAIL it there. Task-number: QTBUG-24297 Change-Id: I9615c408aa7e72b5eb8fe9739903594e45eb5fd7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Expect tst_QGraphicsWidget::updateFocusChain...() failure on Mac OS XBradley T. Hughes2012-01-231-0/+3
| | | | | | | | | tst_QGraphicsWidget::updateFocusChainWhenChildDie() currently fails due to what appears to be window activation. Task-number: QTBUG-23699 Change-Id: I404f90d32dba64d558598d97cf805b6c025e6456 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix XPASS in tst_QGraphicsWidget on Mac OS XBradley T. Hughes2012-01-231-1/+3
| | | | | | | | | | | | Don't expect failure from these 2 tests anymore: XPASS : tst_QGraphicsWidget::initStyleOption(all) COMPARE() Loc: [tst_qgraphicswidget.cpp(1162)] XPASS : tst_QGraphicsWidget::initialShow2() COMPARE() Loc: [tst_qgraphicswidget.cpp(3196)] Change-Id: Ibd1178f8cab480fa9fad9c829083a4862749c60b Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Re-enabled passing tests in tst_qgraphicswidgetJo Asplin2011-11-011-0/+2
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qgraphicswidget test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: Ic484fde3492f077453f47a959dd6dc862288dcaf Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Moved tests into integrationtests/ and widgets/Jo Asplin2011-10-201-0/+3361
Task-number: QTBUG-19013 Change-Id: Ibb776f5967c0645ce6d22ef7afdc40657c575461 Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>