Commit Graph

655 Commits

Author SHA1 Message Date
Richard Moore
c82af87b53 QSslSocket: Add accessors for SSL version
This commit adds accessors for both the openssl version number and the
version string. The intention here is to aid debugging by making it
possible for applications to know which version of the openssl library
has been found by the runtime linking code.

Since the version of openssl in use will depend on the installation of
the developer, the test cases merely display the version string and
number rather than verifying that any particular version is in use.

Change-Id: Ieec44f0941f99887c85c2858bab0481722d739e5
Merge-request: 12
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1406
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-07-11 12:43:52 +02:00
Thiago Macieira
d9bec0a1d2 Remove Qt 4.3 binary compatibility for MSVC
When we removed the useless "const" in the return type, we broke
compatibility with a few compilers that include the return type in the
mangling. We don't need that anymore in Qt 5.

This change should have had a ### Qt5 mark everywhere, not just in a
comment in qstring.cpp.

Change-Id: I8839f8dc540b34e57a3efdb160a1c015f7328422
Merge-request: 13
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1385
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-07-11 11:16:22 +02:00
Thiago Macieira
8cc3b1a426 Remove the definition of QT_NO_FPU based on the processor or WS
The definition is just wrong these days. Modern ARMv7 and MIPS have
FPUs. Maybe AVR32, SH or SH4A don't, but then QT_NO_FPU should be
defined in the qplatformdefs.h for those platforms.

More importantly, since QPA is the only supported architecture for Qt
5, we definitely don't want to say that no platforms have no FPU.

Still let qreal be defined to float on ARM, though: on Cortex-A8,
which is the current norm these days, float performance is better than
double performance.

