Commit Graph

928 Commits

Author SHA1 Message Date
John Layt
041abb9316 QPrintSupport: Move QAbstractPrintDialog test into QPrintSupport
Move the test for QAbstractPrintDialog from widgets into printsupport

Change-Id: Ia7595fa650a7ad565df3090207500ed06564e842
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-10-26 00:39:51 +02:00
Frederik Gladhorn
840f6a40e6 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Ie56539b2e0be611a363b5f15ae5412a78d6945a2
2013-10-24 12:48:42 +02:00
Shawn Rutledge
7e30d3afd3 QFileDialog can delete files too, not just directories
After Ic12de12ec51c20de52d040514e90be5e783add43 this functionality
was broken.  Added an autotest.

Task-number: QTBUG-34159
Change-Id: I8f41b7073dc57fea855ab87796f09e8a91520d13
Reviewed-by: David Faure <david.faure@kdab.com>
2013-10-23 19:09:54 +02:00
Gunnar Sletta
72a7882cec Better QWindowContainer by not relying on native widgets.
We change the behavior slightly from the initial implementation in
5.1. Forcing the use of native child widgets is causing massive
performance issues so instead, we attach the embedded QWindow directly
to the root window. The only exception is QScrollArea and QMdiArea
which still enforces native windows for the entire parent chain
to make clipping and stacking work.

Task-number: QTBUG-34138
Change-Id: If713637bd4dce630552ace2f8ad6b2e86c063721
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-10-22 10:46:21 +02:00
Friedemann Kleint
2d107c20b9 Fix settable style hints.
Introduce QStyleHintsPrivate and introduce internal
setters called by QApplication.

Task-number: QTBUG-33991
Change-Id: Id61f8b1e2b5c9cfd7b4713aaded66e93e6f63719
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-10-22 10:04:48 +02:00
Sergio Ahumada
bdc558019a tests: Replace Q_OS_MACX -> Q_OS_OSX
Use the correct identifier for the OS X operating system.

Change-Id: I7158a6b77e5e7418bc6b0a565f003500820a346d
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-10-21 10:37:56 +02:00
Andy Shaw
89c01c3242 Only emit messageChanged() if the message has actually changed
This fixes QStatusBar so it is back to the original behavior of only
emitting the signal when the message has changed. The intention of the
code that caused this to break in the first place is kept intact.

Change-Id: I2f57c2abec01246ed924626ad954ac9ff9889855
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-10-15 13:01:59 +02:00
Shawn Rutledge
37ca2224ec QFileDialog: don't create widgets if the platform dialog will be used
This is a performance and memory optimization which also fixes bugs
that are related to creating widgets, file system models etc.
despite using platform native dialogs.  Similar to
785bc64f8e for QColorDialog.

Task-number: QTBUG-33039
Change-Id: Ia1aa7ec1f43b47006b9ebd377aed15c958538a17
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-10-15 08:14:48 +02:00
Simo Fält
cd13fe44cd Skip tst_QGraphicsItem::paint() on Mac OS X 10.7
The test is randomly failing on CI when ran on 10.7.

Task-number: QTBUG-31454
Change-Id: I79fce9a37616c6abaee960e338f8eea8fe6f31cf
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-10-15 06:20:01 +02:00
Friedemann Kleint
12b68ed072 Stabilize tst_qmenu on Mac.
Position cursor outside and move once more.

Task-number: QTBUG-33972

Change-Id: If060f1359361981cf1243d8d2a4ebef181689d74
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-10-14 17:29:37 +02:00
Friedemann Kleint
2b8e571f84 Stabilize tst_QComboBox::keyBoardNavigationWithMouse.
The cursor needs to be within the view from start on Mac.

Task-number: QTBUG-33973
Change-Id: I313c9fd1c3a917e135a92497f1818d1b0d8b7698
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-10-11 18:47:27 +02:00
Sergio Ahumada
da0cb32b8e Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-10-09 15:50:11 +02:00
Albert Astals Cid
7f3e3c1099 Compare QIcon QVariants by their cache key
This makes it so that two QVariants created from the same
QIcon (or from QIcons that were assigned one from eachother)
compare to true.
Unfortunately creating two QIcons with the same path and
comparing them still gives false as they have different cacheKeys

Change-Id: Iafe2bc4082a830f9c6469f083c26a7abbe4b35c5
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-10-09 13:15:54 +02:00
Frederik Gladhorn
d8fc0da235 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/minimal/qminimalintegration.cpp
	src/plugins/platforms/offscreen/qoffscreenintegration.cpp

Change-Id: Ica85deeab5c5038ac004718e25194b1157343480
2013-10-04 00:44:18 +02:00
Friedemann Kleint
cdf0c5905b Fix temporary file leak in tst_qfiledialog2.
Change-Id: I5a1e601e3aa6e84300efa09bfbd9232fecab903e
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2013-10-03 21:43:56 +02:00
Andrew Knight
c6af0a504f WinRT: Fix various test compilations
- Remove irrelevant test subdirs via .pro files
- Follow WinCE codepaths where applicable
- Replace unsupported Win32 APIs with WinRT equivalents

This does not aim to fix any failures in the tests themselves; it only
makes them compile.

Change-Id: Ia82bc0cc402891f8f6238d4c261ee9152b51be80
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-10-02 12:36:05 +02:00
Liang Qi
5b70efb125 Mac: QWizard default background pixmap works again
Task-number: QTBUG-26722
Change-Id: I579111b5d34f8e3cdc6bb016d9c0e42ec3ffb8c9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Stephen Chu <stephen@ju-ju.com>
2013-09-26 20:42:33 +02:00
Ivan Komissarov
f3a723f2ec Add QKeySequenceEdit
Change-Id: I497309d3e6cbf38b298afb5ff3cb1ed6a0e82000
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-09-24 10:55:17 +02:00
Thorbjørn Lund Martsum
42d681f9cf Add widget replace function to QLayout
Sometimes it is nice to be able to replace a widget in a layout.

Change-Id: I23a6a65e417e94d53bc48639503db1a142bc3f10
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-09-21 23:17:55 +02:00
Sergio Ahumada
a5d34b34fb Merge branch 'stable' into dev
Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
2013-09-21 17:33:15 +02:00
Oto Magaldadze
6b95130faa QCompleter::setFilterMode() add property filterMode.
QCompleter::setFilterMode(Qt::MatchContains) will enable filtering
out entries that contain typed characters in any place, instead of the
default behavior when only those entries that start with typed characters
are displayed. Qt::MatchEndsWith is also possible.
QCompleter::setFilterMode(Qt::MatchStartsWith) will bring the default
behavior back.
Task-number: QTBUG-3414

Change-Id: I3845704c59eb8fc401e9a650c54a9c934ed28c2e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-09-20 23:45:06 +02:00
Simo Fält
13c03d3c28 Set tst_qfilesystemmodel as insiginificant
The test has been failing on all platforms. Usually it just times out,
but it also have behavied flaky, failing with different error codes
when executed twice in a row.

Task-number: QTBUG-29403
Change-Id: Ic06638f0ffd23131b4c1aa4136f715195727e959
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-20 12:04:03 +02:00
Sune Vuorela
e24f75af4d Implement QMainWindow::takeCentralWidget()
This allows the application developer to restructure the application,
including moving the central widget some place else.

Change-Id: Idca2f74c190500db24404e020b0eb400e41aad10
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-09-20 11:54:13 +02:00
Shawn Rutledge
26ddb586ac xcb: QWindow never uses XCB_GRAVITY_CENTER
Center gravity doesn't mean center the window, it only affects the
method of converting between internal window bounds and decorated bounds.
So wanting to have each dialog centered w.r.t. its transient parent
is not a reason for using center gravity.  Instead it caused the
bug that when you resize a QMessageBox by clicking the Show Details
button, it jumps downwards on the screen.

Task-number: QTBUG-32473
Change-Id: I3fabf3caa1e4d10fd4f7508e297f73efe5cc51b6
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-16 14:15:06 +02:00
David Faure
aabbd27dda Simplify QFileSystemModel::remove by using QDir::removeRecursively
This also fixes it in case of hidden or system files, which
were missing from the filter (found by Denis Kovalskiy).

Change-Id: Ic12de12ec51c20de52d040514e90be5e783add43
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-16 12:12:09 +02:00
Sergio Ahumada
2346ae1675 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
2013-09-07 16:18:32 +02:00
Marcel Krems
730bc064a0 Forward QGraphicsView::mouseDoubleClickEvent
Do the same as in mousePressEvent.
Otherwise it is not possible to handle the event
in one of the graphics views parents.

