Commit Graph

753 Commits

Author SHA1 Message Date
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