profile/ivi/qtbase.git
12 years agoFix qtmodule-configtests to honor error codes
Girish Ramakrishnan [Thu, 8 Mar 2012 13:11:11 +0000 (05:11 -0800)]
Fix qtmodule-configtests to honor error codes

The test is marked as fail if qmake or make fails.

Change-Id: I565c68af4a9271d7aa36fb592ac399aa728ba4d8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
12 years agoQRegularExpression: minor fix to captureIndexForName
Giuseppe D'Angelo [Sun, 26 Feb 2012 22:37:45 +0000 (22:37 +0000)]
QRegularExpression: minor fix to captureIndexForName

Although passing a null pointer to pcre16_get_stringnumber for
the compiled pattern should simply make it error out, it's actually
an undocumented behaviour, so let's stay safe and add an explicit
check.

Tests for this codepath are added.

Change-Id: Ifd9c87874f6812ba487104ec1a5bbc83c3b16761
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQRegularExpression: improve JIT memory handling
Giuseppe D'Angelo [Thu, 23 Feb 2012 02:53:08 +0000 (02:53 +0000)]
QRegularExpression: improve JIT memory handling

PCRE's JIT uses by default 32K on the pcre_exec caller's stack. This
is fine for most situations, but in some cases (esp. patterns with
lot of recursion) more memory is required.

Therefore, if a match execution fails due to exhausting JIT memory,
we let PCRE allocate up to 512KB to be used for the JIT's stack.

The pointer to the allocated memory is put in thread local storage
(so it can be reused from the same thread, if needed, and automatically
goes away when the thread dies).

Change-Id: Ica5fb7d517068befff88ebb198a603a26ec5d8a7
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoWindows: Fix flag handling.
Friedemann Kleint [Thu, 8 Mar 2012 15:13:28 +0000 (16:13 +0100)]
Windows: Fix flag handling.

Fix a typo that caused a variable to be hidden such that
the Qt::WindowFlags were not used.

Change-Id: Iea4456b0cd4c968e0fbfdd53e5006ffee0298b24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQtNetwork: blacklist two more certificates
Martin Petersson [Wed, 7 Mar 2012 11:05:59 +0000 (12:05 +0100)]
QtNetwork: blacklist two more certificates

The comodogate 72:03:21:05:c5:0c:08:57:3d:8e:a5:30:4e:fe:e8:b0
certificate is a test certificate and the MD5 Collisions was created
as a proof of concept deliberately made to be expired at the time
of it's creation.

Task-number: QTBUG-24654
Change-Id: Ic8eb417363569fe50bf19cd229658f5e371862f7
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoreplace uses of QMAKE_INCDIR_QT and QMAKE_LIBDIR_QT with module-specific variables
Oswald Buddenhagen [Mon, 5 Mar 2012 10:49:51 +0000 (11:49 +0100)]
replace uses of QMAKE_INCDIR_QT and QMAKE_LIBDIR_QT with module-specific variables

Change-Id: Id410887fa97f345a229e0cbf395633ccf303fa2f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoremove obviously counterproductive uses of QT_SOURCE_TREE & QT_BUILD_TREE
Oswald Buddenhagen [Fri, 2 Mar 2012 20:32:02 +0000 (21:32 +0100)]
remove obviously counterproductive uses of QT_SOURCE_TREE & QT_BUILD_TREE

Change-Id: I77cf734b58f350d82277c084a680ab56fdf82f08
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoremove automatic building of moc from moc.prf
Oswald Buddenhagen [Fri, 2 Mar 2012 16:52:12 +0000 (17:52 +0100)]
remove automatic building of moc from moc.prf

the problem this (probably) tried to solve has been solved via ordered
builds a *long* time ago.

Change-Id: I84c58076c864735eea4210ec60aa060fe3e5d97e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agouse $$QT_BUILD_TREE instead of $$(QTDIR)
Oswald Buddenhagen [Mon, 5 Mar 2012 13:20:17 +0000 (14:20 +0100)]
use $$QT_BUILD_TREE instead of $$(QTDIR)

it's a "tad" more reliable

Change-Id: I7207daa6869d1682719cc357794cf6efff496225
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agodelete dumpcpp.prf
Oswald Buddenhagen [Mon, 5 Mar 2012 13:19:21 +0000 (14:19 +0100)]
delete dumpcpp.prf

it seems to be a no-op. presumably it was meant to be an auto-rebuild
hack like in moc.prf, but it wasn't really "wired".

Change-Id: I914456f5f5a63a06c2004b16edcf2e2ade448270
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoremove strange .qmake.cache hacks
Oswald Buddenhagen [Mon, 5 Mar 2012 11:15:50 +0000 (12:15 +0100)]
remove strange .qmake.cache hacks

they are obsolete (qmake knows the qt build configuration anyway), and
messing with QTDIR is a recipe for disaster.

Change-Id: Ib3594f38ec3192a5f70771f8bc5d8fd435bbbd15
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoRemove legacy pre-QPA gui/egl implementation
Donald Carr [Wed, 7 Mar 2012 16:30:08 +0000 (16:30 +0000)]
Remove legacy pre-QPA gui/egl implementation

Change-Id: I22a100cec7064df87eb2036adbca8a41aab5a10d
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQAccessibleEvent needs a virtual destructor.
Frederik Gladhorn [Wed, 7 Mar 2012 15:21:11 +0000 (16:21 +0100)]
QAccessibleEvent needs a virtual destructor.

Change-Id: Ia0cd82c5457d39fe501e7ee6b5468ccb0f62f35a
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoDefer window activation if the window hasn't beenn mapped yet.
Lars Knoll [Thu, 8 Mar 2012 11:49:49 +0000 (12:49 +0100)]
Defer window activation if the window hasn't beenn mapped yet.

Change-Id: I60d616fc60d3be9b55ab2599abadede5f7c11f93
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoWindows: Removing insignification from QTextEdit test
Miikka Heikkinen [Thu, 8 Mar 2012 09:38:09 +0000 (11:38 +0200)]
Windows: Removing insignification from QTextEdit test

