Commit Graph

27461 Commits

Author SHA1 Message Date
Jani Heikkinen
cd46a2daf5 Unify license header usage.
Update files using old header.LGPL3 to header.LGPL
Update files using old FDL template to use new one
Update files using old BSD template to use new one

Change-Id: I36a78272516f9953d02956522f285b40adfc8915
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-29 10:20:03 +00:00
Simon Hausmann
487844fc62 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I13c7ea6a74eb98606cf45702ae068101943bec6a
2016-03-24 20:37:33 +01:00
Alexander Volkov
6cacd19db5 Don't propagate unsolicited events from QWidgetWindow to QWidget
Show and Hide events were not propagated before this change.
Add Timer, DynamicPropertyChange, ChildAdded, and ChildRemoved,
because they are supposed to be delivered to one QObject.

Also don't propagate these events if WA_DontShowOnScreen is set.

Change-Id: I134bf3909d46141e4d3e39f41983f493a4f35478
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-24 16:37:01 +00:00
Marc Mutz
aedda12ef1 tst_QAtomicInteger: fix UBs (signed overflow)
Drop addSub() test. It executes exactly the union of fetchAndAdd()
and fetchAndSub(), which have already had their UBs fixed.

No need to do fixes in duplicated code.

Change-Id: Ib72caab0310fce3ff9a40c261d8a38518f91ecaf
Reviewed-by: David Faure <david.faure@kdab.com>
2016-03-24 16:16:15 +00:00
Joerg Bornemann
24411e9743 Add a write buffer to QLocalSocket/Win
Commit 0307c008 removed the buffering of data-to-be-written from
QWindowsPipeWriter, because it was assumed that users of this class
(QProcess and QLocalSocket) already buffer data internally.

This assumption was wrong for QLocalSocket. The following sequence
    localSocket->write(someData);
    localSocket->write(someMoreData);
would not write anything on the second write.

Add a write buffer to the Windows implementation of QLocalSocket.

Task-number: QTBUG-52073
Change-Id: I6d0f03a722ec48138cbde3e2f69aae7dafe790d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-24 16:12:46 +00:00
Friedemann Kleint
4ed048dded qNonConstOverload(): Fix documentation typo.
Amends change 14b79ae2b3.

Change-Id: I4e17965e877002be1fe3cad25001d5d164d1c128
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-24 15:38:58 +00:00
Friedemann Kleint
9a96eb00c4 Add mime type browser example.
Add an example showing the types in QMimeDatabase in
a QTreeView with detailed information on click.
The example has menu options to detect a file type
and search by name.

Change-Id: If6f1a6661edd100a54460a49562a8a8667245ddb
Reviewed-by: David Faure <david.faure@kdab.com>
2016-03-24 13:03:02 +00:00
Friedemann Kleint
14b79ae2b3 Fix some documentation warnings.
qtbase/src/corelib/io/qnoncontiguousbytedevice.cpp:87: warning: Cannot find 'atEnd(...)' in '\fn' virtual bool QNonContiguousByteDevice::atEnd()
qtbase/src/corelib/io/qnoncontiguousbytedevice.cpp:107: warning: Cannot find 'size(...)' in '\fn' virtual qint64 QNonContiguousByteDevice::size()
qtbase/src/corelib/io/qsettings.cpp:2387: warning: Unexpected '\endlist'
qtbase/src/corelib/kernel/qcoreevent.cpp:90: warning: Undocumented enum item 'Pointer' in QEvent::Type
qtbase/src/corelib/kernel/qmetaobject.cpp:346: warning: No documentation for 'QMetaObject::inherits(const QMetaObject *metaObject)'
qtbase/src/corelib/statemachine/qsignaltransition.cpp:154: warning: No such parameter 'sourceSate' in QSignalTransition::QSignalTransition()
qtbase/src/corelib/global/qglobal.cpp:945: warning: Undocumented parameter 'memberFunctionPointer' in qConstOverload()
qtbase/src/corelib/global/qglobal.cpp:956: warning: Undocumented parameter 'memberFunctionPointer' in qNonConstOverload()
qtbase/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc:519: warning: Command '\snippet (//! [96])' failed at end of file 'code/doc_src_stylesheet.cpp'

Change-Id: I7da69b9b535f484e10ca030dbf64b6007dce0df3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-03-24 13:02:58 +00:00
Rolland Dudemaine
531e449f93 Disable some examples for INTEGRITY.
They depend on unsupported features.

