Commit Graph

1850 Commits

Author SHA1 Message Date
Morten Sorvig
58d10c0bd7 Refactor window system event dispatching.
Add QWindowSystemInterface::sendWindowSystemEvents,
which contains the canonical "empty and send queued
window system events" implementation.

Make the Cocoa, QPA, and GLIB dispatchers use the
new implementation. Cocoa now no longer inherits
from QPA.
2011-06-23 11:04:21 +02:00
Morten Sorvig
c359cf0017 Remove stray file. 2011-06-23 11:04:20 +02:00
Friedemann Kleint
4890211f03 Remove leftover file.
Code went into Windows plugin.
2011-06-23 10:27:26 +02:00
Samuel Rødal
6d6ac714ca Prevent endless loop when calling QWaylandShmWindow::format(). 2011-06-22 16:28:45 +02:00
Samuel Rødal
f3440ddf52 Get wayland plugin working again. 2011-06-22 16:26:02 +02:00
Morten Sorvig
9512c440b5 Compile. 2011-06-22 14:58:41 +02:00
Friedemann Kleint
a009fec107 Remove Windows code from platform lib.
Rubber-stamped-by: Jørgen <jorgen.lind@nokia.com>
2011-06-22 14:20:16 +02:00
Morten Sorvig
ca494ce782 Send expose on (initial) show 2011-06-22 14:14:15 +02:00
Morten Sorvig
d6dc5ed1d6 Compile 2011-06-22 14:13:52 +02:00
Morten Sorvig
def5901955 Reintroduce QWindow::SurfaceType
On Cocoa it makes sense to distinguish between the
two window types.

Reviewed-by: Samuel
2011-06-22 14:10:26 +02:00
Richard Moe Gustavsen
0e4844aa24 Cocoa: clean up pro file for platform plugin 2011-06-22 14:01:02 +02:00
Richard Moe Gustavsen
041b809a62 Cocoa: implement support for wheel events 2011-06-22 13:59:35 +02:00
Friedemann Kleint
111068f383 Add QGuiEventDispatcherWin32.
Dispatches Gui events after
DispatchMessage().

Reviewed-by: Samuel Rødal <sroedal@trolltech.com>
Reviewed-by: Morten Sørvig <morten.sorvig@nokia.com>
2011-06-22 13:43:47 +02:00
Friedemann Kleint
8c42defe67 Compile. 2011-06-22 12:11:55 +02:00
Morten Sorvig
be4221d8fa Q_GUI_EXPORT is a mac-only workaround. 2011-06-22 12:04:03 +02:00
Lars Knoll
61d22c932d fix autotest regressions introduced by 37c329a3
Add proper license headers and properly clip
pixel drawing to the devices bounding rect.
(cherry picked from commit 67d275542464c794ec4b650f10cca9a17e10c977)

Change-Id: I52a166919e87e07168fa5f597b22398a1abefe14
Reviewed-on: http://codereview.qt.nokia.com/590
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-06-22 11:45:29 +02:00
Morten Johan Sorvig
f1975cfc53 Make xcb work again after event dispatcher changes.
The platform plugin/event dispatcher creation order
has now been reversed and the event dispatcher
cannot be accessed during plugin construciton.
2011-06-22 11:37:42 +02:00
Oswald Buddenhagen
e6b744fb4b simplify relative path generation
instead of hand-crafting the logic, simply use QDir::relativeFilePath()

Change-Id: I5a495ad6bdfa8ec126741180770934e7ebee0495
Reviewed-on: http://codereview.qt.nokia.com/512
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-06-22 11:17:02 +02:00
Peter Hartmann
4545b212af SSL certificate printing: fix auto test for different OpenSSL versions
OpenSSL versions 0.9.8 and 1.0.0 produce slightly different output when
dumping a certificate.

Change-Id: I2cf27213237a2e1e08f1b0345c29ca2cd441f41c
Reviewed-on: http://codereview.qt.nokia.com/555
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-06-22 11:01:00 +02:00
Shane Kearns
85136496bc IPv4 + IPv6 dual stack sockets
Adds support for binding "dual stack" sockets (via QUdpSocket or
QTcpServer). A dual stack socket will accept incoming connections on
either IPv4 or IPv6 interfaces.

QHostAddress::Any     - use this to bind a dual stack socket
QHostAddress::AnyIPv6 - use this to bind a socket for IPv6 only
QHostAddress::AnyIPv4 - use this to bind a socket for IPv4 only

Binding to a specific address rather than one of the "any" addresses
is restricting you to a protocol anyway so no behaviour change there.
IPv6 sockets were previously dual stack on some OS and v6 only on others
Any previously meant IPv4 only

