Commit Graph

466 Commits

Author SHA1 Message Date
Friedemann Kleint
82860b133c Propagate initial size constraints to QWidgetWindow.
Size constraints set on a widget before the creation of
the QWidgetWindow were lost (for example, Qt Creator's
preference page).

Task-number: QTBUG-26745
Change-Id: I7c2f5aed9c8817795603e5ad3c24418d66627bab
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-21 16:13:38 +02:00
Stephen Kelly
799ceebad8 Take account of hidden items in QListView when using scrollTo.
Task-number: QTBUG-21804
Change-Id: I475166f3f60b1278089baa255ace4e18baeb568e
Reviewed-by: Jani Honkonen <jani.honkonen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-20 11:24:55 +02:00
Andy Shaw
9ea9ec1cbb Ensure that all the children get the new stylesheet set on a parent
When a stylesheet was set on a parent widget then in some cases it would
not get applied to all the child widgets.  This was because the order of
the children list may have been modified while it was being set on
children.  By making a copy of the list we prevent this from being a
problem.

Task-number: QTBUG-26321

Change-Id: Iea6bf72c69a0c39746f7ef5e7893dda5a93ed7e5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-20 10:28:51 +02:00
Jani Honkonen
d2bba5e553 Fix a QListViewItem width when spacing is set
The listitem width was calculated incorrectly because spacing was
not considered. This fixes the second part of the reported bug where
spacing is set. Added some tests to catch the issue relating to the
reported bug.

Also added a test to check spacing in general.

Task-number: QTBUG-21804
Change-Id: Icc6326bce914264d882a60a9fc0ebe7d2a08dbf6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-19 08:52:09 +02:00
Jani Honkonen
d4385e48b8 Fix QListWidget scrolling with keys when there are hidden items
If the selected item is scrolled with keyboard keys the selected item
will go outside the visible area. The scrolling did not take hidden
items into account when calculating the amount to be scrolled.

Task-number: QTBUG-21804
Change-Id: I63da0248cec43be464898f9dc8167e739f00ccd0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-19 08:51:57 +02:00
Stephen Kelly
4d9d88af6f Remove QWidgetStar.
This allows us to remove the odd hacks to get the static metaobject
for the QWidget* metatype.

The QWidget* is still an automatic metatype thanks to the QObject
partial template specialization. It is registered as a metatype
at runtime automatically in qwidgetsvariant.cpp.

Change-Id: Ie01b69eadf2cbe87af1a86c3284550f60dcf9e94
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-18 10:55:47 +02:00
Stephen Kelly
2ef3ac72fc Emit layoutChange signals when changing QPersistentModelIndexes.
This is necessary whenever QPersistentModelIndexes are changed. Omitting
it means that views are not able to react to the change, such as QTreeView
clearing its (manually held) QModelIndex cache, and the QItemSelectionModel
clearing the item from its storage.

It is necessary to change a QSortFilterProxyModel test which assumed setItem
does not have any such effect. That test is ported to setData instead.

Task-number: QTBUG-18539
Change-Id: Id7a602f18b9773ba4d11019418de886860d26d3e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-18 08:34:53 +02:00
Stephen Kelly
351904be50 Emit the highlighted signal if the model changes.
The bug is that the connection to emit that signal can be made
obsolete if the connection is made too early and the model is replaced.
In the bug report, the connection is made by calling view() early (thereby
causing the creation of a view and a QItemSelectionModel which operates on
the built-in QItemSelectionModel, and then connecting to that
QItemSelectionModel), and then when QComboBox::setModel() is called later
the built-in view creates a new QItemSelectionModel for it. The bug was
that that new QItemSelectionModel is not connected to. This patch fixes that
bug.

Task-number: QTBUG-4454
Change-Id: Ibbdb8731f16ab071008b4a19dc2cc7ae03cebc84
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-15 13:58:29 +02:00
Jani Honkonen
121062d884 Fix undo and redo in QLineEdit when in password mode
There are some security issues with undo/redo. User should not be
able to get the erased password back in any situation. Therefore
redo must be disabled completely and undo is limited only for erasing
previously entered text.

Task-number: QTBUG-14226
Change-Id: I2b38aca84adbad1c14db76b56ad6303d56b35b4d
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-15 11:38:37 +02:00
Stephen Kelly
d19589b90a Make selectAll() do nothing if the mode is NoSelection.
Task-number: QTBUG-26687

Change-Id: Iaa0197efe64c61505e22e4a63a1f5c012af0bc78
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-15 11:38:37 +02:00
Marc Mutz
4564103d53 tst_QToolBar: fix "might be used uninit'ed" warnings
GCC 4.8 warns:

  src/testlib/qtestmouse.h:219:67: warning: ‘popupMenu’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     { mouseEvent(MouseClick, widget, button, stateKey, pos, delay); }
  tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp:862:12: note: ‘popupMenu’ was declared here

