Commit Graph

655 Commits

Author SHA1 Message Date
Olivier Goffart
d5bdbd70b3 Update the documentation of QUuid::operator QString
2c8e030a3f forgot to make it obsolete

Change-Id: Ic4d1f04c8c9c6656c3e93c60e7483b14f4517f19
Reviewed-on: http://codereview.qt.nokia.com/1742
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-19 16:49:02 +02:00
Olivier Goffart
77ed8787ac Fix use of C style cast.
Fix the test tst_Moc::oldStyleCasts()

(The test make sure moc do not generate old C cast, by compiling the
generated code and testing for gcc warning. But if it is present in the
public header, the warning will be shown)

Change-Id: I2fd3d01e7d78639d97bea021c200afbe2caae85f
Reviewed-on: http://codereview.qt.nokia.com/1772
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-07-19 16:49:02 +02:00
Laszlo Agocs
ba1b6f16ae Implement todos in touchscreen generic plug-in.
The patch implements periodic clearing of the point states when no
activity occurs (i.e. no ev_syn is coming at all, meaning that most
probably all the fingers are already up) and also moves the entire
functionality into a separate thread even when used as a plug-in.

Change-Id: Ib1daa738085b61af9b07eb8a284416e5a3fcabe8
Reviewed-on: http://codereview.qt.nokia.com/1744
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-07-19 15:00:46 +02:00
Martin Petersson
9581c90395 QNetworkAccessFileBackend: Do not accept file url without scheme set.
In Qt 4.8 this generated a warning. For Qt 5 we should no longer
accept file urls without a scheme set. So you should use file://
for local files.

Change-Id: I57789e2b56b712aa4f370aec9437c6febf0d0211
Reviewed-on: http://codereview.qt.nokia.com/1822
Reviewed-by: Markus Goetz
2011-07-19 15:00:46 +02:00
Olivier Goffart
6c984d6c15 "Fix" the crash at startup on MSVC
The problem is that for some reasons, QByteArray::shared_null (and
probably shared_empty, and the ones for QString) are not in the .rodata
anymore, and they are initialized by code.
programs like QMake, which has others global objects (like global
QFiles) that uses QByteArray crashes, because they reference and
dereference shared_null (and try to destroy shared_null)
That happens before shared_null's refcount is initialized to -1

The solution here is not to ref() the objects that have a refcount of 0
(that is what the refcount is before it is initialized to -1)

The real fix to this problem would be to understand why it is not in the
proper section, and make sure it is.

Change-Id: I5b7e966ed4c460b90dba70855f4dc50685dff97f
Reviewed-on: http://codereview.qt.nokia.com/1712
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-07-15 18:46:50 +02:00
Kim Motoyoshi Kalland
b1a0f7c0d2 Moved red-black tree from qtriangulator.cpp into its own file.
Moved the red-black tree class so it can be used outside the
triangulator as well.

Change-Id: I1d63fc88502e8e6c390cac2820c0ce45721cda79
Reviewed-on: http://codereview.qt.nokia.com/1710
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-07-15 17:14:37 +02:00
Thiago Macieira
412ef92162 Fix the timeout calculation for futexes in QMutex.
Recalculate how much time is remaining.

This commit needs to be backported to 4.8.

Change-Id: Ib587335bb90306e65969bb26256fb388f8f6bd24
Merge-request: 20
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1666
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-07-15 11:39:25 +02:00
Olivier Goffart
2c8e030a3f Deprecated QUuid::toString
Change-Id: I1186358df1c3f7615868725d93621608ed22ac99
Reviewed-on: http://codereview.qt.nokia.com/432
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-07-15 11:39:19 +02:00
Ritt Konstantin
92a1a3cc4f fixup for d17c76feee
removing the NoCategory enum value caused all category flags to change.
not an issue for qchar where they were used properly, but an issue for qregexp
where the hardcoded values were used instead.
the `all_cats` could be set to `FLAG(QChar::Symbol_Other + 1) - 1` which is shorter,
but I don't want hardcode the values in order to avoid similar issues in he future

Change-Id: Ie3ae2fca1b01d5911b834f439a0a6216766b8a20
Merge-request: 21
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1696
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-07-15 11:39:04 +02:00
Olivier Goffart
639943ddea Revert "make QChar::Unicode_Unassigned a constantly big value"
This reverts commit ebfd24a20b.