This commit implemented & tested on Windows 7, Linux (Ubuntu 10.04)
and Mac OS 10.6.7.

Windows XP and server 2003 do not support dual stack sockets, even though
they can support IPv6. On those versions, QHostAddress::Any will still
bind to IPv4 0.0.0.0 (which is also the behaviour anywhere QT_NO_IPV6 is
defined)

Autotests run:
qudpsocket (includes a new test case)
qtcpserver (includes a new test case)
qtcpsocket
qnetworkreply
qhostaddress

Task-number: QTBUG-17080
Change-Id: Id486677c4f832e18dc0ff1a86c5f5fc422c9eb4f
Reviewed-on: http://codereview.qt.nokia.com/421
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Reviewed-by: Markus Goetz
2011-06-22 11:01:00 +02:00
Lars Knoll
407a6fe798 add QInputMethodQueryEvent
QInputMethodQueryEvent will replace the old
inputMethodHints() and inputMethodQuery() APIs
in QWidget. It has the advantage that it works
nicely with any kind of QObject.
2011-06-22 10:46:12 +02:00
Lars Knoll
4363d836f6 remove the plugin support for QInputContext
This will be handled through the lighthouse plugin
instead.
2011-06-22 10:46:12 +02:00
Lars Knoll
e1293b49e3 add a platform interface for input method support
add QPlatformInputContext to help supporting
complex text input. Communication with the
focus objects/widgets will happen slightly
different then before, through events instead of
methods one can query on QWidget.
2011-06-22 10:46:11 +02:00
Morten Johan Sorvig
c23580de7b Add libxcb-xfixes0-dev to xcb deps 2011-06-22 10:07:17 +02:00
Samuel Rødal
0235b9d0a6 Compile fix (region is an accessor now, not a public member variable). 2011-06-22 09:50:47 +02:00
Morten Sorvig
4efaf305f5 Add lighthouse event dispatcher API.
Platform plugin creation is now moved forward in
order to have a platform plugin instance at event
dispatcher creation time.

Plugins are now responsible for implementing
PlatformIntegration::createEventDispatcher and returning
an QAbstractEventDispatcher subclass.
2011-06-22 09:47:49 +02:00
Samuel Rødal
18c1d67137 Made QExposeEvent public and added exposeEvent() in QWindow.
This is needed for applications that use QBackingStore directly.
2011-06-22 09:41:10 +02:00
Friedemann Kleint
dc40eaba1f Compile. 2011-06-21 16:20:15 +02:00
Samuel Rødal
176f30b137 OpenGL API refactor.
Rename QGuiGLFormat to QSurfaceFormat, and make QWindow sub-class of
QSurface and QPlatformWindow sub-class of QPlatformSurface, instead of
having QPlatformGLSurface accessor in QWindow.
2011-06-21 14:02:22 +02:00
Richard Moe Gustavsen
272daebaa0 Cocoa: fix compiler warning 2011-06-21 13:53:21 +02:00
Richard Moe Gustavsen
c477fa3e2c Cocoa: add missing return statement
Rev-By: sroedal
2011-06-21 11:49:22 +02:00
Laszlo Agocs
14a1d6d3c7 Make readback-glx working again in wayland. 2011-06-21 10:23:28 +02:00
Laszlo Agocs
31b2311818 Compile fix for readbackglx after surface->backingstore renaming. 2011-06-21 10:10:22 +02:00
Morten Sorvig
ee60794a68 Compile. 2011-06-21 09:56:46 +02:00
Morten Sorvig
2e94bef1e4 Compile fix for platformsupport on Mac.
Switch platformsupport over to be a shared library,
which is well supported by the build system.

This requires exporting classes we use. I've done
this on OS_MAC only for now.

Reverts 4581a9999e
2011-06-21 09:52:29 +02:00
Samuel Rødal
cf1a53cf3c Port Cocoa plugin to new backing store interface. 2011-06-21 09:04:01 +02:00
Samuel Rødal
6ce6b8a378 Rename QWindowSurface -> QBackingStore and split into platform / public.
Also get rid of GL window surface and related classes.
2011-06-21 09:04:01 +02:00
Samuel Rødal
891a86f0f3 Compile fixes. 2011-06-21 09:04:01 +02:00
Richard Moe Gustavsen
4581a9999e Mac: buildfix for cocoa lighthouse plugin
Rev-By: msorvig
2011-06-20 14:18:26 +02:00
Richard Moe Gustavsen
1ed22cdfd3 Mac: buildfix for QtPlatformsupport 2011-06-20 14:18:26 +02:00
Lars Knoll
1c86896f53 Don't crash if Clipboard and Selection hold the same mimedate
Cliboard and Selection can hold the same QMimeData object.
Don't delete the mimedata in this case before when clearing
only one of them.