Change-Id: Ia18c1560fc5cc321efb05cd3165e3e1c4b0e758f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-24 13:02:53 +00:00
Simon Hausmann
f75d950bd4 Fix typo in QLocalServer documentation
Change-Id: Iceababb1e137c2363ee8a75476ecb4f5dba53b28
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-24 09:08:32 +00:00
Marko Kangas
b7022d782a Fix Fusion style combobox dirty lines in HiDPI mode.
Tuned combobox item highlight outline to avoid
dirty lines when painting in HiDPI mode.

Task-number: QTBUG-45600
Change-Id: I3c4aab91b2d32733bd2561424052034a3d9c26a3
Reviewed-by: Marko Kangas <marko.kangas@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2016-03-24 09:05:53 +00:00
Giuseppe D'Angelo
4ca7785161 QAbstractItemView test: check that the selection model is in sync with the view
Change-Id: Ifca91154b47184a9d9a1979e1fba471517e16698
Reviewed-by: Stephen Kelly <ske@ableton.com>
2016-03-23 22:10:07 +00:00
Gabriel de Dietrich
060e0f6628 minimal QPA plugin: Use fontconfig DB if available
This makes minimal a bit more useful for apps needing to access
QFonts from non-UI environments.

Change-Id: Idc5ca13f0c385ab9b4258e11fea7ec886515eea4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2016-03-23 20:24:59 +00:00
hjk
536da5eb6a Use default nullptr parents in QAction constructors
In user code it is not uncommon to have QActions as proper members
in structures. Being forced to pass a null parent in their
constructors is uncomfortable.

Change-Id: I10d0b0b39d7f8c2b158af1136367b44f1150d4df
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-03-23 18:28:14 +00:00
Rolland Dudemaine
6be6d3bc19 Build SQLite including the platform header for INTEGRITY.
The platform header defines geteuid(), which is necessary for the SQLite
library. The common platform header is also modified to handle being
included from C, and resolves a typo on the way.

Change-Id: I8ace8a11ceac0f541b9c9b0d8112609579224884
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-03-23 15:38:27 +00:00
Giuseppe D'Angelo
fce83bd9f8 QAbstractItemView: trigger handlers (and redraw) when changing selection model
The most visible problem is that changing selection model didn't update()
the view, resulting in the old selection/current item still being drawn.
In general trigger the handlers for when the selection/current item
changes.

Change-Id: Ib3b2ad70412e6a21a182d4c173e617710bcc630d
Task-number: QTBUG-50535
Reviewed-by: Stephen Kelly <ske@ableton.com>
2016-03-23 15:12:04 +00:00
Marc Mutz
2119b86db2 QRawFont: fix UB in supportedWritingSystems()
Found by UBSan:

  src/gui/text/qrawfont.cpp:647:55: runtime error: load of misaligned address 0x000001eeed26 for type 'quint32', which requires 4 byte alignment
  src/gui/text/qrawfont.cpp:648:50: runtime error: load of misaligned address 0x000001eeed02 for type 'quint32', which requires 4 byte alignment

Fix by using the qFromBigEndian() overload that can read from
unaligned memory.

While touching the code, also disentangle the two loops so that
operations are now performed in memory order instead of inter-
leaved, use less magic numbers, and avoid a QByteArray detach.

Change-Id: I26fa39726f6fa2e957b60863fa160280cf1dc9ac
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-03-23 10:42:45 +00:00
Anton Kudryavtsev
282cf63554 QtActivity.java: fix typo
Replace QtApplication.onKeyDown with QtApplication.onKeyUp

Task-number: QTBUG-42204
Change-Id: I458dce23ca22fe381fcaebc94a1edab91f69a57f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-03-23 10:13:10 +00:00
hjk
c5e6f7d572 Hide mixed comparisons with QT_RESTRICTED_CAST_FROM_ASCII
While the implementation of the QByteArray::operatorX(const QString &s2)
for X \in { ==, !=, <, <=, >, >=} was already inavailable when
QT_RESTRICTED_CAST_FROM_ASCII was defined, the declaration was
still visible, leading effectively to a linking error.

This change hides the declaration, too, creating a compiler error as
intended, and as present with the QString::operatorX(const QByteArray &s2)
functions.

Change-Id: Ifdb0b85b7423b3b9c69212639b1512b0808a7983
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-23 10:06:40 +00:00
David Schulz
d3d78c8175 configure: Appending compiler and linker flags...
...instead of overwriting when building qmake for windows.

