profile/ivi/qtbase.git
12 years agoRemove Symbian support from src/corelib/io/.
Robin Burchell [Tue, 27 Dec 2011 17:11:08 +0000 (18:11 +0100)]
Remove Symbian support from src/corelib/io/.

Change-Id: I52c2a58396e03f29ca478de34c914535c7ae1012
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoDo not unconditionally define QT_BEGIN_MOC_NAMESPACE
Denis Dzyubenko [Fri, 30 Dec 2011 13:18:28 +0000 (14:18 +0100)]
Do not unconditionally define QT_BEGIN_MOC_NAMESPACE

Qt5 modules are supposed to be in a namespace, but if the namespace definition
is hidden in a macro, then moc doesn't know about it and generates invalid
moc_xx.cpp that cannot be compiled due to usage of classes outside of their
namespaces - e.g. in qtjsondb we have QtAddOn::JsonDb::Foo class, but the
moc_foo.cpp expects to find that class in the global namespace instead.

Fixed it in QtJsonDb to define QT_BEGIN_MOC_NAMESPACE="QT_USE_NAMESPACE
QT_ADDON_JSONDB_USE_NAMESPACE", however we need to ensure qglobal.h doesn't
re-define that macro back.

Change-Id: Ic8407f50c11d2d787167ad2f92457aa3ec126d45
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoInline some methods in qgrayraster.
Robin Burchell [Sat, 17 Dec 2011 22:33:51 +0000 (23:33 +0100)]
Inline some methods in qgrayraster.

gray_conic_to, gray_cubic_to and gray_line_to were all single line wrappers
around their equivilent gray_render counterparts, with an additional lie of
error handling that never actually happened.

Since this doesn't really do anything except confuse the reader, let's ... not
do it :)

Change-Id: Id5d86c49174acb92514b628a70bd32d6c6640a5d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove env var to enable accessibility on linux.
Frederik Gladhorn [Fri, 30 Dec 2011 11:45:52 +0000 (12:45 +0100)]
Remove env var to enable accessibility on linux.

Usually we don't have a plugin for this on linux anyway.
But if we do, we should actually allow it to interface with the
system.
When using AT-SPI the plugin can detect if it should be active.
Other plugins can fall back to using an env var if really needed.

Change-Id: Ic9dcfa305e7cdafbf4a93bcc2dc9a0fcd9b9a7a2
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoblitter: Base QBlitterPaintEngine on QRasterPaintEngine
Holger Hans Peter Freyther [Sun, 1 Jan 2012 21:12:34 +0000 (22:12 +0100)]
blitter: Base QBlitterPaintEngine on QRasterPaintEngine

The original intention was to identify a clipping bug, it turns out
that during a ::begin() (and systemChanged) we should forward the
QPaintEnginePrivate state to our proxy engine.
Instead of using the proxy-pattern subclass rasterengine and
specialize the paths we are able to accelerate using the blitter
interface. This will avoid similiar problems in the future. I have
no performance measurement to show which of the two approaches is
faster/slower.

Change-Id: I39bff11b32b1fe20284c7e8df60050de5991bb6e
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoblitter: Group code by functionality in header and cpp file
Holger Hans Peter Freyther [Sun, 1 Jan 2012 20:26:56 +0000 (21:26 +0100)]
blitter: Group code by functionality in header and cpp file

* Group code responsible for tracking the render pipeline state
  to check if we can easily accelerate it
* Code that will call into the QBlittable
* Code that will lock the QBlittable before calling into raster

Change-Id: I862e242d59805de5094ed363b486afcdbc23ff78
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoblitter: Fix the 'solid' detection for the brush in case of fillRect
Holger Hans Peter Freyther [Sun, 1 Jan 2012 14:49:44 +0000 (15:49 +0100)]
blitter: Fix the 'solid' detection for the brush in case of fillRect

A default QPainter will set a QBrush with Qt::NoBrush BrushStyle, the
current code detects this as a non solid fill and all calls with fillRect
and a color will not go through QBlittable. Check for Solid or NoBrush
style. Manually verified that a p.fillRect(rect, Qt::red) goes through
the accelerated path now.

Change-Id: Ic0d98030e94f5d11abbe61628fbf71d1e08219c2
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoblitter: Move state updates into new methods
Holger Hans Peter Freyther [Sun, 1 Jan 2012 19:56:38 +0000 (20:56 +0100)]
blitter: Move state updates into new methods

Create updateCompleteState(QPainterState*) so we don't need to
call into the paintengine, move all state methods into the
QBlitterPaintEnginePrivate class.

Change-Id: If30fdcc3f63755e0443bced7d9d9fb993d4ec2b7
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoblitter: Move the definition out of the class
Holger Hans Peter Freyther [Sun, 1 Jan 2012 19:08:47 +0000 (20:08 +0100)]
blitter: Move the definition out of the class

Cosmetic change to remove four spaces of indention from some of the
deeply nested methods.

Change-Id: I67fdd0ab722b7c7c67c4da7a0a0bd86459751700
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoblitter: Kill the isBlitterLocked variable of the QBlitterPaintEngine
Holger Hans Peter Freyther [Sun, 1 Jan 2012 18:58:20 +0000 (19:58 +0100)]
blitter: Kill the isBlitterLocked variable of the QBlitterPaintEngine

It starts with being initialized wrongly, the call to buffer() will
lock the data while we think it is not locked, it can also get out of
sync by someone calling buffer() again. Remove the variable and
check with the QBlittable if we need to lock the resource into memory.

Change-Id: I350375011138d1b4c2c48c100b7b30b8ea2ae460
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoblitter: Use CapabilitiesToStateMask as a class member
Holger Hans Peter Freyther [Sun, 1 Jan 2012 18:50:16 +0000 (19:50 +0100)]
blitter: Use CapabilitiesToStateMask as a class member

Move the bit helper functions into CapabilitiesToStateMask as they
are only used in this class, allocate the class as part of the
QBlitterPaintEnginePrivate, shorten the name as well.

