profile/ivi/qtbase.git
13 years agoMoved red-black tree from qtriangulator.cpp into its own file.
Kim Motoyoshi Kalland [Fri, 15 Jul 2011 11:56:26 +0000 (13:56 +0200)]
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>
13 years agofix access to free()d memory
Oswald Buddenhagen [Fri, 15 Jul 2011 13:39:27 +0000 (15:39 +0200)]
fix access to free()d memory

the 'item' reference may become invalid inside the loop.

this approach was chosen (instead of making 'item' a non-reference) to
keep the code more in sync with creator (where the string type is more
complex).

Change-Id: I60a4b0654dc47c0e3466d43904c358eb7e3e64e2
Reviewed-By: Marius Storm-Olsen
Reviewed-on: http://codereview.qt.nokia.com/1702
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoFix the timeout calculation for futexes in QMutex.
Thiago Macieira [Thu, 14 Jul 2011 12:43:44 +0000 (14:43 +0200)]
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>
13 years agoDeprecated QUuid::toString
Olivier Goffart [Wed, 8 Jun 2011 09:55:40 +0000 (11:55 +0200)]
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>
13 years agofixup for d17c76feee9eece4f7d9d1c5cec254842bb0a639
Ritt Konstantin [Fri, 15 Jul 2011 09:37:10 +0000 (11:37 +0200)]
fixup for d17c76feee9eece4f7d9d1c5cec254842bb0a639

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>
13 years agoRevert "make QChar::Unicode_Unassigned a constantly big value"
Olivier Goffart [Thu, 14 Jul 2011 14:21:21 +0000 (16:21 +0200)]
Revert "make QChar::Unicode_Unassigned a constantly big value"

This reverts commit ebfd24a20b1acdced5fe032eedb2737efdc6eb92.

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>
13 years agoRegenerate unicode tables
Olivier Goffart [Thu, 14 Jul 2011 14:31:20 +0000 (16:31 +0200)]
Regenerate unicode tables

Required after d17c76feee9eece4f7d9d1c5cec254842bb0a639

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>
13 years agoDeprecate some QPixmap functions (marked as obsolete already).
Samuel Rødal [Tue, 12 Jul 2011 12:33:53 +0000 (14:33 +0200)]
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>
13 years agoDeprecate some functions in QImage (that have been obsolete since 4.1).
Samuel Rødal [Tue, 12 Jul 2011 11:16:45 +0000 (13:16 +0200)]
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>
13 years agoFix warning for uninitialized variable
Jiang Jiang [Tue, 12 Jul 2011 07:31:07 +0000 (09:31 +0200)]
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>
13 years agoSSL internals: certificate verification: use mutex locker
Peter Hartmann [Thu, 14 Jul 2011 09:28:32 +0000 (11:28 +0200)]
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
13 years agoFix editable combobox style on Mac
Jiang Jiang [Thu, 7 Jul 2011 12:53:09 +0000 (14:53 +0200)]
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>
13 years agoSkip boundry neutral characters in bidi itemization
Jiang Jiang [Wed, 22 Jun 2011 12:23:47 +0000 (14:23 +0200)]
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>
13 years agoFix crash when app font is added
Jiang Jiang [Fri, 8 Jul 2011 15:40:43 +0000 (17:40 +0200)]
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>
13 years agoApply 57993ba7 properly to 4.8
Jiang Jiang [Thu, 14 Jul 2011 07:40:12 +0000 (09:40 +0200)]
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>
13 years agoAvoid buffer overrun in QMacPixmapData resizing
Jiang Jiang [Tue, 31 May 2011 10:15:55 +0000 (12:15 +0200)]
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>
13 years agoFix potential crash when clicking in a text edit
Eskil Abrahamsen Blomfeldt [Wed, 13 Jul 2011 13:06:43 +0000 (15:06 +0200)]
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>
13 years agomake QChar::Unicode_Unassigned a constantly big value
Ritt Konstantin [Fri, 8 Jul 2011 14:28:09 +0000 (18:28 +0400)]
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>
13 years agodrop a dead QChar::Punctuation_Dask enum value
Ritt Konstantin [Fri, 24 Jun 2011 05:34:04 +0000 (09:34 +0400)]
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>
13 years agodrop an obsolete QChar::NoCategory enum value
Ritt Konstantin [Fri, 8 Jul 2011 14:24:57 +0000 (18:24 +0400)]
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>
13 years agoQNAM: Introduce clearAccessCache()
Markus Goetz [Wed, 13 Jul 2011 08:54:17 +0000 (10:54 +0200)]
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>
13 years agoFix compilation on MSVC
Lars Knoll [Wed, 13 Jul 2011 08:21:23 +0000 (10:21 +0200)]
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>
13 years agoFix a crash with QGraphicsScene.
Pierre Rossi [Tue, 12 Jul 2011 15:29:46 +0000 (17:29 +0200)]
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>
13 years agoFix uses of qRound on non-floating-point types.
Thiago Macieira [Tue, 12 Jul 2011 15:08:35 +0000 (17:08 +0200)]
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>
13 years agoFix compilation with icc 11
Olivier Goffart [Tue, 12 Jul 2011 14:13:26 +0000 (16:13 +0200)]
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>
13 years agoQNAM HTTP: Re-write compression code
Markus Goetz [Wed, 6 Jul 2011 14:08:59 +0000 (16:08 +0200)]
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
13 years agoAdd the #defines for C++0x features in GCC 4.6
Thiago Macieira [Tue, 12 Jul 2011 11:47:14 +0000 (13:47 +0200)]
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>
13 years agoQNAM HTTP: Do zero-copy for small HTTP replies by default
Markus Goetz [Tue, 12 Jul 2011 10:45:02 +0000 (12:45 +0200)]
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>
13 years agoQSslCertificate: extend documentation for new verify method
Peter Hartmann [Tue, 12 Jul 2011 09:52:10 +0000 (11:52 +0200)]
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
13 years agoAdd the ability to verify a chain of certificates
Richard Moore [Sat, 18 Jun 2011 14:53:53 +0000 (15:53 +0100)]
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

