Commit Graph

1046 Commits

Author SHA1 Message Date
Laszlo Agocs
4469de4ce7 Cursor support in xcb plug-in.
Custom cursor pixmaps with depth greater than 1 are not yet supported
and will be converted to monochrome always.

Reviewed-by: Samuel Rødal
2011-06-08 14:47:22 +02:00
Lars Knoll
88f3b059a9 Avoid out of bounds write
Reviewed-by: Samuel
2011-06-08 14:46:50 +02:00
Marius Storm-Olsen
8fe0427cb8 Fix typo from 1835afe6
Change-Id: I99e4407bbcb82cb27057ada838d73b6582867937
Reviewed-on: http://codereview.qt.nokia.com/379
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-06-08 14:42:23 +02:00
Olli Werwolff
2d09fe38ac Undefine DrawText in qlineedit.cpp
There is a #define DrawText DrawTextW in winuser.h which is included
in windows.h so that the enum value in line 1981 is seen as DrawTextW
and thus is not a valid enum value on Windows.

Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:30 +02:00
Olli Werwolff
4b566e5db9 Most checks for windows in widgets have to be ws specific
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:29 +02:00
Olli Werwolff
affaefe049 use correct includes in qaccessible_win.cpp/qwizard_win_p.h
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:28 +02:00
Olli Werwolff
aecd41c070 Do not compile _win files when -qpa is used
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:27 +02:00
Olli Werwolff
a844e23607 QTextDocumentLayout has to be exported as it is used in widgets
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:26 +02:00
Olli Werwolff
9a3e1dba27 Fixed compilation with QT_NO_PRINTER
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:25 +02:00
Lars Knoll
f2ff9036ae cosmetic changes 2011-06-08 13:46:09 +02:00
Jiang Jiang
3fb67767fc Reorder member varibles in QGlyphRunPrivate to eliminate warning
Reviewed-by: Eskil
(cherry picked from commit 74a1135341783449970d579b273d00c837ac14b0)

Change-Id: I8e1c6bdc7f0957d8f389531f5f5682c536cdc286
Reviewed-on: http://codereview.qt.nokia.com/374
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-06-08 12:25:23 +02:00
Jiang Jiang
c2dddd8322 Fix warning in qtextengine compilation
enableHarfbuzz() should only be defined on Mac.

Reviewed-by: Eskil
(cherry picked from commit 5ce3fbb67b79c3732fd47b296ef9421398ca520c)

Change-Id: I9ecb5db49478c3f5beb5d41cf99320f0faedce2e
Reviewed-on: http://codereview.qt.nokia.com/375
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-06-08 12:25:22 +02:00
Jiang Jiang
d9e3d1a540 Fix compile when configure with no fontconfig support
Task-number: QTBUG-19716
Reviewed-by: Eskil
(cherry picked from commit 5a598afa3f1928e9ad18257e2fa48fe3d5739917)

Change-Id: I05107970e3273fce48303c9956e1c9aa928832b9
Reviewed-on: http://codereview.qt.nokia.com/376
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-06-08 12:25:21 +02:00
Lars Knoll
b6b244efda Fix behaviour after WM_TAKE_FOCUS
We should not call requestActivateWindow() in
reaction to WM_TAKE_FOCUS. Looks like it should
only be done if the focus should in fact go
to a modal child of the widget.
2011-06-08 11:44:41 +02:00
Olli Werwolff
819f9ca965 Use Q_WIDGETS_EXPORT for widgets library
Reviewed-by: Lars Knoll
2011-06-08 10:43:55 +02:00
Marius Storm-Olsen
ed5a7e22be Fix usage of QT_SOURCE_TREE
Functionality has been moved into qt_example.prf

Change-Id: I81423eb4c5645f03b131932b2d37eceee9fea086
Reviewed-on: http://codereview.qt.nokia.com/371
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-06-07 22:18:35 +02:00
Lars Knoll
6a243e5559 revert accidental commit 2011-06-07 16:45:28 +02:00
Lars Knoll
1729785d1e remove unused code 2011-06-07 16:44:23 +02:00
Lars Knoll
52e5fd336b cleanups code
Make QXcbClipboard and QXcbDrag a QXcbObject to simplify
the code.
Use the predefined atoms in xproto.h instead of our own
defines.
2011-06-07 16:29:35 +02:00
Lars Knoll
4386425ce3 Implement QDropEvent::source() again
QDropEvent::source() now returns a QObject
instead of a widget, matching the implementation
in QDrag.

Reviewed-by: Samuel
2011-06-07 15:50:54 +02:00
Lars Knoll
71304aefd0 reset certain global variables on deletion
qt_button_down needs to be reset to 0 if it
points to the widget being deleted.