Breaks QChar and QString autotests

Change-Id: If1e915520ea491262c5f7753368be98c02ddac5e
Reviewed-by: Ritt Konstantin
Reviewed-on: http://codereview.qt.nokia.com/1672
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-15 09:49:52 +02:00
Olivier Goffart
4bb5167177 Regenerate unicode tables
Required after d17c76feee

Change-Id: I6820b5cbb78636aa5348bdddf8824ea5c78ba934
Reviewed-on: http://codereview.qt.nokia.com/1673
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-15 09:49:42 +02:00
Samuel Rødal
31d0891866 Deprecate some QPixmap functions (marked as obsolete already).
Reviewed-by: Olivier Goffart
(cherry picked from commit fb4903c4eca6a085c4c39078c11de03f5791f08e)

Change-Id: I87208fe830b47412b40044070fbdad4ed3d0af8c
Reviewed-on: http://codereview.qt.nokia.com/1551
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-14 14:38:15 +02:00
Samuel Rødal
1cc5464236 Deprecate some functions in QImage (that have been obsolete since 4.1).
Reviewed-by: Olivier Goffart
(cherry picked from commit 5ee3e4964d60f4d9cd7026c6f8b6fb93ddd39588)

Change-Id: Ib536c2b5a2b51ca42ab26129142242f30f6c6759
Reviewed-on: http://codereview.qt.nokia.com/1550
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-14 14:38:15 +02:00
Jiang Jiang
d29401ebad Fix warning for uninitialized variable
Reviewed-by: Eskil
(cherry picked from commit 94913c337a388e3d5938ece3a460f1f6e9590cd5)

Change-Id: Ie3c0986a3f5c70a654d9f14c3fae42b528c06b9e
Reviewed-on: http://codereview.qt.nokia.com/1632
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-07-14 14:38:15 +02:00
Peter Hartmann
6ab8ecb002 SSL internals: certificate verification: use mutex locker
there are return statements between locking and unlocking, so to not
leave the mutex locked when returning, this commit introduces a
QMutexLocker.

Change-Id: I74e2f329bf116e92250189bf097deb47d460d9dc
Reviewed-on: http://codereview.qt.nokia.com/1656
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
2011-07-14 13:08:20 +02:00
Jiang Jiang
3b19eab45e Fix editable combobox style on Mac
Reviewed-by: Jens Bache-Wiig
(cherry picked from commit 459dc4a3bf0dc0ac54fc558379fdf551949dd1c6)

Change-Id: I744722d46ced0c2b6139bc232a819d0d802eed0d
Reviewed-on: http://codereview.qt.nokia.com/1633
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-07-14 13:08:20 +02:00
Jiang Jiang
9e7a21291c Skip boundry neutral characters in bidi itemization
According to UAX #9, bidiItemize should act as if those characters
don't exist. If we don't, dir and status.eor here may become
QChar::DirBN, thus interfere the result of bidiItemize.

Task-number: QTBUG-19949
Reviewed-by: Lars Knoll
(cherry picked from commit a5c3064439a9f1483565e5d9dfbf0342cd9236f0)

Change-Id: I224cfdf5b38433a31d33b6d944d5770accf74546
Reviewed-on: http://codereview.qt.nokia.com/1631
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-07-14 11:21:55 +02:00
Jiang Jiang
1080586abc Fix crash when app font is added
Loading app fonts will clear the application font cache, but
QFontPrivate::engineWithScript will try to load the font again,
in Mac the font engine used here must be the one used for shaping,
because subsequent sub font engines may be added to it during the
shaping process (QCoreTextFontEngineMulti::stringToCMap). That is
why we need to fetch the font engine directly from QTextEngine's
fontEngine cache instead of QFontCache.

Task-number: QTBUG-20250
Reviewed-by: Eskil
(cherry picked from commit 1f90ae36cff8acf581d1624bf011fe3a55c623c0)

Change-Id: Ibc0054cd7df65b65a67af4a7b15027731ba417fe
Reviewed-on: http://codereview.qt.nokia.com/1630
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-07-14 11:21:55 +02:00
Jiang Jiang
042cffd601 Apply 57993ba7 properly to 4.8
Because we have moved alignLine from qtextlayout.cpp to QTextEngine,
this patch has to be applied manually.

