Commit Graph

655 Commits

Author SHA1 Message Date
Liang Qi
26877d990b Support -qtnamespace and -qtlibinfix again
This fix is for qtbase libraries with -qtnamespace and -qtlibinfix
options in configure.

Task-number: QTBUG-19964
Change-Id: I2f2ff1748f2c1c2b20d5f73b6be36f68a7a26cef
Reviewed-on: http://codereview.qt.nokia.com/505
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-06-20 15:27:18 +02:00
Eskil Abrahamsen Blomfeldt
46ffabde50 Fix empty lines in Qt HTML when displayed in external browsers (again)
This redoes f541c78e1bc5b293466b40e6f10496199a4a5d73 in a way which
should be more compliant with different browsers. In particular,
Outlook didn't support the CSS trick in the last fix, so we need the
somewhat larger patch which adds an extra line break node to the tree
and then ignores it when re-importing the document.

Task-number: QTBUG-3669
Reviewed-by: Simon Hausmann
(cherry picked from commit cb760eaef631abd49836ae5c8dc12a61ef5eff0d)

Change-Id: Ia55bf39d52461aa9445a9a5d0bfb5b4c5bf1e9bd
Reviewed-on: http://codereview.qt.nokia.com/492
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-06-20 15:27:17 +02:00
Martin Petersson
1d450c6941 QAuthenticator::setUser() parse user name in form user@domain
Task-number: QTBUG-19894
Change-Id: I063dbc66e5f47a83cc1c0aee8913062b4b5e42bc
Reviewed-on: http://codereview.qt.nokia.com/507
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-06-20 15:27:16 +02:00
Christian Strømme
883b120d2f Fix QProcess emitting two started signals on X11
On X11 QProcess would emit two started signals when calling
QProcess::waitForStarted(). We should expect that the private
implementation of waitForStarted() should emit the started signal
and return true or false appropriately.

Task-number: QTBUG-7039
Change-Id: I3d381399ab7a39bf57db03a110fa6747a4fc6a24
Reviewed-by: pending
Reviewed-on: http://codereview.qt.nokia.com/331
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
2011-06-20 14:13:17 +02:00
Eskil Abrahamsen Blomfeldt
18eb310d5b Fix bug which caused repeated characters in a QML Text
We would include too much in the characters displayed, since
itemEnd is actually the start of the next item and not the
end of the current one. Adding a minus one removes the duplicated
characters at the end of text lines.

Change-Id: I1e13470548fafaa692ae58e019e9e2469a947f5e
Reviewed-on: http://codereview.qt.nokia.com/495
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-06-20 13:08:48 +02:00
Eskil Abrahamsen Blomfeldt
f562b90518 Make it possible to set color of QStaticText with pixel size >= 64
Adding the fallback to QPainterPath for large QStaticTexts created a
regression where all text would be painted in black regardless of the
color you set on it. The color in QStaticTextItem is sometimes invalid,
in which case the current painter color should be used. In either case,
the color is already set on the current pen when entering
drawStaticTextItem() so we can just use that.

Task-number: QTBUG-19950
Reviewed-by: Jiang Jiang
(cherry picked from commit ee77ee5c25f58271e6f2863225d08573da86c3ee)

Change-Id: I955aa6526e5b14589430f8dccd006a9de9ae08c9
Reviewed-on: http://codereview.qt.nokia.com/491
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-06-20 12:01:22 +02:00
Gunnar Sletta
b9fcfa18f5 Initialize member variable.
Change-Id: Ica42c77614fa4fa9ae7692e00d3fc796219aacdc
Reviewed-on: http://codereview.qt.nokia.com/466
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-06-14 09:35:53 +02:00
Eckhart Koppen
a37f8e08ec Include cycle_p.h only conditionally
cycle_p.h is only needed when HAVE_TICK_COUNTER is defined, and should
not be included otherwise. It is also a 3rd party header which is not
exported as a private header so far, which makes compilation of
dependenty modules fail.

Change-Id: I5c2546eae7d65fc68b8411c20634aca541c327d6
Reviewed-on: http://codereview.qt.nokia.com/465
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-06-13 15:45:18 +02:00
Laszlo Agocs
bdda694e86 Handle really global selection offers in wayland clipboard.
Handle selection offer globals properly even if they arrive during the
initial blocking read. If such a global arrives so early, the platform
integration is not yet available from QApplicationPrivate (as it is
just being constructed). Therefore the handling of the selection
offer has to be delayed. At the moment selection offers are typically
posted as globals and not added to the global list, but that is likely
to change in the future.

Change-Id: Ib4ae804ad7f19e05978ee08828b88e028a3bf7b2
Reviewed-on: http://codereview.qt.nokia.com/446
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-06-10 14:27:32 +02:00
Ritt Konstantin
fc74b4e564 fix an incorrect OpenMode flags handling in QBuffer::open()
which leads to absurd statement (QBuffer::open() == !QBuffer::isOpen()) to be true.
also treat Truncate as (Truncate | WriteOnly) to satisfy lazy ones

Reviewed-by: Joao
Merge-request: 2612
(cherry picked from commit 6b91affb9a355e668bc9d06dee580d95230ac63a)

Change-Id: I657d4d0a33f7993313fe2a1a8ba408371991717f
Reviewed-on: http://codereview.qt.nokia.com/447
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-06-10 13:14:04 +02:00
Andy Shaw
c1ed7951ac Fix a case of SP_MediaSkipForward returning the wrong pixmap.
This fixes QTBUG-18311.

Merge-request: 2621
Reviewed-by: Joao
(cherry picked from commit a9364af090fd3209b92ed5e07a1374488d22b1c4)

Change-Id: I0a0fc99060c64a9aab395a183f2faf9223e9a925
Reviewed-on: http://codereview.qt.nokia.com/449
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-06-10 13:14:03 +02:00
Eskil Abrahamsen Blomfeldt
11bbfb5882 Fix missing empty lines in Qt HTML when displayed in compliant browsers
When QTextDocument exports HTML, it makes an effort to be compatible
with its own importer, hence it has to be compatible with the dialect
of HTML which Qt has developed over the years. One incorrect
interpretation in Qt is that an empty paragraph is interpreted as an
empty line. So if you use a QTextDocument to produce HTML for text where
an empty line has been added, this empty line will not be visible when
the document is viewed in a compliant browser. The fix is to set the
height of the empty paragraph to 1em, so that it will match the current
pixel size of the font, thus look the same as a <p><br /></p> but
without altering the structure of the document.

Reviewed-by: Gunnar
(cherry picked from commit f541c78e1bc5b293466b40e6f10496199a4a5d73)

Change-Id: Ic0eae2c81609b8872eb2eb9344a3ec416cd09149
Reviewed-on: http://codereview.qt.nokia.com/445
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-06-10 12:04:16 +02:00
Tapani Mikola
db37aa1004 Fontengine buildfix for xcb platform plugin.
Change-Id: Ic909e1ac08163e62634643c68862e802a016b911
Reviewed-on: http://codereview.qt.nokia.com/442
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-06-10 09:40:55 +02:00
Jiang Jiang
97391be5eb Allow selecting fonts with irregular style names
Fonts like "Helvetica Neue UltraLight" or "Skia Regular Black
Condensed" can't be selected in Qt because either they don't
report correct numeric values for weight/stretch/etc. or these
values are not mapped from QFont enums in a linear way. Thus
we provide a shortcut to select these fonts with PostScript
name or full name without resorting to family name matching in
QFontDatabase (these fonts are not registered in font database
anyway). After this, we can simply use:

    QFont font("Helvetica Neue");
    font.setStyleName("UltraLight");

to select these fonts. QCoreTextFontEngineMulti matched like
this can be created directly from the CTFontRef instance
instead of creating from the font name, making this process
faster.

The commit also cleaned up the font loading process in Mac
font database a bit, moving the code for family matching into
a separate function.

Add QFontInfo::styleName() and QRawFont::styleName() to access
the resolved style name for a font.

Task-number: QTBUG-19366
Change-Id: Iad07768c02ed06cc8d6b7395dec554384f410506
Reviewed-on: http://codereview.qt.nokia.com/333
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-06-09 15:07:13 +02:00
Gunnar Sletta
b97215b04c Duplicate some harfbuzz symbols inside Qt.
This is done to remove a compile-time dependency on the harfbuzz
source files inside qtbase/src/3rdparty. These are not accessible
now that QT_SOURCE_TREE is not accessible as a qmake variable
anymore.

With the refactor branch we might solve this differently, but for
now this is how we get svg and declarative to compile.

Change-Id: I5dad23f2ea1f650e2621c1c1fcf39632a3a22ae8
Reviewed-on: http://codereview.qt.nokia.com/378
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-06-09 13:01:16 +02:00
Eckhart Koppen
dc25fb7278 Use homePath instead of homeDirPath
homeDirPath requires Qt 3 support, which is not enabled in all
configurations.

Change-Id: I7d51b880574021ef4569a4a2b16f06a7786dbb7d
Reviewed-on: http://codereview.qt.nokia.com/415
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
2011-06-09 11:43:30 +02:00
Pierre Rossi
94c173de05 Add tilde (both ~ and ~<user>) expansion to QFileDialog on UNIX.
Task-number: QTBUG-3265

Change-Id: Id8062afe69e798e1f9cf3f4e967ae0d30c362b72
Reviewed-on: http://codereview.qt.nokia.com/411
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
2011-06-08 22:37:52 +02:00
Marius Storm-Olsen
15d6f1f031 Fix modules to load(qt_module) first
Change-Id: Iabdfffff09088243863a8661add73298ed8baaf3
Reviewed-on: http://codereview.qt.nokia.com/413
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-06-08 21:04:48 +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
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
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
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
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
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
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
Jiang Jiang
c25495dba7 Correct antialias disabling logic for Core Text
We should always turn antialias off when QFont::NoAntialias being
passed in styleStrategy. That corrects some QStaticText tests.

Change-Id: Iaffc5f3bb7f501dcb648cab41a8b6ffcf93f90ae
Reviewed-on: http://codereview.qt.nokia.com/328
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-06-04 12:20:01 +02:00
axis
55f2a05a20 Install some headers that were previously missing from install.
Change-Id: I58a5f58e6e03e3e266de23beee47de0c823f3240
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/233
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-06-03 22:20:39 +02:00
Jiang Jiang
39d6b7b287 Fix Windows build
Change-Id: Ieafe2cefe0dcb00a3b22133506fb854428abff5e
Reviewed-on: http://codereview.qt.nokia.com/320
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-06-03 13:14:18 +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
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
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
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
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
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
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
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
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
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
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
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
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
Shane Kearns
785905a1f4 Fix thread safety regression of QNetworkConfigurationManager
Changes in 4.8 led to a timer being created in the wrong thread.
I have restored the invokeMethod used to call startPolling() to solve
this problem.

Reviewed-By: mread
(cherry picked from commit e9e95f75e7c1e8325c2acce0087ff8677d773779)

Change-Id: I8b89fa89766679beb2d469f9bbd1f5e2233f061b
Reviewed-on: http://codereview.qt.nokia.com/138
Reviewed-by: Markus Goetz
2011-05-26 14:16:18 +02:00
shiroki
a78e184811 fix "Host" header of ipv6 URLs in QNAM
Change-Id: I6bf3320e5ab285e3d1f4d72bd1ef0a0e42813e5b
Reviewed-on: http://codereview.qt.nokia.com/115
Reviewed-by: Markus Goetz
2011-05-26 14:16:16 +02:00
Jason Barron
8c9deffcb3 Add private header support to the EGLFS platform plugin.
Several of the QPA headers include private headers in the Core, Gui and
OpenGL modules and with the new modularized Qt, we need to opt-in for
these.

Change-Id: Ib7a81f7843ef89e3c5c5218f790287bb6c00e4cb
Reviewed-on: http://codereview.qt.nokia.com/133
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-05-26 12:51:11 +02:00
Jason McDonald
0ed16a1c55 Remove the redundant QTEST_ACCESSIBILITY define.
QTEST_ACCESSIBILITY was always defined and only used in one autotest.
Code that uses accessibility features should be excluded if Qt was built
without accessibility rather than based on a define in the test
framework.

Change-Id: I3a517a579a51f536a0983b43bd99e86292026552
Reviewed-by: pending
Reviewed-on: http://codereview.qt.nokia.com/129
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-05-26 09:30:03 +02:00
Jiang Jiang
635af8d700 Fix QGLWidget::renderPixmap for raster engine on Mac
The QPixmap buffer is backed by QRasterPixmapData instead of
QMacPixmapData for the raster engine, thus we have to update
qt_mac_pixmap_get_base() and qt_mac_pixmap_get_bytes_per_line(),
so that QGLWidget can locate the offscreen buffer from a QPixmap.

Reviewed-by: Fabien Freling
(cherry picked from commit c5846314dfd80e7f7f32ba737f1884dcccbbd80d)