Change-Id: I89e01c10c59fbe95840a668ec9736846d23258fb
Merge-request: 16
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1383
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-07-11 11:16:12 +02:00
Thiago Macieira
cd80fcb5d6 Use lambdas for generating static data for QStringLiteral
This means it will work on C++0x compilers that support lambdas (all
of them once they've completed supporting the functionality). Olivier
had the idea and the initial code.

Change-Id: I11ef7da4058ed18f4ea99ada070891a68ed54f55
Reviewed-on: http://codereview.qt.nokia.com/1380
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-11 11:15:53 +02:00
Casper van Donderen
6efe729881 Remove more references to demos.
Change-Id: I431184cd0534c86047706fdaa1045b2935de5d7a
Reviewed-on: http://codereview.qt.nokia.com/1307
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: David Boddie
2011-07-08 15:36:26 +02:00
Shane Kearns
b59392aeb5 Fix memory leak in QHostInfo
QHostInfo was leaking in the code path where it removes duplicate
name lookups after one has completed.

Task-number: QT-5121
Reviewed-by: Markus Goetz
(cherry picked from commit 73df7890923f377f19147466d9317fe1ec064b1d)

Change-Id: I26cc6a168ef8ea6cc18940300ca2eddd6777071d
Reviewed-on: http://codereview.qt.nokia.com/1363
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
2011-07-08 13:34:47 +02:00
Olivier Goffart
2e58f52ded Remove the qs() macro.
There is tootoo many risks of conflicts with existing code.

QStringLiteral is not that hard to type. And if users want to use qs
they can still define it in their own headers.

Change-Id: I7da4772d902033fa163f5177c012b5d0e87332d7
Reviewed-on: http://codereview.qt.nokia.com/1357
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-07-08 11:22:30 +02:00
Thiago Macieira
d96b7b809e Use memmove in QListData::append(int) as regions overlap.
It's undefined behaviour to memcpy regions with overlapping area. You
have to use memmove.

Change-Id: I912c819bf7ab26ba1e60028ee9d7c833dfc5138a
Reviewed-on: http://codereview.qt.nokia.com/1355
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-08 11:22:30 +02:00
Markus Goetz
948d051fb1 QNAM: Add support for more KnownHeaders
Task-Number: QTBUG-17267

Change-Id: I32b41d26411ee3a7162bb658d69363a5eeb37230
Reviewed-on: http://codereview.qt.nokia.com/1327
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-07-08 11:22:30 +02:00
Martin Zielinski
62481fe9f6 Fixed wayland windowmanager-protocol authorization
The authorization is now handled more robust. The client tries to authenticate
as soon as a surface is created, but does so only if the authentication
token is valid. A re-authorization than happens when requestActivateWindow()
is called.
This is needed to get the auth-process properly working even with
pre-started clients, that do not have a valid token on surface-creation
time.

Change-Id: I4371b424686b9d5a6a163a802ec66a33c0aeeea7
Reviewed-on: http://codereview.qt.nokia.com/1207
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lasse Holmstedt
2011-07-08 11:22:30 +02:00
Thiago Macieira
a21f992925 Add support for QStringLiterals in QStringBuilder
Otherwise we get errors for failing to have operator+ properly when
writing:
    QStringLiteral("foo") + s

Change-Id: I03844c95e9fdfa886eadfa2b5fe104ff048fd618
Reviewed-on: http://codereview.qt.nokia.com/1351
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-07-08 11:22:30 +02:00
Thiago Macieira
571785b31d Make the new QStringLiteral produce a non-temporary
This is currently GCC-only code (the __extension ({ }) stuff), but it
was the only way I found to create a static variable and return it. I
had to add the QConstStringDataPtr container because I had to return a
pointer to the data -- it's impossible to return a reference through
this extension.

I could have returned a naked pointer directly too.

This isn't complete. GCC 4.6 is placing the string in the .data
section, not .rodata as we wanted. Investigating further.

Change-Id: I170030dca3eddbd69f6c879e952f652f7fe5d958
Reviewed-on: http://codereview.qt.nokia.com/1350
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-07-08 11:22:30 +02:00
Thiago Macieira
f3d6589068 Bugfix the QConstString implementation.
Change-Id: Ic9ea9d91c1a976962a3881ecdf7ad178de768b08
Reviewed-on: http://codereview.qt.nokia.com/1349
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-07-08 09:45:19 +02:00
Lars Knoll
7297cf8542 Don't cast a string from ascii
Change-Id: Ia902e5be3ff61057b2e895a491bb68f1b7c6dd64
Reviewed-on: http://codereview.qt.nokia.com/1221
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-07-07 17:37:29 +02:00
Harald Fernengel
27b953efae Don't keep a static instance of QDBusConnection
Prevents weird crashes at app exit and makes backtraces from potential
crashes saner because they won't start in __cxa_init.

Change-Id: I62821faad03b06ec92da05d96027b668d1f1ca0f
Reviewed-on: http://codereview.qt.nokia.com/1324
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Robert Griebl <robert.griebl@nokia.com>
2011-07-07 17:37:29 +02:00
Harald Fernengel
f96a19d1b4 Fix a crash when D-Bus library can't be loaded
In certain sandboxes, we have libQtDBus, but not D-Bus. QtDBus shouldn't
crash in that case, but return non-working QDBusConnection instances
instead.

Change-Id: Ia4ac78d1197bae50cde0cf07e6fc66fc25b85011
Reviewed-on: http://codereview.qt.nokia.com/1319
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Robert Griebl <robert.griebl@nokia.com>
2011-07-07 16:10:50 +02:00
Lars Knoll
f4c07fe721 Unify QLatin1String and QLatin1Literal
Unify the two classes and get rid of one
TODO item for Qt 5.

Using strlen in the constructor of QLatin1String works,
as the compiler can do the calculation at compile time.

Change-Id: I59d98c71a34b86d4211fa0d8cfd40b7d612c5a78
Reviewed-on: http://codereview.qt.nokia.com/1219
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-07 12:30:00 +02:00
Lars Knoll
ee85e9cc10 Support for compile time generated QStrings
use with QString string(QStringLiteral("foo")) or
QString string(qs("foo")).

qs(...) can in almost all places replace QLatin1String.
the Macro qs requires c++0x support or a compiler
where sizeof(wchar_t) == 2. In case these conditions
are not met, qs simply falls back to QLatin1String.

The commit also cleans up the QStringData structure
significantly, now using only 16 bytes for the header
on 32 bit systems.

The bitflags to store unicode directionality of the string and whether the string would require complex text processing to render are removed. They don't really belong here and the result can be calculated very fast in any case.

Added an internal QRefCount class the encapsulates the
reference counting semantics required where a negative refcount
is never changed. This is required to be able to put the string
data into a constant POD object.

Change-Id: I5b1395213deca48b2d582a036a0e8a8358d26d14
Reviewed-on: http://codereview.qt.nokia.com/1218
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-07-07 12:30:00 +02:00
Lars Knoll
fcca106e59 Add an internal QRefCount class to QtCore
The class will be used by QString and possibly other
container classes to allow for the Data objects to be
created at compile time in read-only memory.

Change-Id: I9c7538bc97df637cc920e6e5ef23d67a93abac0d
Reviewed-on: http://codereview.qt.nokia.com/1216
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-07 12:30:00 +02:00
Jyri Tahtela
2d802625a3 Update licenseheader text in source files for qtbase Qt module
Replace old license header with correct one.

Change-Id: Ie8bf7d8d07ff01d05654bafe13ebbc1892f59cc4
Reviewed-on: http://codereview.qt.nokia.com/1178
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
2011-07-07 12:30:00 +02:00
Jiang Jiang
1174b69ee1 Fix regressions in previous QFontDatabase patch
1. QtFontStyle::Key comparison should either use styleName or
   style, etc., but not both.
2. When initializing a QFont from QFontDatabase::font(), style
   and weight parameters should always be set even when we found
   a match styleName, in case these parameters will be used for
   comparison later.
3. Move styleName out of QtFontStyle::Key so that the code can be
   clearer and more explicit.

Change-Id: Icdee8e97568a0f31f57d2cdb8d414f47331fde75
Reviewed-by: Eskil
Reviewed-on: http://codereview.qt.nokia.com/1263
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-07-07 08:38:52 +02:00
Olivier Goffart
c0c6dd2b02 Use Q_DECL_CONSTEXPR in QFlags
Change-Id: I851e0b1c3f80a7b33a38cb1ab2665dc0f3c73adc
Reviewed-on: http://codereview.qt.nokia.com/1248
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2011-07-06 17:09:47 +02:00
Olivier Goffart
28f927f8e0 Add Q_DECL_CONSTEXPR
Defined to the c++0x constexpr when compiler supports it

Change-Id: I82687fe46848eedf3cffc39982106749b3dde8aa
Reviewed-on: http://codereview.qt.nokia.com/1247
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2011-07-06 17:09:47 +02:00
Eskil Abrahamsen Blomfeldt
febb4b8df3 Fix bidi reordering when part of text is rendered by fallback font
If the fallback font is used for part of a RTL text, we need to
position the different text items accordingly, subtracting the advance
instead of adding it.

Task-number: QTBUG-17117
Done-with: Lars
(cherry picked from commit e5e1ff0d6f4e6a8457da61b5b215730de6f960bd)

Change-Id: I73b501d36e5c9e12112cc1997c1d360f3a4a6083
Reviewed-on: http://codereview.qt.nokia.com/1228
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-07-06 13:29:44 +02:00
Lars Knoll
3422bc3b18 Unicode strings are supported from gcc 4.4 onwards
Change-Id: Icf3dfdb34b0a9867c69e91e5eb8400aa934f56bc
Reviewed-on: http://codereview.qt.nokia.com/1217
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-06 13:29:44 +02:00
Casper van Donderen
a97d4dcb24 Remove references to QT_INSTALL_DEMOS & DemosPath.
The distinction between 'examples' and 'demos' is completely blurred at
this point. We've decided, with the SDK people, to scrap the existing
terminology in favor of the word 'example' only -- distinguishing
between code snippets, walkthroughs, "demonstrations" can be done
via keywords or some other method.

Removing QT_INSTALL_DEMOS from all .pro files in Qt is still in
progress.

Change-Id: I86fc0e40d54baa54c5641fc6acbd8b67e4ad2789
Reviewed-on: http://codereview.qt.nokia.com/1034
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-07-06 13:29:44 +02:00
Lars Knoll
26a6d3f11b Fix compilation with c++0x mode
Change-Id: Ie4f157f25c31e46d4cc7cb628b8605b99561a4e8
Reviewed-on: http://codereview.qt.nokia.com/1220
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-06 13:29:44 +02:00
Gabriel de Dietrich
f306d18fe6 Remove QT3_SUPPORT from qsql, qxml
Change-Id: Iab36ef60de2f0201efa4eb86d8ed5e514d6244fb
Reviewed-on: http://codereview.qt.nokia.com/1188
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-07-06 12:03:30 +02:00
Jørgen Lind
5d9818e7b6 We need to let the currentContext be in the same state after
setting the new eglsurface
(cherry picked from commit af3efefeefe686e5c35ed502de077c0bcb6f6fc0)

Change-Id: Ic1d62b21a1482d1bc7f1d99478e175e4b767e157
Reviewed-on: http://codereview.qt.nokia.com/1209
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-07-06 12:03:30 +02:00
Jørgen Lind
1b1337601e Fix the wayland windowsurface so that we have stencil and depth buffer
(cherry picked from commit 322c96eb9564f930a63be820c22b053630663880)

Change-Id: I89c10cea1a302d9549024940e49c7d5960abb953
Reviewed-on: http://codereview.qt.nokia.com/1210
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-07-06 10:26:28 +02:00
Martin Petersson
83736a8d06 QAbstractSocket: Always clear old QHostAddress list on a new connect.
Change-Id: Iee1416e7803836e5f1a37508739bcbcb2cdb421c
Reviewed-on: http://codereview.qt.nokia.com/1174
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-07-06 08:26:50 +02:00
Casper van Donderen
1631be8176 Update the documentation after moving examples.
Change-Id: I7aa52785979df9eddd7b91e62abd0ef10adc74b7
Reviewed-on: http://codereview.qt.nokia.com/1031
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: David Boddie
2011-07-05 21:19:08 +02:00
Casper van Donderen
1734cb55c5 Move some other examples around in the docs.
Change-Id: Ib50600ff9fd3d807b82a152abd7d587196d5b5e3
Reviewed-on: http://codereview.qt.nokia.com/932
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: David Boddie
2011-07-05 21:19:08 +02:00
Olivier Goffart
60cb6d7f3b Make use of deleted members in Q_DISABLE_COPY
Might help the compiler to produce better error message.

Change-Id: I1df3c32084b9ecda0b2a140776ad5f57adfb2e6e
Reviewed-by: Thiago
Reviewed-on: http://codereview.qt.nokia.com/1177
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2011-07-05 18:24:36 +02:00
Martin Petersson
21c4f1806e QHostAddress: fix compile on Windows
AF_INET6 needs to be defined on Windows. This got undefined when
QT_NO_IPV6 was removed in 85869920bb

Change-Id: I1b4904f9561286b884324882f0f11dc29ba01416
Reviewed-on: http://codereview.qt.nokia.com/1169
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
2011-07-05 17:03:32 +02:00
Olivier Goffart
d789e40c58 Fix QScopedPointerarray default constructor
Since the compiler cannod find the template argument if there is no
argument passed to the constructor, this effectively means there is
no default constructor.

Add a default constructor

Task-number: QTBUG-20256
Change-Id: I310d5e1f3f94a8fe69fd3a5c46f2f51bca60facd
Reviewed-on: http://codereview.qt.nokia.com/1165
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2011-07-05 17:03:32 +02:00
Markus Goetz
808acc07f2 QNAM HTTP: Fix canReadLine() for zerocopy
Change-Id: I16cf25c72b3fa16649c3e4e0f4d4b08ad7ce360d
Reviewed-on: http://codereview.qt.nokia.com/1161
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-07-05 17:03:32 +02:00
Shane Kearns
f45ad0eeb3 Remove QT3_SUPPORT from network
Change-Id: I962bece24c958c053a3edc0e49a594b61a3725ae
Reviewed-on: http://codereview.qt.nokia.com/1093
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-07-05 15:32:39 +02:00
Sergio Ahumada
1da4753bd9 Doc: Fixing typo
(cherry picked from commit 0a9652c93170ab9520869e9e231eba1834b47abc)

Conflicts:

	tests/auto/mediaobject/tst_mediaobject.cpp
	tests/auto/q3accel/tst_q3accel.cpp
	tests/auto/q3checklistitem/tst_q3checklistitem.cpp
	tests/auto/q3dns/tst_q3dns.cpp
	tests/auto/q3popupmenu/tst_q3popupmenu.cpp
	tools/linguist/tests/tst_lupdate.cpp

Change-Id: I118829afb27ab082f9656139102f74f9ab5f7ac4
Reviewed-on: http://codereview.qt.nokia.com/1035
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: David Boddie
2011-07-05 15:32:39 +02:00
Shane Kearns
8f222e2ad8 Finish removal of QT3_SUPPORT from corelib/codecs
Change 369696dc23 removed a function
from the header but not its implementation, causing a compile error.

Change-Id: I5da45d8401f5779b1660e5baf4557f078e202bf5
Reviewed-on: http://codereview.qt.nokia.com/1092
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-07-05 14:10:16 +02:00
Eskil Abrahamsen Blomfeldt
d010d0893a Don't issue GL calls when the geometry is empty
This works as a band-aid and optimization for QT-5104, because in the
text in the example, which contains latin text and has a latin default
font set, will think of all spaces between the cyrillic characters as
latin characters, hence it will make separate text items for them and
issue separate glDrawElements() calls. By cutting off if there are no
glyphs to draw, we can avoid hitting the actual bug for this and several
other use cases, making it less likely to happen.

Task-number: QT-5104
Reviewed-by: Samuel
(cherry picked from commit f51b5fe09c63e4b3c2ab5a4d06e162c43d38207d)

Change-Id: Id80f55ce403a7aa112c3abb314d080aa43c0078b
Reviewed-on: http://codereview.qt.nokia.com/1158
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-07-05 12:38:50 +02:00
Rohan McGovern
8226443b16 Fixed compile of QtOpenGL on Mac & QPA.
Replace a Q_WS_MAC test (which is not true for Mac & QPA) with Q_OS_MAC
(which is always true on Mac).

Change-Id: Ie3d12bae233d44b3607f4c57a0c65059d0d6ccb9
Reviewed-on: http://codereview.qt.nokia.com/1129
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
2011-07-05 05:17:36 +02:00
Matthew Cattell
8f94aac68e fixed typo in .pro file
Change-Id: I78a23177deb55a9be15fe19fc841dbf2223332ec
Reviewed-on: http://codereview.qt.nokia.com/1088
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-07-04 17:42:44 +02:00
Martin Petersson
a85edb3781 QNam remove compile warnings for QNetworkReplyHttpImpl
Change-Id: I677a72a1cdcb295dd87d2559163e6f56e97c40c8
Reviewed-on: http://codereview.qt.nokia.com/1083
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
2011-07-04 16:06:04 +02:00
Oswald Buddenhagen
3ca4b74618 make argument quoting code on windows less arcane
Change-Id: I6eca1d336ff770d3e5548e58137ca0053d4f63db
Reviewed-on: http://codereview.qt.nokia.com/963
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2011-07-04 16:06:04 +02:00
Oswald Buddenhagen
b929ce465f fix argument quoting on windows
quotes prefixed with multiple backslashes would not be escaped
correctly.

Change-Id: I56ec72e31bb4ed2b9119ec1996448f803f89ce35
Reviewed-on: http://codereview.qt.nokia.com/962
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2011-07-04 16:06:04 +02:00
Lasse Holmstedt
a77ce3301c Add QScreenOrientationChangeEvent and rotation support to wayland client
Qt Compositor propagates screen orientation changes to wayland, which
are then picked up by the wayland client. The wayland client then sends
a QScreenOrientationChangeEvent to QApplication, which can handle the
orientation change.

Change-Id: Ieb2225e52b7e3c318648f2cb21dab7937f301505
Reviewed-on: http://codereview.qt.nokia.com/1063
Reviewed-by: Matthias Ettrich
2011-07-04 14:32:41 +02:00
Markus Goetz
85869920bb Always assume IPv6 support
It's 2011 baby! And until Qt5 is released probably 2012 :-)

Change-Id: I397aabf25e93c8afb5f562636710985cf0c7acfa
Reviewed-on: http://codereview.qt.nokia.com/1008
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Reviewed-by: Markus Goetz
2011-07-04 14:32:41 +02:00
Martin Petersson
3d5d8b6c4f Add Happy-Eyeballs style IPv6 connection establishing.
In the cases where a DNS lookup will give you both an IPv4 and IPv6
address, this will start two connection channels at the same time.
One trying to connect using IPv4 and one on IPv6. This is done so
that we can use the fastest one for the connection. To do this we
have to do the hostlookup in the connection. The result is then
in the cache for the individual socket so it will not need to do
another lookup.

Task-number: QTBUG-16458
Change-Id: I806c20168d9c5edc2831b80f82a2bd570b36d5fa
Reviewed-on: http://codereview.qt.nokia.com/1003
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-07-04 13:04:57 +02:00
Casper van Donderen
640c5d8a99 Move the composition example in the docs.
Change-Id: I63e906e78de75466b9c9bf99d553691c8335f9b2
Reviewed-on: http://codereview.qt.nokia.com/903
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kevin Wright <kevin.wright@nokia.com>
2011-07-01 15:03:33 +02:00
David Boddie
df515ded60 Doc: Fixed qdoc warnings.
Change-Id: I7b4e9ef513b82a82d2365c9256d09520a44ad10d
Reviewed-on: http://codereview.qt.nokia.com/324
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-07-01 13:06:20 +02:00
Martin Zielinski
9057cad32f Implemented on-screen visibility handling via wayland
The compositor informs the client about it's window not being visible at all.
This is handled here by dispatching a ApplicationActivated/ApplicationDeactivated event.
The application than is free to handle this event and stop rendering and other not
needed processing.

Change-Id: I1dcc3f2a4a8e63ad5cc4f89cbf82cc63f779edbf
Reviewed-on: http://codereview.qt.nokia.com/763
Reviewed-by: Lasse Holmstedt
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-07-01 10:17:54 +02:00
Eskil Abrahamsen Blomfeldt
25beb403ff Fix resource leak in QFontEngineDirectWrite
Bug introduced by f54c5d9133d7aa7636988db36fa6cc51d26434b6. The release
statement has to come before the return statement :)