13 years agoRefactor QByteArray to allow for const data
Lars Knoll [Mon, 11 Jul 2011 21:16:58 +0000 (23:16 +0200)]
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>
13 years agoCleanup reference counting in QDateTimePrivate class.
Jedrzej Nowacki [Fri, 10 Jun 2011 08:47:07 +0000 (10:47 +0200)]
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>
13 years agoAdded macro to check if the malloc hooks should be volatile.
Christian Strømme [Tue, 12 Jul 2011 07:09:53 +0000 (09:09 +0200)]
Added macro to check if the malloc hooks should be volatile.

The malloc hooks changed in glibc 2.14, and are now volatile.
Note also that the malloc hooks are now marked as deprecated.

Ref:
http://sourceware.org/bugzilla/show_bug.cgi?id=11781
http://repo.or.cz/w/glibc.git/commitdiff/a33c44639a8784589c8386ac0b56baf6d0beca32
http://repo.or.cz/w/glibc.git/commitdiff/cf6bbbd701380accba8f709cf88b7bb160131e32
http://repo.or.cz/w/glibc.git/commitdiff/7d17596c198f11fa85cbcf9587443f262e63b616

Change-Id: Iab80bea7a7f5d72ac96cacd75468eefbfd9b8326
Reviewed-on: http://codereview.qt.nokia.com/1497
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
13 years agoremove unneeded cast operator on QConstStringData
Lars Knoll [Tue, 12 Jul 2011 07:08:55 +0000 (09:08 +0200)]
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>
13 years agoIntroduce QT_DEPRECATED_SINCE
Olivier Goffart [Wed, 8 Jun 2011 09:43:27 +0000 (11:43 +0200)]
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>
13 years agoAdd autotest for QStringLiteral
Lars Knoll [Tue, 12 Jul 2011 07:08:28 +0000 (09:08 +0200)]
Add autotest for QStringLiteral

Change-Id: Ia5a82bf3bf489373bc0823065aa9c2990430440c
Reviewed-on: http://codereview.qt.nokia.com/1486
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoCompile with C++0x enabled
Lars Knoll [Tue, 12 Jul 2011 07:08:05 +0000 (09:08 +0200)]
Compile with C++0x enabled

Change-Id: Iffee297c6bc3a53a95cd42fe6ad8901d7b791a11
Reviewed-on: http://codereview.qt.nokia.com/1485
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
13 years agoQSslCertificate: rename "tag" to "attribute", as in the RFC
Peter Hartmann [Mon, 11 Jul 2011 14:39:14 +0000 (16:39 +0200)]
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>
13 years agofix $$resolve_depends()
Oswald Buddenhagen [Mon, 11 Jul 2011 15:19:45 +0000 (17:19 +0200)]
fix $$resolve_depends()

make it a proper topological sort. before, it could not resolve diamonds
correctly.

Change-Id: I17ffd81020ab36e7e5dbcfd120793ba8d9c6cf18
Reviewed-on: http://codereview.qt.nokia.com/1435
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoinline resoveDepends()
Oswald Buddenhagen [Mon, 11 Jul 2011 15:44:27 +0000 (17:44 +0200)]
inline resoveDepends()