Reviewed-by: Samuel
2011-06-07 15:50:54 +02:00
Lars Knoll
779e1aaa35 Protect against deleted windows
Check that the window is still there before
trying to deliver an event to it.

Reviewed-by: Samuel
2011-06-07 15:50:54 +02:00
Lars Knoll
689ac3631d Initialize variable
Reviewed-by: Samuel
2011-06-07 15:50:54 +02:00
Lars Knoll
1928e633a5 Fix some remaining issues with DnD
Do not set the event mask of the window
we drop onto to NO_EVENT. Always use the
clipboards requestor window to convert
selections.

Reviewed-by: Samuel
2011-06-07 15:50:54 +02:00
Lars Knoll
ff53b1dcec add WM support class
Add a QXcbWMSupport class to better integrate with
NET_WM compliant window managers.

Suppport NET_WM_USER_TIME on windows.

Reviewed-by: Samuel
2011-06-07 15:50:53 +02:00
Lars Knoll
c3f9de6296 Implement XDnD in the xcb plugin
Ported most of the code to support dragging
from qdnd_x11.cpp to xcb. Some features are still
not working 100% correct, but it's becoming
usable.

Reviewed-by: Samuel
2011-06-07 15:50:53 +02:00
Lars Knoll
30b7c6512c X11 DnD implementation
Initial code for DnD on X11. Only Xdnd based,
Motif DnD is being ignored.

The code is currently limited to dropping
stuff onto the application. Starting drags
is not yet implemented.

Reviewed-by: Samuel
2011-06-07 15:50:53 +02:00
Lars Knoll
92edbd2060 Add a startDrag to QPlatformDrag
This can be used to initialize data
when a drag starts. The Xdnd implementation
at least has a need for it.

Reviewed-by: Samuel
2011-06-07 15:50:53 +02:00
Thiago Macieira
dddfcd66f8 Fix regression that caused waitForXXX(-1) to fail.
Regression was introduced by 8d4cd52b6981a4e6deea7fdb77f56e40c4f3e6ba
when it failed to check when msecs == -1. This manifested visibly in KDE
failing to connect to any SSL site -- kioslaves are synchronous and use
waitForXXX(-1) (in this particular case, waitForEncrypted, which calls
waitForReadyRead).

Also, take the opportunity to convert these tests in QTcpSocket to use
port 80 (a defined service in the test server) instead of port 22.

Reviewed-by: Martin Petersson
(cherry picked from commit cb5b6799333794496269aa7e6515f96c2ac96d37)

Change-Id: I256a1e138e43fd45844976fe84cd2bc938552e47
Reviewed-on: http://codereview.qt.nokia.com/359
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-06-07 15:14:56 +02:00
Morten Sorvig
28391442e7 Cocoa: Implement raise() and lower(). 2011-06-07 12:06:26 +02:00
Morten Sorvig
67f18cafcc Cocoa: Implement setWindowTitle. 2011-06-07 11:12:38 +02:00
Morten Sorvig
29b29d1b70 Fix Cocoa mouse position handling.
I'm not sure what "local" and "global" means for 
QWindowSystemInterface::handleMouseEvent. Sending
the mouse position in window coordinates for both
works.
2011-06-07 10:53:37 +02:00
Eskil Abrahamsen Blomfeldt
ae3b5b3ab4 Add function QGlyphRun::setRawData()
To provide an optimized way of constructing QGlyphRun objects with no
copying or allocation, we add function setRawData() (naming inspired by
QByteArray::setRawData()). Data retrieved from QRawFont can be passed
directly into this. The logic is now that the data pointers in
QGlyphRunPrivate should always point to the current valid data and is
what will be used in comparisons and drawing calls. The vectors are
optimizations to avoid unnecessary copying if the user wants to use
the QVector based API (which makes it easier to manage the memory.)
This reflected in the functions that return QVectors, which will
return the stored vector if and only if it is identical to the
current pointer. Otherwise we will have to copy the memory.

The internal addition operators in QGlyphRun have been removed since
they really provide no real optimization and have an unclear definition
if the two glyph runs are based on different fonts.

Reviewed-by: Jiang Jiang
(cherry picked from commit 86d88c5b719fd3d50336d9d8e7127b8045ee82ae)

Change-Id: Id5bb55ee3d93afb32ffca850f53382e856df7b3e
Reviewed-on: http://codereview.qt.nokia.com/342
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-06-07 10:30:57 +02:00
Richard Moe Gustavsen
bc6f4d14f7 Buildfix for Mac OS
Since 'widgets' now is a separate library outside GUI, some
previously hidden symbols now needs to be exported. This patch
will make 'widgets' build.
2011-06-07 09:53:09 +02:00
Eckhart Koppen
eabaf61256 Added private header dependencies to MeeGo graphics system plugin
Depends on core, gui and opengl private headers