Reviewed-by: Jiang Jiang
(cherry picked from commit d58eec3c932d1cdbcf3b42534e8fe870ec109487)

Change-Id: Ib0b550ead3f971736142d88f4ca19bb8edc1b654
Reviewed-on: http://codereview.qt.nokia.com/949
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-07-01 07:17:35 +02:00
Eskil Abrahamsen Blomfeldt
0fc1e852ae Fix transformations on DirectWrite rasterized text
There were a few bugs in the DirectWrite font engine that caused
transformed text to break.

First of all, alphaMapForGlyph() ignored the transform, so no gray
antialiased text would be transformed.

Second of all, the imageForGlyph() function would use the wrong
bounding box for the rasterized glyph, causing its positioning to
become a little bit off when rotating. The fix is to get the bounding
box from the system and add a margin to this instead of trying to predict
how it will appear after the vertical hinting etc. has been applied.

So that the positioning metrics are in sync with the actual metrics used
by the alphaMap* functions, we also need to implement the
alphaMapBoundingBox() function.

Task-number: QTBUG-19829
Reviewed-by: Jiang Jiang
(cherry picked from commit f54c5d9133d7aa7636988db36fa6cc51d26434b6)

Change-Id: I3c3840b41e19fcacf926dbf454bdc2cba4bd5a99
Reviewed-on: http://codereview.qt.nokia.com/948
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-07-01 07:17:15 +02:00
Laszlo Agocs
7a9c5eea81 Add a touchscreen generic qpa plugin.
Change-Id: Iaf79df05eb4f60d254d95f5d0f280a8f8f8a8de8
Reviewed-on: http://codereview.qt.nokia.com/941
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-06-30 15:03:28 +02:00
Eskil Abrahamsen Blomfeldt
46c128bbf5 Fix text color in some cases of QML and QStaticText
This reverts 518c2a58ed6fdfd7449cb4476aa8ea0d32ad16e3 which caused a
regression.

