Commit Graph

951 Commits

Author SHA1 Message Date
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
Liang Qi
c8888b518b QDataStream: speedup steaming of QUuid.
By reading and writing as a whole block, because the size of QUuid
is fixed.

Reviewed-by: joao
(cherry picked from commit d56d7f107f9d18810d742ac4d3a2e36077722cb8)

Change-Id: I90554d68da7394c99c48acd0bc5a0eee3b3f7776
Reviewed-on: http://codereview.qt.nokia.com/169
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-05-27 13:21:41 +02:00
Liang Qi
ae0eb22591 Optimize QUuid::QUuid(const char *)
Reviewed-by: joao
(cherry picked from commit 96d10abbb40c52ac6274f1144766f3fb27dfd726)

Change-Id: I050b602b6cac669b4d88046b0a707048ce0a8cda
Reviewed-on: http://codereview.qt.nokia.com/170
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-05-27 13:21:40 +02:00
Liang Qi
fb214079bd Fix the build for QUuid
Add a quint8 specialization for qbswap.

Reviewed-by: Bradley T. Hughes
(cherry picked from commit 32a583b575da1b387955734ccf36b0a93de37670)

Change-Id: I7dae5e47565ed30de960983649e5c214e0303fe3
Reviewed-on: http://codereview.qt.nokia.com/171
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-05-27 13:21:39 +02:00
Friedemann Kleint
4ace7475e7 uic: #include <QLayout> for QToolBox on non-laid-out forms.
for the fake tab-spacing property, which accesses the internal
layout and sets its spacing.

Task-number: QTBUG-19339
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Change-Id: I89f5c035bd3798a0998c3046de643bda0fa8da6b
(cherry picked from commit 89f5c035bd3798a0998c3046de643bda0fa8da6b)
Reviewed-on: http://codereview.qt.nokia.com/173
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-05-27 12:12:20 +02:00
Friedemann Kleint
bf234e3288 uic: Use QString::fromUtf8 for QUrl properties.
As otherwise the compilation of ui_-files fails when
using QT_NO_CAST_FROM_ASCII. Bug reported on mailing list.

Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Change-Id: I00bf2e2605b97ff77efdcb68b7968375b3e9d195
(cherry picked from commit 00bf2e2605b97ff77efdcb68b7968375b3e9d195)
Reviewed-on: http://codereview.qt.nokia.com/174
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-05-27 12:12:17 +02:00
Liang Qi
40425ea53e Fix a regression in QList::mid()
It doesn't need to copy anything when pos is after size().

Task-number: QTBUG-19164
Reviewed-by: Oswald Buddenhagen
(cherry picked from commit 8befc4982a32752e48c82cacbed045e7336a3569)

Change-Id: Iccac75842616f0d41e457e844a15d1a3ccfeb642
Reviewed-on: http://codereview.qt.nokia.com/164
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-05-27 11:06:52 +02:00
Liang Qi
d6c9916fd1 Add some autotests and benchmarks for QUuid
Missing those functions for optimization.

Reviewed-by: joao
(cherry picked from commit 4e9286880fd2686e61de2c4be3c317e01f0d9989)

Change-Id: I147e028f10cec7abc545dcbcca911d39a89d830e
Reviewed-on: http://codereview.qt.nokia.com/165
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-05-27 11:06:51 +02:00
Liang Qi
750f995fb2 Optimize QUuid::toString() and relevant
QUuid::toString() and QUuid(const QString &) are too slow now.

Task-number: QTBUG-19418
Reviewed-by: joao
Reviewed-by: Denis Dzyubenko
Reviewed-by: Ritt Konstantin
Reviewed-by: Robin Burchell
Reviewed-by: Richard J. Moore
(cherry picked from commit 7ce566ed82666ac08f137f4d8590ce589d42c82a)

Change-Id: I7e5bb4072f0941c20a7278a2d9766d4ef47be811
Reviewed-on: http://codereview.qt.nokia.com/166
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-05-27 11:06:49 +02:00
Rohan McGovern
ddc9698079 tests: fixed compile of tst_macgui
This test uses private headers.  Mark it as such.

