Commit Graph

920 Commits

Author SHA1 Message Date
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
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
Laszlo Agocs
ddae8b445b Avoid dialog and other widgets with non-adjusted window flags.
Reviewed-by: Samuel Rødal
2011-05-30 14:41:14 +02:00
Laszlo Agocs
e277d14425 Add focus and modal dialog support.
Reviewed-by: Samuel Rødal
2011-05-30 14:41:14 +02:00
Laszlo Agocs
ef8e5af1d2 The proper fix for subwindow parenting issues.
The previous patch tried to work around the fact that Qt::SubWindow
accidentally pulled in Qt::Window. This patch corrects the root
cause of the problem.
2011-05-30 14:41:13 +02:00
Morten Sorvig
b48abb631f Compile on Mac.
Use the unix QPrinterInfo implementation.
2011-05-30 14:41:13 +02:00
Friedemann Kleint
af13869fef Add QPlatformPrinterSupport.
Add QPlatformPrinterSupport which provides functionality for
obtaining QPrinterInfo and creating native printer engines.

Rubber-stamped-by: Lars Knoll <lars.knoll@nokia.com>
2011-05-30 14:21:09 +02:00
Marius Storm-Olsen
a4ecb10eff Only add dependent include when not already there
Change-Id: I517ad8188a6f6b5ade763f0189f434f446ab6f05
Reviewed-on: http://codereview.qt.nokia.com/198
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-05-27 22:22:40 +02:00
Jiang Jiang
37f20ea8e6 Fix ligature offset in multi-line text
Reviewed-by: Eskil
(cherry picked from commit 278cf1f37945050c4a46d5acab0659f3a7546a43)

Change-Id: Ice20aa38a49ea16cf56bd3705c7d400ee165a9c2
Reviewed-on: http://codereview.qt.nokia.com/195
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-05-27 17:17:08 +02:00
Laszlo Agocs
09796553a5 Revert "Have subwindows parented properly."
This reverts commit bb2986f165.
2011-05-27 15:49:20 +02:00
Jiang Jiang
93339428c0 Fix compile for systems with old fontconfig
Change-Id: Ia26796bdbab7988d14163d3c1290111c0cb22bf7
Reviewed-on: http://codereview.qt.nokia.com/182
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-05-27 15:41:25 +02:00
Laszlo Agocs
bb2986f165 Have subwindows parented properly.
Reviewed-by: Samuel Rødal
2011-05-27 14:27:41 +02:00
Liang Qi
623c753a7b Add QUuid::toRfc4122() and fromRfc4122()
Following the RFC4122, provide the interfaces between QUuid
and QByteArray, they are simpler then toByteArray() and
relevant.

Thanks for the suggestion and brief code from Robin Burchell.

Task-number: QTBUG-19420
Reviewed-by: joao
(cherry picked from commit 06873e467d98ad60d827afae29500bf2ff783c03)

Change-Id: I4623ae3363f1d5affa45de73fac616bb67a9eaa1
Reviewed-on: http://codereview.qt.nokia.com/168
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-05-27 13:59:53 +02:00
Liang Qi
8f4c007f85 Add QUuid::toByteArray() and relevant
Add QUuid::toByteArray() and QUuid(const QByteArray &). Same
behavior with QUuid::toString() and QUuid(const QString &).

Task-number: QTBUG-19419
Reviewed-by: joao
(cherry picked from commit 71f923f29e2c60444a85fc765fc582e06cb7eca4)

Change-Id: I41dad65e269f739ba9ec1c27e9da96af6401356c
Reviewed-on: http://codereview.qt.nokia.com/167
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-05-27 13:21:42 +02:00