Reviewed-by: Samuel
2011-06-20 13:32:20 +02:00
Lars Knoll
7a64f12cfe use selection changed events from XFixes
properly initialize the XFixes extension and then
use the selection changed events to notify
Qt apps.

Reviewed-by: Samuel
2011-06-20 13:31:52 +02:00
Gunnar Sletta
665d8a0454 Make QPoint have the same layout on all platforms
Change-Id: I8330295761a4440afd81c121039237fb651d9a9c
Reviewed-on: http://codereview.qt.nokia.com/487
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-06-20 13:08:50 +02:00
Peter Hartmann
0da3d7d5d3 SSL certificate printing: increase max certificate size
apparently there are really big certificates around, so 4k might not
always be enough.

Change-Id: I84df82d117469a14b4c6db81e0ceecc1a8ba47b3
Reviewed-on: http://codereview.qt.nokia.com/554
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-06-22 11:01:00 +02:00
Jiang Jiang
6ebb60158d Fix fontconfig usage in X11 font database
We should do FcConfigSubstitute(0, pattern, FcMatchFont) on a
FcPattern for query because the family list in it will contain
almost all the families after FcConfigSubstitute(0, pattern,
FcMatchPattern), then the test in <match target="font"> will
almost always succeed. In general, FcMatchFont substitute
should only be done on the FcPattern that we got after
FcFontMatch() or FcFontRenderPrepare().

Based on the suggestion of fontconfig author Behdad Esfahbod,
this patch reorganized the tryPatternLoad logic so that it only
does the QFontEngine creation part, FcPattern *match is retrieved
outside of that function. In this way, the match pattern we got
can be either from FcFontMatch() or after FcFontRenderPrepare()
on one of the fonts we got from qt_fontSetForPattern(). Then we
don't need to duplicate the pattern and add all criterias back
with qt_addPatternProps(). It not only simplified the code a lot
but also fix the way we apply FcMatchFont substitution. This
substitution will either be done by FcFontMatch() or
FcFontRenderPrepare, both implicitly.

Task-number: QTBUG-2148, QTBUG-19947
Change-Id: I2e4dbbe7f448e81850176732b4a65028f2b912fa
Reviewed-by: Eskil
Reviewed-on: http://codereview.qt.nokia.com/579
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-06-22 11:01:00 +02:00
Jiang Jiang
e01ce920e4 Update autotest case after toHtml change
cb760eaef631abd49836ae5c8dc12a61ef5eff0d changed the way we generate
HTML for empty blocks. tst_QTextDocument::toHtml has to be updated
accordingly.

Reviewed-by: Samuel
(cherry picked from commit 2701802511d9c09a11212cc37838154245b0c0ca)

Change-Id: I0664557f9d74e1aacd46cfcf4cfa2cde4f21a719
Reviewed-on: http://codereview.qt.nokia.com/581
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-06-22 11:01:00 +02:00
Peter Hartmann
366f757e84 SSL certificate printing: lookup Symbian ordinal
Change-Id: I5358726f0457f00098c248326ed66fb54af1d177
Reviewed-on: http://codereview.qt.nokia.com/553
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-06-21 19:09:31 +02:00
Rohan McGovern
a93a81be7d Don't attempt to build benchmarks if release-mode Qt is not available
All of the benchmarks explicitly turn on release mode.  This fails on
Mac and Windows if Qt is configured as debug-only.  It is also possibly
misleading on Linux, as compiling the benchmark in release mode does
not imply that Qt is compiled in release mode.

The results are generally not useful if release mode Qt is not
available, so disable them by default in this case.

Change-Id: Ifa2bb6ab6412dd360ff9dfb890ace2f51e0eef86
Reviewed-on: http://codereview.qt.nokia.com/549
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
2011-06-21 17:44:27 +02:00
Richard Moore
ae4b4696a5 Add the ability to convert a certificate to text
Adds a function that will convert a certificate to human readable text
format using the openssl print function. This is useful for debugging
and for displaying the full details of a certificate (including those
parts not supported by the Qt API).

Change-Id: I27238d05df37f8b15ad09f8e761b06344631a9ce
Merge-request: 2
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/551
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-06-21 16:12:55 +02:00
Richard Moore
f5a128bb0e Add an autotest for the conversion of certificates to text.
Loads one of the test certs then compares the result with a known good
text version.

Change-Id: I3a0d6a7f60ce0f48e0cd8032c9964e9c4217dca7
Merge-request: 2
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/552
2011-06-21 16:12:54 +02:00