Task-number: QTBUG-8061
Change-Id: I67c7635361a9ed595c513c28ea016e6253fa2101
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2013-09-06 23:21:18 +02:00
Stephen Kelly
239fe290ad Center the QColumnView on-screen, in case that helps avoid the test failure.
Task-number: QTBUG-32927
Change-Id: Icf0301d583b2ca6e2e099a19eb1f91feac1fb975
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-05 15:26:44 +02:00
Paul Olav Tvete
b855e57804 Fix layouts with expanding items with maximum size
Layout items with a Preferred size policy would be treated as fixed
size if they were in the same layout as an Expanding item (or one with
a stretch factor).

This occurred e.g. if a layout was configured similar to this:
1. One item with ExpandFlag/stretch but with a maximumSize set,
   e.g. (100x100).
2. Another item with 'just' GrowFlag, and a maximum size bigger than
   its  size hint.

If the above layout was resized to e.g. (200x50) it would cause the
expanding item to correctly get the size (100x50), but the 'growing'
item would not stretch beyond its size hint.
Instead, it would distribute space around both items, behaving as if
the 'growing' item was fixed'.

The expected behavior is to continue to grow the 'growing' item after
the expanding item has reached its size limit.

Task-number: QTBUG-33104

Change-Id: Ie410653d905f7ca4d702528dafb269f30a0e4f61
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-09-04 15:09:47 +02:00
Friedemann Kleint
835a7bc0a0 Skip tst_QGraphicsProxyWidget::popup_subwidget on Windows.
Task-number: QTBUG-33213
Change-Id: I1c8daa3a859f9d0d760054f1d8934abd84f62f0d
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2013-09-03 12:48:03 +02:00
Thorbjørn Martsum
0bcfa3d5d9 QHeaderView - add maximum section size
When we auto resize it is handy to be able to limit the maximum
size (just like the minimum size).

[ChangeLog][QtWidgets][QHeaderView]A maximumSize for sections
has been introduced. The maximum section size is by default
the largest possible section size which in Qt 5.2 has been
limited to 1048575 pixels.

Task-number: QTBUG-4346

Change-Id: Ida9cbcc11bd5c4498e319df2e6379c69a7033c04
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-02 16:26:21 +02:00
David Faure
8f4b6f1cd1 item delegates: fix clicking on tristate checkboxes.
QCheckBox cycles through the 3 states, but item delegates didn't
do that.

Change-Id: Iad1e464341033ca357925fe8064f53bb584459f4
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-02 16:26:21 +02:00
Sergio Ahumada
0a3eb0fe44 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-09-02 16:26:21 +02:00
Morten Johan Sørvig
8fc97fdfc7 Revert Mac event loop changes.
"Make QGuiApplication::exec() run within NSApplicationMain()"
"Make Qt process native and timer events on Cocoa applications"
"Cocoa: Fix QFontDialog, QColorDialog auto-tests"

This reverts commits
1e14762b8d
e4b2a0b4ba
df7944e7d7

Change-Id: I80b65b5ee0297b090f807bd420664233dfc44f7b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-02 13:07:35 +02:00
Thorbjørn Martsum
2c916d47ef QTreeView - fix next focus when there is no current index
Before we went through non hidden indexes, but we never considered
the visual order. This patch fixes that issue.

Though it was wrong before, it probably never was a big problem
since it was unlikely that the tree (on logical index 0) was
swapped or hidden, but

658e42e77a

makes it more likely that problems with wrong focus could occur.

Change-Id: Ic7b6cd2df1f8638be1a7c9e6df27f428685869fc
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-30 21:07:46 +02:00
Gabriel de Dietrich
df7944e7d7 Cocoa: Fix QFontDialog, QColorDialog auto-tests
The new Cocoa event dispatcher made apparent some deficiencies in the
way the dialog helpers were being hidden. In particular, we would not stop
a dialog helper's modal loop when closing the dialog, resulting in the
auto-tests hanging. Also, since the QApplication event loop is runnig with
[NSApp run] in the stack, the previous workarounds are no longer needed.

Task-number: QTBUG-24321
Change-Id: Ifba713c286638d78a699c319a15683d09714f06f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-08-29 12:44:24 +02:00
Friedemann Kleint
e9c771d6cc Stabilize tst_qmenubar.
The test was re-using a main window and menu bars for all tests,
clearing and repopulating them. Rewrite the code to be able to
use menu bars and windows on the stack separately for each test.

Change-Id: I13ab31b26b70bc8537e8d8ab164051b3197cd68e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-28 15:50:28 +02:00
Thorbjørn Martsum
fd871694e7 QButtonGroup - add buttonToggled signals
QButtonGroup emits signals on clicked, pressed and released for
buttons in the group, but for some (insuffienct) reason it did
not emit anything for toggle (the only signal that it didn't emit
anything for).

This patch changes that, by adding handling of that signal to
QButtonGroup.

Task-number: QTBUG-14857

Change-Id: I88bcd7b060b78c7ff05ea1adf7baaddfe6d463be
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-08-28 12:15:43 +02:00
Frederik Gladhorn
190fa97c83 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	examples/widgets/doc/src/addressbook-fr.qdoc

Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
2013-08-27 22:51:09 +02:00
Paul Olav Tvete
f3c019649b Test layout engine fundamentals
Done with Jan Arve

Task-number: QTBUG-33104

Change-Id: I8319748536d448d1c37a26527ced53156d8c2f56
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-08-27 22:00:48 +02:00
Friedemann Kleint
78d7192338 Close menu on 2nd click on QMenuBar.
Task-number: QTBUG-32807
Change-Id: I0c3c25c6acf92bc30c1bcfc09003209b572ec777
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-27 19:12:06 +02:00
Friedemann Kleint
5bb4817142 Center widgets using UpdateWidgets in tst_qwidget.
Try to stabilize doubleRepaint and others, try to get them away
from taskbar areas.

Change-Id: Icae8da575999afccb314edafd7deb16446e3d1c2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-27 19:12:06 +02:00
Thorbjørn Lund Martsum
934f062203 QAIV - Fix scollbars with ScrollPerPixel to scroll 1 pixel.
The documentation says that we scroll one pixel

Quote:
"QAbstractItemView::ScrollPerPixel  (value 1)"
"The view will scroll the contents one pixel at a time."

However until now Qt has tried to be smarter than the
documentation, but is actually getting in the way of the user,
where a manual set value to setSingleStep will continuingly
be overwritten (on e.g resize).

This patch ensures the behavior described in the documentation
for the vertical headers - and leaves the control to the user.

[ChangeLog][QtWidgets][QAbstractItemView]  QTBUG-7232 - In ItemViews
scrollbars will now by default only scroll 1 pixel when scrollMode
is set to scrollPerPixel. That is it will (when scrollMode is
scrollPerPixel) do what is stated in the documentation, and no
longer automatically adjust the scrollbars singleStep. The user
can now control that value.

Task-number: QTBUG-7232

Change-Id: I8a61d3100be65d0c4ee32aad58caed019aa2669c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-26 09:40:59 +02:00
Andy Shaw
1baf293548 Move SnapToDefaultButton from QPlatformDialogHelper to QPlatformTheme
Since QPlatformTheme covers all dialogs whereas QPlatformDialogHelper is
really only for the native dialogs then the SnapToDefaultButton hint is
moved as it has relevance for all dialogs

Task-number: QTBUG-32631

Change-Id: I1dce0bb4abcd4cfd39c4a199a33fc7078176ab4b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-08-23 08:42:35 +02:00
Stephen Kelly
48f332f802 Add more comparisons to narrow down error case.
Task-number: QTBUG-32927

Change-Id: I83d6def83c37febd8cd83676bff9d74f364ecfad
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Simo Fält <simo.falt@digia.com>
2013-08-22 19:14:03 +02:00
Thiago Macieira
c374f4441a Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-08-22 02:04:39 +02:00
David Faure
e8bc599a74 tst_qgraphicsproxywidget: fix memory leak
Change-Id: Ib449dc05cebd333310d6ea6b434c9db7082bdee9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-08-21 23:49:59 +02:00
Stephen Kelly
74a153e4b8 Add debugging output to randomly failing test.
The result at

 http://thread.gmane.org/gmane.comp.lib.qt.ci-reports/12118