The commit 660af10dee503729025952ed2374b8a081f941a2 seems to have fixed
the test, so removing the insignification from it.

Task-number: QTBUG-24348
Change-Id: I564e90db53d10b54e22342a1cdbef6826929c63a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix a bug in the assignment operators for QJsonObject and Array
Lars Knoll [Thu, 8 Mar 2012 09:41:55 +0000 (10:41 +0100)]
Fix a bug in the assignment operators for QJsonObject and Array

When objects or arrays where being used read only, several objects
can share the same d pointer, but will have different pointers into
the binary data. Correctly change the pointer into the binary
data even if the d-pointer is the same.

Change-Id: Ife0ea5ac5daf46586f855dccdf35b51ec696a623
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoCrash fix in QMetaType::typeName.
Jędrzej Nowacki [Thu, 8 Mar 2012 14:36:38 +0000 (15:36 +0100)]
Crash fix in QMetaType::typeName.

The function is public, so it should validate input instead of crashing

Change-Id: Ifd9f1110f8631f942929d85db6a57eee7afffb6a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoFix crash in QVariant::canConvert.
Jędrzej Nowacki [Tue, 6 Mar 2012 12:34:30 +0000 (13:34 +0100)]
Fix crash in QVariant::canConvert.

The function was crashing when an unsupported type id was given
as an input argument.

Change-Id: I2b0e3e6d43f6f248dc71532f8e6485efe68e8120
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoWindows: Make QMenuBar autotest significant again
Debao Zhang [Wed, 7 Mar 2012 17:58:34 +0000 (09:58 -0800)]
Windows: Make QMenuBar autotest significant again

The bug has been fix by 7bc576771de0b3c96905a6d11a75a01917334dc9 .

Task-number: QTBUG-24326
Change-Id: Ifd37e9fe76cb24e49132f22909c95a55a230b1ed
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRemove usage of QtXml from rcc, add test
Giuseppe D'Angelo [Sun, 26 Feb 2012 21:04:57 +0000 (21:04 +0000)]
Remove usage of QtXml from rcc, add test

Ported from QDom to QXmlStreamReader. This enables removal of QtXml
classes from bootstrap.

A new rcc test was added, copying the data from the
QResourceFileEngine test. The new test runs rcc to create binary
resources, dynamically loads them under various locales and checks
that they do contain the expected files.

Change-Id: I15d23dfda45de851a421156951ce2a60af4c1f7f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
12 years agoexamples: compile w/QT_NO_CAST_FROM_BYTEARRAY, at least on Unix
Marc Mutz [Thu, 23 Feb 2012 06:39:45 +0000 (07:39 +0100)]
examples: compile w/QT_NO_CAST_FROM_BYTEARRAY, at least on Unix

This is all pretty straight-forward, adding .constData() or
using QString::fromLatin1() instead of QLatin1String().

Change-Id: I984706452db7d0841620a0f64e179906123f3849
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoEnablers for shared graphics cache in raster paint engine
Jiang Jiang [Tue, 28 Feb 2012 11:50:27 +0000 (12:50 +0100)]
Enablers for shared graphics cache in raster paint engine

Required changes for using shared graphics cache for distance field
raster glyph rendering. Most of the logic is in platform plugins.

Platform plugins should implement
QPlatformIntegration::createImagePaintEngine() to create a subclass
of QRasterEngine.

Change-Id: Icf0a396e722e43b4caa2c1849aae38753cde38f1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoRemove dead code.
Pierre Rossi [Tue, 6 Mar 2012 15:42:03 +0000 (16:42 +0100)]
Remove dead code.

This logic was introduced as part of change I92dfb39289a359f49caa02c2caf8baf66098fb59
but isn't used anymore.

Change-Id: I5bcfea99a7a2993434e1e978195a70dae52d6cfa
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agotestlib: Make QTestResult::verify() more robust.
Jason McDonald [Thu, 8 Mar 2012 01:20:41 +0000 (11:20 +1000)]
testlib: Make QTestResult::verify() more robust.

The statementStr parameter should always be non-null, so assert if it is
null.  The description parameter can be null in some cases (particularly
when the verify is successful, and thus no error description is going to
be displayed), so tolerate this.

Change-Id: I87b416d5f3b793bc608cd4aca14a4f7fe7527488
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd accessible role Desktop.
Frederik Gladhorn [Sun, 5 Feb 2012 22:41:34 +0000 (23:41 +0100)]
Add accessible role Desktop.

Another role that is mostly needed to make Qt based desktops accessible.
Would be nice to have for KDE's Plasma in the future.

Change-Id: I1d2ce9d55d677f73cc59f0a3646ee5e588c1d948
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
(cherry picked from commit edc6fae534835a2c72edffb52255fe522a37928f)

12 years agoCall updateAccessibility with the right index.
Frederik Gladhorn [Wed, 7 Mar 2012 12:39:57 +0000 (13:39 +0100)]
Call updateAccessibility with the right index.

In Qt 4 index 0 was the widget itself.
With the cleanup of child index this now changed.
The default constructor uses -1 as parameter to signify that
the widget is the cause, not a child.

Change-Id: I329a1cc91bf2d1d1d8534739acbddfe107f40364
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoChangelog: QEvent::Accessibility
Frederik Gladhorn [Tue, 14 Feb 2012 10:17:36 +0000 (11:17 +0100)]
Changelog: QEvent::Accessibility

Change-Id: I705d21f62e6101599ab59d9b8768c47d3a536bfd
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoFixes potential memory leak in qtextcodec.cpp
Nick Ratelle [Thu, 5 Jan 2012 22:13:46 +0000 (17:13 -0500)]
Fixes potential memory leak in qtextcodec.cpp