Change-Id: I2414222f8a59e02c778177d52ad9a6e0ff68668d
Reviewed-on: http://codereview.qt.nokia.com/123
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-05-25 17:57:35 +02:00
Jiang Jiang
ffc1950591 Workaround a bug in Core Text to select Light fonts
Currently in Core Text there is not proper way to select fonts with
Light weight, for example:
QFont font("Helvetica"); font.setWeight(QFont::Light);
will give you Helvetica-Light, as with:
QFont font("Helvetica"); font.setWeight(QFont::Normal);
because of a bug in Core Text, applying 0 symbolic traits with
CTFontCreateCopyWithSymbolicTraits will always return the Light
variant of that font family. Thus, we should only do this unless
symbolicTraits is not 0 or font.weight is not Normal (Light is not
a symbolic trait, but CT doesn't support selecting Light weight
numerically).

Reviewed-by: Eskil
(cherry picked from commit 4d5b8f66d82e9087d9d58a4e76e6b46ce7bb53cc)

Change-Id: I37a970aba5019a13b9f3bc43b7fb594b74a1aa37
Reviewed-on: http://codereview.qt.nokia.com/124
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-05-25 17:57:34 +02:00
Lasse Holmstedt
1909e03882 Add authentication token support for wayland windows
For compositors that support it, the wayland clients can associate themselves
with an auth token, specified by WL_AUTHENTICATION_TOKEN env var, or by
directly specifying it in the wayland client plugin.

Change-Id: I74a50a27c7c61c2b2cf1e09868618f36edc94cb1
Reviewed-by: Samuel Rødal
Reviewed-on: http://codereview.qt.nokia.com/116
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-05-25 17:05:49 +02:00
Jiang Jiang
6fe12b0e80 Fix QFontEngineX11FT compilation
xglyph_format is only available when XRender is present.

Reviewed-by: Fabien Freling
(cherry picked from commit a6642e4659b3d45ffa94f9a3c6413124d49f2b91)

Change-Id: Ibd767c5055c8fb4a7d28ace141f6713f4367d1ba
Reviewed-on: http://codereview.qt.nokia.com/113
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-05-25 16:08:03 +02:00
Sergio Ahumada
ef91383324 Doc: Fixing typo
Change-Id: Icd73646a9562af5fd6ae56e36ca268719d32471c
Reviewed-on: http://codereview.qt.nokia.com/112
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-05-25 15:11:35 +02:00
Qt Continuous Integration System
1a74e8246a Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Compile.
2011-05-25 17:12:22 +10:00
Morten Sorvig
1be4b50bac Compile.
Change 0748751c brought in an extra copy of this
function.
2011-05-25 09:08:09 +02:00
Qt Continuous Integration System
6bd691dc54 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging: (21 commits)
  Fixed line endings.
  Update licenseheader text in source files for qtbase Qt module
  New configure.exe binary
  Add -qpa option on Windows
  Use qglobal.h's VERSION number instead of hardcoded current version
  More examples adjusted to Symbian and Maemo5. (cherry picked from commit a97b9620a584c9b1a2e006873183526b3d7e001e)
  Doc: Added some details to the accessibility events API documentation.
  Doc: Fixed qdoc warnings.
  Doc: Fixed qdoc warnings.
  Doc: Made an additional change for clarity.
  Doc: Noted that the example will not work as expected with a mouse.
  Doc: Fixed qdoc warnings.
  Doc: Applying a pending change from previous merges.
  Doc: Fixed qdoc warning.
  Doc: Fixed qdoc warnings.
  Doc: Applied pending fixes to API documentation.
  Doc: Various fixes to documentation, some based on changes in master.
  Doc: Added missing project and desktop files.
  Doc: Documented the value returned when no field can be found.
  Squashed commit of changes from the 4.8-temp branch.
  ...
2011-05-25 01:11:52 +10:00
Qt Continuous Integration System
e60f05201f Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging:
  QUrl auto test: include core-private headers
  QUrl TLD: fix documentation file for "Add QUrl::topLevelDomain() ..."
  Add QUrl::topLevelDomain() and move TLD table from QtNetwork to QtCore
2011-05-24 21:43:46 +10:00
Peter Hartmann
e63026dcbd QUrl TLD: fix documentation file for "Add QUrl::topLevelDomain() ..."
see previous commit

Task-number: QTBUG-13601
(cherry picked from commit 9face4b88de2db6f552149d2f96257620e971a59)
2011-05-24 12:12:13 +02:00
Robert Hogan
093a92fb03 Add QUrl::topLevelDomain() and move TLD table from QtNetwork to QtCore
Move Qt's copy of the Mozilla public suffix list from QtNetwork
to QtCore and use it to expose a new API function QUrl::topLevelDomain().
This function returns the section of the url that is a registrar-controlled
top level domain.

QtCore now exports a couple of functions to the other Qt modules: qTopLevelDomain,
a helper function for QUrl::topLevelDomain(); and qIsEffectiveTLD(), a helper
function for QNetworkCookeieJar.

The motivation for this new API is to allow QtWebKit implement a Third-Party
Cookie blocking policy. For this QtWebKit needs to know the element of the url
that is the registry-controlled TLD. Without this knowledge it would end up
blocking third-party cookies per host rather than per registry-controlled domain.

See also https://bugs.webkit.org/show_bug.cgi?id=45455

Merge-request: 1205
Task-number: QTBUG-13601
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
(cherry picked from commit 154402f56dcf8303a6ce601a52215226af8d31ba)
2011-05-24 12:12:04 +02:00
Qt Continuous Integration System
fe0ae9fd2a Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging:
  fix Symbian ordinals for merge request re. utf8 characters in SSL certs
2011-05-24 20:01:46 +10:00
Jyri Tahtela
f9f395c28b Update licenseheader text in source files for qtbase Qt module
Updated version of LGPL and FDL licenseheaders.
Apply release phase licenseheaders for all source files.

Reviewed-by: Trust Me
2011-05-24 12:34:08 +03:00
Peter Hartmann
6c72eb8456 fix Symbian ordinals for merge request re. utf8 characters in SSL certs
Task-number: QTBUG-7912
(cherry picked from commit 83c37059df7f23be482d4ecb2c54603a3665a33d)
2011-05-24 10:33:21 +02:00
Qt Continuous Integration System
da88412334 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging:
  add auto test for SSL certificates containing utf8 characters
  fix coding style for merge request re. utf8 characters in SSL certs
  Use OpenSSL X509_NAME_ENTRY API to parse UTF8 subjectName/issuerName
2011-05-24 01:59:03 +10:00
Pierre Rossi
fe54165149 fix coding style for merge request re. utf8 characters in SSL certs
fixes minor coding issues for
"Use OpenSSL X509_NAME_ENTRY API to parse UTF8 subjectName/issuerName"

Task-number: QTBUG-7912
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
(cherry picked from commit 2e8d206fd9f656cd88b797c059ef83ed3df32881)
2011-05-23 17:41:57 +02:00
Raul Metsma
92f6bd3a15 Use OpenSSL X509_NAME_ENTRY API to parse UTF8 subjectName/issuerName
... to be able to display non-ASCII names from subject and issuerInfo.

Task-number: QTBUG-7912
Merge-request: 922
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
(cherry picked from commit e5d94256be2525c24a8b61edd771662b7f2b8be3)
2011-05-23 17:41:47 +02:00
David Boddie
122d206087 Doc: Added some details to the accessibility events API documentation.
Reviewed-by: Frederik Gladhorn
2011-05-23 14:24:10 +02:00
David Boddie
be2b27824a Doc: Fixed qdoc warnings. 2011-05-23 14:24:09 +02:00
David Boddie
b5a989dc11 Doc: Fixed qdoc warnings. 2011-05-23 14:24:09 +02:00
David Boddie
9c3a1d290a Doc: Fixed qdoc warnings. 2011-05-23 14:24:09 +02:00
David Boddie
7ff15bc4f5 Doc: Applying a pending change from previous merges. 2011-05-23 14:24:09 +02:00
David Boddie
a31fae0835 Doc: Fixed qdoc warning. 2011-05-23 14:24:08 +02:00
David Boddie
234b36698e Doc: Fixed qdoc warnings. 2011-05-23 14:24:08 +02:00
David Boddie
4d7d6d70e5 Doc: Applied pending fixes to API documentation. 2011-05-23 14:24:08 +02:00
David Boddie
9235701d72 Doc: Documented the value returned when no field can be found.
Task-number: QTBUG-19115
2011-05-23 14:24:07 +02:00
David Boddie
0748751c9f Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
2011-05-23 14:24:07 +02:00
Eskil Abrahamsen Blomfeldt
5feefb0c03 Enablers for TextInput
In order to use the scene graph text node in TextInput, we
need enablers. Most of this is to enable selections,
which in turn means we need to be able to extract a certain
set of glyphs from a QTextLine.
2011-05-23 13:38:22 +02:00
Paul Olav Tvete
6e99936502 Track Wayland changes
The wl_display_get_xxxx_visual() functions have been removed, and
are replaced by a compositor event.

Reviewed-by: Samuel
2011-05-23 12:59:29 +02:00
Simon Hausmann
4f2138ecfb Fix inconsistency between Qt and ICU in Shift-JIS codec with regards to ASCII range
Qt's Shift-JIS codec maps the characters 0x5c and 0x7e to unicode yen (0x5a)
and unicode overline (0x203e). ICU and (as it turns out) Symbian's native
Shift-JIS codec preserve 0x5c and 0x7e when converting to Unicode.

Qt's behaviour creates a problem when loading japanese web sites that are
encoded in Shift-JIS. When they reference external JavaScript files, those tend
to inherit the current page encoding (unless the character set is explicitly
specified). Consequently JavaScript tends to contain regular expressions (as a
built-in feature of the language), which in turn uses backslashes for escape
sequences. Therefore it is crucial that the encodings used to decode the script
preserve the ASCII range, i.e. do not convert 0x5c (ascii backslash) to
something else.

This patch corrects the behaviour of Qt's Shift-JIS codec to leave all
characters < 0x80 unaltered in the process of conversion to and from
Unicode.

Task: QTBUG-19335

Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
(cherry picked from commit 8e321cd869da7ff1cf0168da41aa0246b44867cc)
2011-05-20 13:55:12 +02:00
Qt Continuous Integration System
4bd181fb5a Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  tst_qhostinfo: Fix IPv6 lookup detection on Windows.
  Fix incorrect hardware address on systems without getifaddrs()
  Make QHostAddress.toString() follow RFC-5952 for IPv6 address format.
2011-05-20 19:18:56 +10:00
Craig Scott
0ebe0414d2 Fix incorrect hardware address on systems without getifaddrs()
On unix systems for which QT_NO_GETIFADDRS is defined, the way that the
hardware address field is extracted from the result of a call to
qt_safe_ioctl() is incorrect. The address of the ifreq.ifr_addr struct
is taken rather than the appropriate member within that struct, sa_data,
resulting in a memory offset and subsequently the hardware address has
garbage in the first two of six fields. This commit modifies the code
to pass the sa_data member instead of the address of the struct as a
whole.

Task-number: QTBUG-19165
Merge-request: 2614
Reviewed-by: Martin Petersson
(cherry picked from commit 004ad12669ef696eeba70fd57d1eb0c67c806d1d)
2011-05-20 10:46:47 +02:00
Martin Petersson
5a19d52ae7 Make QHostAddress.toString() follow RFC-5952 for IPv6 address format.
Task-number: QTBUG-18426
Reviewed-by: Peter Hartmann
(cherry picked from commit ebc134db484eee31491836b619aad1ee86e3070e)
2011-05-20 10:44:12 +02:00
Qt Continuous Integration System
3a88b3c9e6 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Full translucent background support in xcb and xlib backend.
  Lighthouse xcb and xlib: Add support for transparency of GLX windows.
  Lighthouse minimal: Add support for transparency
  Compile fixes for Xlib plugin.
2011-05-20 03:08:34 +10:00
Samuel Rødal
3d34c9b78e Full translucent background support in xcb and xlib backend.
Make sure to pick an alpha visual also for non-GL surface types, and to
ask for alpha in the window format if the WA_TranslucentBackground
attribute is set.

Reviewed-by: Janusz Lewandowski
(cherry picked from commit 6241e39cff9311c943430ff2f31236b13618f2ac)
2011-05-19 19:03:23 +02:00
Janusz Lewandowski
dd43611b97 Lighthouse xcb and xlib: Add support for transparency of GLX windows.
Merge-request: 1231
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
(cherry picked from commit a3b627e1c5ce03a2500ab35c64729b1995639dcc)
2011-05-19 19:03:22 +02:00
Janusz Lewandowski
463e31fd58 Lighthouse minimal: Add support for transparency
Merge-request: 1231
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
(cherry picked from commit c15b41056e60abdbb4d835e27a360f01be618a4f)
2011-05-19 19:03:22 +02:00
Samuel Rødal
852e9766ed Compile fixes for Xlib plugin.
(cherry picked from commit 4af11f2c6666c55657569f946c33816f33711225)
2011-05-19 19:03:17 +02:00
Qt Continuous Integration System
f60b3e90e6 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Don't crash if windowmanager is not initialized
  Compile fix for 64bit Linux.
