Commit Graph

3105 Commits

Author SHA1 Message Date
Konstantin Ritt
3791d21f72 Update Qlocale data up to CLDR 22.1
Change-Id: Ie6ddfec14cb052e0b89230dc93290ff79488fb25
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-21 18:23:59 +01:00
Konstantin Ritt
4a115ab4ae Update Qlocale data up to CLDR 2.0.1
Change-Id: I4279fac57436d7009a6d61dab5936b72fd39fc14
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-21 18:23:59 +01:00
Konstantin Ritt
fe8962d3a5 Use likelySubtags to instantiate a locale id from it's short form
...just like described in http://www.unicode.org/reports/tr35/#Likely_Subtags.
This is much more effective than current "guessing" algorithm
+ makes it possible to instantiate a locale by the script or territory code only.

Change-Id: I674f8476e65b01c56960b6e83a1a346df0715274
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-21 18:23:59 +01:00
Konstantin Ritt
e7c79face6 [SIC/BIC] QLocale: update enums up to CLRD 1.9.1
This patch adds some missing codes (two-letter ones only),
removes an outdated ones, and updates some names.
The legacy language codes are handled in QLocalePrivate::codeToLanguage()
(fortunately, there are only 4 of such codes).

Change-Id: Iff50aecd1c762b6399cd151aebb955f341d366c6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-21 18:23:59 +01:00
Thorbjørn Lund Martsum
37eb61677c uic - fix to handle QTreeWidget with empty header(s)
This makes it possible for uic to handle QTreeWidget that in
the designer has one or more empty headers.

Before the right(most) empty items where there wasn't a
non-empty header to the right of them would not be visible.

The other empty items - where there was a header to the
right of it would not be empty but initialized with a number.

This patch ensures the same behavior that the QTableWidget
is having.

Task-number: QTBUG-18156

Change-Id: I19bfd3307befe46a1af2d6a3275f7446a15b3442
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-21 16:36:50 +01:00
J-P Nurmi
bb5e45d0a0 Made QWindowsXPStyle internal
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy and even merging style
implementations (XP & Vista) later on, without worrying about BC.

=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QWindowsXPStyle directly.

Change-Id: Ib4fec35c2fcb3b5a193537a1de5b6e26fbbe0a06
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-21 16:36:50 +01:00
J-P Nurmi
537efea52b Made QWindowsVistaStyle internal
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy and even merging style
implementations (XP & Vista) later on, without worrying about BC.

=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QWindowsVistaStyle directly.

Change-Id: I8b320036e241e877fc9bb5f4084cc6e63756cbc4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-21 16:36:50 +01:00
Bernd Weimer
146f63bea4 BlackBerry: Changed QSettings file access
On the BlackBerry platform, applications run in a sandbox. They are
not allowed to read or write outside of this sandbox. Hence in
QSettings there is no use for the system scope and differentiating
between organization and application. This change will also improve
performance.

Change-Id: I79fee0140595385f3d33bd89fe5daa36b04836bc
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alan Alpert (RIM) <aalpert@rim.com>
2012-11-21 16:36:50 +01:00
Jonathan Liu
96361d82c9 Fix MinGW compilation for tst_qwinoverlappedionotifier
Change-Id: I664761e7e6fd1c00067ae1def496ba4974e539be
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-21 14:08:12 +01:00
J-P Nurmi
9bc49b0bca Made QFusionStyle internal
We will take this opportynity to remove various QStyle specializations
from the public API in Qt5. This gives us much more freedom, for
example changing the inheritance hierarchy, pluginizing etc. without
worrying about BC.

=> Use QStyleFactory and/or QProxyStyle instead of creating an instance
or inheriting QFusionStyle directly.

Change-Id: I37d8acb13b6fd328a9cd53c74df971428bbbe443
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-21 11:03:48 +01:00
Jan Arve Saether
035d93a6e1 Fix regression in QXmlStreamWriter with codec set to UTF-16
Actually, this broke using QXmlStreamWriter with any codec
where characters in the ASCII range have a different encoding
than the ASCII standard.

This was a regression from 558fe9383ba0aecbec09cc411c0ebab132aac137

Task-number: QTBUG-23310

Change-Id: I75bd013e9d5de53da564a76c2f06e95ff35303a8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-20 18:53:49 +01:00
Konstantin Ritt
da90a3a490 QLocale: replace hard-coded default country-for-language map
...with a generated one in a way similar to what
http://www.unicode.org/reports/tr35/#Likely_Subtags suggests.
The supplemental/likelySubtags.xml contains all the required data.
This changes some default countries to a most-expected ones.