Change-Id: I56c0a1a6cc261bd15653bc4cbb94daed1f8aa811
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoselftests: Improve reporting of problems with loading expected output
Jason McDonald [Wed, 7 Mar 2012 06:17:46 +0000 (16:17 +1000)]
selftests: Improve reporting of problems with loading expected output

If the expected output file was missing (e.g. not included in
selftests.qrc), tst_selftests would trigger an assert inside QList by
calling QList::at() on an empty list.  Make tst_selftests detect this
error instead and give a meaningful error message.

When loading expected output for the crashes selftest, where there are
several alternative versions of the expected output, the code reused the
"exp" variable when loading the alternative test output files.  This
caused the last file loaded to be used unintentionally if none of the
alternative files had the correct number of lines.  Use a different
variable so that exp remains empty if none of the alternatives are
valid and a failure can be reported.

Change-Id: I35b2a3d905d069d3ee8dcb1447836eb68d5c8612
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotestlib: Improve verbose and XPASS output
Jason McDonald [Wed, 29 Feb 2012 05:43:42 +0000 (15:43 +1000)]
testlib: Improve verbose and XPASS output

Previously, verbose (-v2) and XPASS test output showed all QCOMPAREs as
"COMPARE()", making it impossible to see what was compared and difficult
to match the output to the source of a test containing many calls to
QCOMPARE.

This commit changes testlib's internal compare_helper API so that string
representations of the compared expressions are always passed to
QTestResult::compare() when available, and can thus be shown in the
verbose and XPASS output.  The XPASS output has also been changed to
state explicitly that the comparison succeeded unexpectedly, bringing it
in line with the XPASS output resulting from a call to QVERIFY.

This commit also changes all calls to compare_helper() to call the
eight-argument version of the function, which simplifies much of the
calling code.  The now obsolete four-argument version of
compare_helper() has been changed to output a warning that it is
obsolete.  It will be removed once other modules have had some time to
catch up.

The improved XPASS and verbose output is demonstrated by the expectfail
and verbose2 selftests.

Change-Id: I8baa46d5dd30e6c43b26f366c34dc5b64aab5f7c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotestlib: Document a known limitation of QFINDTESTDATA.
Jason McDonald [Mon, 20 Feb 2012 04:45:50 +0000 (14:45 +1000)]
testlib: Document a known limitation of QFINDTESTDATA.

Change-Id: I72740e394bfe2a95f5b48566b29c9ef9200a8035
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoCall wait() after calling quit() so that it can gracefully finish
Andy Shaw [Wed, 7 Mar 2012 12:08:02 +0000 (13:08 +0100)]
Call wait() after calling quit() so that it can gracefully finish

There was a problem with slow https connections that if the download
was ongoing when quit() was called then it tended to cause a crash
because it tries to shutdown the SSL connection.

Task-number: QTBUG-24594
Change-Id: I6b161bc7a9bb99e41849537462de2d7c92661902
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agoMark unstable windows network tests
Shane Kearns [Fri, 2 Mar 2012 19:10:41 +0000 (19:10 +0000)]
Mark unstable windows network tests

This is unfortunately still "most of them", because of QTBUG-24451
however some of the unit tests are still possible to test stably.

Also skipped test cases which would hang forever due to QTBUG-24451.

Bearer tests are not run, because they pass when test machine has no
wireless LAN, but fail or hang if it does (QTBUG-24503)

Change-Id: Icf99d45707102d2ef9219ed0b5ad521605716219
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoWindows - handle both auto detect proxy settings together
Shane Kearns [Wed, 22 Feb 2012 20:24:58 +0000 (20:24 +0000)]
Windows - handle both auto detect proxy settings together

If both "automatically detect settings" and "use automatic configuration
script" are selected in internet options, then respect that.
Because of performance issues, these are tried separately, and
disabled if they fail.

Task-number: QTBUG-13957
Task-number: QTBUG-10238
Change-Id: Ibc824d3039afeaf12c5ea82ed95287e5cf4e1776
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoFix a number of bugs with windows system proxies
Shane Kearns [Mon, 27 Feb 2012 15:59:48 +0000 (15:59 +0000)]
Fix a number of bugs with windows system proxies

TcpServer requests always returned no proxy, even if socks was available
Tag handling was broken for empty tag (if system proxies were tagged)
Tag handling was broken for unknown tags - now handled the same as if
    no tag was given at all.
When there are different proxies for http and https, windows returns
the http proxy first. However we should prefer to use the https proxy
for general sockets, as it's more likely to support the CONNECT method.

Change-Id: I55dcadf2e142367e857f94e55fdbb0c4ddb513a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoRework QNetworkProxyFactory::systemProxyForQuery autotest
Shane Kearns [Mon, 27 Feb 2012 15:50:19 +0000 (15:50 +0000)]
Rework QNetworkProxyFactory::systemProxyForQuery autotest

Rather than requiring specific hardcoded proxies in the system,
it now checks the proxies returned by the system have the required
capabilities for the request.

Note the test will pass if no proxy is configured (as
QNetworkProxy::NoProxy has all required capabilities)

The test prints the returned proxy lists and elapsed time
diagnostic for manual comparison and debugging.

Change-Id: I621ef4d1d7264a98c3e8bd485c30bc1166fcbdf0
Task-number: QTBUG-19454
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoWindows - fall back on static proxy config if autoproxy fails
Shane Kearns [Wed, 22 Feb 2012 21:20:46 +0000 (21:20 +0000)]
Windows - fall back on static proxy config if autoproxy fails

If both manual proxy settings are configured and the autodetect
setting is enabled, fall back on the manual configuration when
auto detection fails.

Task-number: QTBUG-10428
Change-Id: If008c7c967eec6256ce3c614fff0ec258190d451
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoWindows - handle proxy autoconfiguration resulting in no proxy
Shane Kearns [Wed, 22 Feb 2012 20:20:27 +0000 (20:20 +0000)]
Windows - handle proxy autoconfiguration resulting in no proxy