that's common practice for the expand functions, and that one isn't even
particularly big

Change-Id: I66c22e11edb66bd00d211fc1282eb75f5dd4832d
Reviewed-on: http://codereview.qt.nokia.com/1456
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agofix misnomer: $$resolve_depends() => $$sort_depends()
Oswald Buddenhagen [Mon, 11 Jul 2011 15:17:18 +0000 (17:17 +0200)]
fix misnomer: $$resolve_depends() => $$sort_depends()

... and re-add a real $$resolve_depends(), just in case.

Change-Id: I489d6056546340ce95280fe7fd571e30c14470e7
Reviewed-on: http://codereview.qt.nokia.com/1455
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoinvert the output order of $$resolve_depends()
Oswald Buddenhagen [Mon, 11 Jul 2011 15:13:19 +0000 (17:13 +0200)]
invert the output order of $$resolve_depends()

it needs to go from highest order to lowest order.
that's not relevant unless doing static linking.

Change-Id: Ieb69e3949b4d9cc2d2a62f5661f31e3dc88ac882
Reviewed-on: http://codereview.qt.nokia.com/1454
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agomake 1st argument of $$resolve_depends a variable
Oswald Buddenhagen [Mon, 11 Jul 2011 14:55:53 +0000 (16:55 +0200)]
make 1st argument of $$resolve_depends a variable

this is braindead, but it's consistent with the rest of qmake and more
performant. and the argument error message claimed it already anyway.

Change-Id: I973368acc6ffbff17107085ccd68b0334cc3e681
Reviewed-on: http://codereview.qt.nokia.com/1436
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoCleanup reference counting in internal::Base class (qtconcurrent)
Jedrzej Nowacki [Fri, 10 Jun 2011 07:06:32 +0000 (09:06 +0200)]
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>
13 years agoCleanup reference counting in QIcon class
Jedrzej Nowacki [Fri, 10 Jun 2011 09:28:05 +0000 (11:28 +0200)]
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>
13 years agoSSL: Move the code for extracting the name of an ASN1_OBJECT
Richard Moore [Mon, 11 Jul 2011 14:15:15 +0000 (16:15 +0200)]
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>
13 years agoSSL: Add methods to access the tags of the subject and issuer of a cert
Richard Moore [Mon, 11 Jul 2011 14:15:14 +0000 (16:15 +0200)]
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

13 years agoSSL: Make the internals of certificate name info match the externals.
Richard Moore [Mon, 11 Jul 2011 14:15:13 +0000 (16:15 +0200)]
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>
13 years agoSSL: Store x509 name entries that have no short name as their OID.
Richard Moore [Mon, 11 Jul 2011 14:15:12 +0000 (16:15 +0200)]
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>
13 years agoSSL internals: rename methods in the SSL backend to reflect public ones
Peter Hartmann [Mon, 11 Jul 2011 09:35:53 +0000 (11:35 +0200)]
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>
13 years agomake the non-bootstrapped build work again
Oswald Buddenhagen [Mon, 11 Jul 2011 13:24:55 +0000 (15:24 +0200)]
make the non-bootstrapped build work again

Change-Id: I48d33bea7fd3081461e6edcf7077bfb749e2d2b7
Reviewed-on: http://codereview.qt.nokia.com/1433
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoRemove #ifdef for platforms where QChar was packed -- there aren't any
Thiago Macieira [Fri, 8 Jul 2011 13:49:26 +0000 (15:49 +0200)]
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>
13 years agoQNAM: Remove QNetworkAccessHttpBackend
Markus Goetz [Fri, 8 Jul 2011 13:35:14 +0000 (15:35 +0200)]
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>
13 years agoReplace try/catch blocks in favour of destructors in the event loop.
Thiago Macieira [Thu, 23 Jun 2011 12:11:50 +0000 (14:11 +0200)]
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>
13 years agoRemove some metrics parsing code from Core Text
Jiang Jiang [Wed, 6 Jul 2011 12:31:33 +0000 (14:31 +0200)]
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>
13 years agoAdd font related changes in 4.8 into changes
Jiang Jiang [Mon, 4 Jul 2011 13:27:13 +0000 (15:27 +0200)]
Add font related changes in 4.8 into changes