Reviewed-by: TrustMe
(cherry picked from commit 705416cdc8ee91ac88d80298dbe2971a9384c196)

Change-Id: Ibd657a52da1c510c839623738d49602b5c4a0824
Reviewed-on: http://codereview.qt.nokia.com/1640
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-07-14 11:21:55 +02:00
Jiang Jiang
b2a8832a10 Avoid buffer overrun in QMacPixmapData resizing
Shouldn't use size bigger than the original (source) pixels buffer
or the new one (just allocated).

Task-number: QTBUG-18547
Reviewed-by: aavit
(cherry picked from commit 348894a550510e54e7709d18676b4b10c9e5e9e3)

Change-Id: I7cc373b7d0f1ffef2d2f0cdddb7018c856849d29
Reviewed-on: http://codereview.qt.nokia.com/1635
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-07-14 09:27:15 +02:00
Eskil Abrahamsen Blomfeldt
1f8418807a Fix potential crash when clicking in a text edit
Since the attributes() call might resize the layout and therefore
delete the previous data, the logClusters pointer might be dangling
at this point. We need to reget it to make sure it's valid.

Task-number: QTBUG-20310
Reviewed-by: Jiang Jiang
(cherry picked from commit c0772f44fb1d53608ff629fc622103698c6d0ee5)

Change-Id: I20a29d0c529764eb5d41cb3383c22b6cad8de255
Reviewed-on: http://codereview.qt.nokia.com/1598
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-07-13 15:13:52 +02:00
Ritt Konstantin
ebfd24a20b make QChar::Unicode_Unassigned a constantly big value
this makes the version based checks a bit simpler (and thus faster)

Change-Id: I975c6d043d238a5c16a4b13f8379e87fbade23cc
Reviewed-on: http://codereview.qt.nokia.com/1586
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-07-13 13:31:42 +02:00
Ritt Konstantin
46e2985379 drop a dead QChar::Punctuation_Dask enum value
Change-Id: I22c67ff7c08ab514a646bad86eb8cd0f41099e9c
Reviewed-on: http://codereview.qt.nokia.com/1585
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-07-13 13:31:29 +02:00
Ritt Konstantin
d17c76feee drop an obsolete QChar::NoCategory enum value
there is no such category in the Unicode specs. the QChar::NoCategory
was a subject of bugs since it was introduced. int 4.6 it's meaning was
limited to mention ucs4 > UNICODE_LAST_CODEPOINT only (which is useless anyways)
in order to preserve the old (wrong) behavior.
fix it now for qtbase

Change-Id: I630534824e071090b39772881e747c1fdb758719
Reviewed-on: http://codereview.qt.nokia.com/1584
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-07-13 13:31:13 +02:00
Markus Goetz
4a8d8055b4 QNAM: Introduce clearAccessCache()
Task-Number: QTBUG-17312

Change-Id: I4d7bb22f4aa0292ac6604d783fa9fd218db691e5
Reviewed-on: http://codereview.qt.nokia.com/1574
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-07-13 12:07:47 +02:00
Lars Knoll
718153cfa0 Fix compilation on MSVC
MSVC apparently doesn't like the way the QString::Data
pointers got initialized.

Also fixed a few warnings about signed/unsigned conversions.

Change-Id: I1267979af7601129e5483f8785d4982a1f2f8182
Reviewed-on: http://codereview.qt.nokia.com/1558
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-07-13 10:38:59 +02:00
Pierre Rossi
92c4b63ee1 Fix a crash with QGraphicsScene.
It happened when the scene gets deleted after ~QApplication has been
called.

test case:

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QGraphicsScene *scene = new QGraphicsScene(&a);
    return 0;
}

Change-Id: I74d4023c9575242a2e334b2c786e00d0686c452b
Reviewed-on: http://codereview.qt.nokia.com/1544
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2011-07-12 19:59:40 +02:00
Thiago Macieira
a8fd5b9d2a Fix uses of qRound on non-floating-point types.
It's silly to round integeres, since they are already round. At most,
this would waste CPU cycles without any benefit.

Change-Id: I6fc0152f4416d723b65966e5d48cc7a07957b83c
Merge-request: 17
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1541
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-07-12 19:59:36 +02:00
Olivier Goffart
1bedbb3706 Fix compilation with icc 11
Rvalues reference are not supported by icc11 yet.
Disable all C++0x feature on that compiler.

