When clicking on a widget currently focused, w/o having Qt::ClickFocus
set as focus policy, the focus should stay on the widget and not get
propagated to the widget's parent.
Task-number: QTBUG-34042
Change-Id: I53f1153829cc7228de02a90e38125b5cf4ee5008
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
We claim that -1 is a special automatic value, but calling
setMinimumSectionSize with -1 is unfortunately ignored due a
regression in 524c3e05e8
Change-Id: I7d7e5dbbf78e561849d2f2352c9edb2df36aa181
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Center windows on screen to avoid conflicts with Unity taskbars,
observe minimum geometry for Windows, move cursor out of the
way for Mac. Introduce QScopedPointer to ensure cleanup in
case of failures.
Change-Id: Ic169e015e795597457b8e85a28ff7fcb7b9b9430
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
It's not really clear if styles *must* return a non-negative value for
QStyle::pixelMetric(PM_Layout{Vertical,Horizontal}Spacing), but both
QBoxLayout and QGridLayout seems to be robust enough to handle this.
They will simply make sure that the spacing is never negative.
We therefore make QFormLayout equally robust.
Task-number: QTBUG-34731
Change-Id: I62235bfcd8adf7757cf15bc9927b29650ae6459d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
As the test case shows, clear() is semantically equivalent to
setKeySequence(QKeySequence()), so implement it that way.
Change-Id: Id68edbbf85aac3bcff82c81310c38274ed8e6708
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
It introduces QTBUG-34653 (Qt Designer widget box no longer
repainted after collapsing items or using the filter).
This reverts commit 04de24c644.
Task-number: QTBUG-13522
Task-number: QTBUG-34653
Change-Id: Ieb9766e7f15acea901fce4ad7142aa72557b9957
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
The grabbing always grabbed the desktop. This caused it to also grab
tooltips, siderbars etc that could overlap the window which again
caused the pixmap comparison to obviously fail.
This will currently only fix it on windows. If needed, it should also
be fixed for other platforms.
Task-number: QTBUG-30566
Change-Id: I5cee8651e1d94dedded0acae8b19f351acd976c4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Check if the item is hidden before show the item(QWidget)
Task-number: QTBUG-13522
Change-Id: I1c605d5cb8a80f340e9b7601612d3760f51cb4a7
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Pass window flags on to ColorWidget constructor and use a window
frame + stay on top-hint for the moveChild/showAndMoveChild tests
to make the screen grabbing more reliable.
Disable animations on Windows since they seem to affect screen
grabbing as well (fading in of windows).
Task-number: QTBUG-30566
Change-Id: I8eacfc203d26674dc1b283d6643f3d434f218f26
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Only Commit, Finish and Cancel didn't have an object name, yet.
Also Extract Method on the switch statement, add a test, and
use QStringBuilder.
Task-number: QTBUG-29924
Reported-by: Leo Arias
Change-Id: I8c29606bc53e9d4caab631da2089e971a9da2d75
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
After Ic12de12ec51c20de52d040514e90be5e783add43 this functionality
was broken. Added an autotest.
Task-number: QTBUG-34159
Change-Id: I8f41b7073dc57fea855ab87796f09e8a91520d13
Reviewed-by: David Faure <david.faure@kdab.com>
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>
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>
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>
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>
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>
Position cursor outside and move once more.
Task-number: QTBUG-33972
Change-Id: If060f1359361981cf1243d8d2a4ebef181689d74
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
"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
1e14762b8de4b2a0b4badf7944e7d7
Change-Id: I80b65b5ee0297b090f807bd420664233dfc44f7b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
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>
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>
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>
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>
Done with Jan Arve
Task-number: QTBUG-33104
Change-Id: I8319748536d448d1c37a26527ced53156d8c2f56
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
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>
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>
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>