Change-Id: I19cfd1790fbd948e97bf740d4412ccf3bb98a330
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-08-14 08:53:29 +02:00
Thiago Macieira
b1fd9a93b9 Speed up tst_QGraphicsView::mapToScene test
This test is doing a brute-force mapping. Coupled with changes to
QCOMPARE last year, this now allocates and deallocates a lot of memory
per iteration. On my Sandybridge, it takes two minutes to run:

     111136.781153 task-clock                #    0.999 CPUs utilized
   371,692,633,238 cycles                    #    3.344 GHz
   182,641,818,708 stalled-cycles-frontend   #   49.14% frontend cycles idle
    57,951,552,830 stalled-cycles-backend    #   15.59% backend  cycles idle
   477,216,332,971 instructions              #    1.28  insns per cycle
                                             #    0.38  stalled cycles per insn
    86,959,637,669 branches                  #  782.456 M/sec
       309,185,237 branch-misses             #    0.36% of all branches

     111.264868818 seconds time elapsed

Changing the iteration step from 1 to 5 reduces the runtime to about 5
seconds.

Change-Id: I9cad6f85f535f472319da7cd6c4aa28e12ddf1b7
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-13 09:32:21 +02:00
Rohan McGovern
4ef1ddc641 tst_qgraphicsview: increase test timeout further
This test has recently timed out in CI, but appeared to be making
progress. Give it more time to complete.

Change-Id: Ied0fb7aad35ed6d5889dd585a7545687617e5e19
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-08-13 07:14:40 +02:00
Stephen Kelly
146b7a9c8b Take scroll position into account when painting drag pixmap.
Task-number: QTBUG-26793

Change-Id: Ic19cb6581cd5838d26713998e152772a5d12da4f
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-10 21:59:47 +02:00
Janne Anttila
5410299d94 Fix qlayout autotest build for WinCE.
SRCDIR was not defined for WinCE but it should no longer be used.
Fixed test case to use QFINDTESTDATA instead.

Change-Id: I07cbf7d42790d33e2d205d1682ec10e7577a92bd
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2012-08-09 13:18:08 +02:00
Stephen Kelly
c5d7ea5bad Only emit the clicked() signal from views if the left button is used.
This is consistent with QAbstractButton, QCalendarWidget,
QDialogButtonBox and QGroupBox (ie, all other widgets with
a clicked signal)

Task-number: QTBUG-26105

Change-Id: Ieafe988b5c03216796b69a7cd70ac1a03fc12b0a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-07 16:40:07 +02:00
Stephen Kelly
2ade633c0a Ensure that we return an invalid QTableWidgetItem when none is available.
Task-number: QTBUG-26195

Change-Id: Iede4f51770bd8c8eab3558137aaf7b1721f25a87
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-07 16:40:07 +02:00
Stephen Kelly
dbe4b45f9b Remove some dead code wrapped in Q_WS_QWS.
Change-Id: Ie1ee8c4af603b924abe40145041357981d174445
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-08-03 11:24:28 +02:00
Paul Olav Tvete
3d0af143ca Revert "Move QWindowSystemInterface out of qpa."
This reverts commit 784a877d3c.

Conflicts:

	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/testlib/qtestkeyboard.h
	src/testlib/qtestmouse.h
	src/testlib/qtesttouch.h

Change-Id: Iebfed179b3eb7f30e4c95edcae5a8ad6fd50330e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-03 00:38:09 +02:00
Lars Knoll
328550ff00 Remove the obsolete scene argument for constructors of graphics items
The argument has been obsoleted and not documented since 2007. Get rid
of it now before Qt 5.0

Task-number: QTBUG-25089
Change-Id: I91a5508a5e1606f5b5c289501295c67be4abe6a0
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-08-03 00:37:59 +02:00
Paul Olav Tvete
5ac4a1304b Make tests compile without gui-private
Add new qt_handleXXX functions that forward to the QWindowSystemInterface
functions, and use those in the testlib inline functions. Remove use of
struct QWindowSystemInterface::TouchPoint from the testlib header files
(requiring some slight increase in ugliness in the two tests that use
that struct).

Also remove the qmake hack that adds private headers to all tests

Change-Id: Iec23537e55a44802f6e9cd463f7a0f82007c5250
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-08-02 17:25:37 +02:00
Thiago Macieira
672b5b7ab6 Set the Qt API level to compatibility mode in all tests.
Qt 5.0 beta requires changing the default to the 5.0 API, disabling
the deprecated code. However, tests should test (and often do) the
compatibility API too, so turn it back on.

Task-number: QTBUG-25053
Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-01 15:37:46 +02:00
Friedemann Kleint
305cdc7355 Remove usage of deprecated qWaitForWindowShown(QWidget *) method.
Change-Id: I445d24a09dbb7abb62a37bd9914284f21a4f08f1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-08-01 13:26:03 +02:00
Joerg Bornemann
a992a12bec don't change a widget's active state in QWindowsWindow::setWindowState
QWindow::setWindowState is not supposed to set the window active.
The method requestActivateWindow() should be used for that.

When switching from and to fullscreen mode we're always passing
SWP_NOACTIVATE to SetWindowPos to not change the activation state
of the window. This is inverse to the old behaviour, which did not
have an effect.

