Commit Graph

1132 Commits

Author SHA1 Message Date
Laszlo Agocs
1f456b4cbb Add support for mouse and keyboard grab.
Reviewed-by: Samuel Rødal
2011-06-03 11:59:15 +02:00
Jiang Jiang
43c0e08ba2 Refactor glyph pretransform check
Move paintEngineSupportsTransformations logic from QPainter to paint
engine subclasses. Simplify and consolidate checks for cached drawing
(pretransformed) and path drawing (untransformed) in raster paint
engine. Fix unnecessary transform when paint engines actually take
the path drawing track. Fix scaling and rotation transform in raster
engine for Mac.

Task-number: QTBUG-19086
Change-Id: I1c0c1800a5173d3db765b9fccfd0e7a3628e3815
Reviewed-on: http://codereview.qt.nokia.com/298
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-06-03 10:57:42 +02:00
Samuel Rødal
7d9fcaccb1 Prevent crash in tst_QWidget::persistentWinId().
Only call createWinId() if we have a parent widget set.
2011-06-03 10:07:01 +02:00
Samuel Rødal
504ab89c6a Get rid of superfluous debug output in the xcb plugin. 2011-06-03 10:00:25 +02:00
Samuel Rødal
ac4276531c Made tst_QWidget::winIdChangeEvent() pass with Lighthouse.
We need to call setWinId() at appropriate times, and enable creation of
native handles for child widgets when createWinId() is called.
2011-06-03 10:00:25 +02:00
axis
c8dead7186 Fixed an argument parsing bug in syncqt.
We need to move the detection up above the general -no-* match,
otherwise it never hits.

Change-Id: I04ab5a1ed2c4a01219e7b9e10948b3fc4989f4b8
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/228
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-06-02 22:54:08 +02:00
Andy Nichols
1fb4d6737c Allow SHM buffers to be displayed in Wayland plugin when using DRM
When running an application with the wayland backend, SHM window
surfaces were not being displayed on the wayland-demo compositor as
wl_surface_damage was being called, but not wl_buffer_damage as well.

Change-Id: I2ffea3bbb20cb3729cd029bd21855819cd7fcf55
Reviewed-on: http://codereview.qt.nokia.com/305
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-06-01 17:09:04 +02:00
Jørgen Lind
17613b7add Merge branch 'refactor' of scm.dev.nokia.troll.no:qt/qtbase-staging into refactor 2011-06-01 16:00:16 +02:00
Jørgen Lind
d47246a7c6 Compile fix 2011-06-01 15:55:15 +02:00
Jørgen Lind
00ef07fe96 Merge remote-tracking branch 'base/master' into refactor
Conflicts:
	src/gui/embedded/qmousepc_qws.cpp
	src/gui/embedded/qwslock.cpp
	src/plugins/decorations/default/default.pro
	src/plugins/decorations/styled/styled.pro
	src/plugins/decorations/windows/windows.pro
	src/plugins/gfxdrivers/ahi/ahi.pro
	src/plugins/gfxdrivers/directfb/directfb.pro
	src/plugins/gfxdrivers/eglnullws/eglnullws.pro
	src/plugins/gfxdrivers/linuxfb/linuxfb.pro
	src/plugins/gfxdrivers/qvfb/qvfb.pro
	src/plugins/gfxdrivers/transformed/transformed.pro
	src/plugins/gfxdrivers/vnc/vnc.pro
	src/plugins/graphicssystems/meego/meego.pro
	src/plugins/graphicssystems/opengl/opengl.pro
	src/plugins/graphicssystems/openvg/openvg.pro
	src/plugins/graphicssystems/shivavg/shivavg.pro
	src/plugins/graphicssystems/trace/trace.pro
	src/plugins/kbddrivers/linuxinput/linuxinput.pro
	src/plugins/mousedrivers/linuxtp/linuxtp.pro
	src/plugins/mousedrivers/pc/pc.pro
	src/plugins/mousedrivers/tslib/tslib.pro
	src/plugins/platforms/minimal/minimal.pro
	tests/auto/qerrormessage/qerrormessage.pro