Change-Id: I920a5623601d8661a943e78197d3bcc838191483
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-19 21:18:03 +01:00
Aaron McCarthy
7456562e7f Fix error reporting in TDS SQL driver.
The error and message handlers used by the freetds library were getting
reset to back to the default every time a database was opened.  The
Qt TDS SQL driver was calling dbinit() from QTDSDriver::open().  This
had two problems:

1. dbinit() would reset the error handler previously set by a call to
   dberrhandle().  A db error would then cause the application to
   abort.
2. freetds expects dbinit() and dbexit() to be called symmetrically.
   Opening multiple database connections would result in freetds not
   cleaning up on application close.

Solved by moving the dbinit() call into the QTDSDriver constructor.

Change-Id: I59018d83238672c903b96a4d7f3f21b664c3ff4c
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-11-18 23:13:29 +01:00
Giuseppe D'Angelo
8cb319939a Fix QStringList::sort test
Checking that the result of sort() is a specific list is wrong,
as sort() can put equivalent elements in an arbitrary order.

Change-Id: Ib06399cdecedb6cf01e721d4d92048449d66b40d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-16 06:38:01 +01:00
Olivier Goffart
2b308d4cb5 Fix QMutex::tryLock timeout computation on Linux
The timeout is in millisecond. So we just need to divide by 1000 to get
the number of seconds

Regression introduced in f587e8f4fd
Reported in the comments of QTBUG-24795

Change-Id: Id16e05e7d04d33605860926f7516d14cdefd6a36
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-16 01:37:01 +01:00
Samuel Rødal
9b62b01ddd Disable static contents optimization for now.
Since none of the platform backingstore implementations currently
implement this, skip trying to use the optimization for now to avoid
graphical glitches.

Task-number: QTBUG-27971
Change-Id: Ic6d263bb552ef0b4786910d71f965d26d810b7eb
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2012-11-15 18:15:50 +01:00
Thorbjørn Lund Martsum
fc271b4273 Regression fix to QHeaderView::setDefaultSectionSize
When the sections has been resized we need to calculate new values
for the section start-positions. Otherwise we break visualIndexAt
and sectionPosition.

This fixes a regression introduced in
b800d8b94a

Change-Id: I148dbf44f742208787ed59b70d82b8048d721e90
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-15 13:55:00 +01:00
Miikka Heikkinen
b8be2e67ea Change to enter/leave policy while grabbing.
Sending enter and leave events to other windows than the grabbing
window is not logical. The policy should be that only the grabbing
window receives enter and leave events.

Changed the documentation accordingly and provided the necessary
changes to Windows implementation.

Also removed explicit leave event generation for widgets when
popup is opened as that is now redundant.

tst_QWidget::underMouse() test was changed to behave according to
new logic.

Task-number: QTBUG-27871
Change-Id: I127fb8685b4a4206d1a319f42cba491ec02bc8ca
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-15 11:59:34 +01:00
David Faure
7721c3d27c QMimeDatabase: Fix handling of duplicate mimetype definitions.
When both freedesktop.org.xml and kde.xml define text/x-qml (*.qml),
the XML provider would look up *.qml, see two mimetypes, and treat that
as a glob conflict, and proceed with contents-based-determination,
which for this sample file, would find "C source" due to the C comment.

Fixed by ignoring duplicate pattern-mimetype associations.

The binary-cache provider doesn't have this problem, update-mime-database
already filters out duplicates when generating the on-disk extension tree.

Change-Id: Ie335b0b419e7413fa0550779709513f68c2bfc68
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-14 14:18:31 +01:00
Gabriel de Dietrich
9346cb9552 Widgets: Stop cursor blink timer when QLineEdit is read-only
This prevents unnecessary updates, since the cursor is not visible.

Change-Id: Iec54ed338a0cb526a03cd611de4d823e26f3d804
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-14 14:18:31 +01:00
Friedemann Kleint
39a0952687 Send enter to the child at the position of the QEnterEvent.
This was apparently done so in each of the widget_<platform>.cpp
in Qt 4.8. This then causes the cursor to be updated in
dispatchEnterLeave() on Windows and Linux.