Change-Id: If22ddd117a9789cd98edb08f23fd0ffabb17d5a5
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoblitter: Style changes to the code
Holger Hans Peter Freyther [Sun, 1 Jan 2012 18:43:30 +0000 (19:43 +0100)]
blitter: Style changes to the code

Spend some bytes for spaces after comma and keywords. This should
now mostly follow the Qt style guidelines.

Change-Id: I3298c8d41d40ab5b0153a33d44b1b607a2edca8e
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoraster: Fix typo in a function argument
Holger Hans Peter Freyther [Sun, 1 Jan 2012 12:34:03 +0000 (13:34 +0100)]
raster: Fix typo in a function argument

Change-Id: I903e1245667680f43414414bb0b4bfaa6240ea04
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoMake QTimer::singleShot use Qt::PreciseTimer for lower timeouts.
Bradley T. Hughes [Wed, 21 Dec 2011 10:33:07 +0000 (11:33 +0100)]
Make QTimer::singleShot use Qt::PreciseTimer for lower timeouts.

CoarseTimers are worst in their first firing, so we prefer a
PreciseTimer for something that happens only once. If the timeout is
too big, we use a CoarseTimer anyway (current threshold is 2000ms).

Author: Thiago Macieira <thiago.macieira@nokia.com>
Change-Id: I30b20acf506e442cd58126abfe3a4d70fc13b075
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoChange QTimerInfo (UNIX) to keep the interval in milliseconds.
Bradley T. Hughes [Wed, 21 Dec 2011 10:33:56 +0000 (11:33 +0100)]
Change QTimerInfo (UNIX) to keep the interval in milliseconds.

The API passes the interval as an int, there's no reason to convert
it to a timeval struct. This also prepares for changing the UNIX
timer code to support the different timer types.

Author: Thiago Macieira <thiago.macieira@nokia.com>
Change-Id: Ie3cc1ae8f1be6a9ad3f1766051642cbf3e614418
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd Qt::TimerType argument to QAbstractEventDispatcher::registerTimer()
Bradley T. Hughes [Wed, 21 Dec 2011 10:33:33 +0000 (11:33 +0100)]
Add Qt::TimerType argument to QAbstractEventDispatcher::registerTimer()

... and deprecate the old registerTimer() functions. The new pure-
virtual registerTimer() breaks source-compatibility. Subclasses cannot
be instantiated anymore, since the pure virtual function signature has
changed.

QAbstractEventDispatcher::TimerInfo is no longer a QPair. It is now a
struct with timerId, interval, and timerType members. This is a source
incompatibility that should only affect subclasses of
QAbstractEventDispatcher, which will need to pass 3 arguments to the
TimerInfo constructor instead of 2. If the subclass used QPair<int,int>
instead of the TimerInfo typedef, the QPair<int,int> declarations will
need to be replaced with TimerInfo.

Call the new registerTimer() function with the type from
QObject::startTimer(). Change all subclasses of QAbstractEventDispatcher
to reimplement the new virtual function. The type argument is unused at
the momemnt, except to ensure that registeredTimers() returns the type
each timer was registered with. Implementations for the various
dispatchers will be done in separate commits.

Author: Thiago Macieira <thiago.macieira@nokia.com>
Change-Id: Ia22697e0ab0847810c5d162ef473e0e5a17a904b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd Qt::TimerType and the QTimer::timerType property
Bradley T. Hughes [Wed, 21 Dec 2011 10:32:43 +0000 (11:32 +0100)]
Add Qt::TimerType and the QTimer::timerType property

The timer type will control the accuracy of the timer. By default, all
timers are CoarseTimers, which allows for +/- 5% interval adjustment.
PreciseTimers will not have any interval adjustments, VeryCoarseTimers
will have intervals adjusted to full second resolution.

Use QTimer::setTimerType() or the QTimer::singleShot() overload to
specify the type.

QObject::startTimer() now takes a Qt::TimerType argument which defaults
to Qt::CoarseTimer. QBasicTimer::startTimer() gets an overload that
takes a Qt::TimerType argument. The argument is unused for now, since
the QAbstractEventDispatcher interface needs to change (done in a
separate commit).

Author: Thiago Macieira <thiago.macieira@nokia.com>
Change-Id: I3100da5aa1fe17ec30b8644897d0fe6ec4a07f52
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoHandle -1 (Invalid Key) and Qt::Key_unknown gracefully in encodeString.
David Faure [Thu, 22 Dec 2011 18:02:34 +0000 (19:02 +0100)]
Handle -1 (Invalid Key) and Qt::Key_unknown gracefully in encodeString.

Previously they would fall into the unicode handling and return very
strange values.

Change-Id: I62a53894c0983bf53fd79f924b40a6fd3ba02993
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agotests: use contains(QT_CONFIG,private_tests) consistently
Sergio Ahumada [Sun, 1 Jan 2012 20:24:28 +0000 (21:24 +0100)]
tests: use contains(QT_CONFIG,private_tests) consistently

These tests used requires(contains(QT_CONFIG,private_tests)) in their
.pro file, but did not subtract themselves from their parent project
SUBDIRS when private_tests weren't enabled.

In the best case, this wastes a little time as qmake iterates over these
projects which won't be built.  In some worse esoteric cases, this may
break compilation or packaging.

Change-Id: If36b1b8f69c3509128786fec67899ae18ffaa2bc
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoUnbreak cross-compilation to ARM.
Sergio Ahumada [Sun, 1 Jan 2012 13:36:09 +0000 (14:36 +0100)]
Unbreak cross-compilation to ARM.

v8snapshot is not required to build V8

Change-Id: I75f728a1237acaac9d3a10a87673fb2b6dd2dc91
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoChange event posting to use a QVector.
Robin Burchell [Fri, 9 Dec 2011 14:05:10 +0000 (15:05 +0100)]
Change event posting to use a QVector.

This provides a ~10% improvement to the newly introduced QCoreApplication
event_posting_benchmark (a simple synthetic benchmark of creating a bunch of
events, posting them, and sending the queue).

before:
********* Start testing of QCoreApplicationBenchmark *********
Config: Using QTest library 5.0.0, Qt 5.0.0
PASS   : QCoreApplicationBenchmark::initTestCase()
RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"1000":
     0.82 msecs per iteration (total: 53, iterations: 64)
RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"10000":
     8.6 msecs per iteration (total: 69, iterations: 8)
RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"100000":
     84 msecs per iteration (total: 84, iterations: 1)
RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"1000000":
     874 msecs per iteration (total: 874, iterations: 1)
PASS   : QCoreApplicationBenchmark::signal_slot_benchmark()
PASS   : QCoreApplicationBenchmark::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of QCoreApplicationBenchmark *********

after:
********* Start testing of QCoreApplicationBenchmark *********
Config: Using QTest library 5.0.0, Qt 5.0.0
PASS   : QCoreApplicationBenchmark::initTestCase()
RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"1000 events":
     0.781 msecs per iteration (total: 100, iterations: 128)
RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"10000 events":
     7.8 msecs per iteration (total: 63, iterations: 8)
RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"100000 events":
     75 msecs per iteration (total: 75, iterations: 1)
RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"1000000 events":
     774 msecs per iteration (total: 774, iterations: 1)
PASS   : QCoreApplicationBenchmark::event_posting_benchmark()
PASS   : QCoreApplicationBenchmark::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of QCoreApplicationBenchmark *********

Change-Id: Ibf56d9526b0a8cbaf171008da4104bb457628172
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoFlag udpTest as insignificant, fails on Ubuntu 11.10 x64.
Toby Tomkins [Thu, 29 Dec 2011 07:26:48 +0000 (17:26 +1000)]
Flag udpTest as insignificant, fails on Ubuntu 11.10 x64.

This testcase fails on the Ubuntu 11.10 x64 platform, add flag to .pro
file so test is ignored on this platform.

Task-number: QTBUG-23380

Change-Id: I51831df8c8e9bfcf63d3689e37552ca1a62691cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdapt QGraphicsView test to QPlatformInputContext
Pekka Vuorela [Thu, 15 Dec 2011 14:49:43 +0000 (16:49 +0200)]
Adapt QGraphicsView test to QPlatformInputContext

Change-Id: I9562a0b763fe7d77cd08451426bf2ceaec00acf9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoAdapt QGraphicsScene test to use QPlatformInputContext
Pekka Vuorela [Thu, 15 Dec 2011 14:22:52 +0000 (16:22 +0200)]
Adapt QGraphicsScene test to use QPlatformInputContext

Change-Id: Iaf61798cc78e57563fee088711d39090b722a946
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoPrevent qDebug test bypassing the testlib message handler.
Jason McDonald [Fri, 30 Dec 2011 00:58:14 +0000 (10:58 +1000)]
Prevent qDebug test bypassing the testlib message handler.

Several of the test functions in the QDebug autotest call
qInstallMsgHandler() to temporarily use a custom message handler.
Unfortunately, these test functions were then resetting the message
handler back to Qt's default handler at the end of the test.

QTestLib also calls qInstallMsgHandler() to set a message handler that
redirects debug/warning/fatal messages into the test log.  When the test
resets the message handler back to Qt's default handler, testlib's
message handler is bypassed for the rest of the test, preventing any
subsequent debug/warning/fatal messages from being visible in the test
log or subject to testlib's ignoreMessage() function.

This error also caused several of the test functions to fail if they
were run manually.  The "defaultMessagehandler" test would fail if it
was run before any other test function and the "assignment" test would
fail if it was run after any other test function.

This commit fixes these failures by using a helper class to ensure that
the previously active message handler is restored at the end of each
test function, even if the test function fails or throws an exception.

Change-Id: I51376724d164c8ad126e5b9be76890bf3e6a9fb0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoUse QVERIFY2 to output verbose failure messages.
Jason McDonald [Thu, 29 Dec 2011 03:34:25 +0000 (13:34 +1000)]
Use QVERIFY2 to output verbose failure messages.

Change-Id: I2ce96d9d9f582e99c1d9f6dd6e6e80ce42d6e61d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoCorrect misspelt function names in QFutureWatcher test.
Jason McDonald [Thu, 29 Dec 2011 01:53:54 +0000 (11:53 +1000)]
Correct misspelt function names in QFutureWatcher test.

Change-Id: I60965f3475f83a7c42d2efc6ed8adf9a1403e144
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoCorrect misspelt function name in qtconcurrentmap test.
Jason McDonald [Thu, 29 Dec 2011 01:38:45 +0000 (11:38 +1000)]
Correct misspelt function name in qtconcurrentmap test.

Change-Id: I79b54b4e0de6319add89d220d3c3306556ab4ccc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoCorrect misspelt function name in qtconcurrentfilter test.
Jason McDonald [Thu, 29 Dec 2011 01:11:41 +0000 (11:11 +1000)]
Correct misspelt function name in qtconcurrentfilter test.

Change-Id: Ie7ea2defac407d099d7bb27cccfb34911b832626
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoChange test to use new QTRY_COMPARE/QTRY_VERIFY macros.
Robin Burchell [Tue, 27 Dec 2011 18:46:18 +0000 (19:46 +0100)]
Change test to use new QTRY_COMPARE/QTRY_VERIFY macros.

When verifying nonzero results (i.e. that something expected *did* happen),
using these macros allows bailing out of the timer much earlier than the
potential 5 seconds.

My running this on Linux goes from ~147 seconds to ~91 seconds.

Change-Id: Ie1e41252eb4eb295b5c8e795ded02f00eb7f9387
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoMake qDecodeDataUrl return bool.
Jonas M. Gastal [Thu, 29 Dec 2011 14:24:17 +0000 (12:24 -0200)]
Make qDecodeDataUrl return bool.

Change-Id: I23b9fed39af7bea6c171b35e10bd72c424bd903e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoImprove QTextCodec::codecForLocale() test.
Jason McDonald [Thu, 29 Dec 2011 05:45:04 +0000 (15:45 +1000)]
Improve QTextCodec::codecForLocale() test.

Don't call QSKIP when omitting the optional part of the test, as doing
so hides the fact that the rest of the test passed.