Change-Id: I339337935cdad76b3ef252202e92177f37543038
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-01 02:26:52 +02:00
Joerg Bornemann
0d8795fcb4 fix window activation in tst_qmdiArea::subWindowActivated2
QApplication::setActiveWindow doesn't activate the native window but
marks the widget as active inside Qt.
We need to use QWidget::activateWindow instead. See docs.

Also moved the activation call further down because on Windows a
minimized window cannot be activated using the activation-by-focus
fake we're currently using.

Change-Id: I752f6ada1f463931fa9cfb3c35f42dbec0207bfa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-31 20:25:59 +02:00
Friedemann Kleint
5b49793d80 Implement synchronous WS events by flushing.
Previously synchronous window system events were
implemented by bypassing the queue and processing
the event immediately. This is not ideal since the
event order is not preserved - there might be "happened
before" events waiting in the queue.

Add QWindowSystemInterface::flushWindowSystemEvents
and change all handleSynchronous* to 1) queue the
event 2) call flushWindowSystemEvents.

flushWindowSystemEvents is almost identical to the
already existing sendWindowSystemEvents with the
exception that it does not call QApp::sendPostedEvents.
Move the common implementation to a new private function.

Task-number: QTBUG-20778

Change-Id: Ie98a83875bc0a14e335e36bed0dd9e0ed4a1dea0
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-31 20:25:36 +02:00
Friedemann Kleint
58ab483cdb Stabilize the QHeaderView test.
The test has a member QWidget *topLevel which it recreates
and shows in init() without waiting for it to be exposed
although it is not used in every test case. This apparently
interferes with some tests that create separate top levels.
Do not show in init(), delete the topLevel.
Add wait to the cases where the topLevel is shown.

Change-Id: Ib428020b36dc82991d41e68478fd583bdfb004c7
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-07-31 11:57:21 +02:00
Joerg Bornemann
12a40a7cbb tst_qwidget task reference fixed
Change-Id: I8d65f5912bfc2daa1e35be33a3c4d986508eebeb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-31 11:51:51 +02:00
Friedemann Kleint
be4f8393e4 Stabilize QWidget-test alienwidgets on XCB.
Use QTRY_VERIFY for the mappped attribute check.

Change-Id: I3cbde9122405bf7067f3702193e80636edc8c5c6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-07-31 11:13:35 +02:00
Friedemann Kleint
2f587ee689 Work on the QWidget-autotest.
- Introduce smart pointers to delete widgets and resources
  to ensure tests are not affected by left-over widgets
  also in case of failure.
- Replace deprecated QTest::qWaitForWindowShown() by
  QTest::qWaitForWindowExposed() and use QVERIFY,
  remove some hard-coded timeouts.
- Set some titles and object names.
- Add verbose debug output of event lists in tests
  childEvents.
- Set minimum sizes on widgets to avoid Windows warnings.
- Stabilize GDIWidget, trigger on first event only.

Change-Id: I64119a2e7113e4a9f0156d00c72ce0935d03bb81
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-28 00:09:45 +02:00
Stephen Kelly
9784dd8d06 Implement implicit constructors for built-in classes.
Change-Id: I6b0b104bc1da3252d014615c50b81830de42e722
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-07-27 03:27:23 +02:00
Andrew den Exter
281d4995ec Fix position of mouse events generated from touch events.
In touch event terminology the global position is the screenPos,
scenePos is the windowPos.

Fixes a tst_qdeclarativepincharea test failure in qtquick1.

Change-Id: Ie98fe12be8cbedc9b019913b066e7c4bce75278d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
2012-07-26 15:13:24 +02:00
Friedemann Kleint
e3ccc032f0 Stabilize tst_QMenu::tearOff().
Introduce QTRY_VERIFY for frequently failing test.

Change-Id: I38a6420574c4dde20fd7fa484681514543bd70cb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-07-26 15:13:03 +02:00
Friedemann Kleint
65fa00b6be Stabilize tst_QCompleter::QTBUG_14292_filesystem.
Make sure the test subdirectories are actually visible
in the file model before the tests start.

Change-Id: If640456bba4362b19d7ad9d9184736c2eb8d3bde
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-07-26 15:12:55 +02:00
Friedemann Kleint
db83f2d73d Base 'FileSystem' test helper class on QTemporaryDir.
This avoids test instabilities and prevents test directories
from being cluttered with temporary files. Change tests
accordingly. Remove unused createLink() method.

Change-Id: I843c28ab81c8a476c71c5211a7479b22d3d9fc93
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-07-26 15:12:50 +02:00
Marc Mutz
e083d25395 QMetaTypeId2::IsBuiltIn: (new) template meta-function to check for built-in types
This allows to check whether QMetaTypeId2::MetaType exists, and can help
turn run-time into compile-time expressions, even without constexpr support,
or in situations where constexpr can't be used (because you can't overload
on it). This was designed for the QMetaType::registerConversion feature,
but it's much more widely applicable.