When writing systems are mixed and an underline is set on the font,
QPainter will set a pen with the current color and a new width on
itself before drawing the decoration. This would cause the recorder
in QStaticText to mark the pen as dirty, saving the current pen
color in all subsequent text items. The effect was e.g. that in QML
the cached color would override the current one, making it impossible
to change the color on the text without forcing a relayout somehow.

The right fix is to only mark the pen as dirty when its color actually
changes.

Task-number: QTBUG-20159
Change-Id: Ia819b67cccc9eaedd23fde655eab58cd892646f8
Reviewed-by: Jiang Jiang
Reviewed-on: http://codereview.qt.nokia.com/870
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-06-30 15:03:28 +02:00
Frederik Gladhorn
3debd70c08 Add HB_LineBreakType to qharfbuzz_copy_p.h.
The QTextLayout relies on this enum to be defined.

Change-Id: Ibcc8a0073bd56e29431c52c4ea54a909ff42f07b
Reviewed-on: http://codereview.qt.nokia.com/537
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
2011-06-30 15:03:28 +02:00
Jiang Jiang
399208c54b Move glyph run merging logic to QTextLayout level
So that we can merge glyph runs from different QTextLines.

Change-Id: Id8e0cc1aa21a482a995773fd55599c0011245e82
Reviewed-on: http://codereview.qt.nokia.com/950
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-06-30 13:16:41 +02:00
Lars Knoll
13b83d896d make QHoverEvent inherit from QInputEvent
QHoverEvent is an input event and as such should
also contain the current keyboard modifiers.