Change-Id: I9c102e8daeaf9586b2e510c4c9ce697ead290795
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix printerPaperSize and some tst_qprinter test failures
Sergio Ahumada [Wed, 28 Dec 2011 20:28:51 +0000 (21:28 +0100)]
Fix printerPaperSize and some tst_qprinter test failures

Removing QEXPECT_FAIL accordingly.

Task-number: QTBUG-22296
Task-number: QTBUG-22562
Change-Id: I128a78897722cc067168ee50dbcbfc7537abdfcd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoEnable variadic macros if building in c++0x mode.
Stephen Kelly [Tue, 27 Dec 2011 14:06:57 +0000 (15:06 +0100)]
Enable variadic macros if building in c++0x mode.

Change-Id: I40d1f1f64ad31a299ccad9258f70e9bf3255c3cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoDon't allow QThreadPool test to hang on failure.
Jason McDonald [Wed, 28 Dec 2011 06:52:24 +0000 (16:52 +1000)]
Don't allow QThreadPool test to hang on failure.

Use QTRY_VERIFY() to fail after a reasonable timeout rather than putting
the test into an infinite loop.

Change-Id: Ie0917556e15999a94cc0587f3f4c11c0d743a228
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoClarifying the flow of signals on QNetworkAccessManager.
Jonas M. Gastal [Tue, 27 Dec 2011 19:20:04 +0000 (17:20 -0200)]
Clarifying the flow of signals on QNetworkAccessManager.

Task-number: QTBUG-22858

Change-Id: I07eaecebf17e73f9c3148465d8970ca7672a900c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAvoid repeatedly registering the same meta-type
Jason McDonald [Wed, 28 Dec 2011 05:40:50 +0000 (15:40 +1000)]
Avoid repeatedly registering the same meta-type

Register the meta-type in initTestCase(), which is run once, rather than
in init(), which is run before every test function is run.

Change-Id: Ic62a2469da6a2a85254ffc7c4d893395202c50d8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImprove qtconcurrentthreadengine autotest.
Jason McDonald [Fri, 23 Dec 2011 05:18:16 +0000 (15:18 +1000)]
Improve qtconcurrentthreadengine autotest.

The threadCount() test function is unstable and had been disabled by
making it not be a slot.  It is better to disable it with QSKIP so that
the test output shows that the test function exists and is in need of
repair.

Change-Id: Iccdc8da31e0d15d922f7e9606835d1ff1a3a4966
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoCleanup itemmodel autotests.
Jason McDonald [Fri, 23 Dec 2011 04:55:15 +0000 (14:55 +1000)]
Cleanup itemmodel autotests.

Avoid using bug tracker identifiers in test function names.  These
identifiers lose their meaning when the bug tracker is replaced.

Change-Id: Ia867f7c2ec2ab9ed546588843d532ac615a34031
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove old debug code from itemmodel tests.
Jason McDonald [Fri, 23 Dec 2011 04:14:07 +0000 (14:14 +1000)]
Remove old debug code from itemmodel tests.

Change-Id: I7c6aeed2d3b593a4dac89e54ef22743d5f736d42
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoReinstate commented test data in QItemSelectionModel test.
Jason McDonald [Fri, 23 Dec 2011 03:54:39 +0000 (13:54 +1000)]
Reinstate commented test data in QItemSelectionModel test.

The restored test data was marked as failing, but appears to pass, and
the available history does not explain why it was commented out.

Change-Id: I7e9e3ba72fc8fef42c91ee882efa98d25b3d8317
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoCleanup itemmodel autotests.
Jason McDonald [Fri, 23 Dec 2011 03:13:08 +0000 (13:13 +1000)]
Cleanup itemmodel autotests.

Bring the code closer to compliance with Qt's coding style guidelines
and eliminate excessive vertical whitespace.

Change-Id: Iaa29f8edf326ddb80cbadb6c18cca4fea88fd9b2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove empty functions from itemmodels tests.
Jason McDonald [Fri, 23 Dec 2011 01:55:38 +0000 (11:55 +1000)]
Remove empty functions from itemmodels tests.

Change-Id: I23775a334812b096192c7f44c4a3cb06f4b08705
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoCleanup corelib autotests.
Jason McDonald [Thu, 22 Dec 2011 07:16:48 +0000 (17:16 +1000)]
Cleanup corelib autotests.

When using QSignalSpy, always verify that the signal spy is valid.  This
will cause the test to give a meaningful failure when spying on a
non-existant signal.  Without this change, tests that spy on a signal to
ensure that it is not emitted (i.e. by comparing the spy count to zero)
could pass erroneously if something went wrong when creating the signal
spy, as an invalid QSignalSpy will always return a count of zero.

Change-Id: I41f4a63d9f0de9190a86de237662dc96be802446
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove mention of Trolltech in qlibrary autotest.
Jason McDonald [Wed, 21 Dec 2011 01:47:28 +0000 (11:47 +1000)]
Remove mention of Trolltech in qlibrary autotest.

Task-number: QTBUG-19653

Change-Id: I8cf21bac41b08187528ba7004a7a23b9baa64b17
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove mention of Trolltech from QGraphicsScene autotest.
Jason McDonald [Wed, 21 Dec 2011 01:28:57 +0000 (11:28 +1000)]
Remove mention of Trolltech from QGraphicsScene autotest.

Task-number: QTBUG-19653

Change-Id: Iabebf17f5b09c17a767e81a0ccadd03513238a75
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove mentions of Trolltech from QRegExp autotest.
Jason McDonald [Wed, 21 Dec 2011 01:26:26 +0000 (11:26 +1000)]
Remove mentions of Trolltech from QRegExp autotest.

Task-number: QTBUG-19653

Change-Id: I55ae6bed6fb2177cdc842de34ef31ae98d0d3237
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove mention of trolltech from QThreadStorage test.
Jason McDonald [Wed, 21 Dec 2011 01:17:39 +0000 (11:17 +1000)]
Remove mention of trolltech from QThreadStorage test.

Task-number: QTBUG-19653

Change-Id: I6c74a15b6c6db415a545328b73b6dd704d69bfee
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove mention of Trolltech in QHttp autotest.
Jason McDonald [Wed, 21 Dec 2011 00:47:38 +0000 (10:47 +1000)]
Remove mention of Trolltech in QHttp autotest.