Change-Id: Iafa04add04bcb531b3f7fe3e751c7e91ee6a3bc0
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-07-26 15:01:04 +02:00
Friedemann Kleint
aaaf60aeab Remove usage of deprecated qWaitForWindowShown(QWidget *) method.
Remove usages from autotests with the exception of
widgets/kernel, widgets/widgets and widgets/graphicsview.

Change-Id: I917b2857ed0cd07a6b3dbcd69244f558086c6586
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-25 17:32:21 +02:00
Marc Mutz
5fd8dd19ea QtWidgets: use nullary version of qRegisterMetaType<T>("T")
Using qRegisterMetaType<T>() has the advantage that multiple calls
during a program run are much more efficient, since an inlined
atomic is used to store the result. It also ensures that
Q_DECLARE_METATYPE(T) has been used, whereas qRegisterMetaType<T>("T")
will happily register anything.

Had to add Q_DECLARE_METATYPE to QFileInfo, for
QList<QPair<QString,QFileInfo>> of QFileSystemModel to work with
the partial specialisations of Q_DECLARE_METATYPE for QList, QPair.

In order to synchronize this change with other modules that did
their own Q_DECLARE_METATYPE(QFileInfo), a sync macro is defined
that can be tested in other modules, and will later be removed again.

Change-Id: I3004664e07e64cd885d5a03a57ff4e4379804aec
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-25 13:33:05 +02:00
Friedemann Kleint
4677cf3d01 Deprecate the qWaitForWindowShown(QWindow *) method.
While the qWaitForWindowShown(QWidget *) is inherited
from Qt 4.8, the qWaitForWindowShown(QWindow *) was introduced
in Qt 5. As it is identical to qWaitForWindowExposed()
and removed already, it can be deprecated in Qt 5.

Remove its usages in qtbase.

Change-Id: I28788d120ad687a49f02b2b44de6b38a2832fe5c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-07-25 07:24:49 +02:00
Kevin Ottens
7808ec795c Propagate synthesized mouse events in parallel (lock-step) with touch
This patch implement the equivalent of
468626e99a90d6ac21cb311cde05c658ccb3b781 in qtdeclarative but for
QtWidgets.

If a widget doesn't accept a touch event, then QApplication gives it
another try by synthesizing a corresponding mouse event. This way
QtQuick and QtWidget behave in a similar way, removing the need for
platform backends to try to emulate a mouse event from a touch event
unconditionally.

Also add relevant unit tests and adjust old QApplication ones.

Change-Id: Iddbf6d756c4b52931a9d1c314b50d7a31dbcdee9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-24 10:46:24 +02:00
Friedemann Kleint
607c37befb Remove usage of deprecated qWaitForWindowShown in dialog tests.
Change-Id: Id3ebe202d65ee682e8e2e3ae107808e9abb6cc15
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-24 00:08:28 +02:00
Stephen Kelly
cb43dec31e Split QWidgetsVariant tests into a separate testcase.
This allows building the QVariant tests without the QtWidgets module.

Change-Id: I7cd7e78a60c7bc7614ec16df1abe1e93e45d4923
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-07-23 17:47:51 +02:00
David Faure
1603ba2365 Provide public API for native event filtering, moved up from QPA.
The previous API was hard to use (global function, no type safety,
manual chaining), and confusing (app vs dispatcher split only made
sense on Windows). Installing and removing out of order would have
the risk of setting back a dangling pointer (crash). Meanwhile QPA
added type safety, and this new API models the QObject::installEventFilter
API for ease of use. The virtual method is in a new interface,
QAbstractNativeEventFilter.

QPA was even calling the dispatcher event filter with QPA-private event
classes, which made no sense (refactoring leftover from when the code
was in the dispatcher). Now the QPA plugins trigger the qcoreapp event
filters with the actual native events directly.

Change-Id: Ie35e47c59c862383bcaf857b28d54f7c72547882
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-07-20 18:34:08 +02:00
Friedemann Kleint
6ae168f8ce Tests: Replace deprecated QPixmap::grabWidget() by QWidget::grab().
Change-Id: I5018cf5dd51c1781e7f17c7d205f3f60de7945be
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-07-20 16:47:11 +02:00
Friedemann Kleint
fa896f03c2 Activate native window tests of QMdiArea.
Change-Id: Ic272b5e28256e454a3186d4407d009c9331b292b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-07-20 11:43:34 +02:00
Friedemann Kleint
8761840397 Implement waitForWindowExposed and friends for widget windows.
- 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>
2012-07-20 09:27:28 +02:00
Joerg Bornemann
af8e318b35 QWidget/Win: fix restoreGeometry() from fullscreen mode
When turning off fullscreen mode and restoring the widget's geometry
we must inform the QWindow about the geometry change synchronously.
Otherwise QWidget::geometry() will return the old value.

Using the same technique for the state transition to fullscreen mode
without sending a separate resize event.

Autotest: tst_QWidget::saveRestoreGeometry
Task-number: QTBUG-26421