The PAC file may result in direct connection, in which case
WinHttp returns null strings for the proxies and the connection
type marked as direct.
In this case, return the default list (no proxy)

Change-Id: I601033f56a841bb92ea80a28174bb993b024ad79
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoWindows - fix proxy types for manually specified proxies
Shane Kearns [Wed, 22 Feb 2012 20:11:28 +0000 (20:11 +0000)]
Windows - fix proxy types for manually specified proxies

When the windows internet options are used to specify a
different proxy for each protocol, assume the proxy server type
matches that protocol too.
e.g. "socks=qt-test-server:1080" is both tagged for socks, and
assumed to be a socks server.
"ftp=qt-test-server:2121" is assumed to be an ftp proxy
"ftp=http://qt-test-server:3128" is overridden to be a http proxy
used for ftp.

Task-number: QTBUG-10502
Change-Id: I70615c89d6ede53f0e7d62e6d0754b90d042aa2e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMark tst_QNetworkReply::getThenDeleteObject as unstable
Shane Kearns [Tue, 6 Mar 2012 11:19:33 +0000 (11:19 +0000)]
Mark tst_QNetworkReply::getThenDeleteObject as unstable

It's unstable on all platforms, because the reply can be finished
due to a race with the http thread. It isn't crashing (which the
test was trying to test for), but rather the QVERIFY(!reply->isFinished())
fails, which is an inconclusive verdict.

Change-Id: Ib815a7cedd220544a0c9cb83023e3334df4a0fb3
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agotst_qnetworkreply - remove qRegisterMetaType duplicates
Shane Kearns [Mon, 5 Mar 2012 17:36:28 +0000 (17:36 +0000)]
tst_qnetworkreply - remove qRegisterMetaType duplicates

The metatypes are registered in the constructor, don't need to
register them in test cases as well.
Registering in a test case is bad practice, as it could result
in tests failing when run individually due to unknown metatype.

Change-Id: Ic4d65d0f5fe3cdd3ab57cf2512a4906d71205a05
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agoAdd windows XFAIL to qnetworkreply autotest
Shane Kearns [Mon, 5 Mar 2012 17:32:48 +0000 (17:32 +0000)]
Add windows XFAIL to qnetworkreply autotest

The test case that depends on QLocalSocket consistently fails due
to bugs in QLocalSocket windows implementation

Change-Id: Ibfe9eb3590be4f72b52f14cd4fbe5be61f6cf70e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoAllow compilation of 3rdparty/pcre on QNX
Sean Harmer [Wed, 7 Mar 2012 18:22:39 +0000 (18:22 +0000)]
Allow compilation of 3rdparty/pcre on QNX

Change-Id: If9a56d5e042c8da9626feab377388e9bfc22b129
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agochiptester benchmark: compile
Marc Mutz [Thu, 1 Mar 2012 09:10:16 +0000 (10:10 +0100)]
chiptester benchmark: compile

The implementation uses QScrollBar, which is no longer
included by <QtGui>.

Change-Id: I2422cfccc427179ca71e9a3195f16bd637925fb3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoexamples: use QVector<QPointF> instead of QList<QPointF>
Marc Mutz [Thu, 1 Mar 2012 09:09:02 +0000 (10:09 +0100)]
examples: use QVector<QPointF> instead of QList<QPointF>

QPointF is in the category of types for which QList
is needlessly inefficient (elements are copy-constructed
onto the heap and held through pointers). Use a vector
instead. This is consistent with the QPainter API.

Change-Id: Id0e910c067a60d12fbc175e7ee7da824834be374
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix typo: remember not remembet
Frederik Gladhorn [Tue, 6 Mar 2012 10:45:45 +0000 (11:45 +0100)]
Fix typo: remember not remembet

Change-Id: I6e3bc6a233e7ec8ba94ecaeeafc730b18dd32f02
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoMove qdoc into qtbase and bootstrap it
Lars Knoll [Mon, 5 Mar 2012 14:34:40 +0000 (15:34 +0100)]
Move qdoc into qtbase and bootstrap it

We need qdoc in qtbase to be able to properly
modularize our documentation and build it
when building the different Qt modules.

qdoc does contain a copy of the qml parser from
qmldevtools, but this is the lesser evil compared
to how we are currently forced to genereate our
docs (and the fact that no developer can run
qdoc and check the docs for their module).

Change-Id: I9f748459382a11cf5d5153d1ee611d7a5d3f4ac1
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agomove postProcessProject() call to sane location
Oswald Buddenhagen [Wed, 7 Mar 2012 12:31:04 +0000 (13:31 +0100)]
move postProcessProject() call to sane location

there is totally no reason to call it unless the project is actually
used for makefile generation, and the excessive calls actually mess up
things.

Change-Id: Idb7912a5404f6054010d2f29cce820a167de4f6f
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoQCursor: Associate cursor with screen.
Friedemann Kleint [Mon, 5 Mar 2012 13:42:42 +0000 (14:42 +0100)]
QCursor: Associate cursor with screen.

- Introduce cursor() accessor to QPlatformScreen.
- Remove screen member of QPlatformCursor (a
  cursor can be shared by multiple screens
  of a virtual desktop).
- Add QCursor::pos()/ QCursor::setPos() taking
  a QScreen-parameter, use primaryScreen() for
  old overloads.  QCursor::pos() can then query
  the platform cursor for the position and return
  the position even if the mouse position is outside
  the windows owned by the Qt application.
- Fix tests

Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Task-number: QTBUG-22457
Task-number: QTBUG-22565
Task-number: QTBUG-20753
Change-Id: Ia69f37343f95772e934eab1cd806bd54cbdbbe51
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix dockwidgets behavior when window resized or central widgets is set.
Debao Zhang [Thu, 22 Dec 2011 16:27:32 +0000 (00:27 +0800)]
Fix dockwidgets behavior when window resized or central widgets is set.

When adding and showing a central widget in a QMainWindow then the
layout does not respect the size policy of the central widget.