Task-number: QTBUG-19979
Change-Id: Ifca939b18aa933b047883584cdf91f5543b852b5
Reviewed-by: Thiago
Reviewed-on: http://codereview.qt.nokia.com/1535
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-12 17:02:38 +02:00
Markus Goetz
2b5dcfcee1 QNAM HTTP: Re-write compression code
This eliminates some code (header parsing) that can be done by
zlib already.
Add support for 'deflate' encoding.
Also do less memory copying while uncompressing.

Change-Id: I94de21e3c58b904dd91d004c375ed8cbea56cb0b
Task-Number: QTBUG-13191
Reviewed-on: http://codereview.qt.nokia.com/1314
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Markus Goetz
2011-07-12 15:34:12 +02:00
Thiago Macieira
363c710bc4 Add the #defines for C++0x features in GCC 4.6
Merge-request: 8
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>

Change-Id: I9176f53bd98692c31e49d1d98f91641661a52044
Reviewed-on: http://codereview.qt.nokia.com/1522
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-12 13:57:14 +02:00
Markus Goetz
37be55a86f QNAM HTTP: Do zero-copy for small HTTP replies by default
Task-Number: QTBUG-19046

Change-Id: I34bf432c81d94787524124b7d110a00305a660c1
Reviewed-on: http://codereview.qt.nokia.com/1516
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-07-12 13:57:14 +02:00
Peter Hartmann
e11fac22c4 QSslCertificate: extend documentation for new verify method
Change-Id: I47e038299a7e6ef18206839ff59ecef9f0860415
Reviewed-on: http://codereview.qt.nokia.com/1510
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
2011-07-12 13:57:14 +02:00
Richard Moore
451f3b3785 Add the ability to verify a chain of certificates
Currently it is only possible to verify a certificate chain when
connecting to a server. This change makes it possible to verify a
chain at any time.

Change-Id: Ib70ad7b81418f880e995f391b82ce59561ededb8
Merge-request: 11
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1509
2011-07-12 13:57:14 +02:00
Lars Knoll
ad35a41739 Refactor QByteArray to allow for const data
Similar refactoring as done for QString. Make
shared_null read-only, and add support for
compile time generated QByteArrayData.

Add support for properly reserving capacity.

Change-Id: Ie4c41d4caac7b3b4bb1aef40c1c860a30b82edb8
Reviewed-on: http://codereview.qt.nokia.com/1484
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-12 12:28:12 +02:00
Jedrzej Nowacki
9fea02400c Cleanup reference counting in QDateTimePrivate class.
It is better to use QSharedData which is a common interface for ref
counting.

Change-Id: I990476d6763901bf383f241bce16fe26665b021c
Reviewed-on: http://codereview.qt.nokia.com/1439
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-12 12:28:12 +02:00
Lars Knoll
82454b6014 remove unneeded cast operator on QConstStringData
Change-Id: Ib5f090cd6c716e1d936894be206b78629e70137b
Reviewed-on: http://codereview.qt.nokia.com/1487
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-12 11:04:04 +02:00
Olivier Goffart
6618dd877f Introduce QT_DEPRECATED_SINCE
To be used to versionize deprecated symbols

Symbols deprecated in Qt 5.0 need to be inlined

Change-Id: I696a834c25b7e86acf14ae081ea91ef993a5b19e
Reviewed-on: http://codereview.qt.nokia.com/431
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-07-12 11:04:04 +02:00
Peter Hartmann
94e110ca5f QSslCertificate: rename "tag" to "attribute", as in the RFC
RFC 2459 "Internet X.509 Public Key Infrastructure" uses the word
"attribute" for fields in a certificate like common name, organization
etc.

Change-Id: I51e595acbe3e146acf81af21cf48e554fa9490e4
Reviewed-on: http://codereview.qt.nokia.com/1453
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-07-12 09:25:06 +02:00
Jedrzej Nowacki
12d9436522 Cleanup reference counting in internal::Base class (qtconcurrent)
It is better to use QSharedData and QExplicitlySharedDataPointer then
doing manual ref counting.