Reviewed-by: Eskil
Change-Id: I2371fab17201ffd157753d36bc7e2e0c59cc2376
Reviewed-on: http://codereview.qt.nokia.com/1265
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoQSslSocket: Add accessors for SSL version
Richard Moore [Mon, 11 Jul 2011 08:47:16 +0000 (10:47 +0200)]
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>
13 years agoRemove Qt 4.3 binary compatibility for MSVC
Thiago Macieira [Fri, 8 Jul 2011 13:49:26 +0000 (15:49 +0200)]
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>
13 years agoRemove the definition of QT_NO_FPU based on the processor or WS
Thiago Macieira [Fri, 8 Jul 2011 13:41:50 +0000 (15:41 +0200)]
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>
13 years agoUse lambdas for generating static data for QStringLiteral
Thiago Macieira [Fri, 8 Jul 2011 12:10:02 +0000 (14:10 +0200)]
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>
13 years agoRemove more references to demos.
Casper van Donderen [Mon, 4 Jul 2011 08:30:18 +0000 (10:30 +0200)]
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
13 years agoFix memory leak in QHostInfo
Shane Kearns [Thu, 7 Jul 2011 13:17:58 +0000 (14:17 +0100)]
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
13 years agoRemove the qs() macro.
Olivier Goffart [Fri, 8 Jul 2011 09:11:39 +0000 (11:11 +0200)]
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>
13 years agoUse memmove in QListData::append(int) as regions overlap.
Thiago Macieira [Fri, 8 Jul 2011 08:42:49 +0000 (10:42 +0200)]
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>
13 years agoQNAM: Add support for more KnownHeaders
Markus Goetz [Thu, 7 Jul 2011 15:42:55 +0000 (17:42 +0200)]
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>
13 years agoFixed wayland windowmanager-protocol authorization
Martin Zielinski [Mon, 4 Jul 2011 07:41:26 +0000 (09:41 +0200)]
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
13 years agoAdd support for QStringLiterals in QStringBuilder
Thiago Macieira [Thu, 7 Jul 2011 17:53:35 +0000 (19:53 +0200)]
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>
13 years agoMake the new QStringLiteral produce a non-temporary
Thiago Macieira [Thu, 7 Jul 2011 17:51:09 +0000 (19:51 +0200)]
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>
13 years agoBugfix the QConstString implementation.
Thiago Macieira [Thu, 7 Jul 2011 14:10:31 +0000 (16:10 +0200)]
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>
13 years agoDon't cast a string from ascii
Lars Knoll [Tue, 5 Jul 2011 11:01:37 +0000 (13:01 +0200)]
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>
13 years agoDon't keep a static instance of QDBusConnection
Harald Fernengel [Thu, 7 Jul 2011 15:02:42 +0000 (17:02 +0200)]
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>
13 years agoFix a crash when D-Bus library can't be loaded
Harald Fernengel [Thu, 7 Jul 2011 13:31:19 +0000 (15:31 +0200)]
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>
13 years agoUnify QLatin1String and QLatin1Literal
Lars Knoll [Mon, 4 Jul 2011 10:21:06 +0000 (12:21 +0200)]
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>
13 years agoSupport for compile time generated QStrings
Lars Knoll [Wed, 6 Jul 2011 07:21:10 +0000 (09:21 +0200)]
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>
13 years agoAdd an internal QRefCount class to QtCore
Lars Knoll [Wed, 6 Jul 2011 07:17:00 +0000 (09:17 +0200)]
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>
13 years agoUpdate sync.profile dependencies to new syntax
Alan Alpert [Wed, 6 Jul 2011 08:36:10 +0000 (18:36 +1000)]
Update sync.profile dependencies to new syntax

%dependencies now has a simpler format of gitmodule => gitref instead of
using qt modules and keywords.

Change-Id: I785f30e24e0a793218e2e307bdde56067760c513
Reviewed-on: http://codereview.qt.nokia.com/1215
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoUpdate licenseheader text in source files for qtbase Qt module
Jyri Tahtela [Tue, 5 Jul 2011 14:05:10 +0000 (17:05 +0300)]
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>
13 years agoDoc: Fixing typo
Sergio Ahumada [Wed, 6 Jul 2011 21:06:42 +0000 (23:06 +0200)]
Doc: Fixing typo

(cherry picked from commit 7f5797a784e237672f291055020ef4bbb6199893)

Conflicts:

tests/auto/qaccessibility/tst_qaccessibility.cpp
tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp

Change-Id: I8bab7ee83f6e32bba2574aad82b288fb05b503eb
Reviewed-on: http://codereview.qt.nokia.com/1253
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
13 years agoFix regressions in previous QFontDatabase patch
Jiang Jiang [Thu, 7 Jul 2011 06:36:45 +0000 (08:36 +0200)]
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>
13 years agoUse Q_DECL_CONSTEXPR in QFlags
Olivier Goffart [Wed, 6 Jul 2011 14:37:14 +0000 (16:37 +0200)]
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>
13 years agoAdd Q_DECL_CONSTEXPR
Olivier Goffart [Wed, 6 Jul 2011 14:35:04 +0000 (16:35 +0200)]
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>
13 years agoMake qtextlayout autotests to compile
Sergio Ahumada [Wed, 6 Jul 2011 13:25:02 +0000 (15:25 +0200)]
Make qtextlayout autotests to compile

Change-Id: I6c3a773da54c0a08da553104bb09840f6489e7d0
Reviewed-on: http://codereview.qt.nokia.com/1238
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
13 years agoFix bidi reordering when part of text is rendered by fallback font
Eskil Abrahamsen Blomfeldt [Wed, 6 Jul 2011 09:44:57 +0000 (11:44 +0200)]
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>
13 years agoUnicode strings are supported from gcc 4.4 onwards
Lars Knoll [Wed, 6 Jul 2011 07:20:45 +0000 (09:20 +0200)]
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>
13 years agoRemove references to QT_INSTALL_DEMOS & DemosPath.
Casper van Donderen [Mon, 4 Jul 2011 08:30:18 +0000 (10:30 +0200)]
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>
13 years agoFix compilation with c++0x mode
Lars Knoll [Mon, 4 Jul 2011 12:03:23 +0000 (14:03 +0200)]
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>
13 years agoRemove QT3_SUPPORT from qsql, qxml
Gabriel de Dietrich [Tue, 5 Jul 2011 16:30:35 +0000 (18:30 +0200)]
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>
13 years agoQNetworkReply benchmark: Benchmark a chain of SSL requests
Markus Goetz [Fri, 1 Jul 2011 13:15:21 +0000 (15:15 +0200)]
QNetworkReply benchmark: Benchmark a chain of SSL requests

Change-Id: Ic74b4189c5b8e7fc8f86d76973d628c63989d32d
Reviewed-on: http://codereview.qt.nokia.com/1010
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
13 years agoWe need to let the currentContext be in the same state after
Jørgen Lind [Fri, 27 May 2011 09:12:02 +0000 (02:12 -0700)]
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>
13 years agoFix the wayland windowsurface so that we have stencil and depth buffer
Jørgen Lind [Sun, 8 May 2011 08:53:56 +0000 (10:53 +0200)]
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>
13 years agoQAbstractSocket: Always clear old QHostAddress list on a new connect.
Martin Petersson [Tue, 5 Jul 2011 14:32:01 +0000 (16:32 +0200)]
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>
13 years agoUpdate the documentation after moving examples.
Casper van Donderen [Fri, 1 Jul 2011 12:59:19 +0000 (14:59 +0200)]
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
13 years agoMove some other examples around in the docs.
Casper van Donderen [Thu, 30 Jun 2011 07:42:52 +0000 (09:42 +0200)]
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
13 years agoRemove references to demos from docs.
Casper van Donderen [Mon, 4 Jul 2011 08:16:53 +0000 (10:16 +0200)]
Remove references to demos from docs.

Change-Id: I1ae723af883c305ea64a4e46cc3ce889dd3c021b
Reviewed-on: http://codereview.qt.nokia.com/1032
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: David Boddie
13 years agoMake use of deleted members in Q_DISABLE_COPY
Olivier Goffart [Tue, 5 Jul 2011 15:05:13 +0000 (17:05 +0200)]
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>
13 years agoQHostAddress: fix compile on Windows
Martin Petersson [Tue, 5 Jul 2011 14:04:38 +0000 (16:04 +0200)]
QHostAddress: fix compile on Windows

AF_INET6 needs to be defined on Windows. This got undefined when
QT_NO_IPV6 was removed in 85869920bb9a4ee45cf4a89e74b1bd3d4ce67eaa

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
13 years agoFix QScopedPointerarray default constructor
Olivier Goffart [Tue, 5 Jul 2011 12:06:01 +0000 (14:06 +0200)]
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>
13 years agoQNAM HTTP: Fix canReadLine() for zerocopy
Markus Goetz [Tue, 5 Jul 2011 11:07:30 +0000 (13:07 +0200)]
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>
13 years agoRemove QT3_SUPPORT from network
Shane Kearns [Mon, 4 Jul 2011 16:21:34 +0000 (17:21 +0100)]
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>
13 years agoDoc: Fixing typo
Sergio Ahumada [Mon, 4 Jul 2011 08:37:56 +0000 (10:37 +0200)]
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