Change-Id: Ic403a8511eb991a9c6b5132908af1d5900869361
Reviewed-on: http://codereview.qt.nokia.com/937
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-06-30 11:33:27 +02:00
Laszlo Agocs
06d85c51fe Add touch event support to wayland plugin.
Change-Id: If4be4965ae4e9898f5afb756632aa0349bd9b149
Reviewed-on: http://codereview.qt.nokia.com/935
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-06-30 10:18:28 +02:00
Lars Knoll
03deed59ba Remove the remaining QT3_SUPPORT code in corelib
Change-Id: I6641c62d75d2034a46ea7cc869ae65285ae8b8f4
Reviewed-on: http://codereview.qt.nokia.com/866
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-06-29 15:10:14 +02:00
Lars Knoll
6fa1bbdce0 remove QT3_SUPPORT in corelib/io
Change-Id: Ia9ad0bebacc538a7392afb0fdcca40e8a2bb687b
Reviewed-on: http://codereview.qt.nokia.com/865
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-06-29 15:10:14 +02:00
Lars Knoll
369696dc23 Remove QT3_SUPPORT from corelib/codecs
Change-Id: Ie674be85b64c5816ee0ad4bccc077943b7046136
Reviewed-on: http://codereview.qt.nokia.com/864
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-06-29 15:10:14 +02:00
Lars Knoll
7b46ec1601 remove QT3_SUPPORT from corelib/tools
Change-Id: Ie224cf992be675c7d405d4be05e4acd4157e590e
Reviewed-on: http://codereview.qt.nokia.com/863
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-06-29 15:10:14 +02:00
Lars Knoll
28cf5c5356 Remove QT3_SUPPORT in src/corelib/global
Change-Id: I3bda38801659125b49ef74537b22281a530b8e0a
Reviewed-on: http://codereview.qt.nokia.com/862
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-06-29 15:10:14 +02:00
Lars Knoll
118b3d3f84 Remove Qt3 support functionality from parts of QtCore
Change-Id: I90f391e9bfc412087bd0401e28d2497571f81aa1
Reviewed-on: http://codereview.qt.nokia.com/825
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-06-29 15:10:14 +02:00
Pierre Rossi
406db04c3f Push the data together with the error in the synchronous case.
As it turns out some test cases in QtWebKit rely on this.