The data file named "trolltech" has nothing specific to Trolltech in its
contents.  Rename it to "testhtml".  The lack of a file extension is
intentional.

Task-number: QTBUG-19653
Change-Id: Idc5c5f4ffa447151e47f66ff7364f0fa8753a699
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove non-const getters marked for elimination.
Robin Burchell [Tue, 20 Dec 2011 14:31:41 +0000 (15:31 +0100)]
Remove non-const getters marked for elimination.

These all have consted overloads, so there's no need for them.

Change-Id: I3d4f63b8eb8f1b7df7fa772d6172e0a954184d24
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoMerge QTextDocumentFragment::toHtml() overload per Qt 5 comment.
Robin Burchell [Tue, 20 Dec 2011 17:14:58 +0000 (18:14 +0100)]
Merge QTextDocumentFragment::toHtml() overload per Qt 5 comment.

Change-Id: Ic8850684c2298b996354e27cc96ad6486d7a3679
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix typos parametter -> parameter.
Stephen Kelly [Fri, 23 Dec 2011 13:26:59 +0000 (14:26 +0100)]
Fix typos parametter -> parameter.

Change-Id: I0ebb3658477a1afdc1af5f4f6f64f12dc20ace56
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoIncrease the value of the UserRole for the ItemDataRole enum.
Stephen Kelly [Mon, 19 Dec 2011 17:49:44 +0000 (18:49 +0100)]
Increase the value of the UserRole for the ItemDataRole enum.

For future proofing. No need for it to be so small.

Change-Id: I8a0c734f87671881f114922ada7c5bc9524de19b
Reviewed-by: Marius Bugge Monsen <marius@cutehacks.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoReplace a pseudo-virtual slot with a virtual method.
Stephen Kelly [Mon, 19 Dec 2011 18:08:07 +0000 (19:08 +0100)]
Replace a pseudo-virtual slot with a virtual method.

Change-Id: I5d0e1e54e0d3d441b71b7594bc14e872512cc937
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQLocalSocket shouldn't emit disconnected if it isn't connected yet.
Jonas M. Gastal [Mon, 19 Dec 2011 15:55:29 +0000 (13:55 -0200)]
QLocalSocket shouldn't emit disconnected if it isn't connected yet.

Task-number: QTBUG-22082
Change-Id: I2e1dae133f50a232d4be3ff63cafaf1b417b286c
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoadd tests and benchmarks for QString::toLower()/toUpper()/toCaseFolded()
Konstantin Ritt [Tue, 18 Oct 2011 17:12:18 +0000 (19:12 +0200)]
add tests and benchmarks for QString::toLower()/toUpper()/toCaseFolded()

Merge-request: 70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Change-Id: I3929d4d8963c3cef6d2c6420d8ad1f7a45f7e042
Reviewed-by: Olivier
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agonetwork auto tests: add QNetworkReply test for pipelining
Peter Hartmann [Thu, 17 Nov 2011 10:19:33 +0000 (11:19 +0100)]
network auto tests: add QNetworkReply test for pipelining

Reviewed-by: Markus Goetz
Task-number: QTBUG-21369
(cherry picked from commit a32bfdef6d6b45c916f143dcf8495a2e102c3eec)

Change-Id: Iecde23c56f128008c5172675601928d83180358a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix crashes and non-portable functionality in QDBusDemarshaller QByteArray extraction
Sami Rosendahl [Tue, 22 Nov 2011 11:52:15 +0000 (13:52 +0200)]
Fix crashes and non-portable functionality in QDBusDemarshaller QByteArray extraction

QDBusArgument QByteArray extraction operator and QDBusDemarshaller that
implements the extraction do not check the type of the extracted value.
When extracting a QByteArray when the value actually is e.g. a struct of
mixed types the byte array extraction will crash as it attempts to extract
the struct data as a fixed array.

The fix adds DBus type checks to QDBusArgument byte array extraction
operator implementations.
The checks invalidate extracting arrays of other types than bytes to a
QByteArray that worked with the unchecked implementation. The rationale
for this restriction is
1) extracting a QByteArray to a variant checks already that the array
   element type is byte
2) Results of extracting arrays of types wider than a byte to a QByteArray
   are architecture-dependent making such code inherently non-portable.

Task-number: QTBUG-22840
Change-Id: Ie20f2adc06c697a68055c803215fb408568fdd90
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix crash in QDBusDemarshaller QStringList extraction
Sami Rosendahl [Mon, 5 Dec 2011 11:06:40 +0000 (13:06 +0200)]
Fix crash in QDBusDemarshaller QStringList extraction

QDBusArgument QStringList extraction operator and QDBusDemarshaller that
implements the extraction do not check the type of the extracted value.
When extracting a QStringList and the value actually is e.g. an array of
bytes the string list extraction will crash as it interprets the bytes as
char pointers.

The fix adds DBus type checks to QDBusArgument QStringList extraction
operator implementations.
The checks are as permissive as possible provided crashes are avoided.

Task-number: QTBUG-22840
Change-Id: I4b67d75b59c5052d939f3a69f3e92dabdb3bdd6b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix crash in QDBusDemarshaller basic string-like type extraction
Sami Rosendahl [Fri, 25 Nov 2011 09:13:46 +0000 (11:13 +0200)]
Fix crash in QDBusDemarshaller basic string-like type extraction

QDBusArgument string extraction operators and QDBusDemarshaller that
implements the extraction do not check the type of the extracted value.
When extracting string-like basic DBus type that actually is e.g. an
integer the string extraction will crash as it blindly attempts to use the
integer as a pointer to char.

The fix adds DBus type checks to QDBusArgument string type extraction
operator implementations.
The checks are as permissive as possible provided crashes are avoided.
Previously supported functionality of extracting an object path or type
signature to a string type is retained.

Task-number: QTBUG-22840
Change-Id: I29be1ae592658ca268c65ed692e1d42619d52280
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoImprove QSettings autotest
Jason McDonald [Fri, 23 Dec 2011 05:35:32 +0000 (15:35 +1000)]
Improve QSettings autotest