This is a side effect of 059be19781a22d2e41f22072152589857d0fabf9

After the layout of QMainWindow is restored or the separator between central
widget and dock widgets is moved by user, dock widgets should keep their
size when the window if resized.

Task-number: QTBUG-15689
Change-Id: Idfccb7b4ae057a99f431c2ed54e3b9fcfb6ef54c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQRegularExpression: add optimizations autotest
Giuseppe D'Angelo [Wed, 22 Feb 2012 03:33:00 +0000 (03:33 +0000)]
QRegularExpression: add optimizations autotest

Exporting the counter that controls the optimization of a compiled
pattern lets us to forcibly optimize all patterns. Therefore,
two tests are now run: one with default optimization values
and another one which always optimizes the pattern.

The counter itself was renamed with a qt_ prefix and put
inside the Qt compilation namespace
(thanks to rohanpm for pointing it out).

Change-Id: I56602433d37adc127772b2d0d2cdaf2e49d43c71
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove references to missing tests
Girish Ramakrishnan [Wed, 7 Mar 2012 02:51:41 +0000 (18:51 -0800)]
Remove references to missing tests

17ddce4692b31af4374b28cd40b9f25e8ed629cd removed the endian test.
90a5492fb01ec3bc10c18c5a0acd38d6ed845a6d removed the ipv6 test.

largefile and nix are long dead.

Change-Id: If8e5d4f0546e30778b82ee99f662cb9ed3aefacb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFixing iconv test to match new mkspec name
Rafael Roquetto [Wed, 7 Mar 2012 08:10:10 +0000 (09:10 +0100)]
Fixing iconv test to match new mkspec name

Fixed iconv.pro file to follow the qnx mkspec renaming from blackberry- to
qnx-

Change-Id: I91e0e2495d0ec70c6ffec3e3e83eb8712805b3aa
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQWidget: fix wrong mouse behavior
Debao Zhang [Wed, 7 Mar 2012 00:44:52 +0000 (16:44 -0800)]
QWidget: fix wrong mouse behavior

Widgets will receive extra mouse press events when double clicked. This
is a side effect of change Id Ief6af12c666b23e544da4a68cb835cd577265469
which has partially fixed the folowing bug.

Task-number:QTBUG-24649
Change-Id: I030ac6ba641050d40ac8989720a1c261ab15f849
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix sending simulated keyboard events to popup widgets
Miikka Heikkinen [Tue, 6 Mar 2012 11:58:31 +0000 (13:58 +0200)]
Fix sending simulated keyboard events to popup widgets

Popup widgets steal the keyboard grab stealthily without it being
visible via QWidget::keyboardGrabber(). To more accurately simulate a
real keyboard event, prioritize sending simulated keyboard events to
the active popup widget over QGuiApplication::focusWindow().

Task-number: QTBUG-24326
Change-Id: Id7a75c613d934e24657b521f1684ce7cce92556a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoWindows: Fix override cursor logic
Miikka Heikkinen [Wed, 7 Mar 2012 11:31:30 +0000 (13:31 +0200)]
Windows: Fix override cursor logic

Fixed a logic error that prevented override cursors being applied in
Windows plugin. The logic for override cursor handling is already
in crossplatform code, so no need to do extra checks in plugin.

Task-number: QTBUG-24657
Change-Id: Ied9b36b57f22607ef5bb5c30f2926b0053eebca5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoCocoa: Implement Drag-and-Drop.
Friedemann Kleint [Wed, 7 Mar 2012 13:46:04 +0000 (14:46 +0100)]
Cocoa: Implement Drag-and-Drop.

Implement drag and drop support for drags originating
from outside Qt. Port mime and pasteboard code from
Qt 4. Use QSimpleDrag from from platform support to
implement internal Qt drags.

Change-Id: I5b664a95ebb00f48de2bd21c24dfb579af16123e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoExample build fix.
Jędrzej Nowacki [Tue, 6 Mar 2012 15:41:47 +0000 (16:41 +0100)]
Example build fix.

buttontester.pro has to be renamed to mousebuttons.pro because it lives
in mousebuttons subdirectory, to which examples/widgets/widgets.pro is
pointing by SUBDIRS variable.

Change-Id: I04bbd85713321337fbe8cbccfa6284f12b677279
Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoFix deadlock in QPropertyAnimation
Olivier Goffart [Wed, 7 Mar 2012 11:24:30 +0000 (12:24 +0100)]
Fix deadlock in QPropertyAnimation

Commit 1e6514a714c1f55b9cb57d2b8b65bc2305c2e2c6 changed the mutex from
recursive to non-recursive, which could introduce dead lock if the
animation starts other animation (This is the case in QMainWindow
layouts)

Change-Id: I1b149b78a802748eb24b5700fffeca0b8555f005
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoAdd fonts to QPlatformTheme.
Friedemann Kleint [Wed, 7 Mar 2012 07:56:41 +0000 (08:56 +0100)]
Add fonts to QPlatformTheme.

- Remove QPlatformFontDatabase::defaultFonts() returning
  a hash containing widget name ->font and the Windows
  implementation.
- Add enumeration and font accessor to QPlatformTheme. The value
  returned for the enumeration value overwrites the default font
  of the font database.
- Implement for Windows, Mac and KDE.
- Add more Windows palettes.

Task-number: QTBUG-23686

Change-Id: I8a2abdfd216df23daa7c9630c54264cdf61295db
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoAdd nicer error message in qMetaTypeId function.
Jędrzej Nowacki [Tue, 6 Mar 2012 14:12:06 +0000 (15:12 +0100)]
Add nicer error message in qMetaTypeId function.

The function can be used only with a registered type and it would fail
to compile for other types. By adding the static assert we can print
an almost user friendly compilation error message.

Change-Id: I59ab148cabf32afe0baef186b82cb03303b57780
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoMake QCursor manual tests compile on Qt5
Miikka Heikkinen [Wed, 7 Mar 2012 08:33:16 +0000 (10:33 +0200)]
Make QCursor manual tests compile on Qt5