2011-05-20 00:58:20 +10:00
Lasse Holmstedt
611837baec Don't crash if windowmanager is not initialized
This can happen if there is e.g. no wayland server.

Reviewed-by: sroedal
(cherry picked from commit aea5e35f57d061b133d2fa613d10f5e0118f5706)
2011-05-19 16:54:12 +02:00
Qt Continuous Integration System
a813d7c24a Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Wayland: send surface id + process id pairs to compositor
2011-05-19 22:53:06 +10:00
Lasse Holmstedt
a98ebc599a Wayland: send surface id + process id pairs to compositor
This enables doing window/process management since we can now
actually map the process we've launched to a window.

Reviewed-by: Samuel Rødal
(cherry picked from commit 457c33d9fd308542c9290fd60bf86960f9251255)
2011-05-19 14:44:00 +02:00
Qt Continuous Integration System
c1031d334f Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Remove warning from QColor::setNamedColor().
2011-05-19 21:55:04 +10:00
Qt Continuous Integration System
fe0a4972b8 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Fixed compile of qdrawhelper_neon.cpp.
2011-05-19 21:21:09 +10:00
Samuel Rødal
0377b7f96d Remove warning from QColor::setNamedColor().
This warning is pointless as the user can anyway check if the color is
valid after making the call by calling isValid(). Using isValidColor()
could be used but it has a big performance overhead as validation then
needs to be done twice.

Task-number: QTBUG-19098
Reviewed-by: Erik Verbruggen
(cherry picked from commit a423ff5474b89028eeca95b254f5184311c8223b)
2011-05-19 13:17:53 +02:00
Samuel Rødal
4ec4d78711 Fixed compile of qdrawhelper_neon.cpp.
We need to use the quad-word intrinsic and reinterpret the cast to
a signed int vector.

Reviewed-by: Kim Motoyoshi Kalland <kim.kalland@nokia.com>
(cherry picked from commit d2d7aef223a3bad368c6b7c7f7f4617f4acf323c)
2011-05-19 13:16:50 +02:00
Qt Continuous Integration System
77cd5455b2 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Compile IPC tests.
  Always call XInitThreads.
  Remove redundant #ifdef's from benchmarks
  Improve coding style of qdatastream test
  Don't use Qt3Support in arthur test suite.
  Remove Qt3Support code from QMenuBar autotest
  Remove Qt3Support code from QSplitter autotest
  Remove Qt3Support code from QSharedPointer autotest
  Remove Qt3Support code from QComboBox autotest
  Remove Qt3Support test code from accessibility autotest
  tests: allow unstable tests to be marked with CONFIG+=insignificant_test
2011-05-19 20:04:29 +10:00
Gunnar Sletta
105513a888 Always call XInitThreads.
Any Qt application that embeds a QSGView needs to call this
because of the threaded renderer. Today applications that
use threaded GL silently fail. In a few weeks time, the
refactor branch will be merged, which will obsolete this
change, so it is a temporary measure to get tests and
examples running.
2011-05-19 08:34:52 +02:00
Qt Continuous Integration System
4299467335 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  tests: fixed compilation of tst_qtextstream
  QUiLoader, QAbstractFormBuilder: Introduce errorString().
  Enable configuration for Xcb
  Fall back to using paths for large fonts in drawStaticText()
  Add ability to work around non-standard GLES implementations
  Fix broken drawing with large fonts using QStaticText and FreeType
  Remove Q_ASSERT's from qdbustype autotest
  Remove autotest code for Qt3Support library.
2011-05-19 10:07:06 +10:00
Friedemann Kleint
449b8a9317 QUiLoader, QAbstractFormBuilder: Introduce errorString().
Introduce errorString() to be able to obtain load errors
in Qt Designer. Remove automatic Qt 3 form conversion
from Qt Designer (since uic3 no longer exists) and move
all form load error checking logic including language
check into QAbstractFormBuilder.
Make language accessible in FormBuilderExtra in case
Jambi is revived.

Reviewed-by: hjk
2011-05-18 16:55:47 +02:00
Eckhart Koppen
b9ee8487e9 Enable configuration for Xcb
The xcb platform plugin can now be enabled using -xcb at configuration
time. A configuration time compilation check will be added at a later
point.

Reviewed-by: Samuel Rødal
2011-05-18 17:35:04 +03:00
Eskil Abrahamsen Blomfeldt
f4c1c2f939 Fall back to using paths for large fonts in drawStaticText()
QStaticText had an implicit risk which meant you had to make sure the
text size did not grow unreasonably large. This was intended to avoid
hiding the performance impact of using QStaticText for such a purpose,
but it's too inconvenient. Thus, the same fall back as in drawTextItem()
has been introduced. This will also fix a bug recently introduced when
we started using the FT cache to draw static text in the raster engine,
since this will fail for large fonts.

Task-number: QTBUG-19084, QTBUG-19370
Reviewed-by: Jiang Jiang
(cherry picked from commit 0aa9b30432cec3b7f366983f451fc9a7f8f83243)
2011-05-18 15:57:38 +02:00
Paul Olav Tvete
e8c95790d9 Add ability to work around non-standard GLES implementations
Reviewed-by: Gunnar
2011-05-18 15:31:14 +02:00
Olivier Goffart
b57a7e6994 QT_USE_QSTRINGBUILDER to fix source compatibility
In 4.8 we added support for using StringBuilder with QByteArray.
But this is breaking source compatibility for people that used
QT_USE_FAST_OPERATOR_PLUS in Qt 4.7. So we introduce a new macro

Notice that QT_USE_FAST_CONCATENATION was not working without
QT_USE_FAST_OPERATOR_PLUS, so we remove the checking of that macro.

Reviewed-by: joao
(cherry picked from commit 8447f5616be731d78081f326bb9cb3f5aa9087a4)
2011-05-18 15:17:17 +02:00
Eskil Abrahamsen Blomfeldt
5fcd60f256 Fix broken drawing with large fonts using QStaticText and FreeType
In FreeType, there's a fall back to QFontEngine::alphaMapForGlyph()
when the fonts are very large. Since this uses a QPainterPath containing
an unhinted glyph, the use of hinted metrics would sometimes lead to
the glyphs being clipped because they would be positioned slightly
outside the image they were painted into. When outline drawing is on,
it makes sense to return unhinted metrics, since the glyphs we will
actually use are unhinted.

Task-number: QTBUG-19067
Reviewed-by: Jiang Jiang
2011-05-18 14:55:03 +02:00
Eckhart Koppen
73e1f35fa3 Removed duplicate setting of QT dependencies
Reviewed-by: TrustMe
2011-05-13 18:36:12 +03:00
Eckhart Koppen
a9c2c15487 Updated default Qt version to 5.0.0
Changed default version in qbase.pri and qpluginbase.pri in case no
version is given at all.
2011-05-13 15:38:00 +03:00
Eckhart Koppen
36c29abc0d Removed deprecated functions in QList
Removed detach, detach2, detach3 and append which were marked
as required only up to 4.5.x
2011-05-13 13:47:56 +03:00
Eckhart Koppen
23d98f70b9 Updated Qt and QtBase module version number to 5.0.0
Updated version in qglobal.h as well as the module version itself
2011-05-13 13:22:30 +03:00
Eckhart Koppen
7d756ed718 Updated data stream version for Qt 4.9 and 5.0
For now, using the same version as 4.8. This needs to be corrected
when the actual data stream version is known.
2011-05-13 13:15:04 +03:00
Laszlo Agocs
542ba35f2f Fix deadlocks in wayland clipboard that can occur in special scenarios.
setMimeData() emits the changed signal always so to prevent duplicated
signals keyboardFocus() must only emit when the change came from
another wayland client. However direct connection may cause issues
when invoking the slot from a wayland callback, so use a metacall
to make sure we return from the callback. Unnecessary data transfer
and potential deadlock is now also avoided when a client is requesting
the mime data from itself.

Reviewed-by: Jørgen Lind
2011-05-13 09:27:11 +02:00
Jason McDonald
dd1a7a6379 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging 2011-05-13 10:42:41 +10:00
Jason McDonald
d9119535a2 Make error checking in QSignalSpy consistent
QSignalSpy's constructor failed gracefully for some problems with the
parameters, but not for null parameters, for which there was only a
Q_ASSERT.  This commit makes the handling of null parameters consistent
with the handling of other errors -- output a meaningful error message
with qWarning() and return, so that isValid() will subsequently return
false.

Change-Id: I7f5677a4c10185e30403ce3e12a022de8c13bc1c
Task-number: QTBUG-14283
Reviewed-by: Rohan McGovern
2011-05-13 10:42:06 +10:00
Lars Knoll
1a1471718d fix compilation with namespaces
Reviewed-by: Bjørn Erik Nilsen
(cherry picked from commit 7a1c29f101b95c9cc2cb53f8b80d231b5a994a9a)
2011-05-12 22:52:49 +02:00
Lars Knoll
4214ddc1d9 Fix compilation with namespaces enabled
Reviewed-by: Samuel Rødal
(cherry picked from commit bff68fc7094a50af57f7da23ecf9b25cab00f188)
2011-05-12 16:36:48 +02:00
Frederik Gladhorn
38ed8c2ddd Make QLineControl send accessibility updates.
To make it emit the signals for the right object, it needs its parent to
be the QGraphicsItem/SGItem/QLineEdit.
According to IA2 it should emit TextUpdated and CursorMoved signals.
TextChanged is deprecated.
More fine grained signals would be desireable but this makes changes work at all.

Reviewed-by: Morten Sorvig
2011-05-12 15:59:33 +02:00
Jan-Arve Sæther
1625b25a9f Revert "Fix double painting when adding an item into a linear layout"
(It did not really fix the issue.)

This reverts commit 33f525e636ef8fa64a15d3e66c56adaea0075bda.

Conflicts:

	src/gui/graphicsview/qgraphicslinearlayout.cpp
	tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
(cherry picked from commit fee052e3e37b3335fe563cb8a1881bf59f9e25d0)
2011-05-12 15:51:02 +02:00
Sergio Ahumada
446a7ba4ff Fix licence headers again for MR 900
See commit b00089261eafbdf5f92ed94d7fb20b402bfcaeb2

Reviewed-by: Gabriel de Dietrich
(cherry picked from commit bc16ebdb7aeff70fe8149297183636ea7fd14ed1)
2011-05-12 15:48:46 +02:00
Jan-Arve Sæther
913ff73200 Avoid flicker when invalidate is propagated in a widget/layout hierarchy
* Do not call invalidate from activateRecursive().
  This resulted in that a layout was invalidated as many times as there
  were items in the layout.

* Several improvements. Do not call resize(size()) too often.
  Calling resize() from the widgetEvent() is not very nice though...

* Remove commented out code

* make sure layout is activated even if the widget does not change size

* activate the layout if the resize is same as size()

* In order to not break existing apps, make this an opt-in feature
  with QGraphicsLayout::setInstantInvalidatePropagation(true);

Reviewed-by: Frederik Gladhorn
Reviewed-by: John Tapsell
2011-05-12 15:47:26 +02:00
Gabriel de Dietrich
1ce725cb60 Fix licence headers again for MR 900
See commit b00089261eafbdf5f92ed94d7fb20b402bfcaeb2

Reviewed-by: Trust me
(cherry picked from commit 7b6a7f475119878681c9d0c06b29896ec3fe72c3)
2011-05-12 15:43:54 +02:00
Lars Knoll
1f806aa1b4 New algorithm for drawing thin lines
Added a new QCosmeticStroker class for drawing thin
lines. The class can handle both aliased and antialiased
lines.

The code replaces all the midpoint line drawing algorithms in
the raster paintengine and gives correct subpixel positioning
for lines.

It gives around 30% to 50% speedup against the midpoint algorithm. If
we missed that fast path, the speedup is around between a factor of
6 to 8 for lines and aliased paths and 100 and 400 for antialiased
paths.

Reviewed-by: Kim
(cherry picked from commit 37c329a3e35fabc88fbcad824a69f37c671d2132)
2011-05-12 10:36:29 +02:00
Samuel Rødal
e40443f7df Prevent crash in OpenGL engine when scaling images / pixmaps.
Make sure the resulting image / pixmap is valid if the source was valid.

Task-number: QTBUG-19157
Reviewed-by: Kim
Reviewed-by: Benjamin Poulain
(cherry picked from commit 1c5da7207a21cc44a4a08d291c290ffcd9b958fd)
2011-05-11 17:34:42 +02:00
Stephen Kelly
d49c561b73 Add the QIdentityProxyModel.
Older commit history is in KDE svn:
http://websvn.kde.org/trunk/KDE/kdelibs/kdeui/itemviews/kidentityproxymodel.cpp?view=log