Task-number: QTBUG-27871
Task-number: QTBUG-27585
Task-number: QTBUG-26424
Change-Id: Idf14cd96ccb36f7c2607853ed8b0024c36a5413c
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-11-14 10:36:38 +01:00
Andreas Aardal Hanssen
f3597af5ad Fix zero-duration animations running Backwards.
If you set the duration of any variant or property animation to 0,
its progress will be stuck at 1 (0..1), and its "end" value set on
the target object, after start() has been called. If you change the
direction of the animation to QAbstractAnimation::Backward, you
would expect the progress to be 0 after start. Instead it's still
1; the code seems to assume that if the duration is 0, the
progress must be 1 always.

The fix is that if the duration is 0, the direction is checked to
determine whether progress should be 0 (Backward) or 1 (Forward).

Task-number: QTBUG-27969
Change-Id: Ibeca084bbbce41df1dca7b7d96c15b6b54394996
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Thierry Bastian <thierryb@filewave.com>
Reviewed-by: Magne Zachrisen <mazachri@cisco.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-11-13 15:34:56 +01:00
Samuli Piippo
5208de1691 tests: Mark tst_qfilesystemmodel as insignificant on Mac
Task-number: QTBUG-27890

Change-Id: I8af9f019c00d38551ce04b4cdb4bb895a61a50c5
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
2012-11-13 07:59:40 +01:00
Konstantin Ritt
09d0f2d447 test: Remove Q_WS_X11 from tst_QTextScriptEngine
remove private->public hack, make it build on all platforms;
replace homebrew testing code with QtTest based one

Change-Id: Iaed93fd21938620e58ae90189456df1b8061f2f5
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-11-11 12:10:57 +01:00
Jędrzej Nowacki
21c07f56e2 Fix a warning on compilers not supporting constexpr.
Macros should call QSKIP instead of creating a semi-empty function body.

Change-Id: I389701f618fe9bf0a40aa26f161620389a80e407
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2012-11-11 12:10:49 +01:00
Friedemann Kleint
2d07d3b4e3 Add a QEnterEvent containing the mouse position.
Enter handling requires knowledge of the mouse
position. Extend the enter handling of
QWindowSystemInterface to receive the position
(implemented for Windows, XCB and Mac), passing it
on to QEnterEvent. Dispatch QEnterEvent from
widgets code.

Change-Id: I49c07d2b1f46310c877017dd55d4cd7d636bdbce
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-10 20:08:28 +01:00
aavit
d91c1422a9 Fix GIF image decoding: do not zero transparent pixels
For the special transparent color index, the decoder would skip
writing anything out (thus leaving the pixels at 0 rgba value).
Although correct for later frames, for the initial frame this would
loose the color information for such pixels (which one otherwise
could have made visible e.g. by converting then image to an
alpha-less image format).

Change-Id: I316cefce8f21797feedebfbf98296ad84eaa4b99
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
(cherry picked from qt/c309d424f45dc0e7b62fbbbabf20dbfe355f48a7)
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2012-11-09 16:07:51 +01:00
aavit
f4a8e940ed Qt5 updates to the QPainter lancelot autotest
a) Use the new Qt5 OpenGL API for testing of GL painting
b) Simplify: Use the higher-level QBaselineTest API instead
of the low-level baselineprotocol API.

Change-Id: Ib5f47f6fe68837dfdc8dc3a74638c5cb0b724614
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2012-11-09 16:07:44 +01:00
Liang Qi
8e722eb85a test: fix tst_QLocale::macDefaultLocale
1. There is a behaviour change for CFDateFormatterGetFormat() between
10.6 and later, QLocale::dateFormat(QLocale::LongFormat) will return
"MMMM d, yyyy" for 10.6 and "MMMM d, y" for 10.7, 10.8
2. Add a comment for toCurrencyString() test, need another system
settings

Task-number: QTBUG-27790
Change-Id: I4fe684d6e0c1d4a140e3b1f1ef395b7fdad030b4
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-11-09 08:25:51 +01:00
Mark Brand
593b8f7f0b fix binding of bool type in mysql driver
MYSQL_TYPE_TINY should be used for binding bool input value.
MYSQL_TYPE_LONG might be too big for bool, resulting in bools being
saved in the database as int 127. The problem was not specific to
the vendor's BOOL column type.

http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html
http://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statement-type-codes.html

Added generic autotest to make sure that binding bool works. All
drivers should pass this test.