shows an unusual value. The expected output is

 QDEBUG : tst_QColumnView::scrollTo() last= 0  ; HorizontalOffset=  -256
 QDEBUG : tst_QColumnView::scrollTo() last= -256  ; HorizontalOffset=  -512
 QDEBUG : tst_QColumnView::scrollTo() last= -512  ; HorizontalOffset=  -768
 QDEBUG : tst_QColumnView::scrollTo() last= -768  ; HorizontalOffset=  -1024

Change-Id: I8db091f4390cb1a41547d44ca966d172ac278e1a
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-21 16:39:55 +02:00
Frederik Gladhorn
c8ca300e49 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/src.pro

Change-Id: I0a560826c420e46988da3776bd8f9160c365459a
2013-08-21 11:03:18 +02:00
Rohan Garg
e2322c885f Extend QStyle API with a SH_Splitter_OpaqueResize styleHint
Currently the default for QSplitter::opaqueResize is hard coded,
which is less than ideal. Instead this should be provided as a
style hint via QStyle so as to give a more uniform look to all
applications.

Change-Id: I5711811f7b672e36aafcd292ed320308570a0390
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-20 20:09:20 +02:00
Frederik Gladhorn
cbb4a88262 Skip tst_QGraphicsProxyWidget::deleteProxyForChildWidget on Win
This tests crashes a lot lately.

Task-number: QTBUG-29684

Change-Id: I6892238dc071f050b0208dd5b4843629fa707347
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-20 17:59:39 +02:00
David Faure
2ccf995725 tst_qgraphicsproxywidget: skip crashing test on Mac/Windows.
Created QTBUG-33067 for tracking the issue, after some debugging.

Change-Id: Iaf5556db2e0858e40a7cf6c9dbbe7e6fd6120bac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-08-20 17:59:27 +02:00
Simo Fält
d91afa1558 QtBase: Skip some tst_qwidget steps in Ubuntu 11.10
Same steps keeps failing on Ubuntu 11.10 without valid reason.

Task-number: QTBUG-30566
Change-Id: Ic7bf65496ff9ad9c4fdef42a30b808aa2c45a1e5
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-19 14:24:28 +02:00
Giuseppe D'Angelo
76f32cadb2 Fix QGraphics(Ellipse)Item autotest
Change-Id: I6d5d702e97a0186979bd3bdcd0526d53afeecbd8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-19 14:24:28 +02:00
Frederik Gladhorn
e727855476 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-08-16 16:02:19 +02:00
Thorbjørn Martsum
f633bc7f7f QHeaderView - reduce memory usage
Though the worst case memory usage was improved in
b800d8b94a the best case usage changed.

Since best case is the same as worst case in Qt5, we should
use as little as possible, which this patch ensures.

We reduce the memory usage from 3 to 2 ints per section - which is
half of worst case in Qt4. There seems to be no bigger cost in
performance doing that. The recalcSectionStartPos is still very fast.

This patch limits the maximum section size to (2^20) ~ 1.000.000 pixels.

This alleviates
Task-number: QTBUG-32325

Change-Id: I9b7530030a31b4e35cf1ca9e32c6b936f5ea9790
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-16 05:34:18 +02:00
J-P Nurmi
bff78163f6 QHeaderView::paintSection(): fix visible index handling
Sections may be hidden => QStyleOptionHeader::position must reflect the
state seen on the screen. Otherwise styles will give wrong visual
results.

Task-number: QTBUG-32203
Change-Id: I7ef86496be092bf6f52ec45f757b501f38c3a431
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-15 11:37:27 +02:00
Frederik Gladhorn
5c23199d4e Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	configure
	mkspecs/macx-xcode/Info.plist.app
	mkspecs/macx-xcode/Info.plist.lib
	qmake/doc/qmake.qdocconf
	src/corelib/global/qglobal.h
	tests/auto/other/exceptionsafety/exceptionsafety.pro
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp

Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
2013-08-14 09:06:31 +02:00
Ivan Komissarov
252bad7c58 Add useful signals to QTabBar and QTabWidget
In this patch we introduce tabBarClicked and tabBarDoubleClicked to get
a finer grained information on the user interaction with the tab bar.

Done-with: kevin.ottens@kdab.com

Change-Id: I7be76a556ca09186e98f2e076fe2512d6c5e6773
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-13 19:28:31 +02:00
Stephen Kelly
efc43ae83d Add some debugging information to diagnose bug.
Task-number: QTBUG-32927

Change-Id: I7d0a1ad9eeb63ac0ec28483106f42109ed1a834c
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-12 13:51:01 +02:00
Friedemann Kleint
bff5100177 Add clearButton-property to QLineEdit.
Based on addAction-API.

Change-Id: Ie6c3d2d728b23a85cdd80428c92ee8208ae0a65c
Done-with: Kevin.Ottens@kdab.com
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-08 12:55:48 +02:00
J-P Nurmi
737abb8a5e QComboBox: fix item activation via completer
Task-number: QTBUG-31146
Change-Id: I64291f397d80bf934152f63e629810540abf466e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-08-08 05:58:31 +02:00
J-P Nurmi
cffd1633b2 Fix QCompleter::activated(QModelIndex)
When falling back to the completion prefix, make sure to also pass an
invalid index to activated().

Change-Id: I6b282a01c95492466890632b77837bcc96eb038a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-08-07 18:21:23 +02:00
Sergio Ahumada
79d7fd924e tst_qfilesystemmodel: increased test's permitted runtime
This test has recently timed out a few times on OS X test runs, with
no relevant changes to account for the timeout.

Task-number: QTBUG-27890
Change-Id: Ia24f7812ed2a0b3eac51847a7dacbc9f225b48b8
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-06 08:30:20 +02:00
Friedemann Kleint
9ce12cc8de Add side widgets to QLineEdit via QAction.
Add QLineEdit::addAction() overloads,
allowing for a variable number of icons or user-defined
widgets.

Change-Id: Id298f18c2f47cc998170357e65cc6098df851aab
Done-with: Kevin.Ottens@kdab.com
Reviewed-by: Thomas Zander <zander@kde.org>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-06 08:19:38 +02:00
Andreas Aardal Hanssen
8fce4e97ba Fix double transform for items ignoring parent transformations.
Previously, the topmost untransformable's scene transform, which
includes the item's position and local transformation, was used to
determine the item's anchoring position. This position was then
passed on to be multiplied by the item's transform again. This
works fine for toplevel untransformable items that don't have any
transform set at all, but those who do would have their transforms
applied twice - one to determine the anchoring position, and again
to transform the item itself. Since only translation transformations
can affect the first operation (the anchoring pos), this bug only
applies to items that set ItemIgnoresTransformations and use a
local transform that includes translation.

Task-number: QTBUG-21618
Change-Id: I772d52d59dfd9f242d0140632a87e9c68dfe0ea1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-08-05 20:15:53 +02:00
Tor Arne Vestbø
d66d912c53 Fix tst_QCompleter::directoryModel() on OS X
By not assuming that we have the '/Developer' directory at the root
of the file system. 'Users' is less likely to be removed/deprecated.

Change-Id: I659bdb67cfb1ed2f73bc643ba4afe1f1f89d5bc5
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-08-05 16:53:17 +02:00
Sergio Ahumada
06b6061b43 test: Remove insignificant mark from tst_qfilesystemmodel
Tests are passing nowaways on OS X.

Task-number: QTBUG-27890
Change-Id: I6a0a881ece844ef931cb8af51b58d33c40be4d2c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-26 14:47:47 +02:00
Simo Fält
34d2abe309 Fix for tst_qundogroup autotest in shadow build
Added full path to src dir for testdata.

Task-number: QTBUG-32535
Change-Id: I38e96216e9a016869151adf0ae995e068b8b5354
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-07-25 11:32:29 +02:00
Simo Fält
651a03b0dd Fix for tst_qundostack autotest in shadow build
Added full path to src dir for testdata.

Task-number: QTBUG-32536
Change-Id: I5ef215d451a6407c277d2c98f21ffc35a8657e28
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-25 11:32:19 +02:00
Friedemann Kleint
97378dc70e Re-enable tests tst_qgraphicsproxywidget, tst_qgraphicswidget.
Task-number: QTBUG-25294
Task-number: QTBUG-20778

Change-Id: I6b6e19e812d5527465c6162e2df2e4807cf160da
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-07-24 22:16:58 +02:00
Frederik Gladhorn
084c5b3db7 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp

Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
2013-07-23 11:18:11 +02:00
Ivan Komissarov
16579e5b84 Prevent QLineEdit from emitting edited signal (QTBUG-27347)
edited() signal should not be emitted when QValidator fixups
text in a lineedit.