Ammended to update the license headers.

Merge-request: 900
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>

Conflicts:

	doc/src/frameworks-technologies/model-view-programming.qdoc
	tests/auto/headers/tst_headers.cpp

(cherry picked from b00089261eafbdf5f92ed94d7fb20b402bfcaeb2)
2011-05-11 17:37:48 +02:00
Shane Kearns
9d1a7b21c0 update def files
Reviewed-by: Trust Me
(cherry picked from commit 84cf56543c3e9add4f06ed65cf419561117ee739)
2011-05-11 16:40:09 +02:00
Martin Petersson
483807d4f2 emit QNetWorkAccessManager::finished on QNetworkReply::abort()
If we can not get online when the request is made then we are in the
WaitingForSession state. This will happen for example if the device
is in flight mode. This fix follows the same logic as in
_q_networkSessionFailed, but we should look into why we have the
WaitingForSession check in finished().

Task-number: QT-4747
Reviewed-by: Markus Goetz
(cherry picked from commit 0c9cb9a34d6b472cb53bf1af4616af55b593b616)
2011-05-11 16:39:59 +02:00
Oswald Buddenhagen
23db871a44 make QLibraryInfo return clean paths
as a side effect, don't use QDir for path resolution - it doesn't buy us
anything.

Task-number: QTBUG-1371
Reviewed-by: joerg
(cherry picked from commit 9cd62e4f7b23894a672297f6eebda64cdbd53cb0)
2011-05-11 16:39:45 +02:00
Oswald Buddenhagen
86a6ffbc3e make relative paths in qt.conf work inside qmake
Task-number: QTBUG-11602
Reviewed-by: joerg
(cherry picked from commit e6bb6ba76942d98e4b50a7fd32bf44e211f2fa5e)
2011-05-11 16:39:43 +02:00
Shane Kearns
119da2c8d4 Sockets: Fix potential null pointer usages
QAbstractSocketEngine::createSocketEngine can return 0 as well as throw.
In two cases the pointer was being used before the null check, in a 3rd
case the null check was missing.

Reviewed-by: Markus Goetz
(cherry picked from commit 19edac88af53eea7f733cabbaee77f9b725b7ea9)
2011-05-11 16:39:40 +02:00
Markus Goetz
10646142ae QNAM: Re-order checks in migrateBackend()
Do the easy checks first, will avoid a crash in the HTTP code
if request is serviced from the cache.

Task-number: QTBUG-18770
Reviewed-by: Peter Hartmann
(cherry picked from commit d03a28a289cf0665290e6ea0375b31cbb2d6649e)
2011-05-11 16:39:29 +02:00
Miikka Heikkinen
a2e836f3c1 Fix initial main window dimensions for "fullscreen with softkeys" case
The application main window defaults to fullscreen size when initially
constructed, even if softkeys are specified for it, as the screen
furniture is constructed later in show_sys. This resulted in the main
window being partially under softkeys.
Fixed by invoking handleClientAreaChange() explicitly in show_sys in
fullscreen with softkeys case.

Task-number: QTBUG-19043
Reviewed-by: Sami Merila
(cherry picked from commit e8fc93973a41f193665baa5fdc26cba951bd692f)
2011-05-11 16:39:20 +02:00
Bjørn Erik Nilsen
1e41e3076a Fixes crash in QWidget::effectiveWinId.
Widgets are left in a transitional (and incosistent) state while being
re-parented, which caused QWidget::effectiveWinId() to crash in certain
circumstances. See patch for more details.

Auto test included.

Reviewed-by: ogoffart
(cherry picked from commit 6db0153cd7e35e4a919a76ae2aadbf2d2510bfb7)
2011-05-11 16:38:49 +02:00
Shane Kearns
7ee981a834 Fix crash when QSocketNotifier used with an invalid descriptor
select code for open C file/socket descriptors was crashing in FD_SET
if a QSocketNotifier was created with an invalid descriptor.

Added two autotests to QSocketNotifier, one to check notifiers with
bogus socket descriptors don't crash, the other to check that notifiers
with posix socket descriptors do work. (symbian socket engine doesn't
use them so they are not implicitly tested)

Reviewed-by: mread
Task-Number: QTBUG-18138
(cherry picked from commit 8a9a6afcf02f089f932bc81431ab46a60af32134)
2011-05-11 16:37:58 +02:00
Shane Kearns
fe56131236 Optimisation - buffer packet read in pendingDatagramSize
In Symbian, the OS function to get the size of a pending datagram also
includes the size of the packet header (which is different for IPv4 and
IPv6). We were reading the datagram with the "peek" flag set to
implement pendingDatagramSize, then reading again normally when the
client called read/readDatagram.

This change removes the "peek" flag, and buffers the datagram in the
socket engine, returning it and clearing the buffer when read or
readDatagram is called.
If there is no buffered data, the existing code path is followed - it
isn't mandatory to call pendingDatagramSize before reading from the
socket.

Reviewed-by: Markus Goetz
(cherry picked from commit dd8de4c2437397748daba49569cbc7f89a8bfbee)
2011-05-11 16:37:23 +02:00
Shane Kearns
7d505004f5 Remove warnings when disabling notifications on a closed socket
The generic layer calls setReadNotificationEnabled(false) on sockets
after they are closed. This no longer causes a warning from the symbian
socket engine. A warning will only be emitted if trying to enable
notifications on a closed socket.

Task-number: QTBUG-18713
Reviewed-by: Markus Goetz
(cherry picked from commit 0aa780235c24ed724fcf6a9095a6467e34b9346e)
2011-05-11 16:37:18 +02:00
Qt Continuous Integration System
1a1af689fc Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Fix tst_QVariant::invalidColor
  Move QTextCursor::MoveStyle to Qt namespace
  Add some QRawFont related low level functions to avoid extra copying
2011-05-11 23:47:33 +10:00
Jiang Jiang
16628b76c0 Move QTextCursor::MoveStyle to Qt namespace
We cannot use QTextCursor::MoveStyle enums in QTextLine because
QTextCursor is not a QObject, while referring to that enum in
Q_PROPERTY requires it to be. That's why we need to move the
enums in Qt namespace.

Reviewed-by: David Boddie
(cherry picked from commit 5eba82b752e85a5d6cb3a893214ed2646d75f362)
2011-05-11 15:28:09 +02:00
Jiang Jiang
3032ba0f8e Add some QRawFont related low level functions to avoid extra copying
Added functions:

- QRawFont::glyphIndexesForChars(const QChar *chars, int numChars,
  quint32 *glyphIndexes, int *numGlyphs) const
- QRawFont::advancesForGlyphIndexes(const quint32 *glyphIndexes,
  QPointF *advances, int numGlyphs) const

Reviewed-by: Eskil
(cherry picked from commit 965af9eb2932efae5d736df54c3859460017b6a5)
2011-05-11 15:26:34 +02:00
Qt Continuous Integration System
3f8923d3a5 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Fix to commit 7fce0a73cc.
2011-05-11 22:30:28 +10:00
Kim Motoyoshi Kalland
587f7f753a Fix to commit 7fce0a73cc. 2011-05-11 14:24:45 +02:00
Qt Continuous Integration System
eb5ad10b2c Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Check if OES_texture_npot is present on OpenGL ES 2.
2011-05-11 20:41:00 +10:00
Kim Motoyoshi Kalland
7fce0a73cc Check if OES_texture_npot is present on OpenGL ES 2.
Unless the OES_texture_npot extension is present, non-power-
of-two textures have some restrictions on OpenGL ES 2.

Reviewed-by: Samuel
2011-05-11 11:59:50 +02:00
Qt Continuous Integration System
2de195b450 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Prevent crash in wayland mimedata in case there is no offer.
2011-05-11 02:07:56 +10:00
Laszlo Agocs
8e8e0b26b6 Prevent crash in wayland mimedata in case there is no offer. 2011-05-10 18:03:43 +02:00
Qt Continuous Integration System
ff112f47c8 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging:
  Add QT_xxx_VERSION macros for each library in qtbase
2011-05-11 00:10:15 +10:00
Laszlo Agocs
20594a6d5b Prevent having Status undefined in xlib platform plug-in.
Commit 4b75ceea08 changed
qcoreapplication_p.h to include qsettings.h, which undefines Status.
This breaks the xlib platform plug-in (and its includes).
2011-05-10 15:42:01 +02:00
Liang Qi
45cdd701fa Add QT_xxx_VERSION macros for each library in qtbase
Provide version info for each library like QTCORE_VERSION and etc.

Task-number: QTMODULARIZATION-44
Reviewed-by: axis
2011-05-10 15:15:15 +02:00
Olivier Goffart
48b7c870ec Merge remote-tracking branch 'staging/master' 2011-05-10 13:15:10 +02:00
Eskil Abrahamsen Blomfeldt
f0857b7667 Compile on Mac
Missing API update in Q_WS_MAC block

Reviewed-by: Jiang Jiang
(cherry picked from commit 4b95d9939db75d7bd55db4bbbf2d67af459f7eb5)
2011-05-10 13:14:41 +02:00
Oswald Buddenhagen
1e331968e1 ifdef out mac/no_coreservices path more cleanly
the symbian path was also dead
(cherry picked from commit 76ac26383922b4c452592a9175e7f3b9b3fd2513)
2011-05-10 12:54:57 +02:00
Oswald Buddenhagen
00bfc268c4 fix build on symbian
provide dummy implementation of QProcessEnvironment::systemEnvironment()
(cherry picked from commit e4920a4b4bc454ad309324a62db0e9257bba7367)
2011-05-10 12:54:56 +02:00
Alexander Potashev
342d2a253c Allow different text for undo actions and items in QUndoView
Now the texts used for undo actions and for items in QUndoView can
be set separately. This introduces an extended format of text that
can be passed to QUndoCommand::setText or QUndoCommand constructor.

The action text can now contain two strings separated by a "\n". The
first string (that goes before "\n") is then returned by
QUndoCommand::text() and used as name of item in QUndoView.
The second string (that goes after "\n") is returned by
QUndoCommand::actionText() and used when the text properties of the
undo and redo actions are updated.

If the text passed to QUndoCommand does not contain "\n", everything
works as before, and both QUndoCommand::text() and
QUndoCommand::actionText() return the same string.

Even though action text in English usually does not need different forms
for undo actions and QUndoView item, translators can employ this new
command text format, for example to adjust the grammatical case used in
command text to match the context of "Undo %1"/"Redo %1".

Merge-request: 2610
Reviewed-by: ossi
(cherry picked from commit 9b784789c75d59b27530bbf1d12676cc44f64f46)
2011-05-10 12:54:56 +02:00
Alexander Potashev
ec4d346f95 Allow using not only prefixes for undo command text
Functions QUndo{Group,Stack}::create{Undo,Redo}Action() now use action
text templates "Undo %1" and "Redo %1" if no custom prefix was provided.

This makes more flexible translations possible. The surrounding text
(like "Undo" and "Redo") can now be suffixed to the command name as
German and Korean languages require ("%1 rueckgaengig machen" for German).

Also, now the default action text (when no command can be undone) can be
translated differently from the prefix. For example, it can be
translated as "Undo action", not just "Undo".

When a non-empty prefix is passed to QUndo*****::create****Action(),
those functions work as before, and the features described above become
unavailable.

Task-number: QTBUG-14442
Merge-request: 1212
Reviewed-by: ossi
(cherry picked from commit 213c25ad24e4f3b0a44f82f23d34746cd294f8d6)
2011-05-10 12:54:56 +02:00
Pino Toscano
e04ad81dc4 QFileSystemEngine::currentPath(): use QFileSystemEntry() also for the no-PATH_MAX case
... in the same way as done in the other code path.

This makes qmake/QtCore compile again on glibc systems without PATH_MAX (e.g. GNU/Hurd).

Merge-request: 1218
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit c8812fe6e642520532d65744caefcea790d59de8)
2011-05-10 12:54:56 +02:00
Bradley T. Hughes
a6c8d0ba56 Do not allow multiple threads to acquire a QMutex
After the mutex optimizations on Mac, we did not handle the case where
semaphore_wait() could return KERN_ABORTED. Under heavy contention, this
happens, and when running in release mode, the assert in qmutex.cpp is not
executed. The code silently allows multiple threads to continue as if it
had acquired the mutex exclusively.

Fix this by checking for KERN_ABORTED from semaphore_wait(), and retry the
wait. We do not handle KERN_ABORTED for timed waits, simply return false and
let the code doing the tryLock() handle it how it deems best.

Reviewed-by: joao
(cherry picked from commit b54af0a9d6406356616889826e31925d2fa05718)
2011-05-10 12:54:56 +02:00
Robin Burchell
0bb70c3164 Ensure that QDateTimeEdit::calendarWidget() will always return a valid widget.
This case may be triggered in the (admittedly slightly abnormal) case where a
user wishes to embed the calendar widget in a layout or, for whatever reason, do
something else that will change its ownership.