QTestLib-based autotests cannot perform verification steps in the test
class constructor.  This needs to be done in initTestCase() instead.

Change-Id: Ib1f7f838f052fa0fc5104603bdac01ffd8313aef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove empty functions from QSet autotest.
Jason McDonald [Fri, 23 Dec 2011 05:52:54 +0000 (15:52 +1000)]
Remove empty functions from QSet autotest.

Change-Id: Id6fac3a83e3f4385ee1978a19e6dc92605f4abdb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoBuild fix for tst_qprinter with c++11
Jędrzej Nowacki [Thu, 22 Dec 2011 14:44:28 +0000 (15:44 +0100)]
Build fix for tst_qprinter with c++11

GCC 4.6 fails to build the test because of narrowing conversion.

Change-Id: I927693789be7f3df7bd1a96c8924fc04716a03f0
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agov8: Build V8 for FreeBSD
Holger Hans Peter Freyther [Fri, 23 Dec 2011 21:35:42 +0000 (22:35 +0100)]
v8: Build V8 for FreeBSD

For FreeBSD the libexecinfo port needs to be installed and linked to, all
tests execute and pass.

%uname -a
FreeBSD qt-ppa 8.2-STABLE FreeBSD 8.2-STABLE #4: Sun Oct 30 20:43:37 UTC 2011     ich@freebsd:/usr/obj/usr/src/sys/GENERIC  amd64
%./tst_v8
********* Start testing of tst_v8 *********
Config: Using QTest library 5.0.0, Qt 5.0.0
PASS   : tst_v8::initTestCase()
PASS   : tst_v8::eval()
PASS   : tst_v8::evalwithinwith()
PASS   : tst_v8::userobjectcompare()
PASS   : tst_v8::externalteardown()
PASS   : tst_v8::globalcall()
PASS   : tst_v8::cleanupTestCase()
Totals: 7 passed, 0 failed, 0 skipped
********* Finished testing of tst_v8 *********

Change-Id: Ia8198128126c2931807c7fb872c15baad47022e1
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agov8: Change the selection of Operating System
Holger Hans Peter Freyther [Fri, 23 Dec 2011 21:29:13 +0000 (22:29 +0100)]
v8: Change the selection of Operating System

Instead of doing "I want Linux and do it by selecting Unix and
discarding everything not implementing the Linux ABI". Select the
other operating system first and have a catch all Linux/Unix anchor.

!symbian is left inside as it does not hurt right now but could probably
be removed before Qt 5.0.0.

Change-Id: I731d8349e4f9c0ac33d547523f0a0f422e994e54
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoRemove unused -DQT_NO_PCRE from qmake makefiles
Giuseppe D'Angelo [Wed, 21 Dec 2011 23:43:00 +0000 (23:43 +0000)]
Remove unused -DQT_NO_PCRE from qmake makefiles

That define is not used anymore when building qmake.

Change-Id: I6a478cf4bb6cc8dfe87a3cc96f1d520b08e4ba6f
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix cmake files for static builds.
Stephen Kelly [Fri, 16 Dec 2011 23:47:13 +0000 (00:47 +0100)]
Fix cmake files for static builds.

Change-Id: I3864017df6fc0daeb31b389c8883401d344730bf
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoLink to X and Xrender libs in glxconvenience
Jørgen Lind [Fri, 23 Dec 2011 12:51:07 +0000 (13:51 +0100)]
Link to X and Xrender libs in glxconvenience

Change-Id: I54b2704be678f2c3b9ab8d24d044977c9c01e98e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix regression, make sure hit testing work on windows again.
Jan-Arve Saether [Thu, 22 Dec 2011 10:21:47 +0000 (11:21 +0100)]
Fix regression, make sure hit testing work on windows again.

The previous code did not make much sense

This regressed due to 74c9f9d83f9f5cb934d0b62b468c74df5a3b9a0d

Change-Id: Ia4374623257863edca706a1c3d8b565d0c6bd4c1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoFinish removing Qt3 support
Bradley T. Hughes [Tue, 20 Dec 2011 13:59:09 +0000 (14:59 +0100)]
Finish removing Qt3 support

Remove the (-no)-qt3support options from configure, and remove the last
remaining references to Qt3Support, QT3_SUPPORT, and
QEvent::ChildInserted.

The compatibilityChildInsertEvents() tests in tst_QObject and
tst_QWidget have been renamed to childEvents(), which is a more
appropriate name.

Change-Id: Id0b45e9b177efcc8dceee8c9ed8afafedeeace2f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQCryptographicHash: allow to hash the content of a QIODevice
Sune Vuorela [Tue, 20 Dec 2011 18:46:28 +0000 (19:46 +0100)]
QCryptographicHash: allow to hash the content of a QIODevice

This adds a new function (and tests) to give the possibility of doing a
QCryptographicHash of a QIODevice, like a QFile or whatever people
needs.

It is a quite handy overload in many cases.

Change-Id: I22fd272f05571844641b3daefcc6746be4e5c7c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix for -Werror -Wshadow
David Faure [Mon, 19 Dec 2011 11:50:51 +0000 (12:50 +0100)]
Fix for -Werror -Wshadow

qevent.h:792:49: error: declaration of 'device' shadows a member of 'this' [-Werror=shadow]

Change-Id: Iccb7e79dd97d55b17fbd4dfaf3503b9e251adcfc
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove redundant template parameter from QMetaType's internal classes.
Jędrzej Nowacki [Mon, 19 Dec 2011 15:55:47 +0000 (16:55 +0100)]
Remove redundant template parameter from QMetaType's internal classes.

Filter doesn't have to be a parameter because we always use
DefinedTypesFilter.

Change-Id: I19b8eb47a4c50e290cf712f909aaead8fdc94cd9
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoFix http authentication to a different realm on the same server
Shane Kearns [Thu, 22 Dec 2011 14:08:17 +0000 (14:08 +0000)]
Fix http authentication to a different realm on the same server

This is a regression caused by the NTLMv2 authentication patch.
I have manually tested NTLMv2 authentication against MS IIS and reverting
these two lines does not break it.