These tests were not aware widgets had been split to different lib.

Change-Id: I58bde1304c876319a3cbb50f4d6a66e9f24b2886
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix support for scripts that require OpenType
Eskil Abrahamsen Blomfeldt [Wed, 7 Mar 2012 08:49:20 +0000 (09:49 +0100)]
Fix support for scripts that require OpenType

We need to load OpenType tables when initializing fonts for
scripts that require them. This fixes support for many Brahmic
scripts.

Change-Id: Ib5e50f2c7e5edb4b3e3ecf9fd004f2cf62634add
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove abuse of QMetaTypeId from tst_qshortcut test.
Jędrzej Nowacki [Tue, 6 Mar 2012 14:06:33 +0000 (15:06 +0100)]
Remove abuse of QMetaTypeId from tst_qshortcut test.

Q_DECLARE_METATYPE macro is much better for a custom type registration
then a handwritten template specialization.

Change-Id: Ia15688d89f708fbff0c1da93e08052d31f3b3fc0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQSqlTableModel::selectRow(): complete documentation
Mark Brand [Tue, 6 Mar 2012 23:24:08 +0000 (00:24 +0100)]
QSqlTableModel::selectRow(): complete documentation

Mention in changes and document Qt version (merci à dfaure).
Follow-up to 291e2c7d5416af4d16dc0a6e60df7980ba745a3d.

Change-Id: Ie5626e9cd268812c1173ca494ccd8d6bd9be2687
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
12 years agoImprove type detection for query results
Andy Shaw [Fri, 2 Mar 2012 09:46:57 +0000 (10:46 +0100)]
Improve type detection for query results

When an aggregate function is used for a column in a SQL resultset then
it should ensure that the right data type is reported for that column.
This also concerns expressions when the returned column does not map
directly to a table column.

Test included for this.

Task-number: QTBUG-22038
Change-Id: I07487694c0ed393d46af06e232914fe923356a99
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
12 years agoRefactor headersclean for usage from modules other than qtbase
Rohan McGovern [Thu, 1 Mar 2012 04:37:50 +0000 (14:37 +1000)]
Refactor headersclean for usage from modules other than qtbase

headersclean enforces various rules which all Qt headers are supposed to
abide by.  It fails compilation if these rules are broken.

These rules should be followed also by modules hosted outside of
qtbase.  Split the test up so that it can be easily reused by other
modules.

Change-Id: Icf09cbfde411c926ed87914dc821e6dfc569b0de
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoCompile with -qtnamespace
Sarah Smith [Tue, 6 Mar 2012 01:51:22 +0000 (11:51 +1000)]
Compile with -qtnamespace

Mac has to work with -qtnamespace as well, and other files have gotten
this right, so follow their example.

Change-Id: I551e1843e8a0e82a82d1d5ea8c8cd5f20e6880fa
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoQRegularExpression: fix optimizePattern, document the issue
Giuseppe D'Angelo [Thu, 16 Feb 2012 22:49:27 +0000 (23:49 +0100)]
QRegularExpression: fix optimizePattern, document the issue

The studyData pointer is atomically set by the pointer assignment,
but another processor running a different thread might see the
new studyData value but not the memory it points to.

Therefore, the current studyData is returned from optimizePattern
and used by that thread.

Docs were added to optimizePattern to explain what's going on.

Change-Id: I4502c336077bb98a1751011aa93ffd4f585ed101
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRenaming QNX mkspecs
Rafael Roquetto [Tue, 6 Mar 2012 14:21:19 +0000 (15:21 +0100)]
Renaming QNX mkspecs

Renamed from blackberry-* to qnx-* in order to match he <platform>-<compiler>
pattern.

Change-Id: I378151f3d564dd280943c74865a1d2b97215b656
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoAdd benchmark for QMetaType::create().
Jędrzej Nowacki [Tue, 6 Mar 2012 11:04:37 +0000 (12:04 +0100)]
Add benchmark for QMetaType::create().

A case of a custom type creation was not covered before.

Change-Id: Icd2a7d63633f8e40d9d4a8a26e0eb0896fc85ec8
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoQuery udev build parameters from pkg-config
Donald Carr [Fri, 2 Mar 2012 04:58:33 +0000 (04:58 +0000)]
Query udev build parameters from pkg-config

Change-Id: Ia3b7329d7359684ee7bf572a7e5fb681105108f4
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix double click handling.
Laszlo Agocs [Tue, 6 Mar 2012 14:09:09 +0000 (16:09 +0200)]
Fix double click handling.

Until now double clicking in Qt 5 resulted in the following sequence of mouse
events: pressed, released, double clicked, released. This is wrong, the press
belonging to the second button down is missing. In Qt 4 that pressed event is
present.

The problem is not apparent in desktop environments because the double click is
functioning properly even when the second pressed is missing. However when
using a platform plug-in like wayland, where the clients receive only press,
move and release events, double click was broken because the second click was
effectively ignored (due to receiving nothing but a button release).

Change-Id: Ief6af12c666b23e544da4a68cb835cd577265469
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix the bit test for ABS_MT_SLOT to detect protocol B
Shawn Rutledge [Tue, 6 Mar 2012 15:29:50 +0000 (16:29 +0100)]
Fix the bit test for ABS_MT_SLOT to detect protocol B

I tested, it didn't work.  This is from a previous patch I had
already gotten working before 40a5ba4d3fccb449dcfd8d9a0deaf4c7f0fe12bc
was submitted.

Change-Id: I868f069fe834b3122ed9b5b3dc9af0781d6e1d0d
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoQRegularExpression: fix documentation due to qdoc changes
Giuseppe D'Angelo [Sat, 3 Mar 2012 12:41:13 +0000 (12:41 +0000)]
QRegularExpression: fix documentation due to qdoc changes