2011-06-01 15:34:58 +02:00
Laszlo Agocs
7c3e1e0ccd Have tooltips shown properly with xcb. 2011-06-01 15:32:58 +02:00
Martin Petersson
1dd7b8ace0 tst_qnetworkreply: add a test for http abort.
Change-Id: Iec5fe195ff2befe92e759f77768240728bef31bd
Reviewed-on: http://codereview.qt.nokia.com/302
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
2011-06-01 14:47:50 +02:00
Samuel Rødal
e917c1d5aa Make tst_QWidget::ensureCreated() pass with -platform xcb.
We need the parent-creation logic to be enabled on QPA as well.
2011-06-01 14:28:49 +02:00
Shane Kearns
7b6c3707de sockets: limit buffer size of the internal sockets in proxy engines
The application can normally control the amount of buffering of a
socket or QNetworkReply by using the setReadBufferSize API.
This allows the application to flow control the TCP connection, and
avoids out of memory errors when the data being downloaded is received
faster than the application can process it.

However when using a proxy, the proxy socket engine has an internal
socket which is used to communicate with the proxy server. It is not
visible to the user, and does not have awareness of the buffer size of
the external socket.

To solve this, we limit the internal sockets' buffer size to 64k bytes.
Under normal operation, the data is swiftly copied to the external
socket where the buffer can grow (or not) based on the application's
set value for read buffer size.

Task-number: QT-4966
Reviewed-by: Markus Goetz
(cherry picked from commit c4727a85eed57a4db698326a1bed4aa75b6e5284)

Change-Id: I29e6628e38b79b41c4464ba8cb772a0f03717043
Reviewed-on: http://codereview.qt.nokia.com/153
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
2011-06-01 13:38:06 +02:00
Samuel Rødal
f05236a40d Prevent XSetInputFocus BadMatch errors.
The BadMatch errors are generated if XSetInputFocus is called before the
window has been mapped, so we need to set a flag when we get the map
notify event.
2011-06-01 13:37:44 +02:00
Laszlo Agocs
ead7c1c33c Start using libxkbcommon in the xcb plug-in. 2011-06-01 11:01:32 +02:00
Laszlo Agocs
646fcc1bd3 Do not choke on zero-sized windows.
Configure requests with zero width or height will always
fail with BadValue and have to be avoided. Same goes for
shm segments of size 0.
2011-06-01 11:01:32 +02:00
Lars Knoll
38745b341c add a platform interface for DnD
Use the simple in process DnD implementation
for xcb.
2011-06-01 09:55:39 +02:00
Lars Knoll
07f8aecb52 Clean up DnD code
Some cleanups of the DnD code to prepare for
creating a platform API.
2011-06-01 09:55:39 +02:00
Andrew den Exter
50b77ef0b0 Make TextEdit word selection more natural.
QTextControl will only extend the selection to a word if the cursor is
directly over it which prevents the selection being extended if the
mouse is dragged up or down a to a shorter line of text making it
difficult to select multiple lines of text.  Just disable that
limitation when the TextEdit word selection is enabled.

Change-Id: I3b9d1575c0141db8441197d740de94a90eacc077
Task-number: QTBUG-19230
Reviewed-by: Martin Jones
Reviewed-on: http://codereview.qt.nokia.com/292
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2011-06-01 09:36:15 +02:00
Andrew den Exter
16bd22b1bc Ensure the TextEdit cursor delegate is repositioned on mouse events.
Update the micro focus when a mouse press changes the cursor position
of a read only TextEdit.

Change-Id: I11855037f7938b2cd23ac6ad165722b5289b4f46
Task-number: QTBUG-19109
Reviewed-by: Martin Jones
Reviewed-on: http://codereview.qt.nokia.com/291
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2011-06-01 08:04:58 +02:00
Andrew den Exter
3c7793acc0 Don't crash on an invalid replacementStart from an input method.
Ensure the cursor position does not exceed the bounds of the
current text.