Change-Id: Iccef45c4b858a65fd5097dc9e5033cefb09ad889
Reviewed-by: David Faure <david.faure@kdab.com>
2013-07-21 15:52:24 +02:00
Mitch Curtis
5ec344cc77 Make *ItemBoundingRect modes work with custom shapes.
Currently, calling
QGraphicsScene::items(QPointF(0, 0), Qt::IntersectsItemBoundingRect) or
QGraphicsScene::items(QPointF(0, 0), Qt::ContainsItemBoundingRect)
will exclude items whose shape does not contain QPointF(0, 0). This is
because QGraphicsSceneIndexPointIntersector::intersect() also checks if
the point is contained within the shape, instead of just checking
if it is contained within the bounding rect.

Task-number: QTBUG-19036

Change-Id: Ie701af2a5694d40cf9b3c9c19adbb09a53a4e398
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2013-07-16 20:42:01 +02:00
Sergio Ahumada
3ef6cf060e Merge branch 'stable' into dev
Conflicts:
	qmake/generators/mac/pbuilder_pbx.cpp
	src/corelib/json/qjsonwriter.cpp
	src/corelib/kernel/qeventdispatcher_blackberry.cpp
	src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm

Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
2013-07-11 16:42:01 +02:00
Mitch Curtis
5ec3b2826b Test password mask delay and characters on Mac.
Task-number: QTBUG-31498

Change-Id: Iab4a56b94364e3db78070aca40c629f9398ffbb7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-07-11 10:56:49 +02:00
Thorbjørn Lund Martsum
692e642305 QSizePolicy - add retainSizeWhenHidden
Sometimes it is nice that hiding a widget does not affect the
layout. This patch makes that possible by allowing hidden
widgets to take up space.

Change-Id: Ifbc1cdee0e112950acc025919b98199ea9558db7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-07-10 09:26:31 +02:00
Friedemann Kleint
1df4ebe0ef Stabilize tst_QApplication::quitOnLastWindowClosed().
Instantiate widgets on the stack to ensure they are destroyed
when the QApplication instance goes out of scope.
Introduce waitForWindowExposed() to make sure events are in sync.

Task-number: QTBUG-32125
Change-Id: Ia54e2fa9a7c2e279353c4514a6735e326edf35ae
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-04 17:18:14 +02:00
Gunnar Sletta
a1f9b2b2b0 Make the test a bit more sane.
Unactivating a window is not really supported, nor has it ever really
been, so activate another window instead. This incidentally
also makes the test work cross platform.

Change-Id: I6e593e9b7972dd5c5038c8d18a42be90bf19248c
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-07-01 08:57:52 +02:00
Frederik Gladhorn
572200989b Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	configure
	mkspecs/features/create_cmake.prf

Change-Id: I94aea83b83833395d5db399209e0e51b92ef23b5
2013-06-27 13:06:38 +02:00
Friedemann Kleint
d849f3332f tst_qfilefialog: Fix leaking temporary directories.
The test currently leaks 2 directories QFileDialogTestDir,
QFileDialogTestDir4SelectFiles in /tmp.

Change-Id: I396f0b069572a680d81206dd0f1ddf606cbbe9e4
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-06-26 05:46:19 +02:00
Gunnar Sletta
63601509f8 Test for activation and palette on QWindowContainer's parent
Task-number: QTBUG-31775

Change-Id: Ib8ec5508f7bf53f9e3ce502367a3dca1a760289f
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-06-25 09:29:21 +02:00
Frederik Gladhorn
88211af86c Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-06-24 15:14:55 +02:00
Marc Mutz
bab630e4bf QDialogButtonBox: add a missing constructor
Setting the buttons in the constructor is a use-case that happens
more often than setting the orientation. Yet, there was a
(Qt::Orientation,QWidget*) constructor, but no
(StandardButtons,QWidget*) one.

This patch adds it.

Change-Id: If6a5c9f7450a388cd77bd93c8dd144b2fdc11847
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-06-21 19:03:12 +02:00
Frederik Gladhorn
6213b81457 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
	src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp
	tools/configure/configureapp.cpp

Change-Id: I3092bd3276af14304b7ab3ae1e1cc05d11cdede0
2013-06-20 16:45:12 +02:00
Stephen Kelly
249c5f0689 If a QWidget is ignored for auto-quit, ignore its corresponding QWindow.
Unit test by Friedemann Kleint <Friedemann.Kleint@digia.com>

Task-number: QTBUG-31569
Change-Id: I526d33d4f88a41f6ac349098476bc45af6c841b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-06-19 12:16:03 +02:00
Rafael Roquetto
1d23172c99 BlackBerry: fix tst_qlistview
Because fonts are bigger on BlackBerry than those assumed when the test was
written, explicitly adjust the font size on this platform.

Change-Id: I6a23c28c2d32edf744dd5de09ea0a97fd5f9b6d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-06-18 06:25:52 +02:00
Rafael Roquetto
27107b43a3 Fix tst_qlistview for full screen platforms
Some test cases rely on the fact that show() is not fullscreen, which may not
be true for some platforms. Explicitly make use of showNormal() to avoid
full-screen show on these platforms.

Change-Id: Ie62fe21bf0f466c561a27cffda99d0201b4a45af
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
2013-06-18 06:25:52 +02:00
Frederik Gladhorn
e2776b44a0 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/cocoa/qcocoamenubar.mm

Change-Id: I4a699fc8a7f30b2af9de8e496c3d5f027b7495bb
2013-06-12 19:17:07 +02:00
Friedemann Kleint
0d459619a9 QDockWidget: Keep position when undocking.
Initialize undockedGeometry to roughly the current position.

Task-number: QTBUG-31044
Change-Id: I03cbe280d1215bb58ab721b60e29b45359cde76d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-06-12 12:42:51 +02:00
Friedemann Kleint
9e65808acf tst_qfilesystemmodel: Fix warnings about comparing int/bool.
warning C4804: '<=' : unsafe use of type 'bool' in operation

Remove outer loop and replace ugly ROW_NAME macro by
inline function.

Change-Id: Id7e4ef047adaf8017b8c21621d19c151993cc6dd
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-06-08 10:29:34 +02:00
Rafael Roquetto
528fd2149e Use QFINDTESTDATA on tst_QStyle instead of SRCDIR
Update the test code to match the current Qt idiom for finding test data (and
fix it on QNX).

Change-Id: I63e7c97b717722e4e6859a12f329d56b26584ce6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-06-07 22:18:33 +02:00
Friedemann Kleint
1df0f4b2af Fix tst_qcombobox::itemListPosition.
Add font combo to top level via layout and position top level
instead of the (child) font combo.

Change-Id: I0f754c37c009d1ed83615b800d6f2467e858c047
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-05 15:42:01 +02:00
Frederik Gladhorn
80604a0786 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/corelib/global/qglobal.h
	src/plugins/platforms/cocoa/qnsview.mm

Change-Id: I6fe345df5c417cb7a55a3f91285d9b47a22c04fa
2013-06-04 19:34:36 +02:00
Friedemann Kleint
96cd00bc0f widget/graphicsview: Do not run tests showing windows in parallel.
Change-Id: I3bba3f49eba6ca9c187caf696d0f6c73372fec5d
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2013-06-03 13:48:41 +02:00
Frederik Gladhorn
f89c99fa72 Fix typo
Change-Id: I0983f12759fdb806e4fc89f4abefb9088502208d
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-06-03 13:00:32 +02:00
Friedemann Kleint
00ce5a3c1e Remove XFAIL from tst_qgraphicswidget::initialShow2().
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>
2013-05-27 17:47:20 +02:00
Giuseppe D'Angelo
cada1fb4ef Add QComboBox::currentData
Convenience function that returns user data for the current item,
analogous to currentText().

This avoids to having to write the cumbersome

  QVariant variant = comboBox->itemData(comboBox->currentIndex());

(It's quite common to put strings as text and the corresponding
enum values as user data.)

Change-Id: I8c7632c647c5583d18e4e22703aeb4447d73162d
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-05-27 15:19:41 +02:00
Jan Arve Saether
cf366e8b86 Made sure items with preferred width of 0 could also stretch
If no stretch factors were specified, we used the preferred size as a
stretch factor. Obviously, that didn't work if the preferred size was
actually 0.

This patch works around this by actually setting the stretch factor to
1.0 if this is the case.
This should work fine in most cases, except for the case where there
are also other items with a preferred size close to 0.
In this case, the item with preferred size 0 will just grow
faster than an item with e.g. preferred size 0.1.