Change-Id: If3266c3b7233bf40b5ad80a8a99fd5f2c7eafcec
Reviewed-on: http://codereview.qt.nokia.com/336
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eckhart Koppen <eckhart.koppen@nokia.com>
2011-06-06 19:11:25 +02:00
Samuel Rødal
078e4ef6c7 Made tst_QWidget::updateWhileMinimized() pass.
This requires adding a couple of window system interface events, namely
Map, Unmap, and Expose. When a widget is minimized on X11 it is
unmapped, and thus update requests should not be delivered. Instead the
event will delivered when the widget is mapped, which causes an Expose
event to be sent. The Unmap and Expose event thus need to be handled in
QWidgetWindow, and Map is also added for the purpose of API symmetry
(and for future needs).
2011-06-06 16:03:38 +02:00
Samuel Rødal
481067453f Fixed warning about missing return in qmessagebox.cpp 2011-06-06 16:03:38 +02:00
Gunnar Sletta
42b47a404b Use Raster pixmaps for the EglFS plugin
Change-Id: Id94df7b5ebe298104d05bee3ae58e06201c596f7
Reviewed-on: http://codereview.qt.nokia.com/334
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-06-06 15:33:16 +02:00
Morten Sorvig
0bb276863f Set visibility state. 2011-06-06 14:49:13 +02:00
Jørgen Lind
fc9a648dc0 Make building of platform plugins indifferent if its out of source
This requires some source files to be shipped with the Qt install
They are now copied into QT_INSTALL_DATA/platform
2011-06-06 14:35:36 +02:00
axis
ec5cdf9c5d Added module CONFIG to uitools.
This seems to be necessary for installing, and has no side effects
that I can tell.

Change-Id: Ic778b8a3937621ddd401ddd83d05831460db8f39
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/236
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-06-06 13:29:40 +02:00
Samuel Rødal
0273bc5d22 Made tst_QWidget::repaintWhenChildDeleted() pass.
Implement some missing functionality in QWidget::destroy().
2011-06-06 12:38:41 +02:00
Samuel Rødal
d75a9444aa Prevent tst_QWidget::showAndMoveChild() from failing on KDE.
Since we grab the desktop the KDE task bar appears on top of the window
we're interested in. It's preferable to make the window a bit smaller.
2011-06-06 12:38:41 +02:00
axis
ff65077074 Make qmake slightly more verbose with its syncqt output.
It can be hidden with -silent, however.

Change-Id: I6dbd3c743779b8d2070e41f007df26b530987429
Reviewed-on: http://codereview.qt.nokia.com/235
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-06-06 10:42:13 +02:00
Marius Storm-Olsen
ccd5228a93 Disable trying to compile network tests which require QtScript
Those tests should be moved to QtScript/tests/auto

Change-Id: Icc0c50ef35ac08e604ab18cb87b0c2b19f2fc72c
Reviewed-on: http://codereview.qt.nokia.com/197
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-06-06 10:42:12 +02:00
Laszlo Agocs
78264f333e Avoid setting the active window to null when there is a FocusIn queued. 2011-06-06 10:15:14 +02:00
Samuel Rødal
4f1a6ac732 Implemented QXcbScreen::topLevelAt(const QPoint &p).
This makes the tst_QWidget::widgetAt() auto-test pass.
2011-06-06 09:08:25 +02:00
Samuel Rødal
36b2c31ba8 Make XCB plugin work better in combination with auto-tests.
When an auto-test calls processEvents() indirectly via QTest::qWait(),
QAbstractEventDispatcher::aboutToBlock() doesn't get emitted since
the processEvents() implementation gets called without
the QEventLoop::WaitForMoreEvents flag set. Since the auto-tests depend
on all events getting delivered, we need to process the XCB events on
awake() as well.
2011-06-06 09:00:13 +02:00
Samuel Rødal
0ca326917a Made the tst_QWidget::widgetAt() test a bit more robust.
The QTRY_VERIFY() should include the whole test, not just whether we got
a widget or not, since it might be the wrong one.
2011-06-06 08:57:37 +02:00
axis
1835afe621 Moved common module profiles to be feature profiles.
This enables external modules to also make use of them without having
access to the complete QtBase source code.

Change-Id: I056e45cba6c6798b76670b8d238dadb2d9f9c092
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/234
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-06-05 14:47:14 +02:00