Change-Id: I89eb33439b03a0ad33d006d12c9896c87d271c4f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-23 09:57:23 +00:00
Maurice Kalinowski
7565b73434 winrt: Enable windeployqt by default for Visual Studio projects
Using Visual Studio a user very seldom wants to disable the automatic
invocation of windeployqt. Hence switch from opt-in behavior to opt-out.

This also fixes first user experience to invoke qmake –tp vc and then
hit run on examples.

[ChangeLog][Platform Specific Changes][qmake] qmake-generated Visual
Studio projects now automatically invoke windeployqt by default.

Task-number: QTBUG-52008
Change-Id: Iee1607269c38c7f6c726f554978ac05477bebe5e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-23 09:56:56 +00:00
Marko Kangas
1bbbb682b5 Initialize input method for read-only QTextBrowser
Set input method attribute to be aligned with read-only
value in QTextBrowser initialization

Task-number: QTBUG-52071
Change-Id: If0e64bf09e2a2d505ed66fcbfb8cd12ae39844d3
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2016-03-23 09:46:24 +00:00
Simon Hausmann
8e2d3e3b90 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I9a10e1f3c9506ec8554d8f59b6300825ac730939
2016-03-23 08:29:43 +01:00
Kai Pastor
4ccfb1eb92 Fix tests for build with -no-gui
Change-Id: I48d5452daeaf3490ed7a5b8c30953da019bb33af
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2016-03-23 06:52:46 +00:00
Gabriel de Dietrich
f319b9b43c QOpenGL: Fix GLhandleARB redefinition on OS X
Some Qt users include non-system OpenGL headers, resulting
in a possible mismatched redefinition of GLhandleARB.

Ideally, we'd like to skip the whole glext.h inlined portion
and rely on qopenglext.h. However, some issues remain such
as GLDEBUGPROC not being defined on OS X.

Change-Id: Ie551cf0be309234b22cd615cc3703980f48298b9
Task-number: QTBUG-46149
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2016-03-22 23:04:17 +00:00
James McDonnell
005a8bfbf0 Remove QPROCESS_USE_SPAWN and all that it surrounds
The spawn code was only used to make QProcess work on QNX 6.5.0.  Fork
works on QNX 6.6.0.  The QNX spawn implementation has a flaw that causes
a deadlock in certain situations.  When a working directory is specified
for the process, the QNX spawn implementation stops all threads except
the one doing the spawn so that it can temporarily change the process'
working directory.  This can lead to a deadlock if the thread does
anything that conficts with something being done in a stopped thread.
QNX 6.5.0 is no longer supported in Qt 5.6.0 so we can just switch QNX
to the fork implementation and get rid of the spawn implementation.

Made a QNX specific adjustment to the hardExit test.  There's a bug
in the OS that the test can run into because it does something that
normal applications wouldn't.

Task-number: QTBUG-47250
Change-Id: Ib32567d2c15ce651815858000035ac5aa6f35224
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2016-03-22 15:20:06 +00:00
Friedemann Kleint
663263c124 QWidget::create(): Mark parameter window as ignored.
Remove parameter from QWidgetPrivate::createWinId(), add a warning and fixme
comments. Update the documentation to point the users to QWindow::fromWinId()
and QWidget::createWindowContainer().

Task-number: QTBUG-33079
Task-number: QTBUG-51853
Change-Id: I03ae922b31bb46a411889cc0260ea14a4d933492
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-03-22 14:20:41 +00:00
Andreas Holzammer
8fd96d78f0 qmake/wince: Deploy QPA plugin as well in Visual Studio
Change-Id: Ia936290ddb61a85be18d903b64d4b11c709b0732
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2016-03-22 14:10:12 +00:00
Andreas Holzammer
f8d790f086 qmake: Fix wince dll deployment in Visual Studio
This fix repairs the mechanism to deploy Qt dlls as well as C++ runtime
to a wince target in Visual Studio.

Do this by adding a deploy section in the Visual Studio solution and
adding the C++ runtime from the mkspec to the files deployed to the target.
Deploy target path is set to what the wizard of Visual Studio defaults to.
Before, the c++ runtime was only deployed for executables which were built
as part of Qt.