We work around this by detecting when it is deleted and recreating the widget.

This will also have a positive side effect if setCalendarWidget() is called with
a widget which is then subsequently deleted, returning the default widget
instead of a pointer to (now deleted) memory.

Reviewed-by: Denis Dzyubenko

Merge-request: 2568
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
(cherry picked from commit 124ec3200f8453142717fcfe7a4aa0a55164aaa6)
2011-05-10 12:54:56 +02:00
Oswald Buddenhagen
202df2ae89 don't crash in QProcessEnvironment::systemEnvironment()
as the implementations moved to platform-specific files, the
QSharedDataPointer<QProcessEnvironmentPrivate>::detach() specialization
needs to go to the private header.

Reviewed-by: thiago
(cherry picked from commit c79246683a5033f605acd59d1c37d68381383a06)
2011-05-10 12:54:56 +02:00
Peter Hartmann
f38a639a41 HTTP backend: do not load resources from cache that must be revalidated
The header field "Cache-Control: must-revalidate" is a strict
requirement for loading the resource from the server, and not reading it
from the cache without revalidating first. With this patch, PreferCache
will load such from the network instead of loading them from the cache,
and AlwaysCache will throw a ContentNotFound error.

Reviewed-by: Markus Goetz
Task-number: QTBUG-18983
(cherry picked from commit 0e449f38894b1bd2dbb2f14206a011424679f063)
2011-05-10 12:54:56 +02:00
Denis Dzyubenko
bf89190cfb Compile fix for QLocale on Symbian.
The previous change added new ELangEnglish_India that doesn't
necesserally present in all SDKs.

Reviewed-by: trustme
(cherry picked from commit 154ab1cb4c4cdf34f21fc93b078f91cc79048bd4)
2011-05-10 12:54:56 +02:00
Denis Dzyubenko
563ab2e16c Added Kazakh language to the QLocale mapping table on Symbian.
Reviewed-by: trustme
(cherry picked from commit c6808af66d45541546b30c8e6de155b9812b4ef9)
2011-05-10 12:54:55 +02:00
Denis Dzyubenko
fc7aaa5c48 Added support for QLocale::uiLanguages on Symbian.
Extended the mapping table that matches symbian device languages to a
locale name and language code.

Task-number: QTBUG-7329
Reviewed-by: trustme
(cherry picked from commit 93233fc811920002d5b5b8272d9b5b8d5d3e2b98)
2011-05-10 12:54:55 +02:00
Olivier Goffart
74dda83074 Fix drawing text in item view:
Put back code that was removed by mistake in e8019cf8feb402303e6d253f5ca58bebfda42679

Task-number: QTBUG-18998
(cherry picked from commit bbbd4b8f3949b58d4fd21854241cb46cbc024a80)
2011-05-10 12:54:55 +02:00
João Abecasis
1787e557e8 Don't rely on uninitialized data
HB_GetCharAttributes used to require a zero-initialized array for
attributes, as it selectively sets relevant bits for each character. We
ease that requirement by always initializing the attributes buffer
explicitly with memset.

Task-number: QT-4911
Reviewed-by: Ritt Konstantin
(cherry picked from commit 4cb9db404224c55859713c282aa90409e375c372)
2011-05-10 12:54:55 +02:00
João Abecasis
e6e6e4c169 Don't realloc user-provided buffer
When QTextBoundaryFinder doesn't own the buffer, don't realloc it and
get a new one instead.

Reviewed-by: Ritt Konstantin
(cherry picked from commit 320f172c851a4720299297c8b3b757eb1202c568)
2011-05-10 12:54:55 +02:00
Samuel Rødal
978fc98bff Fixed bug in X11 backend when creating translucent windows.
We forgot to send the ParentAboutToChange event, which meant QGLWidget
didn't destroy the old EGL surface. This could cause two EGL surfaces to
be created for the same QGLWidget, which leads to undefined behaviour on
some platforms.
(cherry picked from commit 5a834d7141cc7d29d022911ccec16e628d94acf1)
2011-05-10 12:54:54 +02:00
Janne Anttila
2d07ca2cbd Clarified sendCustomRequest documentation to include HTTPS
Reviewed-By: mgoetz
(cherry picked from commit 16b8c940dac02ec77e6ff9fe4150c32db1811e74)
2011-05-10 12:54:54 +02:00
Olivier Goffart
94beee1c37 Fix compilation
Conflicts between 61c6d66b7efd8de4a83b021e7c4ef2b1a803ece2 and 940f16babab76b328b7c9bfdb5435102c689b76b
(cherry picked from commit 7a20cf9d4419cf1a5a9a4ed450b03caa8716fd58)
2011-05-10 12:54:54 +02:00
Oswald Buddenhagen
8b7bebd45d no environment on WinCE
(cherry picked from commit 62e73a463cb7035192acdce6538c5b0248e643d4)
2011-05-10 12:54:54 +02:00
Oswald Buddenhagen
8bc9f1ca62 fix Widestring vs. Ansi mixup
(cherry picked from commit 4dcb4a41022085aa82f25f7e0a2ce9e92510f4ae)
2011-05-10 12:54:54 +02:00
Oswald Buddenhagen
575410f466 fix potential crash in QProcessEnvironment::systemEnvironment() on windows
GetEnvironmentStrings() can theoretically return null
(cherry picked from commit 443608952d7df9a5146317be992320ba232d2cf9)
2011-05-10 12:54:54 +02:00
Armin Berres
0b2f70a5de Only cleanup share widget if it has been created.
Without this change a not yet created share widget is created
once qt_destroy_gl_share_widget() is called. As creating the
widget also triggers a call to qt_cleanup_gl_share_widget() once
QApplication is destroyed a QApplication created afterwards
cannot use a share widget anymore.
This functionality is needed for Harmattan.

Merge-request: 2609
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
(cherry picked from commit 8680d831fb7066feae07690a4a6bc8e908a84e5a)
2011-05-10 12:54:54 +02:00
Liang Qi
046befd0c4 Get rid of "typename, typename" for TEMPLATE_TEMPLATE_PARAMETERS.
Because Qt doesn't support that feature before.
(cherry picked from commit c12ed14fb38ae77be194e19a27545190aded830b)
2011-05-10 12:54:54 +02:00
Olivier Goffart
91f5144f90 Compile with msvc
msvc tries to instenties the return type of overloads that are not chosen by overload resolution
(cherry picked from commit 7307d712e10783b57c4c95c8390a9455b69f473a)
2011-05-10 12:54:54 +02:00
Olivier Goffart
9c39117419 compile with windows
MSVC doesn't pick up the right template partial specialisation.
(cherry picked from commit 0188f5ee18d00ae18e65a03c712d3f701e84fa80)
2011-05-10 12:54:53 +02:00
Olivier Goffart
7efa2f6aab get rid of the DisableIfSame hack
By changing the order of the parametters, in a way it is unlikely to clash
(cherry picked from commit e9d198b5928e1adf678796c098113bc307ef53f5)
2011-05-10 12:54:53 +02:00
Liang Qi
5d85018720 Rewrite the interfaces of QtConcurrent.
At least make RVCT 2.2 work.

Task-number: QTBUG-5182
Task-number: QTBUG-9070
Reviewed-by: Olivier Goffart
Reviewed-by: joao
(cherry picked from commit 0ba0c374fe055623381e3795daa6743c5c995bbc)
2011-05-10 12:54:53 +02:00
mae
a9a850952b Fix namespace issue with the global static
(cherry picked from commit c99be6bf73dce10fc706764b72a8dacc1c6589a0)
2011-05-10 12:54:53 +02:00
Matthew Cattell
c500291e42 Fixed bug in QPdfEngine::addImage causing mono images to be made 32 bit
Regression from 4.5 causing performance and size degradation.

Task-number: QTBUG-18997
Reviewed-by: Samuel
(cherry picked from commit 18122b473ecbd85ba953f70743b1756358bf7c0c)
2011-05-10 12:54:53 +02:00
mae
42452a32bf Fix regression with QSettings patch
The plugin loader is used without QCoreApplication.
This fixes 31ef8fa6abc2ea23c6f0a996b36494d88aafb0b5
(cherry picked from commit 988871dabf3c949ffc71d126131281a3ae641ebf)
2011-05-10 12:54:53 +02:00
Jani Hautakangas
c0da3003df Fix trailing whitespaces
Reviewed-by: TRUSTME
(cherry picked from commit d4fd21f746b536eaddbdd7a07f1d717ef18278e7)
2011-05-10 12:54:53 +02:00
Jani Hautakangas
806873f9af Fix for native child widget performance issue.
Flushing native child widgets in VG and GL window
surfaces caused performance downgrade because unnecessary
swapBuffers calls. On Symbian we must not support flushing
native child widgets in VG and GL window surfaces because
it causes GPU memory overhead and performance issues. Symbian
graphics architecture allows us to render native child widgets
to TLW EGL surface correctly in most of the cases.

Task-number: QTMOBILITY-1570
Reviewed-by: Samuel Rødal
(cherry picked from commit 6a92de7c89764848f7a85b1aa412a07bedc72b1a)
2011-05-10 12:54:53 +02:00
Oswald Buddenhagen
95e57339a9 fix build on symbian
Error:  #793: explicit specialization of class "QTypeInfo<QProcessEnvironmentPrivate::Key>" must precede its first use

just un-nest QProcessEnvironmentPrivate::{Key,Value}

Reviewed-by: thiago
(cherry picked from commit 167044693cc1d16684a5732b05e3926d0af61960)
2011-05-10 12:54:53 +02:00
Oswald Buddenhagen
4d8cf47178 fix build on mac
environ needs to be declared properly
(cherry picked from commit aae6ef391d2ee2fa5b91c834ea65f14fd61e5af6)
2011-05-10 12:54:53 +02:00
Oswald Buddenhagen
61b85df09b make QProcessEnvironment on Unix cache converted values
values are converted between byte arrays and qstrings on demand.
this makes it feasible to use the class as a generic environment container
with fast reading and writing access.

Reviewed-by: thiago
Reviewed-by: dt
(cherry picked from commit 7aa4ecdedba60ac4cbc07a774ae9d834677002e9)
2011-05-10 12:54:52 +02:00
Oswald Buddenhagen
5a4df43c71 make QProcessEnvironment::systemEnvironment() encoding-safe
on unix, don't do the roundtrip over unicode.

on windows, use the WinAPI unicode environment instead of the 8-bit CRT
environment.

Reviewed-by: thiago
Reviewed-by: dt
(cherry picked from commit 60194ad0ea68d7c82b4729119d122dcfeb909842)
2011-05-10 12:54:52 +02:00
Oswald Buddenhagen
9ff8d1c34a make QProcessEnvironment on Unix cache converted variable names
the converted keys also cache their hash, as they are used only for the
purpose of looking up in a qhash.

Reviewed-by: thiago
Reviewed-by: dt
(cherry picked from commit 18f1613aa8ece72d24ac10e28f06e3db1d8ce400)
2011-05-10 12:54:52 +02:00
Oswald Buddenhagen
299d10549f move key/value converters to the private class
this will enable them to access other members later

Reviewed-by: thiago
Reviewed-by: dt
(cherry picked from commit a2d70d71c8c7652ded41d5d603672c3927df44e6)
2011-05-10 12:54:52 +02:00
Oswald Buddenhagen
4212ee7ec7 make QProcessEnvironment on Windows preserve variable name case
while windows itself does not care which case the variable names are in,
they may be passed to unix tools which *do* care.

note that this uses true case folding for string comparisons while
windows uses uppercasing. this means that "ess" and "eß" will be
considered the same by us, while not by windows. this is not expected to
have real-world impact, particularly because non-ascii variable names
are not used much.

Task-number: QTCREATORBUG-3110
Reviewed-by: thiago
Reviewed-by: dt
(cherry picked from commit f3db5603871928ebed43a085a496397e65952b39)
2011-05-10 12:54:52 +02:00
Oswald Buddenhagen
3ab236d77b split QProcessEnvironmentPrivate::Unit into Key and Value
Reviewed-by: thiago
Reviewed-by: dt
(cherry picked from commit 11a79c65ea992be0e2ede7dc8f60660c9190291f)
2011-05-10 12:54:52 +02:00
Oswald Buddenhagen
1e9a4bce9d remove unused functions
Reviewed-by: thiago
Reviewed-by: dt
(cherry picked from commit e989a4d375b279b3ea61139cb07596e0e4b79e28)
2011-05-10 12:54:52 +02:00
Oswald Buddenhagen
e608887ee4 minor optimization: use QList::reserve()
Reviewed-by: thiago
Reviewed-by: dt
(cherry picked from commit 6a53f17c7039f1a5405912a4a645572e215410bb)
2011-05-10 12:54:52 +02:00
Oswald Buddenhagen
9590b7b662 use the Hash typedef
Reviewed-by: thiago
Reviewed-by: dt
(cherry picked from commit 10fd0d3e5c88c7b0265db3acdd75cb3d6f35ee63)
2011-05-10 12:54:52 +02:00
mae
4b75ceea08 Reduce open and stat system calls for QSettings
The patch moves the global static QSettings object
from QLibrary to QCoreApplication and reduces a
few stat and open calls.