Change-Id: I869e36cd302d9a94e398f48949ab3cb7ee9cdf51
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-19 15:28:18 +02:00
Friedemann Kleint
dcf12533b7 Remove the test tst_qdialog::throwInExec().
QtWidgets and QtGui are currently compiled without exceptions,
which causes a crash with gcc 4.6.3.

Change-Id: I8f872f3bec6266444adf08d51a6678150c5fae8e
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-19 12:58:12 +02:00
Miikka Heikkinen
150284198b Fix rendering glitches when using native widgets in MDI subwindows
When mixing native and regular widgets in same QMdiArea, some
subwindows didn't properly get set native. This was because
when a native parentless widget was given a parent, it wouldn't
enforce native window on the new parent and its ancestors.
This happened because window flags were adjusted too late in
relation to createWinId() call in setParent_sys().
Fixed by moving the createWinId() call to its proper place.

Also removed some old Q_WS_* ifdeffing in QWidget::setParent() that
masked some native enforcement code.

Additionally removed few QEXPECT_FAILs from QWidget autotest now
that those cases work correctly.

Task-number: QTBUG-26424
Change-Id: Ib6f9d0531e5c7299e2c307734d49c81f1ffa9713
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-18 15:07:32 +02:00
Friedemann Kleint
a89c7e4020 Replace Q_WS_ in tests by Q_OS_ or check platform names.
Change-Id: Ica445cf1e83bfaab870ac344d6c02766f047a5cc
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-16 16:30:55 +02:00
Joerg Bornemann
887607e956 tst_qwidget: check widget geometry in fullscreen mode
Change-Id: Idc45c6d18decf3c71c6736742434ad9d0cccd2d2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-16 16:30:55 +02:00
Friedemann Kleint
7a2aafcbbf Remove #ifdef Q_WS_ / include / #endif conditionals.
Change-Id: I734490ddcb5501e620370e50ef06180ab5e23393
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-16 16:30:55 +02:00
David Faure
199741d026 Fix applicationName() being empty in QApplication.
A virtual method was reimplemented to return an always-empty string,
probably a leftover from a refactoring.

This fix showed that tst_qwidget_window was buggy: between Qt4 and Qt5,
a "Before" became "After", which made "Before" unused, and was masking
the fact that the app name was empty by default. In addition, the
earlier Qt5 change that made the app name default to argv[0] now requires
updating this test, now that it's actually working.

Change-Id: I5360026821a9b95bedd0ff09dba3d51a22e542b7
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-07-16 16:30:55 +02:00
Friedemann Kleint
46c62433e8 Implement qWaitForWindowShown using qWaitForWindowExposed.
Deprecate qWaitForWindowShown for Qt 6 as it is just a wrapper.

Change-Id: I0f8195679679120bd402e273fed4d331dc926708
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-07-12 14:22:48 +02:00
Friedemann Kleint
2d5caa0b79 Tests: Fix printsupport profiles.
Fix reversed conditions, breakage introduced by
32db7de207.

Change-Id: I6fca399376cd1fa9bffea0a686b56c4d5ec26605
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-12 11:15:58 +02:00
Sergio Ahumada
59339941e0 Fix some spelling errors
Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-07-11 14:52:37 +02:00
Thorbjørn Lund Martsum
43850e5295 QItemDelegate - add a more comprehensive test
This is a bigger test after this change:
c3e1abad4e

Beside the test of behavior it has the class
FastEditItemView which could be useful in the future.

QTestEventLoop::instance().enterLoop(1) does not perform well.
(IE it makes CI slower). My class could be used to extensions.
(or maybe even to remove a few of these calls)

Change-Id: I4f1460873cd07ddc482d5cfe462b59c47ebb189f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-09 12:07:48 +02:00
Joerg Bornemann
5b0273fc7a remove QEXPECT_FAILS from tst_qwidget
Task-number: QTBUG-26420

Change-Id: Ic4cb725cda418bfb427e7d834c0e07c2543d408d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-09 10:50:34 +02:00
Bjoern Breitmeyer
32db7de207 fixed unittest builds for wince
removed printsupport tests for wince as there
is no print support on wince and removed the special
handling for wince from 4.8 on some tests as the dependent
modules are not part of qt base anymore

Change-Id: I4ffb22da11f98beee1013f775cb5ce4b936d3211
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-06 21:14:09 +02:00
Joerg Bornemann
822c2c9457 make tst_qwidget significant again on Windows and Linux
To let this test pass, a bunch of test cases had to be disabled.

Task-number: QTBUG-25300

Change-Id: I26bc08f366c43fb2bf3ba42a5fcbeb3888ed02c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-06 16:08:02 +02:00
Thorbjørn Lund Martsum
5dc9036e18 QHeaderView - adding an auto test with saveState and restoreState
This test is nice to have regardless though the main reason for it
is a refactor of hiddenSections in QHeaderView.

Change-Id: Id41a1d5edda2ef75bf432a78cdb3e952303eae92
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-05 13:13:58 +02:00
Thorbjørn Lund Martsum
524c3e05e8 QHeaderView - prevent negative default+minimum section sizes
In 96f1fe8855 we agreed that sections
with negative sizes did not make sense. Of the same reason default
section sizes and minimum section sizes should be not negative.