Change-Id: I5674046141701bd48a53415ab96fcb6b538e79e6
Reviewed-on: http://codereview.qt.nokia.com/1440
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-11 18:58:41 +02:00
Jedrzej Nowacki
d1f080138a Cleanup reference counting in QIcon class
It is better to use QSharedData and QExplicitlySharedDataPointer then
doing manual ref counting.

Change-Id: Icbb06d92102bcc906291238c5895a05e8d0e6de1
Reviewed-on: http://codereview.qt.nokia.com/1438
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-11 18:58:41 +02:00
Richard Moore
eab215070e SSL: Move the code for extracting the name of an ASN1_OBJECT
Moves the code for extracting the name of an ASN1_OBJECT to a function.
We're going to need this again for implementing support for X509
extensions.

Change-Id: I43276eb375b37f5fef0d981f4003220d7e7b81ba
Merge-request: 18
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1452
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-07-11 17:33:37 +02:00
Richard Moore
852d4b03f6 SSL: Add methods to access the tags of the subject and issuer of a cert
Add methods that return a list of the tags in use in a certificate
issuer or subject. This means that unknown elements of these fields can
be accessed.

Change-Id: I588989e34f541b1d31cc9e97f5a85d1624ece1b1
Merge-request: 18
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1451
2011-07-11 17:33:16 +02:00
Richard Moore
14b56b2be4 SSL: Make the internals of certificate name info match the externals.
The internals of QSslCertificate were using QString but the API used
QByteArray, this commit unifies the code. This means that we don't keep
converting things.

Change-Id: I29fc149a85b77e786a6e90e5154c62f713476599
Merge-request: 18
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1450
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-07-11 17:33:00 +02:00
Richard Moore
8499fb3a9a SSL: Store x509 name entries that have no short name as their OID.
Previously, x509 name entries that didn't have a shortname would all be
(accidentally) stored with the tag 'UNDEF'. This commit changes things
so that they are stored using the string form of their OID.

Change-Id: I667306cc4f91b1ca84f29b986bc21daadeb089b6
Merge-request: 18
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1449
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-07-11 17:32:47 +02:00
Peter Hartmann
c299b4deac SSL internals: rename methods in the SSL backend to reflect public ones
Change-Id: I234c740b1acbfea670d6170332626f5e3ba49328
Reviewed-on: http://codereview.qt.nokia.com/1437
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-07-11 15:52:33 +02:00
Thiago Macieira
0c0676ada2 Remove #ifdef for platforms where QChar was packed -- there aren't any
On ARM OABI, sizeof(QChar) was 4, so we used to pack it so QChar[] was
isomorphic to ushort[]. We don't support the OABI anymore and the EABI
does the right thing.

Change-Id: I181dd2f169f6868450302e269ef9ad5d643f306f
Merge-request: 13
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1386
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-07-11 14:17:33 +02:00
Markus Goetz
06f2c9da46 QNAM: Remove QNetworkAccessHttpBackend
Qt 5.0 is using QNetworkReplyHttpImpl

Change-Id: I230230dc8b81e55a6c0cc8e1d85714e49fd35d17
Reviewed-on: http://codereview.qt.nokia.com/1381
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-07-11 12:43:52 +02:00
Thiago Macieira
f9035587b9 Replace try/catch blocks in favour of destructors in the event loop.
This has two direct benefits:
1) compiles regardless of -fno-exceptions: no need for #ifndef
QT_NO_EXCEPTIONS or QT_TRY/QT_CATCH

2) no QT_RETHROW either, which means the backtrace of an application
crashing due to an uncaught exception will include the actual throw
point.

Change-Id: I18e5500e121bfa81431ef16699df96d962794f0e
Reviewed-on: http://codereview.qt.nokia.com/663
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-07-11 12:43:52 +02:00
Jiang Jiang
915ec02cad Remove some metrics parsing code from Core Text
The respective value in some of the default fonts like Lucida Grande
are simply not reliable. It seems that the only reliable way to get
such information is by going through all the glyphs.

It seems that these code are not well tested on Mac and should be
removed for now since it caused visible regressions in QLineEdit
rendering.

Reviewed-by: Eskil
(cherry picked from commit 8032d6f4ced50837e126f28c1475ad89eaf91ad7)

Change-Id: I85e71a2e3228a367659be9f5f6ec3e667e0ce902
Reviewed-on: http://codereview.qt.nokia.com/1264
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-07-11 12:43:52 +02:00
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