Without the patch, a large Trolltech.conf was
pushed out of the unused settings cache during
startup, meaning Trolltech.conf was parsed
more than once.

Reviewed-by: Liang Qi
(cherry picked from commit 31ef8fa6abc2ea23c6f0a996b36494d88aafb0b5)
2011-05-10 12:54:52 +02:00
Samuel Rødal
5c791cc0d5 Fixed off-by-one in radial gradient color table index computation.
Clamp to GRADIENT_COLOR_TABLE-1, not GRADIENT_COLOR_TABLE-2. Fixes
visible error in gradients.qps

Reviewed-by: Kim Motoyoshi Kalland <kim.kalland@nokia.com>
(cherry picked from commit af9d20680c91f587f4791aa68f3a8b03d3a42be0)
2011-05-10 12:54:51 +02:00
Thorbjørn Lindeijer
cd650da45a Revert "Added QStringRef::toLatin1 and QStringRef::toUtf8"
This reverts commit feabda665de62a0f6a82d831b45926697f30b45b.

They were already added by Denis Dzyubenko in commit 2916b074.
(cherry picked from commit ffe0a2ec7c1f4412792a977401bdc4dbf6c76acd)
2011-05-10 12:54:51 +02:00
Olivier Goffart
9c8734dccb Fixes warnings about unused variables
Reviewed-by: Samuel
(cherry picked from commit 28061caa38d94de85db9aec743d1efba33c1e46f)
2011-05-10 12:54:51 +02:00
Olivier Goffart
138cf4373b Fixes warnings about unused variables
Reviewed-by: jbache
(cherry picked from commit e8019cf8feb402303e6d253f5ca58bebfda42679)
2011-05-10 12:54:51 +02:00
Olivier Goffart
c6e1ee2b28 Fixes warnings about unused variables
Reviewed-by: Peter Hartmann
(cherry picked from commit 61c6d66b7efd8de4a83b021e7c4ef2b1a803ece2)
2011-05-10 12:54:51 +02:00
Olivier Goffart
12c96812f9 Fixes warnings
In QString, it would comlain that:
   assuming signed overflow does not occur when assuming that (X - c) > X is always false
Changing to unsigned comparison fix the warning

Others are about unused variables

Reviewed-by: Thiago
(cherry picked from commit 5e5485809e8c6f8339bb9f19ad71ed623a8b23c7)
2011-05-10 12:54:51 +02:00
Olivier Goffart
bd64c94a26 Fixes warnings about unused variables
Reviewed-by: Samuel
(cherry picked from commit ddd253e14318af45e5c56df736028b88257068c4)
2011-05-10 12:54:51 +02:00
Thorbjørn Lindeijer
e8ac3549c5 Added QStringRef::toLatin1 and QStringRef::toUtf8
These helper functions make it convenient to avoid making an unnecessary
copy of the string before converting it to a QByteArray. The current
most obvious way to do this would be:

  // QStringRef text
  QByteArray latin1 = text.toString().toLatin1();

Though the copy can also be avoided by doing:

  const QString textData =
      QString::fromRawData(text.unicode(), text.size());
  QByteArray latin1 = textData.toLatin1();

Now the faster method can be achieved using the new obvious way:

  QByteArray latin1 = text.toLatin1();

Reviewed-by: Thiago Macieira
Reviewed-by: Robin Burchell
(cherry picked from commit feabda665de62a0f6a82d831b45926697f30b45b)
2011-05-10 12:54:50 +02:00
Laszlo Agocs
b9f6b156c6 Make translucent windows working properly with OpenVG.
The OpenVG engine correctly uses vgClear() to fill the surface with
transparent pixels whenever the window has the WA_TranslucentBackground
attribute enabled. However both scissoring and masking affects
the operation of vgClear(). Drawing artifacts were previously
visible due this, simply because scissoring was left enabled by
the VG paint engine, and the filling with transparent pixels
happens in the window surface's beginPaint() that is called
between the paint engine's end() (for the previous paint) and
begin() (for the next paint).

Task-number: QT-4907
Reviewed-by: Jani Hautakangas
(cherry picked from commit 4a1ae3d1b4e8e032b1c978fcc7e1812e37e1f047)
2011-05-10 12:54:50 +02:00
Frederik Gladhorn
14e31b1f5f Add accessible events as defined by IAccessible2.
Additional events from:
http://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/_accessible_event_i_d_8idl.html

Reviewed-by: Morten Sorvig
(cherry picked from commit 6bd74d66b418cad30ed5a448e657a7a5097eed4a)
2011-05-10 12:54:50 +02:00
Frederik Gladhorn
a92f96efa2 Return name and allow actions for invisible accessible items.
There is no reason not to report the name or allow actions
when a widget is invisible.

Reviewed-by: Morten Sorvig
(cherry picked from commit b88b2cb05c56a4c936a073ccf53c9fb3ad50d5d8)
2011-05-10 12:54:50 +02:00
Jens Georg
b11d1be7f3 Update documentation of QDateTime::toString
Merge-request: 1149
Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
(cherry picked from commit 3d4149afe62b4fc5d519a2a155b8f8c32e7e95c4)
2011-05-10 12:54:50 +02:00
Jens Georg
2528f4ffe5 Fix QDateTime::toString for Qt::ISODate
Fixes QTBUG-18290 and the "missing Z" from QTBUG-9698

Merge-request: 1149
Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
(cherry picked from commit 8f95a19d330480bd86650c3d2e4e147d3bca5789)
2011-05-10 12:54:50 +02:00
Laszlo Agocs
dc131f1560 Specify swap behavior preserved bit in openvg engine.
Unlike OpenGL, the EGL_SWAP_BEHAVIOR_PRESERVED_BIT was not set for
the EGL configuration used with OpenVG. Yet the preserved swap was
enabled still, which, according to the EGL spec, should fail. To
make sure it still works with other EGL implementations, the bit
is now set in the configuration.

Reviewed-by: Jani Hautakangas
(cherry picked from commit 710aa7f8fbd72ee303c3348aa3aaf12d6984964d)
2011-05-10 12:54:49 +02:00
Emmanuel BOURGERIE
02ebcdb8c7 Fixed QTBUG-11935 : "With MySQL version > 50000 the QMYSQLDriver::
tables() returns tables in all databases on the server"

This bugfix has been rewritten to match contributors advise.

Change-Id: I3a9cf900ff7eae47c9ffdbcf34bcb1b4396d9837
Merge-request: 1010
Reviewed-by: Charles Yin <charles.yin@nokia.com>
(cherry picked from commit c0ca29efdeb442a6b88ccadff409e3f7ef828ce8)
2011-05-10 12:54:49 +02:00
Emmanuel BOURGERIE
b1d6704b14 Fixed QTBUG-11935
Change-Id: Ia7bdb0ceecf2892f6be73d1816764a2bab6275f1
Merge-request: 1010
Reviewed-by: Charles Yin <charles.yin@nokia.com>
(cherry picked from commit a18f36048aa23fb088527c26274e49ce626ddf4d)
2011-05-10 12:54:49 +02:00
Samuel Rødal
4a93814a1d Removed warning from QPixmap::handle().
With the new fromX11Pixmap function there are valid use-cases where
checking the handle() is useful also with the raster graphicssystem.

Reviewed-by: Thiago Macieira
(cherry picked from commit 1124f41253edd0e03704db72b0e1b6b4b518bd0f)
2011-05-10 12:54:49 +02:00
Gabriel de Dietrich
a759518a98 Removing the "resetInternalData" slot in QAbstractProxyModel
This reverts commits 0916a68056154ecb60e4ea2c79726ab2e49b1532 and
6f1384fcbeea993d5be47590c696de60215b7608.

This effectively reverts most of MR 694.

Reviewed-by: Olivier
(cherry picked from commit 06e104b9c305d3db0dd1848e6e633ee3888fd1de)
2011-05-10 12:54:49 +02:00
Thiago Macieira
d60bd8e216 Fix warnings on unused parameters and variables
(cherry picked from commit 940f16babab76b328b7c9bfdb5435102c689b76b)
2011-05-10 12:54:49 +02:00
mae
4d38a48a70 Fix insert and scroll to bottom case
When using QtextCursor::insert() with a large text followed by setting
the vertical scrollbar to its maximum value (scroll to bottom),
QPlainTextEdit would not behave properly if a document size
change was triggered by the insertion due to line wrapping.

This was visible in Qt Creator.

Auto test included.

Reviewed-by: con
(cherry picked from commit 5d144faf3c524ab557b88f69c4b755e20237e846)
2011-05-10 12:54:49 +02:00
Laszlo Agocs
d4eedda7d2 Make text rendering working outside the gui thread on Symbian.
It was previously not possible to render text (QPainter::drawText)
in a secondary thread on Symbian, it always resulted in some
kind of panic. This patch corrects it. For S60 5.0 and earlier
the behavior is not changed, threaded text rendering is only
supported on Symbian^3 and newer. This also means
QFontDatabase::supportsThreadedFontRendering() will return
true from now on, but only on Symbian^3 and higher.

Task-number: QTBUG-18516
Reviewed-by: mread
(cherry picked from commit 0c62e02b80570bf8b92eff7acceb9018df61c89e)
2011-05-10 12:54:49 +02:00
Frederik Gladhorn
af6057918a Typos in internal api docs.
(cherry picked from commit 81f79b80337a4ef967fdd2b0773f0523c1ce9261)
2011-05-10 12:54:49 +02:00
Thierry Bastian
78ec3b2bd9 Revert "Fixed a crash in QListView"
This caused regressions in the QListView

This reverts commit 5b3872b2d7523d44ba454a76613e7a3fa45387f7.
(cherry picked from commit 0edbaca5e7b718bb9bbbeaccc9e322b525b4327e)
2011-05-10 12:54:48 +02:00
Thierry Bastian
1712e20a5a Fixed a crash on Windows XP with mingw in threaded-code
The thread callback doesn't align the stack on 16-bytes on WinXP.
That causes a crash when we call SSE code. So now we tell the
compiler to force that alignment of the stack.

Task: QTBUG-18631
Reviewed-By: Olivier
(cherry picked from commit 364ce5b7f5379499562b4f4f5a68da7ba068fe1e)
2011-05-10 12:54:48 +02:00
mread
3e787c470d Symbian's QElapsedTimer::restart() fixed to return ms rather than us
Symbian's QElapsedTimer::restart() had accidently been changed to
return a microsecond count rather than milliseconds, when the elapsed
timer resolution was increased. This fixes it back to milliseconds.

Reviewed-by: Shane Kearns
(cherry picked from commit 39202973e3fb7ff37033290b29efa1b9edc674fb)
2011-05-10 12:54:48 +02:00
Laszlo Agocs
dfebed5d5b Create a cleanup stack for each new thread on Symbian.
The native thread implementation in Qt 4.8 did not call
CTrapCleanup::New() which resulted in E32USER-CBASE 69 panics
in applications when they tried to use the cleanup stack in
a thread's run() function. In 4.7 this was working because
OpenC's pthread implementation created a CTrapCleanup automatically.
Now we do it also in the native Symbian thread implementation.

Trask-number: QTBUG-18822
Reviewed-by: Murray Read
(cherry picked from commit 41aa023ef6019ac9745b780c953f48b8bbc42a42)
2011-05-10 12:54:48 +02:00
Miikka Heikkinen
dd646cd10e Do not modify window size for fullscreen windows in setGeometry_sys
Minimum sizes of widgets can cause windows to expand beyond screen
limits in QWidgetPrivate::setGeometry_sys. Normally this is not
noticeable as the window size is forced in various places to the
clientRect, but there are certain sequences where the size set in
setGeometry_sys is the final one, resulting in too large windows.

Removed the modification of window size in setGeometry_sys
for fullscreen windows for which the correct size is already requested.

Task-number: QTBUG-18749
Reviewed-by: Sami Merila
(cherry picked from commit da8f333cfe17a53d475208efa36fa369a9ee4638)
2011-05-10 12:54:48 +02:00
Gabriel de Dietrich
ebbc98fcb6 Totally kill MR 916
... the hard way.

Reviewed-by: Trust me
(cherry picked from commit 443d5b17619002cd6bb428198c453271a01accab)
2011-05-10 12:54:48 +02:00
Samuel Rødal
c889ddb59d Another attempt at fixing the MSVC2005 build.
Apparently direct casting is illegal there too, even though they don't
have the cast operators.