Change-Id: If38f7729372562324d11eadd1a976c0c6da91863
Task-number: QTBUG-19054
Reviewed-by: Martin Jones
(cherry picked from commit 6fbfb1ab3f26ad672eb24f9b4a0ce1a8eea08298)
Reviewed-on: http://codereview.qt.nokia.com/290
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2011-06-01 06:55:27 +02:00
Bernhard Rosenkraenzer
15871d606a Fix build in C++0x mode
This fixes compiler errors (gcc 4.6 -std=gnu++0x on x86_64 Linux):

embedded/qwslock.cpp: In function `bool forceLock(int, int, int)':
embedded/qwslock.cpp:121:39: error: narrowing conversion of `semNum'
        from `int' to `short unsigned int' inside { } [-fpermissive]

(and equivalent errors in other lines/files)

See
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf
Section 8.5.4/6

Change-Id: I2cbac5482b87f33287a416af5a5c9bde621720bc
Reviewed-By: Olivier Goffart
Merge-Request: 1240
Reviewed-on: http://codereview.qt.nokia.com/275
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-05-31 17:46:40 +02:00
Samuel Rødal
bf8dfc394a Remove some QWidget autotest that have become irrelevant with -qpa.
We can't use windowing system specific checks on Lighthouse because the
windowing system is now plugin-dependent.
2011-05-31 16:32:08 +02:00
Jørgen Lind
d0beb0d95b Fix the egl path for xcb and wayland plugins
Reviewed-by: Samuel Rødal
2011-05-31 15:57:03 +02:00
Laszlo Agocs
9bd270f64d Have a sensible default double click interval.
Having 0 as default would disable double clicks completely which
is not really good.

Reviewed-by: Samuel Rødal
2011-05-31 14:18:47 +02:00
Laszlo Agocs
bc75a8963e Fix for excess creation of QWindow instances.
topData() is called from various functions for any kind of widgets,
not just for top-levels. Therefore createTLSysExtra cannot assume
that the widget is top-level. Previously QWindows were created
for desktop widget, toolbars, mdi subwindows, etc. which is
wrong. The patch will avoid this, and will also fix drawing
isses when dragging mdi windows.

Reviewed-by: Samuel Rødal
2011-05-31 13:50:30 +02:00
axis
a8814fcb69 Made qpluginbase.pri into a feature profile.
This enables other modules to use it without having access to the
QtBase sources.

Change-Id: I0a588b2e14ca88fa068c7c2bcc69ff669444f6c6
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/237
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-05-31 12:51:29 +02:00
axis
0b2ce85200 Moved certain qmake config variables to .qmake.cache.
The reason is that these are local to the build, and should not be
present inside the qmodule.pri file, because this file is installed.

Change-Id: I2207f2bf068b1aafd14e60d106c7028ca53d5efd
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/238
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-05-31 12:51:28 +02:00
Laszlo Agocs
7db1f8fc04 Fix QWidget::windowHandle().
The window member in extra should remain null for widgets
that do not have a native window. The change introduced
in an earlier commit is clearly wrong.
2011-05-31 12:36:46 +02:00
Friedemann Kleint
994b71253c New configure.exe binary: Qt 5 with QT3_SUPPORT removed. 2011-05-31 11:11:43 +02:00
Friedemann Kleint
83375db733 configure.exe: Remove QT3_SUPPORT.
As it is causing compile problems.
2011-05-31 11:10:44 +02:00
Friedemann Kleint
66febd27cb Windows: Bring back the HDC to the raster engine, Q_OS_WIN. 2011-05-31 10:48:36 +02:00
Laszlo Agocs
589a562c01 Fix isTopLevel() in QWindow.
This also makes modal hints set properly for dialogs so the
additional checks during active window change are not needed
anymore.