Task-number: QTBUG-27763
Change-Id: I4e69f8e3b32fffb702ec9fa8a80ff5c50dea954b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-11-09 00:37:42 +01:00
Samuli Piippo
acf959bee6 test: Mark tst_QLocale::macDefaultLocale as XFAIL
Task-number: QTBUG-27790
Change-Id: Ida33d9579df4ef35d0323546f4d89596e159cb8e
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
2012-11-08 20:58:39 +01:00
Frederik Gladhorn
4c1c8207b9 Accessibility Linux: Do not depend on external libatspi2
This has (and still does) caused lots of grief since
it means accessibility was often unintendedly not built.

Instead copy the lib-at-spi-2 header file needed for the
type enum and build it by default again.

Change-Id: I1ba26f20edff1aeb444c96a37928f36230ac7576
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-11-08 16:59:50 +01:00
Oliver Wolff
d2e5c7787e Do not call QWidget::show/hideEvent twice
While handling events for Widgets and Windows in QWidgetWindow::event
makes sense for other events, it causes QWidget::show/hideEvent to be
called twice when handled like "the rest". Having that as one case here
seems to be the cleanest solution. Removing the call to showEvent from
QWidgetPrivate::show_helper (as proposed in the bug report) causes
autotests to fail and thus is not a viable option.

Additionally the expected result for the task221221 test for
QDoubleSpinBox was reverted to the Qt4 value as Qt4 behaviour was
restored.

Task-number: QTBUG-27199
Task-number: QTBUG-26424
Task-number: QTBUG-22565

Change-Id: I0ac42b09b1a7618de042d27aa5dd1b3d9f30f552
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2012-11-08 15:01:52 +01:00
Shawn Rutledge
672e7c875e Remove QWindow pos, geometry and size as properties; pos->position
Abbreviated properties are to be avoided.  But all 3 of these
properties are redundant from the QML perspective; and because QRect,
QPoint and QSize are (wisely) not QObjects, it's not possible to bind
to _their_ properties, which make these QWindow properties less useful
than users might assume that they are.

Change-Id: I19c00b54b1d2712f9418e8bcf56e35a8008b89ef
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-08 15:01:30 +01:00
Oliver Wolff
9be15cc1dc Enabled QSystemSemaphore autotest
Change-Id: Id7133c46bbde554b2df69edacf9bfe808498a541
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-08 08:26:19 +01:00
Sergio Ahumada
fdd94ef17c test: Remove CONFIG += testcase from tst_bench_qnetworkreply_from_cache
Benchmark tests are not supposed to be run by "make check"

Change-Id: I718565a8b4e71c136c7aa8f9bd95f95c5fdafab8
Reviewed-by: Rohan McGovern <rohan@mcgovern.id.au>
2012-11-07 23:16:04 +01:00
Shawn Rutledge
cd34da5426 Rename all QWindow properties that have "window" in them
windowTitle, windowModality, windowIcon and so on are named that way
to be similar to the ones in QWidget.  However QQuickWindow inherits
all of the declared properties, and we would like to have shorter
property names in QML.  If you are working with a Window then it's
obvious the title property is the window title.  Unfortunately,
there must be patches in many other modules which depend on this one.
In order to avoid the need to merge them all at the same time,
there is also patch https://codereview.qt-project.org/#change,39001
which temporarily adds backwards-compatible accessors, which can be
removed after the other modules are able to build without them.

We should not rename windowState to state, because in QML, state
usually drives the state machine for animation transitions etc.
(although QWindow is not an Item, a user might get confused about it).

Related patches are
https://codereview.qt-project.org/#change,39001
https://codereview.qt-project.org/#change,37764
https://codereview.qt-project.org/#change,37765
https://codereview.qt-project.org/#change,37766
https://codereview.qt-project.org/#change,37762

Change-Id: Ie4424ec15fbdef6b29b137f90a2ae33f173edd21
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-07 21:26:08 +01:00
Oliver Wolff
dd904c3c48 move QSharedMemory autotest from qtscript to qtbase
As the script dependency for that autotest is not really needed it should
be moved to qtbase.

Task-number: QTBUG-27706

Change-Id: Ieda8b2182a20a77f53a0be9878e82e3236c79c2b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-07 16:25:47 +01:00
Christian Strømme
9d0afa2ab0 Remove out-of-memory test in QVarLengthArray.
No reason to keep this test. If an application is trying to allocate too
much memory it will fail, and its the users responsibility to provide
sane values and catch exceptions to recover.

Task-number: QTBUG-27361