Task-number: QTBUG-19556
Change-Id: I84c8abca5e9a018a4057c827fca973b8ebb39df6
Reviewed-on: http://codereview.qt.nokia.com/795
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
2011-06-29 10:42:23 +02:00
Gunnar Sletta
01b72952c3 Remove QPainter::UniteClip
Change-Id: I5413cb5e2cbb53998bb40f27b9bbc16342caafe6
Reviewed-on: http://codereview.qt.nokia.com/837
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-06-28 16:52:44 +02:00
Gunnar Sletta
73df041f6c Remove code with no consquence
Change-Id: Ic048be26cd4ffe1094e4badd34a0df233aa9b5d5
Reviewed-on: http://codereview.qt.nokia.com/832
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-06-28 15:32:29 +02:00
Gunnar Sletta
a40d74e554 compile on Mac OS X
Change-Id: Ibe74e51aab6e6b8d7a0e71cd88dcc97f72fcd1f9
Reviewed-on: http://codereview.qt.nokia.com/833
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-06-28 15:32:29 +02:00
Casper van Donderen
a964e56228 Change references to affine example.
Because of the merge of demos and examples all references to all demos
have to be updated. This is the update for the affine example.

Change-Id: I83f24010162a73e11786587365c6f10b51d4bf4b
Reviewed-on: http://codereview.qt.nokia.com/774
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: David Boddie
2011-06-28 14:20:17 +02:00
Olivier Goffart
2dd90a27a8 Fix invalid read in QUrl::removeAllEncodedQueryItems
The remove will detach the string making the query pointer invalid.

Note: the "test3" case is commented out because it does not remove
the & at the end, and i do not want to enforce this behaviour in the
test

Task-number: QTBUG-20065
Change-Id: I195c5c3b468f46c797c7c4f8075303f2b1f4724c
Reviewed-on: http://codereview.qt.nokia.com/822
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-06-28 12:10:30 +02:00
Bernhard Rosenkraenzer
563ec6c690 Make it compile with openssl 1.0.0d, gcc 4.6
SSL_ctrl's prototype has changed slightly in openssl 1.0.0x - the 4th
argument is now a void* as opposed to a const void*.
gcc 4.6 doesn't allow this as an implicit cast.

Merge-request: 1239
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
(cherry picked from commit 007f01a7e801d5409708e4b8de8b3ead1481cf7d)

Change-Id: I4f41af981cf0762383b3fc867ec5d726e2b1e5c6
Reviewed-on: http://codereview.qt.nokia.com/821
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-06-28 10:09:00 +02:00
Richard Moore
2cf935b43e Certificates can have each issuer and subject field many times
THIS COMMIT BREAKS SOURCE COMPATIBILITY BETWEEN Qt 4 AND Qt 5

Qt4 assumed that there was only one entry of each type in the subject
and issuer of a certificate. This is incorrect (eg. you can have many
common names). In addition, some of the fields required by RFC3280
were not suppport. This change modifiers the API to return a list of
entries of each type and adds support for the missing fields. It also
updates the commonname matching code for SSL connections to handle
multiple entries.

Change-Id: I9457266a205def0a07c13de47094ff56ead42845
Merge-request: 5
Reviewed-on: http://codereview.qt.nokia.com/796
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-06-27 20:44:36 +02:00
Jiang Jiang
06c20891c1 Add missing APIs to QRawFont and some additional notes to fromFont
Change-Id: I8487a2e32f5b71a1eb51dcb8540cb5de2def09f6
Reviewed-on: http://codereview.qt.nokia.com/769
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-06-27 16:52:31 +02:00
Lars Knoll
e3172080a2 Use floating point coordinates in events
Use FP coordinates in Mouse, Wheel and Hover
events.

Change-Id: I8b43ca257620b4653ae5d6b6122c516384db1e48
Reviewed-on: http://codereview.qt.nokia.com/766
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-06-27 15:26:42 +02:00
Olivier Goffart
53a16752c2 QStringBuilder: do not crash with null char*
This is supported by the others operator+

Change-Id: I9a1d1a0afb63acf32935948111d43ca6da370363
Reviewed-on: http://codereview.qt.nokia.com/764
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-06-27 13:47:53 +02:00
Martin Zielinski
8fb4beb2a1 Removed damaging of waylandsurface after creation
The damaging of the surface at this time causes graphical corruption
in the compositor, as the surface does not contain any rendered output yet.

Change-Id: I51392a68a7531db9901137b9861cb0291e16ff12
Reviewed-on: http://codereview.qt.nokia.com/743
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthias Ettrich
Reviewed-by: Lasse Holmstedt
2011-06-27 12:22:24 +02:00
Jiang Jiang
bb6be57b38 Only compare styleNames if they are not empty
Task-number: QTBUG-19366
(cherry picked from commit 15e6ac8f4d9e7a419cd0c10405954bde78559fac)