Task-number: QTBUG-31217

Change-Id: I966455da0bdd00308591c7f7cfbc4e134d423e57
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-05-27 12:38:53 +02:00
Frederik Gladhorn
d3a8bc803c Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/corelib/io/qdatastream.cpp
	src/corelib/io/qdatastream.h
	src/corelib/json/qjsonwriter.cpp
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/xcb/qxcbkeyboard.cpp

Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62
2013-05-23 21:27:07 +02:00
Friedemann Kleint
ef8ece3f93 Stabilize tst_qgraphicssceneindex.
Change-Id: I8cda10a5a4c9bf949b560e7be4da9bef92667688
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-23 10:02:19 +02:00
Friedemann Kleint
d934ddc297 Silently strip leading dot off QFileDialog default suffixes.
Change-Id: Ie41fafe8c2ce7e8ac8dd595ca3809c1da3b386f4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-05-21 07:55:16 +02:00
Oliver Wolff
184e1a37e8 Fixed autotest build for configurations without printsupport
Change-Id: I7fc4a6e4885e9640ecfbe93547fb56868ebba309
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-05-21 07:25:39 +02:00
Liang Qi
69c05bbef4 QtWidgets: avoid integer divide by zero in QProgressDialog
Autotest is included.

Task-number: QTBUG-31046
Change-Id: Ie549b59112f458de478294fa00443a3cf6898c85
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-05-15 05:06:15 +02:00
J-P Nurmi
0b862e0677 QGV: fix items not to be selected on right mouse button release
Task-number: QTBUG-30990
Change-Id: I421d9169b592da2b468eceb9df4f3f7c6a06e8d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2013-05-14 15:21:23 +02:00
Tor Arne Vestbø
8be5103d29 tst_qmdiarea: Prevent scrollbars from messing up expected viewport calculation
With scrollbars enabled we would get two resize events when tiling the windows.
First one with the expected viewport size, and then a second one with a bigger
viewport when the QMdiArea calculated that the space it set off for scrollbars
was not needed after all. Depending on whether or not the geometry propagation
of the platform plugin was synchronous or not, we would get one or both of the
events before evaluating the viewport size against the expected size, resulting
in flakeyness, and an expected fail on OS X.

We now explicitly disable the scrollbars during the test, and restore them for
the latter test that verifies that scrollbars show up when the area is resized
below the minimum size of the combined child widgets. This allows us to unskip
the expected failure on OS X, and should make the test less flakey.

Change-Id: Ief767456cfd79f5cd0bb0e220c40e5995674ff71
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-05-14 15:17:18 +02:00
Sergio Ahumada
fc7c25bab5 test: Remove XFAIL from tst_qwidget
XPASS  : tst_QWidget::update() QCOMPARE(w.numPaintEvents, 1) returned TRUE unexpectedly.
     Loc: [tst_qwidget.cpp(4017)]

Change-Id: Ib7664871ed218f4c88fd2430491fa65443651927
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-05-13 13:29:48 +02:00
Simo Fält
074975055d Disabling some concurrency in widget tests
There has been frequent failures with CI, especially with OSX 10.7.
These seems to work ok in CI node when ran alone but CI is running
those in parallel with some other tests, and this is causing errors,
most likely due to lost focus.