Change-Id: I6a770e7f510d8e2bb90bfd8f38b4fa0566fc137b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-04 18:00:41 +02:00
Joerg Bornemann
2bd0737303 tst_qwidget: remove QEXPECT_FAIL for QTBUG-8911
QTBUG-8911 has been fixed some time ago.

Change-Id: I19dae0571b1829f6b3b797f7e0ec5c24a4241db8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-07-04 15:00:02 +02:00
Rohan McGovern
bcf20e122a Avoid load(testcase) for installing test helper apps
Make test projects declare TEST_HELPER_INSTALLS rather than calling a
function exported by testcase.prf.  load(testcase) may be unsafe, as
testcase.prf should be processed after default_post.prf.

Fixes silent disabling of various autotests.

Change-Id: I56b35ffd653a637ad5ab18d64dd1a1edadfac59f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
2012-07-04 02:46:27 +02:00
Friedemann Kleint
6136bfffce Fix QWidget/widgetAt() test.
Prevent a crash by giving the widget some time to show up.

Task-number: QTBUG-22326
Change-Id: Idaa23b21121e7c4f7098e8d51efd313bcc467e9a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-03 20:59:36 +02:00
Christoph Schleifenbaum
f4dd0828dc Platform-plugin support for QSystemTrayIcon.
Implement QPlatformSystemTrayIcon providing QPA-plugin-support for
system tray icons. Make QSystemTrayIcon use this as new backend.

Ported over qsystemtrayicon_mac.mm to qcocoasystemtrayicon.mm to provide
Cocoa support for the new interface. It had to be changed to match the
interface, especially for icon and menu handling.

This interface is made to not use QStyle or QMenu which are related
classes of QSystemTrayIcon. It's therefore not introducing QtWidget
dependency into the platform plugin.

Task-number: QTBUG-20978

Change-Id: I0d0a73835698b3b4f97219d4f5bbcfa2af57dbe2
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-03 16:48:33 +02:00
Miikka Heikkinen
8368557b9c Fix focus handling when the application has QAxWidgets.
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>
2012-07-03 14:50:34 +02:00
Joerg Bornemann
9d88743b7d removed ancient left-over test from tst_qwidget
The part of tst_qwidget::reparent() that "makes sense only on Windows"
is antiquated at least since the introduction of alien widgets.
It basically tests if QWidget::winId() returns a valid window handle
(has been replaced with winHandleOf here in the meantime).
This is always successful, because winId() creates a valid window handle.

Change-Id: I52c370e26fd9b34861bd4d52c12dded243382d43
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-03 14:25:36 +02:00
Joerg Bornemann
0f3528a7f6 tst_QWidget::gdiPainting fixed
We cannot use QWidget::grab for widgets that have WA_PaintOnScreen set.
QScreen::grabWindow copies the real screen contents for us.

Change-Id: If1f6233ec48bcb2b941ea683c56ce71a39642e67
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-03 13:32:04 +02:00
Stephen Kelly
14c7bb72b9 Store the QMetaObject with the QMetaType.
This will allow conversion between pointers to compatible QObject
derived types.

Change-Id: I19e08934571fb3f1b91e594892214041fe5f6a11
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-07-01 15:07:10 +02:00
Giuseppe D'Angelo
dba22bc036 Move QStandardItem/QStandardItemModel to QtGui
The dependencies on QFont, QBrush, QIcon are all in QtGui, so there's
little sense to still have these classes in QtWidgets.

This also copies and pastes a version of QWidgetItemData as
QStandardItemData inside qstandarditemmodel_p.h.

Change-Id: Ibafc5a30748e7ce0b54753309ae6dc4a797fc20e
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-06-29 22:42:19 +02:00
Kurt Korbatits
551e1e63d9 Fixed several unit tests to work in shadow builds
- qlogging, qthreadstorage, qnetworkreply, qapplication, qfile, qprocess
  Added app_bundle and debug_and_release_target to CONFIG

Change-Id: I6212902c449520dc016da9590149a423069cc38c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-06-29 04:57:04 +02:00
Mitch Curtis
ab536c3c71 Make QCalendarWidget use its locale's firstDayOfWeek.
QCalendarWidget currently uses Qt::Sunday as the default first day
of the week. It has been suggested that a better user experience
would see the calendar's locale be used instead.

Task-number: QTBUG-19811
Change-Id: I4441bf9ffd52213ef622a4a7f498530b7cc9e110
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-06-28 17:15:17 +02:00
Tasuku Suzuki
197b145a23 Fixed inputMethodQuery() for Qt::ImHints
to return QWidget::inputMethodHints()

Change-Id: I46735c553e0cb4689cd0c53a69d07ed61ba56bf6
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-06-26 08:14:17 +02:00
Shane Kearns
afdce18f57 QSKIP test that is blocking unrelated changes in CI
The test looks vulnerable to misbehaviour if the working directory
contains unexpected files and folders. As it's already skipped on
Mac, skip on linux as well to unblock the CI.