Reviewed-by: Samuel Rødal
2011-05-31 10:45:24 +02:00
Laszlo Agocs
be24744c75 Set xcb size hints properly avoid strange behaviour.
Strange behaviour means incorrect dialog sizes, inability to resize,
X crashes, etc. These were caused by not properly filling the size
hint structure, leaving possibly random garbage in it.

Reviewed-by: Samuel Rødal
2011-05-31 09:59:55 +02:00
Charles Yin
a3146bb75f Fixed linking against QtQuickTest on mac.
qmltest is now a Qt module, so it's not necessary to configure
the include&library paths manually.

Change-Id: I1d2baa67138e08ab9007fba9f6adcf8847509ba8
Reviewed-on: http://codereview.qt.nokia.com/163
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-05-31 06:31:55 +02:00
Gunnar Sletta
8ff3028e23 Export the qt_gl_read_framebuffer function for use in declarative
Change-Id: Ia1dd186ca954774e1faaa4b2e606acac9333d9b0
Reviewed-on: http://codereview.qt.nokia.com/224
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-05-30 18:32:55 +02:00
Laszlo Agocs
0909a0bbfb Made QXcbConnection::atomName() more fail safe.
Reviewed-by: Samuel Rødal
2011-05-30 16:16:36 +02:00
Jiang Jiang
9f837af945 Support placing cursor in ligature with mouse or touch
We need to find out the closest element in the ligature to
the point we clicked (or tapped), currently we do this by
dividing the width of that ligature glyph evenly by the number
of characters it covered. We only support Common and Greek script
at this point, ligatures in other scripts are still handled as a
whole.

Task-number: QTBUG-19260
Reviewed-by: Eskil
(cherry picked from commit 5338d78aa9d80ddd2bcb21e6b22cd2cf1522a7d3)

Change-Id: Ic747e9458d561aca0848dcd1e8b94e0a23fd8189
Reviewed-on: http://codereview.qt.nokia.com/196
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-05-30 15:16:34 +02:00
Friedemann Kleint
dc01995397 Examples: QPA window example does not require widgets. 2011-05-30 15:08:33 +02:00
Laszlo Agocs
80d69dc984 Do not scroll in QXcbWindowSurface when m_image is not yet created.
Reviewed-by: Samuel Rødal
2011-05-30 15:01:34 +02:00
Lars Knoll
3a1f80ac92 compile with QT_NO_CUPS 2011-05-30 14:44:13 +02:00
Lars Knoll
f190d39197 Cleanup code for copy/paste of text
Remove support for COMPOUND_TEXT. All apps should
these days support UTF8_STRING. If not they'll have to live
with STRING or TEXT.

ICCCM states that TEXT is in the encoding of choice. Make this
latin1 instead of local8bit. XA_STRING is defined to be latin1,
so don't use local8bit here neither.
2011-05-30 14:44:13 +02:00
Lars Knoll
ab74e89f5f correctly decode pasted text 2011-05-30 14:44:13 +02:00
Lars Knoll
ec23bf0457 partially working paste
We now paste something from the clipboard,
but the format conversion seems to be
still off at times.
2011-05-30 14:44:12 +02:00
Lars Knoll
bbb2da4a1b add an xcb based clipboard implementation
Copying from the app to somewhere else works
fine, but pasting into the app is still broken.
2011-05-30 14:44:12 +02:00
Lars Knoll
b03ed7b151 Don't leak xcb events
Correctly free the xcb events delivered to
the xcb plugin.
2011-05-30 14:44:12 +02:00
Lars Knoll
28ab03741e Correctly define standard XA_FOO atoms 2011-05-30 14:44:12 +02:00
Lars Knoll
1b1142b305 Add xcb based mime type handling
Reworked the code from the xlib lighthouse
plugin to remove most of the Xlib dependencies.

The code originally comdes from qdnd_x11.cpp
2011-05-30 14:44:12 +02:00
Laszlo Agocs
1d3864488c Have proper warnings shown when xcb window surface creation fails.
Reviewed-by: Samuel Rødal
2011-05-30 14:41:14 +02:00