Change-Id: I29d71745ab791b6e8a76f7b1f866ff4bd7024749
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-07 14:19:00 +01:00
Julien Brianceau
07ea3cf0b3 qpa: Fix rendering issue in blitter engine (negative scaling factors)
A 180° rotation results in a TxScale QTransform with negative scaling
factors (x=-1.0 y=-1.0). This is not properly handled by blitter paint
engine yet, so use software rendering fallback in this case.

This rendering issue can be seen when using "-webkit-transform" CSS
property in WebKit with DirectFB QPA platform.

Change-Id: Iee496b6bf0c90ffe36c4235ceaa2c80f296b2ca4
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-07 14:19:00 +01:00
Oliver Wolff
6a2e965a34 Fixed QSystemSemaphore autotest for "check" target
As CI runs autotests using the "check" target the approach using
DESTDIR = ../ does not work for the test. Instead the binaries are just
moved one directory up and QFINDTESTDATA is used to find the path of the
helper binary.

Change-Id: If1ed2b60821f1de4ac62f238c8af5e09cf0f444a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-07 14:19:00 +01:00
Miikka Heikkinen
285f4daa47 Re-enable some skipped tests in tst_qwidget
Seems that these tests are now passing on Windows, so remove the skips.

Change-Id: Id30ef544502f97f8bc84f35f635e39912da3afe8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-07 14:19:00 +01:00
Friedemann Kleint
f09d434987 Extend widget grab test.
- Add enter/leave logging.
- Add button to enforce native widgets.
- Make mouse event logging more verbose.

Task-number: QTBUG-27800

Change-Id: I23160244bef6cb0b8d505cbf118cf12d91621fe7
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-11-07 12:19:14 +01:00
Miikka Heikkinen
dde3f6a934 Fix excess enter events when showing modal dialog on button press
QApplicationPrivate::leaveAfterRelease was not properly cleared when
mouse event handling was interrupted by a modal dialog, which caused
every mouse move over the modal dialog to trigger enter event to the
widget under cursor.

Fixed by clearing QApplicationPrivate::leaveAfterRelease if mouse event
without any buttons pressed is handled.

Task-number: QTBUG-27643
Change-Id: I4f31daa656bc643c88e5338282a671ae2077e255
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-07 08:44:38 +01:00
Miikka Heikkinen
715902051a Fix inconsistent leave/enter events for main window when popup is open
Changed the platform leave event handling logic in QWidgetWindow to
match platform leave event handling logic in Qt4, where last mouse
receiver is used as leave target only if last mouse receiver wasn't
a native window itself. In that case it is assumed to get leave event
of its own when relevant.

Task-number: QTBUG-27639
Change-Id: Id6edcd29754a15c959f18ab38b20d66e5d446510
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2012-11-06 20:26:43 +01:00
Olivier Goffart
029cc40c2a Allow connect to functors with less parameters than the signal
Before, the functor slot (or lambda expression) had to have the same amount
of arguments as the signal.
This shown to be a big problem to be able to connect to signals that had
a QPrivateSlot.

This implementation use the type of the operator() of the functor to
know how many arguments we have.
As a bonus, we also can check the arguments in a static assert.

The test comes from https://codereview.qt-project.org/#change,38703
But this patch also works without variadic template

If the compiler does not support decltype, we workaround the lack of it
by using another level of indirection.

Change-Id: I9850b43e8caf77356a2ec3f4c0b0ed532d96029e
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-06 18:43:14 +01:00
Frederik Gladhorn
6952a9be5b Make test class name consistent with file name.
Change-Id: I2b0e7068d7476673981c7c7f03012db8eabc8ee2
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-06 15:02:29 +01:00
Olivier Goffart
cf1eb70070 Fix connection to const slots (or from const signals)
Pointer to const member function have a different signature, and hence
need their own traits code.

Change-Id: Ie4b2434a412f412444fb07ef1388a37cab105ecd
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-06 09:18:54 +01:00
Peter Kümmel
6eb0ef546a Add OOM unit test for QVarLengthArray
Change-Id: Idf22ee6747aca8f0322e68b71f2c32e9ea562d4c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2012-11-06 05:33:28 +01:00
Frederik Gladhorn
df0a43519e Accessibility: clean up and simplify test
We don't need to define pi.
Use some clearer names in navigateHierarchy.
Use smart pointers.

Change-Id: I482efe9235a3419f048baede6886d29d46e3057c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-05 19:05:04 +01:00