Change-Id: Id2e48ea455eb77e36c4f9d899885e101f674c0a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-25 23:32:50 +02:00
Toby Tomkins
786341fda1 tst_qgraphicsview hoverLeave regressed
Task-number: QTBUG-26274

Change-Id: Ieafc6bf4a7fa5287985610a4dea57fbe6f3a9eba
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-06-22 05:21:54 +02:00
Janne Anttila
5281cba808 Fix qitemview and qdatetimeedit autotest builds for WinCE.
Defined missing SPI_GETPLATFORMTYPE macro as it was done in for example
in qwidget and qaccesiblity test cases.

Change-Id: I33a1e0119848911fbc4830299fcc1854f5259e86
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-06-21 00:58:29 +02:00
Samuel Rødal
ec2e99ead5 Fixed mouse grabbing preventing popups from being closed.
The pointer grabbing leads to fake Enter events being sent to the
Qt::Popup window, preventing it from closing since QWidget::underMouse()
returns true. We should only send Enter events if the mouse is actually
inside the widget.

Change-Id: I4ba3fb08943580f93ad4337ff0227becd647767e
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-21 00:58:22 +02:00
Joerg Bornemann
5f9d386727 fix tst_QWidget::getSetCheck on Windows
Change-Id: Ie11a7576f8e618e2fedb31bd8071abb44b9f9f57
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-20 15:45:07 +02:00
Oswald Buddenhagen
6d9c545d2b Merge "Merge branch 'buildsystem'" into refs/staging/master 2012-06-20 12:38:32 +02:00
Rohan McGovern
f681e99e29 tst_qfilesystemmodel: increased test's permitted runtime
This test has recently timed out a few times on Windows test runs, with
no relevant changes to account for the timeout. Double the permitted
runtime.

Change-Id: I93765c9ea592973495bfe3a2f63e63ed615eb542
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-06-20 03:17:05 +02:00
Oswald Buddenhagen
07581a87f8 remove some qmake -project boilerplate from project files
Change-Id: I5e6103db42b4fcca4ed4c2ffaec71e71e73d5b95
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:52 +02:00
Jani Honkonen
a85d15259c Fix QListView::scrollTo() when there are hidden rows
This is a cherry-pick of b0601630dd0ddabfaa3b97d042ee02b981d95988
from February

QListView does not consider hidden rows when scrolling to an item.
If there are hidden rows (or columns) before the selected item then
the visual index of an item is not the same as the row index
from the model. So scrolling will be off by the number of hidden
rows before the selected item.

Added a autotest for this also.

Task-number: QTBUG-21115
Change-Id: I01b097bce7f163cdb480a71b763c060cc006fdc7
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-14 10:11:26 +02:00
Stephen Kelly
c5665a182d Only quit if there are no visible widgets or windows.
We need to let the QGuiApplication determine whether quitting is appropriate
based on whether there are visible top level QWindows after the last top-level
QWidget was closed.

This solves the issue raised here: http://thread.gmane.org/gmane.comp.lib.qt.user/1880

The transientParent is the QWindow equivalent of parentWidget on QWidget, so the test
in QGuiApplication::shouldQuit is similar to the one in QApplication::shouldQuit.

Change-Id: I500eff8d5887f24415180134b3a4be3c630a896f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-06-12 04:30:18 +02:00
Markku Heikkila
9e75354aab Fix crash in QTreeWidgetItem::sortChildren when adding new item.
This is a cherry-pick of 4f388c383e39b598d997e21bd9a4f16d89bd0625
from February

Recursive call is caused if user code calls QtreeWidgetItem()::sortChildren and
sorting is enbled in QTreeWidget.

First call is from user code and second is caused by timer.
When timer expires second call is made.

This recursion is prevented with QTreeModel::SkipSorting skipSorting()
in QTreeWidgetItem::sortChildren();

Task-number: QTBUG-20345
Change-Id: Ibf73e69274423f31397a9e391bfba7d5c4103a3c
Reviewed-by: Markku Tapio Heikkilä <markku.heikkila@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-08 18:09:07 +02:00
Stephen Kelly
7d28f7772c Use QPointer instead of QWeakPointer.
The use of QWeakPointer for tracking QObject pointers is to be
deprecated.

Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-05 18:42:26 +02:00
Lars Knoll
143daa6ac2 Correctly locate files with relative paths
QUrl("relativefilename").toLocalFile() changed behavior
and now returns an empty string if the scheme is not set.
Setting the scheme to "file:" in setSource would however
break some other assumptions in the code about relative
url's.

Task-number: QTBUG-22416
Change-Id: I1b3fcbef81f6e356935ec426903989e783ce9a78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-05 13:40:00 +02:00
Rohan McGovern
4eecbf3b84 tst_qtoolbutton: stabilize and improve failure message
Allow for a little more leeway in timers.