Change-Id: Ic4151099c27a4b5d91778c9b13e88d2d661e8a0d
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-05-10 17:31:52 +02:00
Friedemann Kleint
9ddf7c5312 Stabilize QGraphicsWidget test.
The test showed frequent failures with XCB in
initialShow2() (line 3200) after
01bc34088e (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>
2013-05-09 10:20:21 +02:00
Miikka Heikkinen
01bc34088e Fix tabFocusFirst when that item is removed from QGraphicsScene
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>
2013-05-08 06:47:29 +02:00
Ivan Komissarov
0866e48ae2 Fixed applying invalid data from QLineEdit to model
Task-number: QTBUG-2216

Change-Id: I5d1c18aadb380667dedc2bb9f9b7e3dd8178a24c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2013-05-07 22:43:14 +02:00
Friedemann Kleint
5a8d58350d Add QSKIP to hoverenter-test in tst_qgraphicsproxywidget.
Task-number: QTBUG-25294

Change-Id: I7a674dc49d84c7c68a877bcf64c14e9726dd481e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-05-07 20:40:41 +02:00
Friedemann Kleint
1cf39e2610 Fix XPASS in tst_qgraphicswidget (Windows).
Task-number: QTBUG-20778

Change-Id: I90c8135fab85872cae22630c53fef7aed835a19c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-05-07 20:40:41 +02:00
Kevin Ottens
48e3cc30ed Set the base used to display the spin box value
Provide a new displayIntegerBase property which control the base used
by the spin box to display the value in its internal line edit.

Change-Id: Ibadc37107db8770d757b64350946bf19142e8f6c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-05-07 18:40:43 +02:00
Sergio Ahumada
db44b891fb Merge branch 'stable' into dev
Change-Id: Ica003a10ede86914bbbb062a2dc277a2ce39a259
2013-05-07 12:02:41 +02:00
Frederik Gladhorn
c917579a15 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-04-30 09:33:19 +02:00
Kevin Ottens
ac06bfdc76 Add QUrl based static methods to QFileDialog
With QUrl variants of the static methods, it is possible to get to use
VFS facilities of the platform if available.

Since we can't predict if the application will use the VFS available in
the platform or its own mechanisms, an extra parameter is provided to
restrict the protocols allowed to the user. This extra parameter
defaults to no restriction, which is the most convenient if the platform
file dialog and the application use a matching VFS. It's likely to be
the most common use.

Change-Id: I4c9effde9d194d226cd8b7a140eb9036187ba87b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-29 18:41:55 +02:00
Sergio Ahumada
b27e922e1c test: Mark tst_menubar::task256322_highlight as XFAIL
This test is unstable on Mac OS 10.7 with developer builds, so marking
it as XFAIL if it happens to fail.

Task-number: QTBUG-30565
Change-Id: If7094c3b19299f0dbe57cb82a8614032a75573d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2013-04-29 14:50:49 +02:00
Frederik Gladhorn
85e3c53e5c Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I2a54058b64ac69c78b4120fdaf09b96e025a4c6c
2013-04-29 14:17:09 +02:00
Gunnar Sletta
2e0575ce89 Fix windows expose logic
Make sure the value of QWindowsWindow::isExposed is in sync
with regions we expose.

This provoked a couple of existing issues in the qwidget test.

setWindowGeometry tested that windows with invalid sizes got
exposed on screen. They didn't, but because the plugin sent
bogus events, these used to pass. Same with windowMoveResize.

The expect fails are also rather bogus. Showing invalid-size
widgets could be considered undefined behavior. The Window
manager could resize it, choose to not show it at all, etc,
but they now pass on windows.

resizeEvent has been broken since 5.0.0, but the test didn't
spin the event loop so the second event didn't get delivered
before the test completed.

Task-number: QTBUG-30744
Change-Id: I3a9efcd095f366126a87739f4248185b6c81d407
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-25 15:41:54 +02:00
Jan Arve Saether
146658a10f Fixed QLayout::addChildLayout(QLayout *l) when l had a parent
Previously if l had a parent, addChildLayout would warn and skip the
reparenting, but it would still add the sub layout to the layout.
This caused some inconsistencies in the hierarchy which in worst case
could cause crashes.

Task-number: QTBUG-30758
Change-Id: I618ec3341636b97bd71e421201b22c746dcf43e1
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-23 18:57:45 +02:00
J-P Nurmi
00b11ccdea Fix QTableView::doItemsLayout()
Keep the content aligned to the bottom when the view has been scrolled
to the bottom and the content is relayouted (for example due to
sorting).

Task-number: QTBUG-30653
Change-Id: I9513e295e276d25ff2068036cd80dbf91314fe84
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-22 18:35:52 +02:00
Frederik Gladhorn
4c231d5df3 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I059725e3b7d7ffd5a16a0931e6c17200917172b5
2013-04-22 16:35:43 +02:00
Andy Shaw
f78842abe4 Ensure the QLineEdit::returnPressed() signal is still emitted
The signal needs to be emitted directly as the event is not passed to
the QLineEdit if the QSpinBox gets the Key_Return. Since this signal
may be relied upon then we ensure it is emitted directly.

Change-Id: I17cdec62c9f995bacfd7d3cc66d6324f26c84c67
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-21 02:01:29 +02:00
Shawn Rutledge
acfccd0483 Fusion & GTK styles need to check direction from style option not qapp
An RTL menu containing a menu item which opens a submenu was showing
the wrong arrow if the application's direction was not also RTL.
So now the test for QTBUG-30595 can be simplified: no need to set
the application direction, and therefore less chance of failure.

Change-Id: Id140656206c6fefea3649289477dc54c77e2dd5e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-04-18 09:18:43 +02:00
Shawn Rutledge
4c7881396e An RTL submenu should be right-aligned
Task-number: QTBUG-30595
Change-Id: Iac54cae70b5a2ac6be5a750279fb390bb158776a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-18 09:18:43 +02:00
Janne Anttila
453e4da6d1 Fix qgraphicsview autotest build for WEC7.
logicalDotsPerInchX returns qreal, and qreal in WEC7 is defined to
float instead  double. There is no required overload:
    qFuzzyCompare(float,double)
And for that reason build fails. Ensure qreal is casted to double which
is default type used by compilers for floating point literals such as
'96.0'.

Change-Id: I24c701715b3dcf1a2137256a1c251c19d0c1dbe9
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2013-04-17 19:49:18 +02:00
Janne Anttila
4f0770eaab Fix tst_qstyle autotest build for WEC7.
Apparently testAllFunctions method has been changed to take pointer,
but code inside different WinCE defines was not updated.

Change-Id: Id15380ecc1e85650d679cb7437923ff9c77057ae
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2013-04-17 19:49:02 +02:00
Frederik Gladhorn
aa3754d105 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Iee73c93067c5822d8dd51a8692e6da9df4ba49f5
2013-04-12 12:53:13 +02:00
Friedemann Kleint
26da8c34bb Stabilize tst_qcombobox.
- Remove member variable testWidget and instantiate on the stack
  to ensure tests do not interfere.
- Move widgets away from taskbar areas.
- Fix windows geometry warnings by making small windows frameless.
- Fix wrong target widget for key click in
  keyBoardNavigationWithMouse().

Task-number: QTBUG-30573
Change-Id: I6d9fad0f212814a67367baf446750e9bed0ebdb2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-11 06:52:07 +02:00
Sergio Ahumada
90297a64f2 Merge branch 'stable' into dev
Change-Id: Icff019d74ae04c628a80f66aa478e4db40fae464
2013-04-10 15:42:22 +02:00
Andy Shaw
f5dc5225f6 When doing a PageDown or PageUp it should show the next set of cells
Before it would skip out a row depending on the size of the tableview.
Now it will show the next set of cells for the direction it is going in.

Change-Id: I02926d0b2187ffafffb63f7fff43c233b4d7d6af
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-09 22:38:32 +02:00
Stephen Kelly
b242ab7b10 Add missing wait for window shown.
Change-Id: I746a12dfa1b87a0d1393341ca3d641f73bcaee0a
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-09 19:30:14 +02:00
Friedemann Kleint
54bd1102ad Stabilize tst_qcompleter.
- Use qWaitForWindowActive in task178797_activatedOnReturn().
- Remove hardcoded timeouts, use qWaitForWindowActive/Exposed.
- Instantiate widgets on stack or use QScopedPointer to ensure
  cleanup.
- Move widgets to a central location, avoiding taskbar areas.

Change-Id: I98991b70067dddab9aa69b1681fa80398ec8b1f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-05 11:28:47 +02:00
Jan Arve Saether
9d7ae6dfbe Fixed a bug where the MaximumSizeHint of a layout with spans was wrong
This was spotted while tracking down a similar bug related to spans.
This now also eliminates the Q_EXPECT_FAILs in
heightForWidthWithSpanning(), since it now finally works.

The problem was only for the maximum size, since the size of an ignored
row/column was min: 0, pref: 0, max: FLT_MAX (the default constructed
values for a QGridLayoutBox).

Change-Id: Ibb33c26ede40ed02edd26f596ba6133d59c9962f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-04 14:23:04 +02:00
Jan Arve Saether
4f072e2d3d Fixed a bug where spans across empty cells got broken.
If a row/column is only used only because of the spanning of an item,
the cell should be treated as it didn't exist. We keep track of this
with the "ignore" bit array.

The old code would always start from the row/column at position 1.
In the attached testcase this made the effectiveRowSpan become larger
than actually needed.

Task-number: QTBUG-30255

Change-Id: Ief0e7018ee8e5ee36272ce075a43312ffeac7b91
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-03 14:52:25 +02:00
Debao Zhang
ba3418ae75 QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: I1264784d6984edc70bf07e58ed763e1d1b001d7d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-28 02:02:14 +01:00
Debao Zhang
f6e739d9e3 QtWidgets tests: Replace qFindChild{ren} with QObject::findChild{ren}
Change-Id: I79a26387bcce0d7f79f4f9f70293e97dae52f949
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 19:34:22 +01:00
Debao Zhang
1fb3d56efb QtWidgets tests: Don't use the deprecated QTest::qWaitForWindowShown()
Change-Id: I2dd5a54f9485591ca2dab65f7a352ef453c185e2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 06:01:11 +01:00
Debao Zhang
90d74f8602 QtWidgets tests: Don't call the empty function QApplication::syncX()
Change-Id: I2c732afd43586209cf5a2b72caac53e34abb9090
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 06:01:11 +01:00
Debao Zhang
f57a3c0ba3 tst_qgraphicseffectsource: Don't use the deprecated QGraphicsItem::children()
Change-Id: I0cc0c5284a675fb1c7f960e9790baa89c56112b1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 06:01:11 +01:00
Debao Zhang
d0ad02a766 tst_qtreeview: Use QRect::intersected instead of QRect::intersect
Change-Id: I4579929473a408b73f3ad9014ea30ce5a602259c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-26 10:18:02 +01:00
David Faure
a6e5ccbe22 QMdi: Don't emit subWindowActivated during StyleChange handling.
The handling of StyleChange de-maximizes the child window temporarily,
which was emitting subWindowActivated.
This would crash lokalize, because deactivating a window means deleting
the widgets associated with it, and style-change handling is done in
QApplication by looping over QApplication::allWidgets, which would then
contain dangling pointers.

Full valgrind log at https://bugs.kde.org/show_bug.cgi?id=271494#c7

Change-Id: Ifb24032cde2cd470dcae7cd553ec5ab45a919dd6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-25 10:37:37 +01:00
Samuel Rødal
2ab9b747fc Merge remote-tracking branch 'gerrit/release' into stable
Conflicts:
	configure
	mkspecs/features/qt_module_headers.prf
	mkspecs/features/qt_tool.prf
	src/angle/angle.pro
	src/tools/bootstrap/bootstrap.pro
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: Ide5759fe419a50f1c944211a48f7c66f662684e0
2013-03-21 08:49:01 +01:00
Oswald Buddenhagen
76c0be34cd Merge branch 'dev' into stable
This starts Qt 5.1 release cycle

Conflicts:
	src/gui/text/qfontdatabase.cpp
	src/gui/text/qharfbuzz_copy_p.h
	src/widgets/kernel/qapplication.cpp
	src/widgets/kernel/qcoreapplication.cpp

Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
2013-03-20 13:49:28 +01:00
J-P Nurmi
5fd509c4d7 Tests: stabilize tst_QDockWidget on small screens
The test has been recently failing in CI. The problem was easy to
reproduce in a virtual machine by resizing the window of the virtual
machine small enough. This change makes sure that the requested size
hint is significantly smaller than the desktop size, to avoid the
window manager stepping in and limiting the window size.

Change-Id: Id8ce63b2b88cbed964e0330633c5d2e1dc33598c
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
(cherry picked from commit 36e6632fa3)
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-03-20 09:58:06 +01:00
Samuel Rødal
677313fc0b Attempt to prevent tst_QWidget::scroll() from failing in CI.
Skip the test on X11 where it's consistently failing in CI but not when
trying to reproduce locally. Also attempt to make test slightly more
robust on other platforms (it's already #ifndef'd for Q_OS_MAC).

Task-number: QTBUG-30271
Change-Id: I6743eb99549abbd945e380a3a54ce8620000298a
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-20 09:58:03 +01:00
J-P Nurmi
0554341d9f Tests: stabilize tst_qwidget::scroll on small screens
The test has been recently failing in CI. The problem was easy to
reproduce in a virtual machine by resizing the window of the virtual
machine small enough. This change makes sure that the requested size
hint is significantly smaller than the desktop size, to avoid the
window manager stepping in and limiting the window size.

Change-Id: Ie319892747bee60ea6f11e27b6c1bfb4731ef587
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2013-03-18 22:32:15 +01:00
J-P Nurmi
36e6632fa3 Tests: stabilize tst_QDockWidget on small screens
The test has been recently failing in CI. The problem was easy to
reproduce in a virtual machine by resizing the window of the virtual
machine small enough. This change makes sure that the requested size
hint is significantly smaller than the desktop size, to avoid the
window manager stepping in and limiting the window size.

Change-Id: Id8ce63b2b88cbed964e0330633c5d2e1dc33598c
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2013-03-18 22:32:15 +01:00
Axel Waggershauser
b11317a643 Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.

Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp

Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.

Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 20:22:50 +01:00
Stephen Kelly
2a388e503f Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-03-13 23:35:18 +01:00
Friedemann Kleint
cc58912acd Stabilize tst_qscroller on Windows.
Change-Id: I2331f140e19ed6a2f78e48c91c653f483d8f3347
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-03-13 17:17:54 +01:00
Friedemann Kleint
b047f48612 Do not list desktop widgets and desktop screen widgets as top-levels.
Change-Id: Iea4905d802213848594d2ad0266696e5edb884f8
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-03-12 18:13:37 +01:00
Tor Arne Vestbø
bb2d95ce43 Skip more QScroller tests on Mac, they are all flakey
Task-number: QTBUG-29950
Change-Id: Ieda94dbcab3d75678597544a029c5ca6d2dc8226
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-12 18:13:37 +01:00
Caroline Chao
a410273fab Fix wrong initial position
If the widget is larger than the screen,
its title bar top left corner will be shown
inside the screen.

Task-number: QTBUG-30142

Change-Id: Id93773874be3616b3ef4b9bee6e1bb751c541d7b
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-03-12 15:59:21 +01:00
Friedemann Kleint
eccef8c936 Fix warnings about overloaded virtuals in tests (CLANG).
Change-Id: I2f96073c4aaf4b11221b98cc6c7031b253a3b45c
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-03-12 09:16:42 +01:00
Tor Arne Vestbø
77f7a8ef4c Skip tst_QScroller::scroll(), it's flakey and blocking CI
Task-number: QTBUG-30133
Change-Id: I2d91d92e49480b904dec9807d4763c461e809bd2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-03-12 09:16:42 +01:00
Frederik Gladhorn
72e5124b85 Merge remote-tracking branch 'origin/release' into stable
Conflicts:
	tests/auto/opengl/qgl/tst_qgl.cpp

Change-Id: I3c601351c984c1f4b00478d3c47ac9eeb021e892
2013-03-08 16:11:33 +01:00
Friedemann Kleint
d8e767e928 Fix warnings about unused field variables (CLANG).
Change-Id: I488ad18eb0389d1e9b8b695b7a02eca47bee687e
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-03-06 21:50:28 +01:00
Jan Arve Saether
aa2d10750a Fixed QTreeWidgetIterator to work with sorted QTreeWidget
We cannot access children directly, since that won't ensure that
the pending sort is executed. However, the functions we need are
there already and actually makes the code nicer.

Task-number: QTBUG-29903

Change-Id: I6899284275dd79b991896a5f08486b58d95f819d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-06 19:13:28 +01:00
Morten Johan Sørvig
7ee4ab1463 Cocoa: Improve expose event handling.
Send expose events on window and view show/hide
notifications. Implement QCocoaWindow::isExposed.

Close all windows on quit. This allows sending (de-)expose
events for those windows while the event loop is running.

Remove the flushWindowSystemEvents call in setVisible.
This function is called from application code. Flushing
window system events here is wrong since it can lead
to events being processed in the middle of the user
code call stack. flushWindowSystemEvents should only
be called as a result of (native) window system activity.

Skip one of the tst_qtooltip tests which becomes unstable/
fails in the CI system as a result of this change.

Task-number: QTBUG-29583
Change-Id: I3fb8b3f77e2b2e19dfeafba5d7dfcef602891d37
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-06 11:43:22 +01:00
Frederik Gladhorn
5e8ae03578 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	configure
	qmake/generators/mac/pbuilder_pbx.cpp
	src/corelib/kernel/qtimerinfo_unix.cpp
	src/plugins/platforms/cocoa/qcocoabackingstore.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/plugins/platforms/xcb/qglxintegration.cpp

Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
2013-03-05 13:42:11 +01:00
Alberto Mardegan
e3f36e7290 Make tst_qwidget more stable
This change fixes a failure of tst_qwidget under XFCE (Ubuntu 13.04).

Change-Id: Ic63e85a97ac6e44ce8c281a80ef4e83feecd9185
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-03-04 14:54:57 +01:00
J-P Nurmi
14dab5b2d7 Add QProxyStyle(QString key) constructor for convenience
The QStyle implementations are becoming private, so the following
slightly verbose pattern seems to be now repeated a lot:

    new QProxyStyle(QStyleFactory::create("windows"))

This change adds an alternative, more convenient constructor for
this particular use case:

    new QProxyStyle("windows")

Change-Id: I97ded597a0fd3225a6354ebea0abb367237430af
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-03-04 14:54:57 +01:00
Friedemann Kleint
7867f03f8a Stabilize tst_qprogressbar.
- Wait for shown to ensure events are processed.
- Move away from screen corners/potential task bar areas.

Change-Id: I2c3aa9b675c6b33ca0da67ee99cc6f76c502098a
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-27 20:17:19 +01:00
Shawn Rutledge
153d613353 Transient QWindows centered; default-constructed geometry
Default-constructed geometry does not mean put the window at 0,0,
and it does not mean center the window on the screen: it means
let the window manager position the window.  If the window is
explicitly positioned at 0,0 though, that is a higher priority
than the transient hint; without this change, the transientFor property
had no effect.  On X11, transient means use center "gravity" to
make the transient window exactly centered.  But the user can still
override the geometry of a transient window, as with any window.
On OSX and Windows, neither transient window functionality nor smart
initial positioning are provided, so a window with no position set
will be centered on the screen, and a transient window will be put
at the center of its transientParent.

Change-Id: I4f5e37480eef5d105e45ffd60362a57f13ec55f5
Task-number: QTBUG-26903
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-24 20:41:05 +01:00
Frederik Gladhorn
dcb710dd87 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	mkspecs/features/unix/separate_debug_info.prf
	src/gui/kernel/qwindow_p.h
	src/plugins/platforms/cocoa/qcocoacursor.mm
	tests/auto/tools/moc/tst_moc.cpp

Change-Id: Ieb57834c00f961a747ffe51e6eb9fc9612cebccf
2013-02-20 22:08:29 +01:00
Friedemann Kleint
4606ea5395 QProgressBar: Use localized numbers and percent sign.
Task-number: QTBUG-28751

Change-Id: I56aca3e0ee9c579297110c69d2d832c7a57f1ae7
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Karim Pinter <karim.pinter@digia.com>
2013-02-20 08:15:26 +01:00
Jan Arve Saether
18f9eb797b QStackedLayout: Fix crash when focus widget is destroyed in hide()
We also have to make sure that when moving back to a page
that has a focusWidget(), the focus should go to the focusWidget()

Task-number: QTBUG-18242

Change-Id: Ibfa7d6361c1a456480b2f1584a88ef4c4f405709
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 21:07:14 +01:00
Jan Arve Saether
64106705e7 Clean whitespace
Change-Id: Iec1950a0f4053cd71633162f0cb50efc9d4d493f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 21:06:53 +01:00
Morten Johan Sørvig
73d32873cf Cocoa: Add QMdiSubWindow size grip back.
Change all Q_WS_MAC -> Q_OS_MAC in qmdisubwindow.cpp

Remove QEXPECT_FAIL from tst_qmdisubwindow.cpp.

Task-number: QTBUG-29434, QTBUG-25297
Change-Id: I299b87ab994e2d5ba93d5bbae48de0df1ac1c9d6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-19 08:53:55 +01:00
Frederik Gladhorn
f4900d340a Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/widgets/styles/qmacstyle_mac.mm

Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
2013-02-18 16:14:52 +01:00
Tor Arne Vestbø
0768920dbd Remove ifdefs for supporting Mac OS <= 10.5
Qt5 requires Mac OS 10.6, so we can remove checks such as
if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6

Change-Id: Iea21727a277291148704ecf9677ed0b68c24920f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-18 00:31:54 +01:00
Frederik Gladhorn
e65cd6f379 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/concurrent/doc/qtconcurrent.qdocconf
	src/corelib/doc/qtcore.qdocconf
	src/corelib/global/qglobal.h
	src/dbus/doc/qtdbus.qdocconf
	src/dbus/qdbusmessage.h
	src/gui/doc/qtgui.qdocconf
	src/gui/image/qimagereader.cpp
	src/network/doc/qtnetwork.qdocconf
	src/opengl/doc/qtopengl.qdocconf
	src/opengl/qgl.h
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/printsupport/doc/qtprintsupport.qdocconf
	src/sql/doc/qtsql.qdocconf
	src/testlib/doc/qttestlib.qdocconf
	src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf
	src/widgets/doc/qtwidgets.qdocconf
	src/xml/doc/qtxml.qdocconf

Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
2013-02-14 14:24:57 +01:00
Samuel Rødal
17e8286fef Fixed mouse double click events not bubbling up to parent widgets.
The bug was caused by changes b371f3f943
and 3bb9024952, which removed the event
forwarding that QWidget::mouseDoubleClickEvent() used to do without
making sure to call ignore() on the event like
QWidget::mousePressEvent() does.

Task-number: QTBUG-29680
Change-Id: I98af8052ad3dd1dea15d07a710aa9212ef5e4a68
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-14 10:55:33 +01:00
Thorbjørn Lund Martsum
08a632ac1a QTreeView::expandToDepth - add missing emit of expanded and collapsed
Just like other functions this function should emit expanded and
collapsed.

A part of fixing
Task-number: QTBUG-8176

Change-Id: I6d801f61e6f0cb8836634cc52f0be2b610f6c728
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-02 08:10:55 +01:00
Friedemann Kleint
40eaa72319 Do not run tst_qfilesystemmodel for MinGW.
Task-number: QTBUG-29403

Change-Id: I91c938d9a6510ae91e54cd53e2d9df0a56b68d50
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-02-01 09:18:42 +01:00
Thorbjørn Lund Martsum
3260aec38e QTreeView - emit collapsed in collapseAll()
When we call call collapase we emit collapsed. Therefore it should
also be emitted on collapseAll()

This partly solves:
Task-number: QTBUG-8176

Change-Id: I20c1388fcbbb60d12debb4a0b3b0d9fed41e2563
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-31 13:12:40 +01:00
Thorbjørn Lund Martsum
80fa4b6c8e QTreeView - emit expanded on expandAll
When we call QTreeView::expand expanded is emitted.
For the same reason we should emit expanded on expandAll()

This partly solves:
Task-number: QTBUG-8176

Change-Id: Ie85e724eec50980c68f626ec47dec5c1e08cc085
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-01-31 13:12:32 +01:00
Sze Howe Koh
52a317092e Doc: Fix references to Qt Test
QtTestLib and QTestLib don't exist. The proper name is "QtTest" (code)
or "Qt Test" (English)

http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation
http://lists.qt-project.org/pipermail/interest/2012-December/005221.html

Files paths in qttestlib.qdocconf can't be changed easily however, as it
breaks things. So, they're left as they are.

Change-Id: Ifbc44ea858c453bedad8cd7723f847e67fc7a85a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-01-30 01:35:06 +01:00
Frederik Gladhorn
3eb588078e Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-29 11:33:35 +01:00
Stephen Kelly
d315e01218 Add the Qt::ItemNeverHasChildren flag and use it in QTreeView.
It can be used to determine whether expand() should really expand.

Change-Id: If79d8c295a4ca1356e60051682b227524a065126
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-01-29 09:28:43 +01:00
Friedemann Kleint
00ad768f10 Do not execute tst_qfilesystemmodel in parallel.
It may interfere with other file system tests.

Task-number: QTBUG-29014
Change-Id: I32dd7428993b0da1a2f70ec3e581050012a4ff32
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-29 07:30:45 +01:00
Pasi Petäjäjärvi
f3fc2078b8 Check existence of QProcess feature before using it on Qt autotests.
VxWorks does not have QProcess support.

Change-Id: I917b769f967e9d71ec5025aae788f3e237b07aeb
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
(cherry picked from commit 416e73a0fc)
2013-01-28 16:06:15 +01:00
Frederik Gladhorn
02ba93dd3d Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
2013-01-28 11:10:29 +01:00
Friedemann Kleint
322055b9c9 tst_qfilesystemmodel: Avoid commonly used folders.
Use the test's temporary directory instead of
QDir::temp() and the documents folder
instead of QDir::home(). Split out unrelated test
from data-driven sort test.

Task-number: QTBUG-29014

Change-Id: I229f0b1c0f1e43b56d19ebd43fd7cc64a85b1222
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-28 09:41:39 +01:00
Mitch Curtis
5c5c9c26d2 Don't emit activated on clicking disabled itemview item.
A itemview item with its flags set to Qt::NoItemFlags is considered
disabled, and therefore should not cause the activated signal
to be emitted.

Task-number: QTBUG-20490
Change-Id: If824505c46f4fcadb9265ad6d1e9337f0cee32cf
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-26 21:22:22 +01:00
Gunnar Sletta
64134181db Introducing QWidget::createWindowContainer()
A QWidget that can embed a QWindow. This can be used
to embed a QWindow/QOpenGLContext based window or a
full QQuickView.

Change-Id: I8415b5ae38562fc00b46150fa70b56fd9b19a80c
Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-25 14:11:07 +01:00
Frederik Gladhorn
627d9cbd3c Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/windows/qwindowsdialoghelpers.cpp

Change-Id: I4ca87d44129fa5c1d8541cd58b8d62bc69080688
2013-01-24 16:02:55 +01:00
Frederik Gladhorn
4730742f69 Stabilize tst_qabstractslider
When simulating hight load, this test failed 4 times out of 80 runs
on my machine.
With this patch I could no longer reproduce the failure.

Change-Id: I42748de0200b9094c8facf0e33f3794002ec1d01
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-24 15:16:19 +01:00
Andreas Aardal Hanssen
6476d6728e Make sure QGraphicsItem notifies changes to focusScopeItem.
A glitch in QGraphicsItem's logic made it update the focusScopeItem
pointer, but fail to notify the change to QDeclarativeItem through the
d_ptr->focusScopeItemChange() virtual function, hindering
QDeclarativeItem from emitting focusChanged() correctly for focus
scopes that do not have focus.

Two lines were moved, and a comment updated to reflect the reason
why the "return" is needed at this point. It's clear that the
calls to focusScopeItemChange() are unrelated to the return.

Task-number: QTBUG-29260
Change-Id: I12ba9161b16d34c3689401a92c86d2047989f7bd
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Alan Alpert <aalpert@rim.com>
2013-01-24 02:20:34 +01:00
Frederik Gladhorn
7df08a8b63 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-23 22:12:54 +01:00
Gunnar Sletta
2692db542e Implement focus handling of child windows for cocoa.
Change-Id: I1e05ef39aa67f8febdd27215d8ad05d26ece7caa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-01-23 12:41:35 +01:00
Pasi Petäjäjärvi
416e73a0fc Check existence of QProcess feature before using it on Qt autotests.
VxWorks does not have QProcess support.

Change-Id: I20ed479125097d468a1aa50afb18c3749f0fbb98
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:59 +01:00
Frederik Gladhorn
c608ec8254 Merge remote-tracking branch 'origin/stable' into dev
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
2013-01-22 18:40:13 +01:00
Friedemann Kleint
aacf4d0263 Fix a crash when minimizing a QQuickWindow.
Send empty expose event and flush queue when minimizing.

Task-number: QTBUG-28439
Task-number: QTBUG-26424

Change-Id: I2e921a86660f946ced7af735cdf197fb666e2934
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-18 15:42:59 +01:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Frederik Gladhorn
7075e29199 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/widgets/styles/qstyleanimation.cpp

Change-Id: Iae570895be6544de80f9c1ec309d1a08c59daff8
2013-01-16 01:22:45 +01:00
Orgad Shaneh
b6963f109a QMenu: Fix nested popup when keyboard shortcut is used
Task-number: QTBUG-20403

Change-Id: I2a5fe00dd16e9dc1ec0d742a8f48083fc2954996
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2013-01-14 16:28:21 +01:00
Jędrzej Nowacki
63c68cadec Enable tst_qwidgetsvariant test
The test for a magic reason was not build by default.

Change-Id: I21c7fc959d76d6faac0091495f965f3da6d415b1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-11 12:02:21 +01:00