Removes the usage of various qdoc macros which are now deprecated.

Change-Id: I74fa70f8d2a2a1bff57cdb2bcc14a31a7198dea0
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoFixed warnings from arm builds with -Wundef
Rohan McGovern [Tue, 6 Mar 2012 07:50:05 +0000 (17:50 +1000)]
Fixed warnings from arm builds with -Wundef

Do not use the value of a macro before verifying that the macro
is defined.

Change-Id: I36bebe37da5f4e5e7af1e423b7f2b18091e35707
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix off by one in updateAccessibility.
Frederik Gladhorn [Mon, 5 Mar 2012 15:56:55 +0000 (16:56 +0100)]
Fix off by one in updateAccessibility.

Now that indexOfChild is 0-based, the update notifications should follow.

Change-Id: I5e0303516d503d5e23061df5894b2428c00da2ce
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoFix parsing of unicode escape sequences
Lars Knoll [Tue, 6 Mar 2012 12:05:09 +0000 (13:05 +0100)]
Fix parsing of unicode escape sequences

Change-Id: I63a7cd3a571fb47c97157bcb2ca29c4239c600ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFixed warning from gcc with -Wundef for some values of WCHAR_MAX
Rohan McGovern [Tue, 6 Mar 2012 07:55:14 +0000 (17:55 +1000)]
Fixed warning from gcc with -Wundef for some values of WCHAR_MAX

Certain versions of system headers will declare WCHAR_MAX like:

    #define __WCHAR_MAX      ( (wchar_t) - 1 )
    #define WCHAR_MAX         __WCHAR_MAX

In particular on ARM (see e.g.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598937 )

In this case, defined(WCHAR_MAX) is true, but attempting to use the
value of WCHAR_MAX in a preprocessor expression will not give the
desired results - "wchar_t" is unknown to the preprocessor, so
WCHAR_MAX silently (without -Wundef) evaluates to ( (0) - 1 ) == -1.

A simple workaround is to avoid looking at WCHAR_MAX when the
superior __SIZEOF_WCHAR_T__ is defined.

Change-Id: I439b166cffb93416737ee19025fb6e8d51c27876
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQRegularExpression: fix autotest
Giuseppe D'Angelo [Thu, 23 Feb 2012 02:49:52 +0000 (02:49 +0000)]
QRegularExpression: fix autotest

Some minor fixes: obviously, a valid match always come from a
valid regular expression, but a valid regular expression can create
an invalid match (internal error during matching).

Also, testing an invalid iterator should silence the emitted
warnings.

Change-Id: I585bb99a81e22f108601fd66bf30b56e0229d68b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoSupport legacy QDataStream serialization of QDate.
Aaron McCarthy [Tue, 6 Mar 2012 01:17:07 +0000 (11:17 +1000)]
Support legacy QDataStream serialization of QDate.

Commit 8327fa7c11f6c84ccc66be4365ee282a76288788 changed the type of the
Julian day member of QDate from quint32 to qint64.  This changed the
QDataStream format.  Keep the old behavior, with the limited date
range, if the stream version is less than Qt_5_0.

Change-Id: I800448979a1891581069f39de7f9ab9c634e4f0e
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoUse #define before including SHA-2 3rdparty code
Bradley T. Hughes [Fri, 2 Mar 2012 07:07:23 +0000 (08:07 +0100)]
Use #define before including SHA-2 3rdparty code

Using typedef causes errors due to re-definition, so #define the types
needed by the SHA-2 code to the q[u]int* equivalents instead.

Change-Id: I6fc29788dd05aeee28723820f511527d482d31f2
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
12 years agoQSqlTableModel: use selectRow() for field and row edit strategies
Mark Brand [Tue, 21 Feb 2012 08:22:26 +0000 (09:22 +0100)]
QSqlTableModel: use selectRow() for field and row edit strategies

Calling select refreshes the query data but disrupts view
navigation.

For OnFieldChange and OnRecordChange it makes sense to only
select the row in question. This does not disturb view navigation.

Assume disruption of view navigation is not a problem
for OnManualSubmit because the user or application decides
when submitAll is called.

Task-number: QTBUG-2875
Change-Id: I1e5f68668fb9102f6296d67d543e80daa403f1c4
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlTableModel: long live selectRow()!
Mark Brand [Thu, 16 Feb 2012 01:38:02 +0000 (02:38 +0100)]
QSqlTableModel: long live selectRow()!

Change-Id: If26dbcc8a1e8ef1376ef7a688c946ce5270e5706
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlTableModel: handle changes between submit and select
Mark Brand [Wed, 15 Feb 2012 08:56:23 +0000 (09:56 +0100)]
QSqlTableModel: handle changes between submit and select

Once an insert has been submitted, the cached record behaves like an
update. For row bookkeeping, we still have to remember that it was
originally inserted and is not in the query rows.

Between submitting a delete and selecting, we remove the values
from the deleted record. This causes a blank row to be displayed.
Read-only flag is set for cells in deleted row.

Reverting between submit and select means going back to the last
submitted values.

When removing rows, it's better to process from highest row numbers
to lowest. This avoids complications with higher rows shifting down
when lower rows are removed.

Change-Id: I8752fa11f7a1b88f2a71b9e03a020ac37e62487f
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
12 years agoQRegularExpression: const correctness fixes
Giuseppe D'Angelo [Sun, 19 Feb 2012 22:58:04 +0000 (23:58 +0100)]
QRegularExpression: const correctness fixes

Adding some const qualifiers to members which are never written.

Change-Id: Ibb8953764c7b7790a419a5d48f2956751d5fc1f9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQRegularExpression: add captureCount()
Giuseppe D'Angelo [Sun, 19 Feb 2012 22:56:50 +0000 (23:56 +0100)]
QRegularExpression: add captureCount()

QRegularExpression::captureCount() returns the number of
capturing groups inside the regular expression pattern.