Task-number: QTBUG-26004
Change-Id: I59936d0f675b7f734e04b3f5e63631c74ca4f163
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-06-05 09:21:36 +02:00
Bradley T. Hughes
9b07fd0d5c Add QDeferredDeleteEvent
Use this to store the loop-level counter needed by QCoreApplication
when determining when it is safe to delete an object.

This removes the hack to hijack the QEvent::d pointer (even though
the pointer is unused).

Change-Id: I91c0b1aa00235ec6e13feb30bf928e56d2f80026
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-05 06:14:16 +02:00
Miikka Heikkinen
32fa7a5410 Fix tst_qlistwidget::fastScroll test case
tst_qlistwidget::fastScroll fails if the mouse cursor happens to be
over the tested widget, because that causes an item to highlight,
resulting in unexpected region of widget to be painted. Fixed by
forcing the mouse cursor off the widget before the test.

Task-number: QTBUG-24299
Change-Id: I8f45541feda44681179d43eda67d970d5fea4e40
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-01 01:21:17 +02:00
Jan-Arve Saether
7cdcc26722 Fix Qt 5 todo issues for QSizePolicy.
* Merge the two public ctors.
* Use bitflags instead of shifting bits (more readable).
* Add autotest
* Use int datatype for the "stretch setters". (values out of bounds are clamped)

Streaming to QDataStream will still use the Qt 4 format.

Task-number: QTBUG-25100

Change-Id: Iecb1e78cb12717e4d84448484c3ad8ca469d571a
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-05-30 01:54:45 +02:00
Rohan McGovern
dd3e4f1dbe Set explicit testcase.timeout for slow tests
We'd like to decrease the default timeout for tests in the Qt Project CI
so that we waste less time waiting for hanging tests.

Tests which genuinely take a long time to run, such as these, should
have their timeout explicitly set in their .pro file.

Change-Id: I4fe6249e9efa764b230251d73a1115c24411e168
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-05-29 09:39:18 +02:00
Rohan McGovern
4e9e4d940f Make tst_qfiledialog2 closer to parallel-safe.
Use a QTemporaryDir instead of the system-wide temporary directory.

The test is still not entirely parallel-safe (at least on X11) due to
requiring the shown dialog to have keyboard focus.

Change-Id: I628dc6ab52dda49f6957a301eea8944bb9d81453
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-05-29 09:39:18 +02:00
Rohan McGovern
61904b8cfc Make tst_qfilesystemmodel parallel-safe.
Changed one testfunction to use the test's own QTemporaryDir instead of
the system-wide temporary directory.

Change-Id: I6740a7f4ba7f53174cd0730239d8dc088e5111ba
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-05-29 03:04:29 +02:00
Jiewen Wang
3be6ca3ee8 Eliminate QTreeWidget drag crash
In QTreeViewPrivate::adjustViewOptionsForIndex() wrong index had been
used when referencing to array of viewItems. Variable row is set to the
index of the QModelIndex, however it is not as same as the index in
viewItems[] when there was hidden item in treeWidget. Index of viewItems[]
should be used here. Unit test is added as well.

Change-Id: Idc7eda979e7d09c5a07bd6dffd92b7abbac10e67
Task-Id: QTBUG-25333
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-28 16:49:56 +02:00
Rohan McGovern
177070cb7b Add CONFIG+=parallel_test to suspected parallel-safe tests.
These tests have passed a parallel stress test on all three of Linux,
Mac, Windows.  Mark them with CONFIG+=parallel_test to allow CI to run
them in parallel, saving time.

Change-Id: I19fd333c3c645a67374ca998f6c8530dd236b0f8
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-05-28 07:33:01 +02:00
Jiewen Wang
7381328bcc QStatusBar::showMessage will always take new timeout
There is a message check in QStatusBar::showMessage causing the call exits
early if the new 'message' is the same
as the current message. The check has been removed, and new timeout will
always take effect. Unit test is added as well.

Change-Id: I3a03c6842835824caba4adc37c3ed834952c4bb2
Task-Id: QTBUG-25492
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-25 21:41:42 +02:00
Tarja Sundqvist
7266e11297 QTBUG-16850: QLineEdit::setSelection removes blank characters
Changed checking of the start position so that it does not call d->control->text() because this removes blank characters when an input mask is used. Thus the
selection fails. Instead d->control->end() is used for checking the start position.

Task-number: QTBUG-16850
Change-Id: I62992fb81bd47d432bade9f219782d48eb309956
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-05-25 17:23:20 +02:00
Tasuku Suzuki
8b78b3a620 Fixed QLineEdit::inputMethodQuery() for Qt::ImHints
It should return QWidget::inputMethodHints() instead of QVariant()

Change-Id: I01f5de8f2087ac67d125f54f08abed523653eb92
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-05-23 01:11:27 +02:00
Friedemann Kleint
061968d082 QWindowsBackingStore: Implement scroll.
Similar to XCB.

Task-number: QTBUG-24299
Task-number: QTBUG-24296 (partially fixed)

Change-Id: I4c9d813d9645f957f2caad0c4e395ce0d3d222cc
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-21 16:02:06 +02:00