Change-Id: Icb6463629e1414b9da5403d0e0d766d8a113bd57
Reviewed-on: http://codereview.qt.nokia.com/160
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-05-27 09:51:08 +02:00
Rohan McGovern
6abf9093f7 tests: fixed compilation of qstring benchmark on mac
On Mac, MAP_ANONYMOUS and MAP_POPULATE are not defined.

Fix MAP_ANONYMOUS by defining it to MAP_ANON.

Fix MAP_POPULATE by removing it, because its usage was unnecessary in
this code (the page was explicitly faulted in a few lines later anyway).

Change-Id: Iead82e1a949b35fe3c304d38babac8d4dc6f0769
Reviewed-on: http://codereview.qt.nokia.com/162
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-05-27 09:51:03 +02:00
Jason McDonald
2f2ffed775 Make lexgen tests compile
Correctly declare that the tests depend on the Qt build having testlib.

Change-Id: Icf3332bc81a10e701316f1cd7021d2f6d3c2f424
Reviewed-on: http://codereview.qt.nokia.com/158
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-05-27 08:41:02 +02:00
Jason McDonald
a6973e22ff Use "QT += testlib" consistently
If a project uses "load(qttest_p4)" it doesn't need to add testlib to
the CONFIG or QT variables.  If a project does not use
"load(qttest_p4)", it should add "testlib" to the QT variable.

Change-Id: If28353713ccdfe13612682e3e88dadebe2f2eefd
Reviewed-on: http://codereview.qt.nokia.com/159
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-05-27 08:41:00 +02:00
Gabriel de Dietrich
d49973f834 Fix infinite recursion when changing geometry on Mac
Some complex widgets might get a negatively sized rectangle when
calling QWidgetPrivate:setGeometry_sys_helper(), triggering a infinite
recursion. Normalizing the rectangle size before checking for size
change is enough to break this infinite recursion.

Task-number: QTBUG-17333
Change-Id: I4682c3088ea53fb9f28f746c8264f573b5284825
Reviewed-on: http://codereview.qt.nokia.com/156
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-05-26 20:39:30 +02:00
Olivier Goffart
bbbea1fa96 Fix typo in comment
(cherry picked from commit c8a3c427e96ee11907592f5c7f72046795c027ed)
Change-Id: I837f18f043b18410c1d93b9f1156acf729dad510
Reviewed-on: http://codereview.qt.nokia.com/145
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Reviewed-by: axis
2011-05-26 19:22:41 +02:00
Friedemann Kleint
0064dc7bc8 XCB: Fix moveToScreen to use QWindow instead of QWidget. 2011-05-26 17:25:27 +02:00
Olivier Goffart
bc7ea289ea Added some of my Qt 4.8 changes to the changelog
Change-Id: I8913c88e5bd68145e0587d51ee9896fd5d21054a
Reviewed-on: http://codereview.qt.nokia.com/140
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-05-26 14:16:22 +02:00
Olivier Goffart
cc6faee69e MSVC do not really support initilizer_list
std::initializer_list exists, but it is not possible to do bracket
initialisation

Reviewed-by: Joao
(cherry picked from commit a09f5c425079405e72078813bdb7b103c29a5221)
Change-Id: I837f18f043b18410c1d93b9f1156acf729dad510
Reviewed-on: http://codereview.qt.nokia.com/143
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-05-26 14:16:22 +02:00
Olivier Goffart
d3e5fc0220 Support of lambdas in QtConcurrent::run
Reviewed-by: Joao
(cherry picked from commit 917f2ff617209bcc283eb3590b422bcf239c0537)
Change-Id: I837f18f043b18410c1d93b9f1156acf729dad510
Reviewed-on: http://codereview.qt.nokia.com/142
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-05-26 14:16:21 +02:00
Olivier Goffart
83291e6a07 Add QtPrivate::QEnableIf
Needed for QtConcurrent.

Like the new std::enable_if (in c++0x)

Reviewed-by: Joao
(cherry picked from commit 837f18f043b18410c1d93b9f1156acf729dad510)
Change-Id: I837f18f043b18410c1d93b9f1156acf729dad510
Reviewed-on: http://codereview.qt.nokia.com/141
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-05-26 14:16:20 +02:00