Task-number: QT-5209
Change-Id: I64159cbe468e1a7f834f8726fd0c9d4ab4c54b38
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoFix movablity of QVariant.
Jędrzej Nowacki [Fri, 2 Dec 2011 16:52:00 +0000 (17:52 +0100)]
Fix movablity of QVariant.

After 8fd64d22ac7892b061a09c42c72aacf033b80876 (Make usage of internal
QVariant space.) change QVariant started to "inherit" movablity from
interned type.

This change fix it by interning only movable type in QVariant and by
using external allocation for not movable ones.

Obviously, this change has negative impact on QVariant it self, but
after it, QVariant will behave a lot nicer with our containers.

Change-Id: Ibffc95833918f65be737f52d694ee81a2036c412
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix race in http connection channel
Shane Kearns [Mon, 19 Dec 2011 15:35:52 +0000 (15:35 +0000)]
Fix race in http connection channel

When authentication is cancelled, close the channel instead of the
underlying socket.
The previous behaviour could result in further requests being sent
on the closed socket, which caused errors in case of https over a proxy.

Change-Id: I3dbfc164de4fb29a426c06acaac8f29b9da1d705
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoDon't fetch credentials from cache following a failed proxy authentication
Shane Kearns [Thu, 15 Dec 2011 17:32:47 +0000 (17:32 +0000)]
Don't fetch credentials from cache following a failed proxy authentication

Add variable to QAuthenticatorPrivate for tracking failure
Track authentication success/failure in http proxy socket engine
Track authentication success/failure in http connection channel

Task-number: QTBUG-22875
Change-Id: Id5d39e839428271ad687e9da12fbbdea9c478f4f
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoHandle plain socket write errors in SSL
Shane Kearns [Mon, 19 Dec 2011 15:10:45 +0000 (15:10 +0000)]
Handle plain socket write errors in SSL

When an ssl socket is closed during connecting, and it is using a proxy
then it is possible for the plain socket to be in pending close state
when transmit() is called.
As errors were not handled, this caused the socket (and https request)
to "hang".
It now propagates the error from plain socket.

Change-Id: I6fb86815a2a63e197cea582f4b153e487543477c
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix for assertion failure
Shane Kearns [Thu, 15 Dec 2011 17:31:52 +0000 (17:31 +0000)]
Fix for assertion failure

Change-Id: I97b9ecc37e938a3050793fc746288243a1cb40b7
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoFix faulty logic in http connection pipelining
Shane Kearns [Thu, 22 Dec 2011 13:35:34 +0000 (13:35 +0000)]
Fix faulty logic in http connection pipelining

The code which prevents pipelining of requests when authentication is
in use had || where && should have been used.
Also check for blank user with a password.

Change-Id: Ic278cedd370c9d81377f49a0af43aef415cb49ad
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoQTestLib-selftest: Unblock on Windows.
Friedemann Kleint [Thu, 22 Dec 2011 14:01:40 +0000 (15:01 +0100)]
QTestLib-selftest: Unblock on Windows.

Do not run tests that pop up assert boxes.

Change-Id: Idac94398ff1109605eb33a042dab734eafb1a17a
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoAllow QMetaType to register information about movability
Jędrzej Nowacki [Tue, 13 Dec 2011 11:07:47 +0000 (12:07 +0100)]
Allow QMetaType to register information about movability

We need that information to perform some optimizations in QVariant.

Change-Id: Id9a1716e49e4cedd17cd09a32fea4ff003ef61f2
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoRemove QT_NO_STL_WCHAR hack
Harald Fernengel [Wed, 21 Dec 2011 09:40:36 +0000 (10:40 +0100)]
Remove QT_NO_STL_WCHAR hack

We don't support gcc 2.95 any more.

Change-Id: I842f1f8ac64b9006516c104add0991830ac9a46a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix handling of invalid modifiers in QKeySequence.
David Faure [Wed, 21 Dec 2011 19:15:25 +0000 (20:15 +0100)]
Fix handling of invalid modifiers in QKeySequence.

When decoding a string don't assume valid modifier strings. If a
modifier string is unknown return Qt::Key_unknown instead of skipping
the modifier.
Currently 'Win+a' is decoded to 'A' but should be Qt::Key_unknown.

Change-Id: I1c82031159a8b3c19924a7c9e991bc6b1f90d617
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoUse strlen() inline whenever possible
Harald Fernengel [Wed, 21 Dec 2011 11:03:08 +0000 (12:03 +0100)]
Use strlen() inline whenever possible

This allows us to benefit from compile-time optimization

Change-Id: I63dfde3758fcb0ff919fdc0418df1b7586da0b2f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoEnable Mac style on Mac OS X.
Morten Johan Sorvig [Wed, 14 Dec 2011 14:11:49 +0000 (15:11 +0100)]
Enable Mac style on Mac OS X.

Add styles/qmacstyle_mac back to the build, modify
qstylefactory to load it on Q_OS_MAC.

Move helper functions from platforms/mac to
qmacstyle_mac.mm. QMacStyle should now be self-
contained and not rely on anything from platforms/mac.

Change-Id: I68fe40bb7f88c01269968bffd9579b7f3b932d4c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoQNetworkAccessManager: fixed foreach copy of host address
Martin Petersson [Thu, 22 Dec 2011 09:53:19 +0000 (10:53 +0100)]
QNetworkAccessManager: fixed foreach copy of host address

Change-Id: I50cb113fb3c803fc5b13c74b3f7ad1fc4283065b
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoAdd ToS option to sockets.
Jonas M. Gastal [Tue, 20 Dec 2011 16:42:06 +0000 (14:42 -0200)]
Add ToS option to sockets.

Creates a new SocketOption called called TypeOfServiceOption that can be
used with the existing setSocketOption method to set the ToS byte in a
socket socket. This is done only for unix systems because windows
doesn't support directly setting the ToS/DSCP byte:
http://support.microsoft.com/kb/248611
http://blogs.msdn.com/b/wndp/archive/2006/07/05/657196.aspx