Reviewed-by: Kim
(cherry picked from commit 45c60ceac3d5a401543d7d56a44d1f9227464431)
2011-05-10 12:54:48 +02:00
Samuel Rødal
49fc892129 Compile fix in qdrawhelper_sse2.cpp for MSVC 2005.
(cherry picked from commit 7f921ea08c296e7451a44a1dae15350ae183ea20)
2011-05-10 12:54:48 +02:00
Gabriel de Dietrich
4b25f3fa1f Reverting merge request 916
Revert "Introduce menubar plugin system"

This reverts commits 56c3de426d97ab7c8fb..f7b60fffb673b182e63
(cherry picked from commit c6514537a8568050f5812a2b55fcf47a3ec2fce1)
2011-05-10 12:54:47 +02:00
Gabriel de Dietrich
9b609e1c05 Reverting merge request 916
Revert "Build fix on QMenuBar"

This reverts commit ea585d567bf0970c57e31846da044295d80774ba.
(cherry picked from commit 68542b72f53f52df43063677e24994463872e81b)
2011-05-10 12:54:47 +02:00
Samuel Rødal
d92ac3c188 Compile fix in qdrawhelper_sse2.cpp.
(cherry picked from commit 7cc4ffce36c24596630ca83cd6418869d6383670)
2011-05-10 12:54:47 +02:00
Thierry Bastian
95d7a4e8ea Build fix on QMenuBar
Reviewed-By: gabi
Merge-Request: 916
(cherry picked from commit ea585d567bf0970c57e31846da044295d80774ba)
2011-05-10 12:54:47 +02:00
Jan-Arve Sæther
b46d7d3b91 Do not call setSizePolicy from ctor, it might call a virtual function
More specifically, it might very well call updateGeometry()

Reviewed-by: Frederik Gladhorn
(cherry picked from commit febdcef08f22310cbd70ec13b315f70ff8e41e83)
2011-05-10 12:54:47 +02:00
Thierry Bastian
2e768aad98 Fix copyright and a few codestyle mistakes
Reviewed-By: Trust-Me
Merge-Request: 916
(cherry picked from commit 56c3de426d97ab7c8fbb3f5766e1872d6f2e91e9)
2011-05-10 12:54:47 +02:00
Aurélien Gâteau
0241d63994 Renamed QAbstractMenuBarImpl to QAbstractMenuBarInterface
Merge-request: 916
Reviewed-by: Thierry Bastian <thierry.bastian@nokia.com>
(cherry picked from commit 3d188ffae259584c4351c5fa766a49da9b189112)
2011-05-10 12:54:47 +02:00
Aurélien Gâteau
5d6d23f118 Make ctor and dtor of QAbstractMenuBarImpl inline
This way the class does not need to be exported

Merge-request: 916
Reviewed-by: Thierry Bastian <thierry.bastian@nokia.com>
(cherry picked from commit a624a4011adca00d7334462c4d33f574c465110a)
2011-05-10 12:54:47 +02:00
Aurélien Gâteau
9317fee1d9 QAbstractMenuBarImpl::allowSetVisible => setVisible
This makes it possible to alter the behavior of QMenuBar::setVisible().
It seems to be needed for the Mac menubar.

Merge-request: 916
Reviewed-by: Thierry Bastian <thierry.bastian@nokia.com>
(cherry picked from commit bafeffd7b8b2c40761369ba496ee655dff6cf2a5)
2011-05-10 12:54:46 +02:00
Aurélien Gâteau
03b0eb416f Introduce menubar plugin system
Merge-request: 916
Reviewed-by: Thierry Bastian <thierry.bastian@nokia.com>
(cherry picked from commit be0d346052d69693c2780e62401f3c0d4b0d89d4)
2011-05-10 12:54:46 +02:00
Aurélien Gâteau
1b573dd5ff Introduce QAbstractMenuBarImpl
Merge-request: 916
Reviewed-by: Thierry Bastian <thierry.bastian@nokia.com>
(cherry picked from commit 0432a6b79d35ac7db909a81793417107ebfb668f)
2011-05-10 12:54:46 +02:00
Aurelien Gateau
69da442904 Hide Q<Platform>MenuAction
This will help abstracting the platform specific parts of QMenuBarPrivate in a
common interface.

Merge-request: 916
Reviewed-by: Thierry Bastian <thierry.bastian@nokia.com>
(cherry picked from commit c664954295c0605c73f7e69deb9f6130c5f5fb05)
2011-05-10 12:54:46 +02:00
Aurélien Gâteau
e84cfbfcfa Fix warning about initialization order
Merge-request: 916
Reviewed-by: Thierry Bastian <thierry.bastian@nokia.com>
(cherry picked from commit f7b60fffb673b182e633545bffd1d310337aca50)
2011-05-10 12:54:46 +02:00
Samuel Rødal
83ecb25998 Added support for six-parameter radial gradients.
The extended radial gradients conform to the radial gradient
specification in HTML 5 canvas.

Task-number: QTBUG-14075
Reviewed-by: Andreas Kling
(cherry picked from commit da55c1ea92474e989e5582b02815936bbf584405)
2011-05-10 12:54:46 +02:00
Samuel Rødal
e05443367f Improved gradient table generation performance for two-stop gradients.
Two stops is a fairly common case so we gain quite a bit by special
casing it. Improves performance by 10 % in parcycle benchmark, and
by 90 % in a synthetic benchmark.

Reviewed-by: Andreas Kling
(cherry picked from commit 5b74a70ac630073582be56f8a0539624a1080185)
2011-05-10 12:54:45 +02:00
Samuel Rødal
db58039591 Optimized radial gradient fetch using SSE 2.
On an i7 this improves performance by 22 % in parcycle, 107 % in default
svgviewer example, and 283 % in a synthetic radial gradient benchmark.

Reviewed-by: Andreas Kling
(cherry picked from commit 26bd3dccdee8c6a8f1cf9d254a2a6be7d403aa8d)
2011-05-10 12:54:45 +02:00
Samuel Rødal
28e32c0bc3 Improved qt_gradient_clamp for reflect spreads.
Using GRADIENT_STOPTABLE_SIZE * 2 as the modulo gives more correct
behaviour, and also improves performance slightly.

Reviewed-by: Benjamin Poulain
(cherry picked from commit 44dd7ef86a3970694a4f8fd9516575c0533a336e)
2011-05-10 12:54:45 +02:00
Samuel Rødal
79d238abdc Prepared for SIMD implementation of radial gradients.
Made the radial gradient fetch func into a template to be able to
optimize the inner loop using SIMD instructions.

Reviewed-by: Benjamin Poulain
(cherry picked from commit f16c261348193b4c03f796db4e1e3a5db09267a2)
2011-05-10 12:54:45 +02:00
Jonathan Liu
11140fc40a Fix incorrect rendering of checked menu items on Windows Classic
Modify rendering of checked menu items when using Windows Classic
style to be more native looking.

Changes:
* Checked menu items with no icon are not drawn sunken
* Disabled checked menu items with an icon have a plain background
  instead of a checkerboard pattern same as when enabled
* Check mark is drawn with highlighted text color when selected to
  match text
* Fix check mark offset for disabled unselected checked menu item
  as the entire check mark was drawn shifted (1, 1)
* Fix color of check mark shadow for disabled unselected checked
  menu item as it was same color as the check mark when it should
  be a light color

Task-number: QTBUG-15098
Merge-request: 2513
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
(cherry picked from commit e89a2b72050dd782da16ff24bc2eb84dc36ed6a5)
2011-05-10 12:54:45 +02:00
Guoqing Zhang
758978564c Fix OpenGL build break on Symbian
Task-number: QT-4871
Reviewed-by: Dmitry Trofimov
(cherry picked from commit f3092b91a7a2e9e34dfe7eefb3c6b0ed8c3c3786)
2011-05-10 12:54:45 +02:00
Pierre Rossi
fc9a9acbbe Fix a bug with menu overflowing from a lower resolution second screen.
The menu needs to take into account the screen geometry of the screen
it's about to be shown on (not the last screen it was shown on) when
updating its actions rects

Task-number: QTBUG-2748
Reviewed-by: Thierry
(cherry picked from commit b10265efba544b1e4820f45b86354d442f6abf26)
2011-05-10 12:54:45 +02:00
Pierre Rossi
a74f09044e Calculate the submenu position after emitting aboutToShow()
The rationale behind this is that if the submenu gets populated in a slot
connected to aboutToShow(), we'll have to do it again anyway.

Task-number: QTBUG-14739
Reviewed-by: Thierry
(cherry picked from commit 0848b860b9251e76b9319f65554f932ab68e33cc)
2011-05-10 12:54:45 +02:00
Thierry Bastian
09e2335f6d Fixed a crash in QListView
The problem was that QAbstractScrollArea calls layoutChildren on resize
but the QListView requires that updateGeometries is called before.

Task: QTBUG-18558
Reviewed-By: Pierre
(cherry picked from commit 5b3872b2d7523d44ba454a76613e7a3fa45387f7)
2011-05-10 12:54:45 +02:00
David Boddie
82340de4c8 Doc: Fixed reference to a name in a table.
Task-number: QTBUG-18679
(cherry picked from commit a769192ef0393afa07c08a1672b45604fdf64be1)
2011-05-10 12:54:44 +02:00
Jens Bache-Wiig
a5cfc446ed Fix progressbar animation on Vista
This fixes two issues.
- The indeterminate animation was sometimes incorrectly disabled
  when value was 0
- The progress animation was incorrectly stopped when progress
  bars were disabled

Task-number: QTBUG-10957
Reviewed-by: richard
(cherry picked from commit 05e46b93ccb2334ec3722cf1205058f778d11458)
2011-05-10 12:54:44 +02:00
Jonathan Liu
d001733c24 QTabWidget/Win: do not add content margin when documentMode enabled
QTabWidget has 2 pixel bottom and right content margin. This removes the
margin to maximize the area available for content and improve
consistency with other Qt styles when documentMode is enabled.

Task-number: QTBUG-15769

Merge-request: 957
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
(cherry picked from commit 23dd5cb45547de167f5c2e78554e9c3013e59998)
2011-05-10 12:54:44 +02:00
Pierre Rossi
5346d77e8c QTableView: prevent QTableView from hanging when removing rows.
The problem was introduced in cd2afafb where we removed some code that
was meant to adjust the header's offset upon row removal.
The problem with this is that visualIndexAt() is likely to return -1 in
QHeaderView::paintEvent, which in turn will lead to calling paintSection
for each and every section.

Task-number: QTBUG-18551
Reviewed-by: Thierry
(cherry picked from commit d814e378987348ce2123d083b01ea6fb6c3e6bbf)
2011-05-10 12:54:44 +02:00
Jonathan Liu
55bfa460d2 QFileSystemModel: Handle QDir::NoDot and QDir::NoDotDot for setFilter
Add support for QDir::NoDot and QDir::NoDotDot for setFilter in
QFileSystemModel.

Task-number: QTBUG-14760
Reviewed-by: Frederik
(cherry picked from commit b60d82fd56897b1a1d3cc730172f71c27a497ede)
2011-05-10 12:54:44 +02:00
Frederik Gladhorn
2c7c8cf5d0 Don't crash when requesting text.
Sometimes during initialization the QAccessibleItemRow will
still be in an invalid state.

Reviewed-by: Jan-Arve
(cherry picked from commit 90b4cf4b1aa0f70a62118e200e76dc1dc57985cc)
2011-05-10 12:54:44 +02:00
Frederik Gladhorn
1422ce7ded Let QAccessibleButton::text return something even when not visible.
Buttons would not report their text when hidden, which is inconsistent.
Reviewed-by: Jan-Arve
(cherry picked from commit 1897ca20a343121422b354a7910814ddd37abd17)
2011-05-10 12:54:44 +02:00
Jan-Arve Sæther
75bec8093d Fixed regression where AT client did not always announce stuff properly.
This fixes a regression that was created by
75e478abdf336bbdc1b00e2ca4f5293d5455a0cb.
That broke accessibility on 64 bit windows, since lParam can both be
0x00000000fffffffc and  0xfffffffffffffffc.