Task-number: QTBUG-50924
Change-Id: I478010dc16e35c68578281895aa3ae14b5c96bb4
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2016-03-22 14:10:03 +00:00
David Schulz
dfb9b9e1f7 configure: enable QSharedMemory when targeting windows.
Change-Id: Ib20e7bab80c2207c50cc221eba5eae996a805242
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-22 13:15:21 +00:00
Shawn Rutledge
bf17e30c8e QApplication: remove unused static qt_tabletChokeMouse
It was only set, never tested, not exported, and the name is awful.

Change-Id: Ie6a783341984a11139b1481e94af09cb7d1bb9b8
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-03-22 13:06:18 +00:00
Christian Strømme
bf60b1636d Mir: Call QPlatformIntegration::destroyScreen() as recommended.
The QPA plugin was deleting the screen object manually, which
is not needed or the recommended approach. The screen(s) are already
maintained by QGuiApplication and destroying the screen object(s) should
be done by calling QPlatformIntegration::destroyScreen().
This change removes the need to keep a reference to the screen(s) in the
mir platform integration class, and removes the warning printed on exit.

Change-Id: I61f37c25ebabf3e96e4cea458c4af454d025926a
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2016-03-22 13:02:00 +00:00
J-P Nurmi
be5e9247e9 qshapedpixmapdndwindow.cpp: fix build with '-qreal float'
Change-Id: I57a0c8cd7cd10f122dfe81e25c14f141b6f81d57
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-03-22 12:29:28 +00:00
Rolland Dudemaine
c09bc82f0a Do not use forkfd for INTEGRITY.
unix is defined for the integrity target. Remove the general |integrity
and only special-case forkfd.

Change-Id: I8752e62659c28261b2309013fad6e8a82b9397d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-03-22 10:59:04 +00:00
Rolland Dudemaine
8256c680c2 Do not use timezone at all for Q_OS_INTEGRITY.
Change-Id: I3674b86b65a6ec47c89cc4f49e00361e9b87a7c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-03-22 10:58:56 +00:00
Rolland Dudemaine
4d838e31a9 Add support for INTEGRITY with eglfs-viv.
Change-Id: Ief53608d84d8c4a773b79cfe227c3ea425f677cf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2016-03-22 10:45:31 +00:00
Rolland Dudemaine
47c7ae25c6 Add INTEGRITY Framebuffer-based plugin as a platform plugin.
The plugin builds as a static plugin.
It is based on the Linuxfb plugin.
It uses the INTEGRITY FB API for framebuffer for display, and HID API
for input (mouse, keyboard, touch).
Because this is the only supported plugin and requires to be included
as a static plugin, automatically add the platform to any application
through qmake.conf.

Change-Id: Ic228afb59cb39dd02c2d538de46caf6e6ea7d153
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2016-03-22 10:42:03 +00:00
David Schulz
cb72faf2f2 mkspec: Correctly cleanup qhost.pri file.
Change-Id: Ieb430f5ae681713006987de9f915709e843cebca
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-22 09:45:10 +00:00
Friedemann Kleint
c599e7db7e win32-icc: Make it possible to rename the ANGLE libraries.
Adapt the mkspec which was forgotten in change
b0ec05f27b.

Task-number: QTBUG-48431
Task-number: QTBUG-51686
Change-Id: Ie95e650de8b7a7027979ec637fb77c7f0357a598
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-22 09:25:05 +00:00
Friedemann Kleint
b657496a0b QLineEdit: Use High DPI pixmap for clear button.
Add a 32x32-pixmap to the style and factor out a function from
QStyle::standardIcon() to assemble the icon. The 32x32 pixmap may also be used
for the 16x16 case with devicePixelRatio=2.

Change QLineEditIconButton to use QStyle::standardIcon() instead of
QStyle::standardPixmap passing the QWindow to obtain the correct pixmap
from the icon.

Task-number: QTBUG-49374
Change-Id: I9895230f66911752cc13b7212609141610df0977
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2016-03-22 09:25:00 +00:00
Marc Mutz
a125b2c4c7 QVersionNumber: compile with -Wzero-as-null-pointer-constant
(backport of qtbase/f43885f8d14e045e5ec47857d62a140d99d16cfa)
Change-Id: I9735c04d90353372cf9b32828ed839f80c31a88a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-22 09:23:48 +00:00
BogDan Vatra
a3269e1801 Allow the user to choose how much from Android theme is extracted
This way Quick Controls 2 users will have a much faster start up and the
extraction time is reduced x10.

[ChangeLog][Android] Allow the user to choose how much from Android
theme is extracted.