Change-Id: Idf9da2dd8307ac7057982fbfdf9e4e9ebe366780
Task-number: QTBUG-6221
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoSSL: fix build with -openssl-linked for OpenSSL 0.9.8*
Peter Hartmann [Mon, 19 Dec 2011 10:46:45 +0000 (11:46 +0100)]
SSL: fix build with -openssl-linked for OpenSSL 0.9.8*

OpenSSL's SSL_ctrl() always took a "void *" argument as 4th parameter,
since at least version 0.9.7.
I have no idea why we had "const void *" in there.

Reviewed-by: Richard J. Moore <rich@kde.org>
Task-number: QTBUG-23132
(cherry picked from commit 4db91cbd6147e40f543342f22c05b7baddc52e5a)

Change-Id: Ie570e1cc59b72f13d3e6f3ed6fc1892444a63743
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agoDisable logging in xcb
Jørgen Lind [Thu, 22 Dec 2011 08:46:07 +0000 (09:46 +0100)]
Disable logging in xcb

The logging groves and modifies a vector.. It should at least be a
linked-list. but anyway, it shouldn't be enabled by default

Change-Id: Iaebb1158eea1c907e31e9606b143c0318a189dd1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoTest case for QTBUG-22875
Shane Kearns [Tue, 13 Dec 2011 15:50:59 +0000 (15:50 +0000)]
Test case for QTBUG-22875

Test the authentication cache works properly with "cancelled dialogs"
or if the user enters username/password incorrectly.
Expected behaviour is based on web browsers:
If cancelled, current request fails, and prompt again the next time.
If wrong password is given, prompt again and retry the current request.
If bad credentials are in the cache, prompt again

Task-number: QTBUG-22875
Change-Id: Ic02ccac8dbeb3f2580ca4ffe47d0773982c4ab25
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoFix compile error when configured with -no-exceptions
Shane Kearns [Mon, 12 Dec 2011 16:24:52 +0000 (16:24 +0000)]
Fix compile error when configured with -no-exceptions

The test was skipped, but still tried to compile code that uses
exceptions. The throwing class it uses was conditionally compiled
out earlier in the file, causing an error for undefined class.

Task-number: QTBUG-23028
Change-Id: Ia2e05a8a0abbf0e913f6c41e85bfee8b85cbc8a5
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoMac: Add temporary solution to fix app deployment.
Morten Johan Sorvig [Tue, 6 Dec 2011 20:09:53 +0000 (21:09 +0100)]
Mac: Add temporary solution to fix app deployment.

Look for the the platform plugin in "../Plugins" first.
When deployed inside an app bundle this path will
point to the plugin directory inside the app bundle.

Change-Id: I362981a9e0ca9a3e69396b033a571d0b4e2bf78a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix up the accessibility inspector.
Morten Johan Sorvig [Tue, 20 Dec 2011 12:20:13 +0000 (13:20 +0100)]
Fix up the accessibility inspector.

After accessibility API changes. Also make the windows
a bit smaller since the primary user is on a laptop
now.

Change-Id: I53a86cbe85adbbb27401dbf6c3c389629e295b4d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoDo not crash in the windows accessibility bridge
Jan-Arve Saether [Tue, 20 Dec 2011 12:32:01 +0000 (13:32 +0100)]
Do not crash in the windows accessibility bridge

If the object did not have a QAccessibleInterface subclass it would
crash in the windows accessibility bridge.

Change-Id: I931d69466a5a74a87f1c1c577fb1c918dcc8accf
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoQNetworkAccessManager: delay IPv4 or IPv6 based on getaddrinfo order
Martin Petersson [Mon, 19 Dec 2011 10:02:46 +0000 (11:02 +0100)]
QNetworkAccessManager: delay IPv4 or IPv6 based on getaddrinfo order

Instead of always delaying IPv4 when we have both Ipv4 and IPv6 we
should use the order we get from getaddrinfo to descide which one
that should be delayed.

Task-number: QTBUG-23066
Change-Id: Ibe8c4d7000abd6e57fe8c6afac8a4a843e17ff27
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoQTestlib: Make QImage comparison more verbose.
Friedemann Kleint [Mon, 19 Dec 2011 10:33:07 +0000 (11:33 +0100)]
QTestlib: Make QImage comparison more verbose.

Introduce a specialization for qCompare(QImage,QImage) that
checks isNull, size and format and outputs verbose messages.

Check isNull, size similarly for QPixmap.

Add an autotest:
- Add test to cmptest and make it a GUI application since
  QImage requires QGuiApplication.
- Make testlib/selftests capable of running X11-GUI applications
  by passing DISPLAY.
- Ignore stderr output for cmptest
- Add test data

Change-Id: I2b29c7822fbeedf2b22c90889739ed7ff859ce92
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoQTestLib: Fix QFINDTESTDATA for Windows.
Friedemann Kleint [Tue, 20 Dec 2011 08:43:24 +0000 (09:43 +0100)]
QTestLib: Fix QFINDTESTDATA for Windows.

- Scan the parent directory of the executable if it is located
  in a 'Debug' or 'Release' directory
- Report with native separators in the log.
- Use the QString::arg() overloads with several string parameters.

Change-Id: I5ea84411e12978f8f958a0bce3ae10da44cc4e3f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoRebuild configure.exe.
Friedemann Kleint [Wed, 21 Dec 2011 13:14:27 +0000 (14:14 +0100)]
Rebuild configure.exe.

- Use create_prl, link_prl for all modules.
- Remove -graphicssystem (and -runtimegraphicssystem) options from
  configure.

Change-Id: Id1e0c8f82fa3149fd67c6a31e9e8baec06366205
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoconfigure[.exe]: use create_prl, link_prl for all modules
Rohan McGovern [Wed, 14 Dec 2011 01:33:15 +0000 (11:33 +1000)]
configure[.exe]: use create_prl, link_prl for all modules

These should go into qmodule.pri, rather than .qmake.cache, as they
make sense for all Qt modules - not only qtbase.

Fixes link failure when building qtdeclarative with jom on Windows.

Change-Id: I3e8b207e1808cb23af58b865a160c2fafa906288
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>