Change-Id: I5f06bb5133f23dbc8ad6d745d44ca0a85ef49686
Reviewed-on: http://codereview.qt.nokia.com/760
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-06-27 12:22:24 +02:00
aavit
f1c49cd12d Fix problem with cosmetic stroking of cubic beziers
The new algorithm would fail if the start and end point were identical.
(cherry picked from commit 43ce5bab32e0d28366317be99df5e6df70787826)

Change-Id: I44c42b190db95b831fd04492e4afe3555fb3db50
Reviewed-on: http://codereview.qt.nokia.com/610
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-06-27 10:59:28 +02:00
aavit
bc7f43cd02 Still use midpoint rendering of aliased ellipses
37c329a removed this, but it is required to get correct fills,
particularly for small radii

Reviewed-by: gunnar
(cherry picked from commit 9d0104d3da01e262d2178c864b4ba94f620eaa3b)

Change-Id: I41a5093f3cf725aee3abffde4d871566f0f8151e
Reviewed-on: http://codereview.qt.nokia.com/608
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-06-27 10:59:28 +02:00
Lars Knoll
ad0ecae41c Fix smaller bugs in the stroker
Calculating the continuation point for
closed contours was not taking transformations
and the half pixel offset into account.
(cherry picked from commit 31e9c098f3c9321eebf1ac3e4c44a2d18d3816b8)

Change-Id: I735d8e58fc3cf64668f546d5f42892d420d58e84
Reviewed-on: http://codereview.qt.nokia.com/607
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-06-27 10:59:28 +02:00
aavit
048d840ca2 Compilation fix of f8e8583
(cherry picked from commit 7cfd06ee22a875d7658ce6668b418e6f8c6f6480)

Change-Id: Iaaed01590874fbcc439f06c17a63f0343d49a9bb
Reviewed-on: http://codereview.qt.nokia.com/605
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-06-27 10:59:28 +02:00
aavit
d690b14106 Revert "Fix how subpixel positions are intepreted in an aliased grid."
This reverts commit 69fc9e594e6d5da87bff42707973683f84b67c93.

Conflicts:

	src/gui/painting/qpaintengine_raster.cpp
	src/gui/painting/qrasterizer.cpp
(cherry picked from commit f8e85838c5531b56c2175cbdb9c24db426f7fd89)

Change-Id: I4f936404000e6fa88887d0fbe3fbde92c8edd259
Reviewed-on: http://codereview.qt.nokia.com/603
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-06-27 10:59:28 +02:00
Olivier Goffart
7eeabcf70d Fix event delevery order
Some functions (such as QObject::moveToThread) did not keep
the event ordered by priority.
And because qUpperBound is used to add events, that mean new
events would not be inserted in order.

Task-number: QTBUG19637
Change-Id: I38eb9addb1cdd45b8566e000361ac6e5f1f2c2b8
Reviewed-on: http://codereview.qt.nokia.com/733
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-06-27 10:59:28 +02:00
Jiang Jiang
1fda23c0c6 Store styleName in font database
So that queries like QFontDatabase::styles() can return exactly
the same styles as the system does. Then application can use
QFont::setStyleName() to select those styles later. With a lot
of fonts not providing correct numeric weight/width values and
even if they did, values are usually not directly mapped to
QFont enums, styleName is probably the only reliable way to
select any possible font in the system.

Reviewed-by: QTBUG-13518
Change-Id: Id8a9469b804f1b5bb81d8c7378e7e8778f9a4fff
Reviewed-on: http://codereview.qt.nokia.com/739
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-06-27 10:59:28 +02:00
Jiang Jiang
a06c8405d0 Add styleName to QFontDef comparison
To make sure we cache different font engines with different style
names.

Task-number: QTBUG-19366
Change-Id: Iefaebd5418f212ff759e03c1745f839a7f23d013
Reviewed-on: http://codereview.qt.nokia.com/738
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-06-27 09:41:24 +02:00
Laszlo Agocs
73746a5a89 Have the selection offer global handled always without delay.
In a previous attempt to solve the problem of selection offer
globals arriving too early, the handling was delayed. This
solved the issue of crashing but introduced a timing issue,
because the offers (the mime types) will arrive immediately
after the global and therefore will simply be ignored in
case the delayed processing of the selection offer had not
yet been done. The visibility of the problem depended on the
implementation of the compositor, with recent changes to
qt-compositor the issue is very visible.

The patch solves the issue properly: The wayland clipboard
instance is created right away, as early when needed, and the
integration will simply pick up the already created instance.

Change-Id: I75aaba4b0590c05cc0091bed7bb3593186c1188f
Reviewed-on: http://codereview.qt.nokia.com/687
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-06-24 12:09:44 +02:00
Thiago Macieira
ea933359b7 Add a function that returns the D-Bus local machine ID
Cherry-picked from 4.8 59bd3bcd961fb3198dc9ba24996f7f9af67aeda3

Change-Id: Id3c8f9edbcbe9bbea83d4d54a6eb25500ab80b68
Reviewed-on: http://codereview.qt.nokia.com/655
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-06-23 18:26:28 +02:00
Jørgen Lind
1b9c679eb5 Make sure to call damage on the buffer when we damage it
Change-Id: Id325a1dee322c2b37215e6577870068260f5f7cc
Reviewed-on: http://codereview.qt.nokia.com/683
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
2011-06-23 17:04:21 +02:00
Jørgen Lind
e9d3699123 Update the wayland plugin
to sha1 bfea3d6befdb688d5354e6f15a9400ea637febf9