Change-Id: Ib90ce67c67d06ab2966f0c98bd91da21defc156d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQRegularExpression: do not use JIT in debug builds
Giuseppe D'Angelo [Wed, 8 Feb 2012 19:28:14 +0000 (19:28 +0000)]
QRegularExpression: do not use JIT in debug builds

PCRE's JIT uses self-modifying code extensively, requiring full SMC
checks enabled by tools like valgrind, which slow down the execution
considerably; not enabling SMC checks lead to crashes.

Therefore, JIT is now disabled by default in debug builds of Qt.
Its usage (both in debug and release builds) can be controlled
by setting the QT_ENABLE_REGEXP_JIT environment variable.

Change-Id: Ib38952400e4219582942ce65ab9edcd89c432f3e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQRegularExpression: improve operator==, add dedicated autotest
Giuseppe D'Angelo [Wed, 8 Feb 2012 18:53:22 +0000 (18:53 +0000)]
QRegularExpression: improve operator==, add dedicated autotest

Trivial change: compare dpointers first, then the data.
Added test function for operator==.

Change-Id: I33ac64a59db4ccad56c30be17622187e42415f38
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQRegularExpression: QDebug support for pattern options
Giuseppe D'Angelo [Tue, 7 Feb 2012 23:56:40 +0000 (23:56 +0000)]
QRegularExpression: QDebug support for pattern options

Added the proper QDebug operator to debug the
QRegularExpression::PatternOptions flags.

Change-Id: Icd00e93a0c6cc4345db528d494fc176624f7b7a2
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQRegularExpression: add QRegularExpression* set of classes
Giuseppe D'Angelo [Mon, 23 Jan 2012 22:47:59 +0000 (22:47 +0000)]
QRegularExpression: add QRegularExpression* set of classes

Added QRegularExpression, QRegularExpressionMatch and
QRegularExpressionMatchIterator as PCRE-enabled, regexp classes.
Documentation is included, as well as a first round of autotests.

Task-number: QTBUG-23489
Change-Id: Id47031b80602c913ccd2fd740070e3024ea06abc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agodon't add bogus /mkspecs to QMAKE_MKSPECS
Oswald Buddenhagen [Fri, 2 Mar 2012 16:27:33 +0000 (17:27 +0100)]
don't add bogus /mkspecs to QMAKE_MKSPECS

the project build root can of course be empty - if there is neither an
mkspecs/ nor a .qmake.cache - or no project in the first place (-query).

Change-Id: I9595b0b4ad80a9086dcd48c9ae62b3e8bd1b6f2f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agofix relative default examples path
Oswald Buddenhagen [Mon, 5 Mar 2012 20:03:09 +0000 (21:03 +0100)]
fix relative default examples path

copy&pasto ...

Change-Id: I73ab90f31f2a2250abe1ec9aeea975122ff319cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoFix tst_QNetworkReply::httpWithNoCredentialUsage autotest
Shane Kearns [Mon, 5 Mar 2012 16:54:12 +0000 (16:54 +0000)]
Fix tst_QNetworkReply::httpWithNoCredentialUsage autotest

The test was testing the wrong thing, and passing even though
QNetworkRequest::AuthenticationReuseAttribute was not being
respected, until recently when I fixed username/password in URLs

Now the cache is properly bypassed when this attribute is set to
manual, and the autotest is updated to check this.

Change-Id: I87943515562d0b16b03504f0758ba265758d1c22
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agoFix QNetworkReply ioGetFromHttpWithCache test case
Shane Kearns [Mon, 5 Mar 2012 14:09:04 +0000 (14:09 +0000)]
Fix QNetworkReply ioGetFromHttpWithCache test case

Expiration date is calculated from max-age header when a response is
inserted into the cache. Because the test case is prepopulating the
cache outside of QNAM's control, the expiration date was uninitialised,
causing the test to fail.

This is due to a 2 year old change in QNAM, where max age calculation was
removed from cache retrieval, and more recent changes to QDateTime
where secsTo() returns 0 if one of the arguments is invalid.

Change-Id: Ieecd46123dde4ca0fd0be3ae79e70e1528ec02bc
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agoWindows - fix QWindowsSystemProxy global static race
Shane Kearns [Wed, 22 Feb 2012 21:23:48 +0000 (21:23 +0000)]
Windows - fix QWindowsSystemProxy global static race

Loser of the race would try to delete an uninitialised pointer

Task-number: QTBUG-15765
Change-Id: Ie184ee2306e102aa8fbad752ef09b95c3ede00c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix finding specs in the unsupported/ directory.
Thomas McGuire [Tue, 6 Mar 2012 12:13:09 +0000 (13:13 +0100)]
Fix finding specs in the unsupported/ directory.

The -spec argument was interpreted as a relative directory as
soon as it contained a slash. Fix this by checking if the
directory exists before attempting to interpret it.

Change-Id: Ide8f0418abc719b0be582d2d72642a141f6c6dea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQProcess/Win: pointless Sleep call removed
Joerg Bornemann [Tue, 6 Mar 2012 09:18:14 +0000 (10:18 +0100)]
QProcess/Win: pointless Sleep call removed

Change-Id: I634c62d3a0f96bc074e815dfd4106b6187f4ba85
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agotransitively resolve module dependencies
Oswald Buddenhagen [Fri, 24 Feb 2012 18:18:02 +0000 (19:18 +0100)]
transitively resolve module dependencies

otherwise we need the nasty hack for includes, and CONFIGs and DEFINES
from dependencies are not included at all.

Change-Id: I7eaee761161a6e8fbac8e9237d26559aa11a88a1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoDon't use QMutexPool in QEventDispatcher
Olivier Goffart [Fri, 2 Mar 2012 14:39:50 +0000 (15:39 +0100)]
Don't use QMutexPool in QEventDispatcher

Use a QBasicMutex, there is no extra cost of having a mutex for this.

Change-Id: Ib5b01338649002c0c21f018b2c931a8cc68027f6
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>