Change-Id: I063086251880d50d7fdd72ee35536c4094b47f74
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-22 09:14:14 +00:00
Gabriel de Dietrich
56384a854a QCocoaMenus: Use mix-in pattern to implement menu hierarchy
To solve menu item roles from their text, we need to find
its depth in the menubar hierarchy. Unfortunately, there's
no trivial way to access that hierarchy from the QPA side,
so we need to come with an ad-hoc solution.

Previously, we were using a dynamic proprety to keep track
of the 'parent' object. However, as the life span of the
different objects has changed since 09acf326db,
we need a way to keep track of the parent's existence.

This is what we do in this patch by having both QCocoaMenu
and QCocoaMenuItem also inherit QCocoaMenuObject. This class'
sole role is to store the menu hierarchy's parent object and
wrap it in a QPointer.

Change-Id: Ia18d95171af76d26f6325eef04c77b40d99c4285
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-03-22 05:56:57 +00:00
Dmitry Shachnev
e4d79e1fde Add createMenu() method to QPlatformMenuBar
The D-Bus platform menus are only useful inside menu bars and system
tray icons, and should not be created for other cases (like the context
menus).

This adds a new virtual createMenu() method to QPlatformMenuBar class,
analogous to the already existing QPlatformSystemTrayIcon::createMenu()
method, and adds support for it to QMenuBar.

The D-Bus platform menus are now created from QDBusMenuBar class. As an
additional benefit, we no longer have to check whether the AppMenu
Registrar service is present for every created menu, and check it only
once (this should speed things a bit up).

Change-Id: Ic7d94e58a501ab9d2954aeb342ebd46ef8e62d49
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-03-21 21:21:30 +00:00
Anton Kudryavtsev
d804ea01f0 Fix build QtService.java: replace int with Integer
... and boolean with Boolean.

Task-number: QTBUG-51897
Change-Id: I498ed0cce48e2566c6800344677111dee225d7d9
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-03-21 17:30:45 +00:00
Rolland Dudemaine
83ebd5168f Add support for building for INTEGRITY using GHS toolchain.
Targets (xplatform) include integrity-armv7 and integrity-x86.

[ChangeLog][Platform Specific Changes] Added support for INTEGRITY RTOS.

Change-Id: If7827791e0a977ff198cb99e9dcc684a010bbb81
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-21 16:49:54 +00:00
Morten Johan Sørvig
0694751c33 Cocoa: Forward masked out mouse events.
Forward mouse events hitting the a masked out window
area to the next responder by calling the superclass
event handler.

Implement "inverse mouse grabbing": Qt will not take
dragged and up events if the mouseDown was in a masked
out area.

Change-Id: Ie86281245513cad515b77a468ac63f31ae41bfe0
Task-number: QTBUG-41839
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-03-21 16:26:31 +00:00
Morten Johan Sørvig
68987d5454 Cocoa: Forward rejected key events.
Forward rejected key events to the next responder
by checking the return value from QWindowSystemInterface
and calling the superclass event handler.

This is useful when Qt is running as a plugin in a
host application; the host can now react to key
events even if Qt has focus.

Qt will often not accept keyUp events, even if the
corresponding keyDown was accepted, for example in
the case of text controls. We don't want to forward
'bare' keyUps, so keep track of which keyDowns have
been seen.

Change-Id: I976448a5d305a657a0e91aeb271b158f8b598286
Task-number: QTBUG-45768
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-03-21 16:26:27 +00:00
Morten Johan Sørvig
820e69d6c2 Cocoa: Unify mouse handling logic
Reduce the code duplication for the various button
type handlers. Fan in: (example)
	rightMouseDown
	handleMouseDownEvent
	handleMouseEvent

The primary mouseDown function is still separate
with some duplicated logic.

Remove the "invalid button tracking" warning. qWarnings
are for application developers in case of improper
use of API etc, not internal Qt errors.

Change-Id: Idb1a311e37446399668c2a207831fccc84716ca1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-03-21 16:26:18 +00:00
Morten Johan Sørvig
3ee01f7403 Cocoa: Move window logging to qt.qpa.cocoa.window
Remove QT_COCOCA_ENABLE_WINDOW_DEBUG. Replace/Add
logging for window state changes and drawing.

The window identifier is now the QWindow (not the
platform window) everywhere since this object provides
more debug output.

Change-Id: I4ae56626015241279ab1b44d2b81c9d462b532a0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-03-21 16:25:53 +00:00