Change-Id: Ie855cfbc6b786f1e738e205d403478614774ad34
Reviewed-on: http://codereview.qt.nokia.com/682
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-06-23 17:03:51 +02:00
Lars Knoll
61d22c932d fix autotest regressions introduced by 37c329a3
Add proper license headers and properly clip
pixel drawing to the devices bounding rect.
(cherry picked from commit 67d275542464c794ec4b650f10cca9a17e10c977)

Change-Id: I52a166919e87e07168fa5f597b22398a1abefe14
Reviewed-on: http://codereview.qt.nokia.com/590
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-06-22 11:45:29 +02:00
Oswald Buddenhagen
e6b744fb4b simplify relative path generation
instead of hand-crafting the logic, simply use QDir::relativeFilePath()

Change-Id: I5a495ad6bdfa8ec126741180770934e7ebee0495
Reviewed-on: http://codereview.qt.nokia.com/512
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-06-22 11:17:02 +02:00
Shane Kearns
85136496bc IPv4 + IPv6 dual stack sockets
Adds support for binding "dual stack" sockets (via QUdpSocket or
QTcpServer). A dual stack socket will accept incoming connections on
either IPv4 or IPv6 interfaces.

QHostAddress::Any     - use this to bind a dual stack socket
QHostAddress::AnyIPv6 - use this to bind a socket for IPv6 only
QHostAddress::AnyIPv4 - use this to bind a socket for IPv4 only

Binding to a specific address rather than one of the "any" addresses
is restricting you to a protocol anyway so no behaviour change there.
IPv6 sockets were previously dual stack on some OS and v6 only on others
Any previously meant IPv4 only

This commit implemented & tested on Windows 7, Linux (Ubuntu 10.04)
and Mac OS 10.6.7.

Windows XP and server 2003 do not support dual stack sockets, even though
they can support IPv6. On those versions, QHostAddress::Any will still
bind to IPv4 0.0.0.0 (which is also the behaviour anywhere QT_NO_IPV6 is
defined)

Autotests run:
qudpsocket (includes a new test case)
qtcpserver (includes a new test case)
qtcpsocket
qnetworkreply
qhostaddress

Task-number: QTBUG-17080
Change-Id: Id486677c4f832e18dc0ff1a86c5f5fc422c9eb4f
Reviewed-on: http://codereview.qt.nokia.com/421
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Reviewed-by: Markus Goetz
2011-06-22 11:01:00 +02:00
Gunnar Sletta
665d8a0454 Make QPoint have the same layout on all platforms
Change-Id: I8330295761a4440afd81c121039237fb651d9a9c
Reviewed-on: http://codereview.qt.nokia.com/487
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-06-20 13:08:50 +02:00
Peter Hartmann
0da3d7d5d3 SSL certificate printing: increase max certificate size
apparently there are really big certificates around, so 4k might not
always be enough.

Change-Id: I84df82d117469a14b4c6db81e0ceecc1a8ba47b3
Reviewed-on: http://codereview.qt.nokia.com/554
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-06-22 11:01:00 +02:00
Jiang Jiang
6ebb60158d Fix fontconfig usage in X11 font database
We should do FcConfigSubstitute(0, pattern, FcMatchFont) on a
FcPattern for query because the family list in it will contain
almost all the families after FcConfigSubstitute(0, pattern,
FcMatchPattern), then the test in <match target="font"> will
almost always succeed. In general, FcMatchFont substitute
should only be done on the FcPattern that we got after
FcFontMatch() or FcFontRenderPrepare().

Based on the suggestion of fontconfig author Behdad Esfahbod,
this patch reorganized the tryPatternLoad logic so that it only
does the QFontEngine creation part, FcPattern *match is retrieved
outside of that function. In this way, the match pattern we got
can be either from FcFontMatch() or after FcFontRenderPrepare()
on one of the fonts we got from qt_fontSetForPattern(). Then we
don't need to duplicate the pattern and add all criterias back
with qt_addPatternProps(). It not only simplified the code a lot
but also fix the way we apply FcMatchFont substitution. This
substitution will either be done by FcFontMatch() or
FcFontRenderPrepare, both implicitly.

Task-number: QTBUG-2148, QTBUG-19947
Change-Id: I2e4dbbe7f448e81850176732b4a65028f2b912fa
Reviewed-by: Eskil
Reviewed-on: http://codereview.qt.nokia.com/579
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-06-22 11:01:00 +02:00
Peter Hartmann
366f757e84 SSL certificate printing: lookup Symbian ordinal
Change-Id: I5358726f0457f00098c248326ed66fb54af1d177
Reviewed-on: http://codereview.qt.nokia.com/553
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-06-21 19:09:31 +02:00
Richard Moore
ae4b4696a5 Add the ability to convert a certificate to text
Adds a function that will convert a certificate to human readable text
format using the openssl print function. This is useful for debugging
and for displaying the full details of a certificate (including those
parts not supported by the Qt API).

Change-Id: I27238d05df37f8b15ad09f8e761b06344631a9ce
Merge-request: 2
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/551
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-06-21 16:12:55 +02:00
Liang Qi
fa2bb6ab64 Clean-up the macros about Qt Mobility in bearer
Remove the usages of QT_MOBILITY_BEARER, QTM_BEGIN_NAMESPACE and etc.

Change-Id: I68e335c5caa65aa0aebe1a0db82d9633f1724556
Reviewed-on: http://codereview.qt.nokia.com/513
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-06-20 19:24:47 +02:00
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