However, MSDN explicitly says that lParam should be casted to a DWORD,
which would result in (an unsigned) 0xfffffffc in both cases. This can
then be compared to OBJID_CLIENT (defined to ((LONG)0xFFFFFFFC).

Reviewed-by: Prasanth Ullattil
(cherry picked from commit 504941bc50234c225f162192491815bc4d6c38cf)
2011-05-10 12:54:44 +02:00
Jens Bache-Wiig
45c8b242f3 Don't use inactive borders for spinbox on Mac
This was probably caused by the fact that the only spinbox
visible in the main control panel has an inactive frame border.
In XCode 4, however the spin buttons are generally attached
to an active lineedit frame, so we change the default for 4.8.

Reviewed-by: gabriel
(cherry picked from commit 6c9d808c5726893e9aa673ca8b0cbebae67f641c)
2011-05-10 12:54:43 +02:00
Richard Moe Gustavsen
8ab64530b3 Cocoa: respect QT_NO_EXCEPTION in color dialog
If the macro is set, we should not use cocoa exceptions either, as
this causes compile failures

Rev-By: jbache
(cherry picked from commit cdb5729d8e1ffc4a00b52d6d4bbee34a9820a193)
2011-05-10 12:54:43 +02:00
Frederik Gladhorn
0fbeed69a4 Make navigation in TabWidgets consistent.
navigate would not return the right index in the parent if the current
widget was not the visible one.

Reviewed-by: Jan-Arve
(cherry picked from commit fdeeaa9d61efea9cca783a1d4098ae505df24390)
2011-05-10 12:54:43 +02:00
Frederik Gladhorn
d27fb341ec Fix text for checkable buttons, unit tests.
Return Check/Uncheck for checkable buttons.
Partially revive the buttons unit test.

Reviewed-by: Jan-Arve
(cherry picked from commit 6040eeebfb1ab3be3906295c373033cd5b5d9dc3)
2011-05-10 12:54:43 +02:00
Frederik Gladhorn
a5e191de57 Window and Application fixes for accessibility.
Return app name instead of window title for root accessibility object.
Return Window as accessible type for the main window.

Reviewed-by: Jan-Arve
(cherry picked from commit 9a5b0d7a579572cd7e7faf869ab1a6684800f592)
2011-05-10 12:54:43 +02:00
Frederik Gladhorn
8f5b2faaac Call QAccessible::updateAccessibility when changing accessible name.
Reviewed-by: Jan-Arve
(cherry picked from commit e783275cfb71e7325472b3aea54e109a7a854bf7)
2011-05-10 12:54:43 +02:00
José Millán Soto
ed8f1a09f8 QAccessibleTextEdit: Using x coordinate for calculate character width
Merge-request: 1148
Task-number: QTBUG-18233
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
(cherry picked from commit 6cd51aeec11e7a70ba560c350274d5a4bd43c9b9)
2011-05-10 12:54:43 +02:00
Stephen Kelly
3880eee2d0 Use the virtual API to clear a selection.
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
Merge-request: 980
(cherry picked from commit e3cd651d92a9e550fe52360d1be6ae41d0f2ab85)
2011-05-10 12:54:43 +02:00
Jan-Arve Sæther
97952e918d Avoided calling updateAccessibility() from updateMicroFocus if the item was hidden
This had the following negative effect in qmlviewer:
- Every time the qmlviewer logged something to its QPlainTextEdit
  (regardless of if it was visible or not) it would call
  updateMicroFocus (because appending to QPlainTextEdit would move the
  cursor). The result was that the AT client got overloaded with
  accessibility state changes, and response time got really bad.
(cherry picked from commit ad50e45311cce712fbe35641cde973d616ff560d)

Reviewed-by: Frederik Gladhorn
(cherry picked from commit a825b3a9e6132842090e43fae85d2c6c61b2def6)
2011-05-10 12:35:52 +02:00
Jan-Arve Sæther
0154343608 Notify a11y framework of FocusChanges for QGraphicsObject
(cherry picked from commit 1b5cb7865eb8b48a2721f9b9c3ccd2fb25f8175d)

Reviewed-by: Frederik Gladhorn
(cherry picked from commit 9a02ad74693f1835745ec20798b353f7e62bcd5e)
2011-05-10 12:35:51 +02:00
Jan-Arve Sæther
26acac4052 Call updateAccessibility on the QGraphicsObject in updateMicroFocus
Since QGraphicsObjects now can be in the a11y hierarchy, we should
treat them just like we treat widgets.
(cherry picked from commit 860745a4713b29857d14571572504da71a2ca077)

Reviewed-by: Frederik Gladhorn
(cherry picked from commit 4687938fd03ed65306039af6b4e5e192ec8bf491)
2011-05-10 12:35:50 +02:00
Jan-Arve Sæther
5e8b377cb7 Fix updateAccessibility for QGraphicsObjects
If updateAccessibility is called on a QGraphicsObject, walk up and find
the closest ancestor widget with a HWND.
(cherry picked from commit d4291591dfb6a7b1f5c7d00879e8162e84d9ab1b)

Reviewed-by: Frederik Gladhorn
(cherry picked from commit 96406a7dd609e75340f7b4a05726c60c197786b8)
2011-05-10 12:35:49 +02:00
Jan-Arve Sæther
068545f2cd Make accessibility work on Windows with alien
This means that there will be no implicit conversion to windows handles
anymore!
Enabler for making QML accessible on windows.
(cherry picked from commit a3ac7deb5dfe48c5fdd0e170c20b6852c3bb41de)

Reviewed-by: Frederik Gladhorn
(cherry picked from commit d289e54f2d2aa066cb383d8c8249bd7594bdf7b0)
2011-05-10 12:35:48 +02:00
Qt Continuous Integration System
fde6021547 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Rename QGlyphs -> QGlyphRun
2011-05-10 20:26:33 +10:00
Eskil Abrahamsen Blomfeldt
051ef6f294 Rename QGlyphs -> QGlyphRun
API clean-up for QGlyphRun:
1. QGlyphs -> QGlyphRun
2. QGlyphRun's font()/setFont() -> rawFont()/setRawFont()
3. QPainter::drawGlyphs() -> drawGlyphRun()
4. QTextLayout and QTextFragment's glyphs() -> glyphRuns()

Reviewed-by: Jiang Jiang
(cherry picked from commit 84ef364302728b68d2d29ea9c4ccbec32c7bb115)
2011-05-10 12:20:13 +02:00
Qt Continuous Integration System
c5d63be839 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging:
  Respect capacity in QVector::append().
2011-05-10 20:07:16 +10:00
Qt Continuous Integration System
41e14a4175 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Add internal documentation for QUnifiedToolbarSurface.
  Fix the autotest condition.
  Change the repaint() call to an update().
  Fix the update() autotest for raster.
  Change the repaint() to an update().
  Set the default graphics system to raster.
  Revert "Switch the default graphics system to raster on Mac."
  Fix an race condition in the auto test.
  Fix an race condition in the auto test.
  Fix a race condition when the main window is being destructed.
  Switch the default graphics system to raster on Mac.
2011-05-10 19:50:02 +10:00
Fabien Freling
a35b2d58d9 Add internal documentation for QUnifiedToolbarSurface.
This document is aimed for developers. This is why
it is directly written in the header file. This is
not part of the public API.

Reviewed-by: Richard Moe Gustavsen
(cherry picked from commit 891b6ac7236d21b69bdb54b00051422cee004059)
2011-05-10 11:45:42 +02:00
Fabien Freling
daf3795461 Change the repaint() call to an update().
In show_sys(), if we directly call repaint() this
will triggers too many UpdateRequest events.
This fixes the qwidget autotest
"compatibilityChildInsertedEvents".

Reviewed-by: Richard Moe Gustavsen
(cherry picked from commit 747962e6ec20a59b7e2ed67c5cd685258f199a86)
2011-05-10 11:45:33 +02:00
Fabien Freling
5839b221a0 Change the repaint() to an update().
Forcing to repaint might cause a recursive
repaint. Since there is no apparent reason to
directly repaint, we just call update().

Reviewed-by: Richard Moe Gustavsen
(cherry picked from commit 244fedd484b022881b906b1bc794d5af19d02843)
2011-05-10 11:45:30 +02:00
Fabien Freling
68857f9045 Set the default graphics system to raster.
This change is specific to Mac OS X/Cocoa.

Reviewed-by: Lars Knoll
(cherry picked from commit 2c2026df66f237b7313397dd74f6bc3212b94596)
2011-05-10 11:45:19 +02:00
Fabien Freling
8ac73771c6 Revert "Switch the default graphics system to raster on Mac."
This reverts commit a5d40fd3814ab7c8e865912c03a918bfd5994998.

We have to fix the regressions due to the raster engine before putting
it by default.
(cherry picked from commit 3197fe2af911673c6291db0102e90a0d7f6ae926)
2011-05-10 11:44:57 +02:00
Fabien Freling
e27baeff28 Fix a race condition when the main window is being destructed.
During the destructor of QWidget, we delete the
layout. If the layout is not set to 0 afterwards,
a check on the layout might turn true, but any access
will end with a segfault.

Reviewed-by: João Abecasis
(cherry picked from commit abc5a632942c23496d75c49b3b0b4a674cdafdf8)
2011-05-10 11:44:34 +02:00
Liang Qi
44b7877c87 Respect capacity in QVector::append().
Fix a bug in QVector::append(), it should use the capacity for new size,
when it is implicit shared and capacity is bigger than the new size.

Autotest included.

Task-number: QTBUG-11763
Reviewed-by: joao
Reviewed-by: Olivier Goffart
2011-05-10 11:38:53 +02:00
Fabien Freling
e7de0c2e12 Switch the default graphics system to raster on Mac.
Reviewed-by: Lars Knoll
(cherry picked from commit a5d40fd3814ab7c8e865912c03a918bfd5994998)
2011-05-10 11:34:15 +02:00
Qt Continuous Integration System
d0343621a3 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Remove const from QPlatformClipboard::mimeData().
2011-05-10 18:17:06 +10:00
Laszlo Agocs
edd56d531b Remove const from QPlatformClipboard::mimeData().
Most implementations will anyway do non-const operations in there, the
change avoids the need for const_cast or mutable.
2011-05-10 10:09:44 +02:00
Qt Continuous Integration System
94021247c1 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Retrieve the actual data in the Wayland clipboard only when requested.
2011-05-10 17:54:22 +10:00
Qt Continuous Integration System
7f9c32bd39 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Fix QDefaultAnimationDriver
2011-05-10 17:24:49 +10:00
Laszlo Agocs
04549f2eed Retrieve the actual data in the Wayland clipboard only when requested. 2011-05-10 09:17:55 +02:00
Alan Alpert
8fb5928469 Fix QDefaultAnimationDriver
Animation drivers were changed to used signals instead of virtual
functions, but the default animation driver was left behind.

Reviewed-by: Michael Brasser
2011-05-10 13:43:58 +10:00
Qt Continuous Integration System
4bcd4c08fe Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Turned on private headers for some plugins.
2011-05-10 01:16:35 +10:00
Jonni Rainisto
7eef0de091 Turned on private headers for some plugins.
Reviewed-by: axis
2011-05-09 16:55:33 +02:00
Qt Continuous Integration System
e8aceff195 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging:
  Skip test on MacOS due to problems with corewlan plugin
  Fix QNetworkConfigurationManager usage outside main thread first
  Update QTBUG-17223 for Qt 4.8
  fix tst_qnetworkreply::httpProxyCommands autotest
  Send User-Agent from the network request in http proxy CONNECT command
  Add autotests for configuration dependent network proxies
  Fix QNetworkReplyImpl error handling
  Enable per network configuration proxy settings in QNetworkAccessManager
  Allow a network configuration to be included in a proxy query
  Fix error handling in write for socks socket engine
2011-05-09 21:54:18 +10:00
Shane Kearns
a590e77fd8 Fix QNetworkConfigurationManager usage outside main thread first
QNetworkConfigurationManager creates the engines loaded from plugins
as objects in the main thread.
If a QNetworkConfigurationManager instance is created in a worker thread
without any instance previously existing in the main thread, then it
is uninitialised until the main thread has run.
This causes allConfigurations() to return an empty list if called
immediately after instantiation, for example.

This fix initialises the plugins using blocking queued connections,
which causes the worker thread to block until the initialisation function
has been called in the context of the main thread.
Deadlock is possible if the main thread is for some reason waiting on the
worker thread, but it will not deadlock on QNetworkConfigurationManager's
mutex.
If this is a problem for an application, it should use
QNetworkConfigurationManager from the main thread first to preload the
plugins.

Task-number: QTBUG-18795
Task-number: QTBUG-18799
Reviewed-by: Cristiano Di Flora
2011-05-09 13:50:02 +02:00
Shane Kearns
7dd503c62f Update QTBUG-17223 for Qt 4.8
In Qt 4.7, http network requests are assigned to http connection
channels before connecting the channel.
In Qt 4.8, channels are connected "blind" as this gives a performance
improvement in certain circumstances.

On the assumption that User-Agent should be the same for all the
requests being sent to the server in a given burst, we use the first
queued request to set the user agent for a http proxy.

Task-number: QTBUG-17223
Reviewed-by: Markus Goetz
Reviewed-by: Martin Petersson
2011-05-09 13:16:41 +02:00
Shane Kearns
e01faeb5c7 Send User-Agent from the network request in http proxy CONNECT command
Some proxies can discriminate based on the User-Agent when sent a
CONNECT command for establishing a HTTPS connection.
With this change, if the User-Agent header is set in the QNetworkRequest
then it will be passed to the http socket engine for use in the connect
command sent to the proxy.
As before, "Mozilla/5.0" will be used by default when no user agent
has been set.

Task-number: QTBUG-17223
Reviewed-by: Markus Goetz
2011-05-09 13:16:13 +02:00