profile/ivi/qtbase.git
12 years agoQThreadPool: optimize enqueueTask() for common case
Konstantin Ritt [Mon, 16 Apr 2012 11:43:27 +0000 (14:43 +0300)]
QThreadPool: optimize enqueueTask() for common case

the most-common case is: queue is empty or filled with tasks of
the same priority; so the runnable would be put at the end of queue.
both checks are cheap for us.

also avoid detach()'ing by using const iterators

Change-Id: Iab2255f852211f9accc8d717f778671661210ef3
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agofix QChar::decompositionTag() returns wrong result for Hangul syllables
Konstantin Ritt [Mon, 16 Apr 2012 09:52:52 +0000 (12:52 +0300)]
fix QChar::decompositionTag() returns wrong result for Hangul syllables

Change-Id: I28e7b14b6a90aa539f8a50107737a66b3484fc00
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agofix QChar::isPrint() returns an incorrect result.
Konstantin Ritt [Mon, 16 Apr 2012 08:26:41 +0000 (11:26 +0300)]
fix QChar::isPrint() returns an incorrect result.

results are now equals to results of ICU's u_isprint() for the entire set
of the Unicode code points

Change-Id: I763f4b37cccd285eb01543d486f25bd7ea011241
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agofix QSqlQuery ODBC auto tests
Mark Brand [Fri, 13 Apr 2012 15:11:30 +0000 (17:11 +0200)]
fix QSqlQuery ODBC auto tests

The placeholder name must include the : prefix.

Several type tests for aggregate functions assumed sqlite behavior
which is actually exceptional due to sqlite's loose type system.

REAL is a synonymn for DOUBLE in sqlite but is also compatible with
at least MS SQL Server, PostgreSQL, Oracle, and MySQL.

Change-Id: I97f8c55d2e962b072cfab11a121fda685666e754
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
12 years agoFixed RGBA <-> BGRA bug in EGLFS backingstore.
Samuel Rødal [Tue, 17 Apr 2012 06:50:47 +0000 (08:50 +0200)]
Fixed RGBA <-> BGRA bug in EGLFS backingstore.

Better to swizzle in the fragment shader than to do a byte swapping
operation on the CPU.

Change-Id: I01420c3a5ceb5309f5648e1f86979b025bdd88aa
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoRemove insignification from QPluginLoader and QFactoryLoader tests.
Jason McDonald [Tue, 17 Apr 2012 08:55:36 +0000 (18:55 +1000)]
Remove insignification from QPluginLoader and QFactoryLoader tests.

Archived build logs on http://testresults.qt-project.org/ci/ show that
the QPluginLoader test has failed in CI only once in the last 1000
builds (in build 1786), and on that occasion the test was legitimately
blocking a regression.

The QFactoryLoader test was derived from the QPluginLoader test and has
not failed since its first run on March 29, 2012.

Task-number: QTBUG-22765
Change-Id: I866b4b8e30e393e0c7e7292119c072b27008ab43
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFixed MSVC compiler warning for zlib when compiling on WEC7.
Janne Anttila [Wed, 2 Nov 2011 07:24:10 +0000 (09:24 +0200)]
Fixed MSVC compiler warning for zlib when compiling on WEC7.

WEC7 mkspecs define _CRT_SECURE_NO_DEPRECATE globally. zlib redefined
the same macro without checking if it is already defined. Added #ifdef
guard to zlib when defining _CRT_SECURE_NO_DEPRECATE.

Task-number: QTBUG-22512
Change-Id: I477b24b7bc0ebb4cd8a619b11668eceb0f5064d4
Reviewed-by: aavit <qt_aavit@ovi.com>
(cherry picked from commit a0a970447d63e5c9afdb55d179d671d9c24e9061)

12 years agomkspecs: Rename freebsd-g++40 to freebsd-g++46.
Raphael Kubo da Costa [Mon, 16 Apr 2012 20:44:48 +0000 (17:44 -0300)]
mkspecs: Rename freebsd-g++40 to freebsd-g++46.

lang/gcc40 was removed from FreeBSD's ports tree in 2007, and the
lang/gcc port, which provides a stable GCC version newer than the one in
the base system, is currently pointing to the 4.6 series.

Change-Id: Ifd959ef7b9cd122aa606644e97e337ace8742245
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agomkspecs: Sync freebsd-g++40 and freebsd-g++.
Raphael Kubo da Costa [Mon, 16 Apr 2012 20:19:14 +0000 (17:19 -0300)]
mkspecs: Sync freebsd-g++40 and freebsd-g++.

Make freebsd-g++40 include gcc-base-unix.conf and g++-unix.conf and
eliminate a lot of duplicate definitions.

Change-Id: Ib3fe572ee276645fb03034a08fbc8e06720b6372
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoDo not define QT_AOUT_UNDERSCORE in freebsd-g++'s mkspec.
Raphael Kubo da Costa [Mon, 16 Apr 2012 20:03:09 +0000 (17:03 -0300)]
Do not define QT_AOUT_UNDERSCORE in freebsd-g++'s mkspec.

According to FreeBSD svn r52802 from 1999 the -aout compiler option and
the QT_AOUT_UNDERSCORE trick were already obsolete.

Since the FreeBSD project itself only supports versions 7 and above
these days, the definition can be safely removed.

Change-Id: I324d5d5b136a6560d9e1b5c81b93efc32d87cdc2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove the freebsd-g++34 mkspec.
Raphael Kubo da Costa [Mon, 16 Apr 2012 20:22:22 +0000 (17:22 -0300)]
Remove the freebsd-g++34 mkspec.

GCC 3.4 is older than the 4.2.1 in the base system, and should be
removed from the ports tree.

Besides, nobody in their sane mind would want to build Qt with such an
old compiler.

Change-Id: Ib40357758058505465a8bfcefbd182b9240591a5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoDo not redefine QT_SOCKLEN_T in freebsd-g++'s mkspec.
Raphael Kubo da Costa [Mon, 16 Apr 2012 19:53:52 +0000 (16:53 -0300)]
Do not redefine QT_SOCKLEN_T in freebsd-g++'s mkspec.

QT_SOCKLEN_T was being redefined depending on whether FreeBSD was < or
>= 4, branched in early 1999.

FreeBSD < 7 is not supported by the upstream project anymore, so we
can simplify the code and rely on the QT_SOCKLEN_T definition in
common/posix/qplatformdefs.h instead.

Change-Id: I0e06fc37e29158932b95a2619a7442c6068a7d32
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove insignfication from QGuiApplication test on Windows.
Jason McDonald [Tue, 17 Apr 2012 13:08:37 +0000 (23:08 +1000)]
Remove insignfication from QGuiApplication test on Windows.

This test has two stable failures, one of which slipped through while
the test was disabled.  Mark the failures with QEXPECT_FAIL and
re-enable the test.

Task-number: QTBUG-24186
Change-Id: Ie24f86603a01634d6eec5a42baa77e966f9388c8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix a thread safety issue with QTextLine::glyphRuns
Pierre Rossi [Mon, 16 Apr 2012 11:36:18 +0000 (13:36 +0200)]
Fix a thread safety issue with QTextLine::glyphRuns

This is a very partial revert of 10ac80708.
Revert back to using engineFromScript, which is reentrant, for cases other
than the "rawfont mode". In that last case, reentrancy is not a big issue
so far as the only client is WebKit, and this is used in the web process,
with no threaded rendering.

Change-Id: I047b04cf0236d52e6d548f34cddd3dcc7c3c5f83
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoFix memory leak of QFontEngineData
Jian Liang [Sat, 14 Apr 2012 07:50:58 +0000 (15:50 +0800)]
Fix memory leak of QFontEngineData

Move QFont::cleanup(); and cleanupThreadData(); to the end of destructor
of QGuiApplicationPrivate class. This is because they will trigger the
QFontCache::~QFontCache() function being called and at that time the
platform_theme object still hold some fonts object, This will cause the
QFontEngineData object hold by those fonts can never been deleted.

Change-Id: I4d3f21c5e2683706f68395ba3ad24203081e1d1d
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoAdd function getters in the native interface
Jørgen Lind [Tue, 17 Apr 2012 07:08:42 +0000 (09:08 +0200)]
Add function getters in the native interface

Change-Id: I4609071e38c3807479375ef98f260516da03ec15
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
12 years agoQDoc: Write subclasses of namespaces in automatic ditamap.
Casper van Donderen [Mon, 16 Apr 2012 08:11:26 +0000 (10:11 +0200)]
QDoc: Write subclasses of namespaces in automatic ditamap.

Now we also write the subclasses of namespaces sorted to qt.ditamap.

Change-Id: I4a4376bac208b9bacd5a2ddd5265faef13dc2eba
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoAdd some missing \internal for accessibility
Jan-Arve Saether [Tue, 17 Apr 2012 11:04:29 +0000 (13:04 +0200)]
Add some missing \internal for accessibility

Change-Id: I42c0a14908cfcccd2218f887b286515fef8d6611
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoFix out of bounds use of QVector API.
Stephen Kelly [Thu, 12 Apr 2012 15:23:19 +0000 (17:23 +0200)]
Fix out of bounds use of QVector API.

This is a regression introduced by commit
22b7d211865c1505862627a2e65bcd063e314e45.

Task-number: QTBUG-24965
Task-number: QTBUG-25140

Change-Id: I3f3bfe23af802444b078a29ee5565dd2bd24a34d
Reviewed-by: David Faure <faure@kde.org>
12 years agoMerge "Merge remote-tracking branch 'origin/api_changes'" into refs/staging/master
Lars Knoll [Tue, 17 Apr 2012 11:01:20 +0000 (13:01 +0200)]
Merge "Merge remote-tracking branch 'origin/api_changes'" into refs/staging/master

12 years agoRe-enable all of tst_QApplication::quitOnLastWindowClosed() on Mac OS X
Bradley T. Hughes [Tue, 17 Apr 2012 10:55:17 +0000 (12:55 +0200)]
Re-enable all of tst_QApplication::quitOnLastWindowClosed() on Mac OS X

Part of this test was skipped on Mac OS X, due to a bug in timer
handling. This bug has been fixed[1] and the test now passes again.

[1] https://codereview.qt-project.org/#change,21953

Task-number: QTBUG-24319
Change-Id: Iad0a315cfdfcfb007e8aa9243cfef4b2f2b33895
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoAdd tests/auto/gui/kernel/qguitimer
Bradley T. Hughes [Thu, 22 Mar 2012 12:45:03 +0000 (13:45 +0100)]
Add tests/auto/gui/kernel/qguitimer

This test is like qguieventdispatcher, it duplicates a corelib test in
the gui test suite, since the QtGui library often gets a different event
dispatcher implementation from the platform plugin.

Change-Id: Ifd724066950bc3b98a804bc2e5d40ce7b0429af4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoRemove insignification of QOpenGL test on Mac OS X.
Jason McDonald [Tue, 17 Apr 2012 10:28:37 +0000 (20:28 +1000)]
Remove insignification of QOpenGL test on Mac OS X.

The failure was fixed by commit e430ddfafcc6e8fa9fecb9c816908c3edce08d77
and the test has not failed again in the >500 CI builds that have
occured since that commit was merged,

Task-number: QTBUG-23061
Change-Id: I41063f9dbc6b6d7d6b99f1a0c20708b0842353d5
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoMerge remote-tracking branch 'origin/api_changes'
Lars Knoll [Tue, 17 Apr 2012 10:58:41 +0000 (12:58 +0200)]
Merge remote-tracking branch 'origin/api_changes'

Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1

12 years agoSkip tests toolbar-dialog/widget_window.
Friedemann Kleint [Mon, 16 Apr 2012 08:30:47 +0000 (10:30 +0200)]
Skip tests toolbar-dialog/widget_window.

To enable merging the api_changes branch.

Task-number: QTBUG-25331
Change-Id: I90d32ca0bd96eed62bae5f01316d6360a3b435c8
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoMerge "Merge remote-tracking branch 'origin/master' into api_changes" into refs/stagi...
Sergio Ahumada [Tue, 17 Apr 2012 08:38:24 +0000 (10:38 +0200)]
Merge "Merge remote-tracking branch 'origin/master' into api_changes" into refs/staging/api_changes

12 years agoUpgrading libpng: Patches to libpng 1.5.10 for Qt usage
aavit [Mon, 16 Apr 2012 11:55:27 +0000 (13:55 +0200)]
Upgrading libpng: Patches to libpng 1.5.10 for Qt usage

This is the collection of those earlier patches to libpng in Qt that
are still relevant, updated as required. For details, refer to the git
history of the src/3rdparty/libpng directory of Qt 4 and Qt 5/qtbase.

Change-Id: Ia922441024536eec9b8ced8c3c5e4dc941ae152f
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
12 years agoUpgrading libpng: Adding clean copy of libpng 1.5.10
aavit [Mon, 16 Apr 2012 11:34:47 +0000 (13:34 +0200)]
Upgrading libpng: Adding clean copy of libpng 1.5.10

This commit removes the previous version of the bundled libpng
(1.5.4), as well as all local modifications to it. It adds an
unmodified copy of the official libpng source distribution, except
that various extraneous files have been removed, as usual.

The patches required to build it in Qt will follow in separate
commit(s).

Change-Id: I90149f87fc889c44a3b60b21cdf755020f3a8e39
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
12 years agoMove XFAIL in tst_QGraphicsProxyWidget on Mac OS X
Bradley T. Hughes [Tue, 17 Apr 2012 05:29:24 +0000 (07:29 +0200)]
Move XFAIL in tst_QGraphicsProxyWidget on Mac OS X

The number of paint events is correct now, but the first expected region
is still incorrect. Move the XFAIL to the region comparison.

Change-Id: I3e706cf703b20a0e98b644b3082172fc3142b44f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoCocoa: allow timer activation to recurse
Bradley T. Hughes [Wed, 11 Apr 2012 11:08:40 +0000 (13:08 +0200)]
Cocoa: allow timer activation to recurse

CFRunLoopTimer's callback will never recurse. Since we are using one
CFRunLoopTimer to drive all Qt timers, we need to work around this by
sending all timers via a dedicated CFRunLoopSource (since these
callbacks can recurse). We also need to block this new timer source
along with the posted event source when calling processEvents()
"manually" to prevent livelock deep in CFRunLoop.

Change-Id: I375e46b6cfa0c76db678a1085314d42d8996d062
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoAdd QPlatformWindow::setWindowModified(bool)
Bradley T. Hughes [Thu, 12 Apr 2012 10:52:24 +0000 (12:52 +0200)]
Add QPlatformWindow::setWindowModified(bool)

Mac OS X provided a platform API for marking a window/document as
modified. This previously worked in Qt 4, so we need to have an
interface to keep this working in Qt 5. If the platform window does not
provide an implementation, fallback to setting the window title.

Note that this does not add any QWindow API, it's only in
QPlatformWindow.

Change-Id: I84c5a5df8536859157f2b1fa9e4cc647a09fd06d
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoMake failures in QTimeLine autotest more stable.
Jason McDonald [Mon, 16 Apr 2012 13:47:19 +0000 (23:47 +1000)]
Make failures in QTimeLine autotest more stable.

QTimeLine appears to have very poor timing characteristics. Historical
CI logs show roughly one failure in every twenty-five test runs on
Windows, and less frequent failures on Mac and Linux.

The root of the problem seems to be that QTimeLine's currentTime
counter appears to run at a variable speed and the only guarantee is
that it is slower than wall time.  The frameChanged() test
function waited for double the expected duration of the timeline and
still found that the timeline had failed to finish in about one in every
thirty test runs.  The interpolation() test function also failed for the
same reason, though less often.

This commit makes the frameChanged test more strict so that the poor
timing will be demonstrated more often, waiting only 1.5 times the
duration instead of double the duration.  It also makes the test fail
gracefully so that this known issue won't disrupt CI when the test is
made significant in a later commit.

Task-number: QTBUG-24796
Change-Id: If469d43abb662e24445a9da619052eea9cf7c581
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix bug in tst_QTimeLine::duration().
Jason McDonald [Mon, 16 Apr 2012 13:11:41 +0000 (23:11 +1000)]
Fix bug in tst_QTimeLine::duration().

QTimeLine::currentTime() is an integer in the range [0..duration], not a
float in the range [0.0..1.0].  The aim of the test appears to be to
verify that currentTime() is at least 90% of the way to duration() when
the timeline is almost due to finish, so verify that and give the
corresponding 10% tolerance on reaching the end state.

Change-Id: I38646947c3b9189a4e8e91a450c6071430ddc66a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoMarked tst_QProcess as insignificant on Windows.
Rohan McGovern [Mon, 16 Apr 2012 23:53:21 +0000 (09:53 +1000)]
Marked tst_QProcess as insignificant on Windows.

This test hangs ~2.6% of the time in CI.

Task-number: QTBUG-25342
Change-Id: I2c3531140e15edfe2dc2524e101b84e3206a4e61
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoapi: remove QWindow::move
Girish Ramakrishnan [Fri, 13 Apr 2012 20:17:13 +0000 (13:17 -0700)]
api: remove QWindow::move

QWindow::setPos is the correct api.

Change-Id: I5439338e9bc6933800d66331f20ce554b017c4fb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoapi: Fix const correctness of api in QScreen
Girish Ramakrishnan [Fri, 13 Apr 2012 22:38:41 +0000 (15:38 -0700)]
api: Fix const correctness of api in QScreen

const was missing in many convenience functions.

grabWindow should not be const since it actually does something.

Change-Id: I0ffa718878d4251c4fb5c34789cf58ebb85cff37
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoapi: Make QGuiApplication::styleHints() static
Girish Ramakrishnan [Fri, 13 Apr 2012 14:30:02 +0000 (07:30 -0700)]
api: Make QGuiApplication::styleHints() static

Practically all functions in QGuiApplication are static.

Change-Id: I5948620865c021029a3c04b31901b1110e6c0d27
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix tst_qtracebench benchmark.
Jędrzej Nowacki [Mon, 16 Apr 2012 14:01:50 +0000 (16:01 +0200)]
Fix tst_qtracebench benchmark.

Default QDataStream version was changed in Qt5, but the test tried to
load an old dumped file.

Change-Id: I49c06c232ec8a27f33c9da345bae4e03cd0c56fb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix tst_QDialog::deleteInExec() crash on Mac OS X
Bradley T. Hughes [Mon, 16 Apr 2012 10:14:35 +0000 (12:14 +0200)]
Fix tst_QDialog::deleteInExec() crash on Mac OS X

When destroying a window immediately after showing it, we can sometimes
provoke a crash in Cocoa after the show-window-animation has finished
(which appears to assume that the window's view will always be valid).
Prevent the crash by not removing the view from the window. When
recreating a window, we explicitly release the old window, but we do not
release the view, so we can freely add it to the new window (i.e. this
does not introduce new bugs related to recreating the platform window).

Task-number: QTBUG-24977
Change-Id: I466ce75b04785401032a0a2d4a2c494910cd1672
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoReintroduce testlib to widget free builds
Donald Carr [Mon, 16 Apr 2012 10:01:26 +0000 (10:01 +0000)]
Reintroduce testlib to widget free builds

testlib now compiles without widget support and it will be great to get
this code path QAed and testable.

Change-Id: Iceb641bf04fdac84ef0a0f86d0abb83f4c66bf80
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoAdd support for iOS.
Qt4iOS [Sat, 24 Mar 2012 14:09:04 +0000 (14:09 +0000)]
Add support for iOS.

Provide support for platforms with older implementations of
realpath() (eg. iOS).

Change-Id: Iec7f73c8014d238ae6a2cb2fa836b36b89ce4ef6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoqmake vc(x)proj generator: don't create bogus directories
Joerg Bornemann [Mon, 16 Apr 2012 14:09:18 +0000 (16:09 +0200)]
qmake vc(x)proj generator: don't create bogus directories

When creating the temporary project object,
Option::output_dir must be adjusted temporarily.

Task-number: QTBUG-22788
Change-Id: Ibf8897a46b63f48b9e33d7e2168b09e559cecec7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoqmake/Win: fix incomplete generated version resource
Joerg Bornemann [Mon, 16 Apr 2012 09:11:19 +0000 (11:11 +0200)]
qmake/Win: fix incomplete generated version resource

Since Windows Vista the resource language must be included to
make the version information visible in Windows Explorer.

Two new variables have been introduced:
RC_LANG (default: 1033) - resource language
RC_CODEPAGE (default: 1200) - resource codepage

Task-number: QTBUG-23218
Change-Id: I29e102d19501e3b7a43d5096fc4806bc38a4d846
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoqmake vcxproj generator: fix handling of /MANIFEST:NO linker option
Joerg Bornemann [Mon, 16 Apr 2012 08:27:10 +0000 (10:27 +0200)]
qmake vcxproj generator: fix handling of /MANIFEST:NO linker option

Task-number: QTBUG-23513

Change-Id: I5dd6fb6fd7910e43acd28057133a3ad6613cfc1a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoqmake: QMakeProject::intValue added
Joerg Bornemann [Mon, 16 Apr 2012 09:07:02 +0000 (11:07 +0200)]
qmake: QMakeProject::intValue added

For variables that are supposed to contain a single int,
this method returns the numeric value.
Only the first value of the variable is taken into account.

Change-Id: Ifa11ba5ac044e0a4703a387a9bcf02043e4681d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoqmake vcproj generator: unused variable removed
Joerg Bornemann [Mon, 16 Apr 2012 07:38:21 +0000 (09:38 +0200)]
qmake vcproj generator: unused variable removed

Change-Id: Iaf8bb1772846001297e1a421c3860f5e4d090a35
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoAdd QPlatformWindow::windowEvent()
Bradley T. Hughes [Thu, 29 Mar 2012 07:25:29 +0000 (09:25 +0200)]
Add QPlatformWindow::windowEvent()

This function is used to pass non-spontaneous events from QWindow to
QPlatformWindow so that QPlatformWindow subclasses can do any platform
specific event handling (such as setting/clearing modality flags on
QEvent::WindowBlock/WindowUnblock).

Change-Id: I82a89e8dadcd2f706aae25889d79cbfac9c2ee18
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoUpdate parent indexes first with changePersistentIndex.
Stephen Kelly [Sun, 15 Apr 2012 21:03:40 +0000 (23:03 +0200)]
Update parent indexes first with changePersistentIndex.

Otherwise, the order of updating of the indexes will cause
inconsistent results because it will rely on ordering within a
QHash (which is indeterminate).

Task-number: QTBUG-25325

Change-Id: I7d99578c8ee2954b8562dc5aff7dc32e74d41fb5
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove incorrect inclusion of GL support headers given EGL presence
Donald Carr [Mon, 16 Apr 2012 05:04:33 +0000 (05:04 +0000)]
Remove incorrect inclusion of GL support headers given EGL presence

The include files have a hard dependency on OpenGL (ES2); testing for the
presence of  EGL support is insufficient grounds for including this
functionality

Change-Id: I391b5dbbcbef40ecf68d16617b6eb1c0bb4b799e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMake {TCBPoint,QEasingCurveFunction}::operator==() const
hjk [Fri, 13 Apr 2012 09:14:15 +0000 (11:14 +0200)]
Make {TCBPoint,QEasingCurveFunction}::operator==() const

This is needed to use the classes with standard algorithms
and is the Right Thing anyway.

Change-Id: I13d1e0bfabbd216319cc138f11a9b3240f093052
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoHandle window state changes correctly in EGLFS
Donald Carr [Mon, 16 Apr 2012 20:19:12 +0000 (20:19 +0000)]
Handle window state changes correctly in EGLFS

The only valid state for EGLFS is fullscreen; this change reduces EGLFS to
reflect this cruel reality

Change-Id: I5aa9b4ef88451a00ce9de328add7d5512e1c86b5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove insignification from QLocale test for Mac OS X.
Jason McDonald [Mon, 16 Apr 2012 14:54:22 +0000 (00:54 +1000)]
Remove insignification from QLocale test for Mac OS X.

This test has not failed in the last 500 Continuous Integration runs.

Task-number: QTBUG-22769
Change-Id: Ib2e95bb2291757941baa0ea46d568816eef20b09
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoAdd bug numbers to insignificant_test markers.
Jason McDonald [Fri, 13 Apr 2012 10:25:49 +0000 (20:25 +1000)]
Add bug numbers to insignificant_test markers.

Change-Id: I4033ef0bd50a1be484503886b6bfda456da26675
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImplemented raster based backing store for EGLFS plugin.
Samuel Rødal [Mon, 16 Apr 2012 19:24:41 +0000 (21:24 +0200)]
Implemented raster based backing store for EGLFS plugin.

This improves quality of rendering for QWidget-based applications a bit.

Change-Id: I6b832d1de7e722f4dbe4e82882f5db35f0b8c30c
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoFixed networkproxy build under WinCE
Bjoern Breitmeyer [Mon, 16 Apr 2012 12:40:44 +0000 (14:40 +0200)]
Fixed networkproxy build under WinCE

The used functionality is partially not available under WinCE.
qnetworkfunctions_wince.h encapsulates the needed extra symbols.
It only needs to compile as the functions are loaded dynamically.

Change-Id: Ieb9010d4f6c7f94d39918b869ac503976e094e49
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoIntroduce fallback for general cross compilation
Donald Carr [Mon, 9 Apr 2012 19:47:12 +0000 (19:47 +0000)]
Introduce fallback for general cross compilation

The current approach of forcing people to pass the fully qualified prefix
of their toolchain to the configure script is verbose and something of a
chore for people who use the same toolchain to target several devices.

This allows you to set a single toolchain for use with all Qt targets via:

qmake -set CROSS_COMPILE foo

You can still explicitly override this toolchain, as originally mandated,
with the configure time device-option arguments.

Change-Id: Ibd3d940bb08fa09499533f9c661557e337a8421a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoResponses to request with AlwaysNetwork set should be cached
Martin Petersson [Mon, 16 Apr 2012 10:41:42 +0000 (12:41 +0200)]
Responses to request with AlwaysNetwork set should be cached

Previously the cache was not enabled if the request had AlwaysNetwork
set. This removes the check for the CacheLoadControlAttribute when
checking if the cache should be enabled.

Task-number: QTBUG-15805
Change-Id: I3d0722fbc1e6c77c5b947a2af0a09e2de8f4f9df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoTrivial doc fix.
Richard Moore [Sun, 15 Apr 2012 21:56:58 +0000 (22:56 +0100)]
Trivial doc fix.

Change-Id: I837c74d38b9f73aed41c3839421f5faad9d22f3f
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoMinor doc improvements.
Richard Moore [Sun, 15 Apr 2012 20:02:12 +0000 (21:02 +0100)]
Minor doc improvements.

Change-Id: Ic14cefcf935fea822c581013f437ae61b820ddd9
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoAdd 'we mean it' header to qpa headers
Girish Ramakrishnan [Sat, 14 Apr 2012 00:49:04 +0000 (17:49 -0700)]
Add 'we mean it' header to qpa headers

The QPA api is internal and not meant to be used by app users.

Change-Id: I37245e9635bf22f2454e763699dd58eca6565b63
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agodoc: Mark all qpa classes as internal
Girish Ramakrishnan [Sun, 15 Apr 2012 12:00:35 +0000 (05:00 -0700)]
doc: Mark all qpa classes as internal

All QPA api as marked as so:
    * preliminary - the api is subject to change anytime
    * internal - internal api that shouldn't be used by apps
    * ingroup qpa - "qpa" module. In the long run, qdoc should
      generate documentation for qplatform* API as if it were
      a seperate module.

Change-Id: I4e76c0e0c1805c679cabd52d5006f9fa9bc411c0
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agogui: Clear the QPixmapCache before destroying the QPlatformIntegration
Holger Hans Peter Freyther [Mon, 16 Apr 2012 14:39:44 +0000 (16:39 +0200)]
gui: Clear the QPixmapCache before destroying the QPlatformIntegration

The QPixmap in the pixmap cache should not outlive the QPlatformIntegration.
Clear the cache shortly before destroying the platform integration. This is
fixing a crash with the DirectFB plugin in the tst_qpixmapcache test.

Change-Id: I0b1a304dc37d874b412aadb77f8dbaa7d292711f
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove the Qt 5 todo about empty string lists in QSettings
Thiago Macieira [Mon, 16 Apr 2012 14:27:11 +0000 (11:27 -0300)]
Remove the Qt 5 todo about empty string lists in QSettings

There's no need to change behaviour now. The current marker (@Invalid())
returns an empty string list, as opposed to a list with one item.
Changing it would break compatibility unpredictably with Qt 4.

So I choose not to change QSettings. Let it be "Done".

Task-number: QTBUG-25110
Change-Id: Id1f353dfed800005d927183da237f3f8357c496d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoMade the evdev mouse plugin clamp coordinates to screen.
Samuel Rødal [Mon, 16 Apr 2012 15:36:03 +0000 (17:36 +0200)]
Made the evdev mouse plugin clamp coordinates to screen.

Useful when we get relative events, as otherwise the mouse might end up
far outside the screen boundaries.

Change-Id: I8e3884ab2acb03eaa6afce8926f503dbd03b0c5d
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoMake reallocData use QArrayData::AllocationOptions
João Abecasis [Fri, 6 Apr 2012 08:12:36 +0000 (10:12 +0200)]
Make reallocData use QArrayData::AllocationOptions

Growth computations are deferred to QArrayData::allocate, except in the
case of realloc as that functionality is currently lacking in
QArrayData. Since that sits in library code, anyway, it can be changed
later to use a future QArrayData::reallocate.

As it is, reallocData is becoming a model for QArrayData::reallocate
and what it can offer to containers of POD/movable types.

Change-Id: I045483f729114be43e4818149d1be1b333bcbe13
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoDrop unnecessary assignment
João Abecasis [Fri, 6 Apr 2012 07:56:20 +0000 (09:56 +0200)]
Drop unnecessary assignment

In this branch, !IS_RAW_DATA has already established that offset is
sizeof(QByteArrayData) and realloc maintains the assumption.

Change-Id: Ic160e36d7781d4c4f64a3b2ebec98c9cb605b3eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoMigrate QByteArray over QArrayData.
Jędrzej Nowacki [Tue, 27 Mar 2012 11:17:46 +0000 (13:17 +0200)]
Migrate QByteArray over QArrayData.

For the time being QByteArrayData keeps its independent existence, for
the sake of other modules. Once they have been ported to use the new
initializer macros it can be changed to:

    struct QByteArrayData { QArrayData array; };

Extra braces can then be added to the macros.

With respect to source compatibility, the only concern is with other
modules, as QByteArrayData has already changed in incompatible ways with
Qt 4.x

Done-with: João Abecasis
Change-Id: I044e2a680317431777a098feec8839a90a3d3da3
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove explicit checks for shared_null/empty
João Abecasis [Fri, 6 Apr 2012 07:24:37 +0000 (09:24 +0200)]
Remove explicit checks for shared_null/empty

This eases porting to QArrayData and retains semantics. In append() and
prepend() a conditional was generalized so that no work is done if there
is nothing to add.

Done-with: Jędrzej Nowacki
Change-Id: Ib9e7bb572801b2434fa040cde2bf66dacf595f22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoMake QByteArray and QString keep track of terminating null
João Abecasis [Wed, 4 Apr 2012 13:36:09 +0000 (15:36 +0200)]
Make QByteArray and QString keep track of terminating null

In conceptual terms, this change increments the Data::alloc member by
one for all strings allocated and maintained by these classes. Instances
initialized with fromRawData retain 0 as the member value, so they are
treated as immutable.

This brings QByteArray and QString closer to QVector, making it possible
for them to reference and share the same data in memory, in the future.
It also brings them closer to QArrayData.

In practical terms all comparisons to the alloc member were changed to
take into account that it also tracks the terminating null character.

Aside from the increment in the alloc member, there should be no user
visible changes.

Change-Id: I618f49022a9b1845754500c8f8706c72a68b9c7d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMerge remote-tracking branch 'origin/master' into api_changes
Lars Knoll [Mon, 16 Apr 2012 10:04:34 +0000 (12:04 +0200)]
Merge remote-tracking branch 'origin/master' into api_changes

Conflicts:
configure
src/corelib/io/qurl.cpp
src/gui/kernel/qwindow.cpp
src/tools/moc/generator.cpp
src/widgets/kernel/qwidget_qpa.cpp
src/widgets/styles/qstyle.h
src/widgets/widgets/qtabbar.cpp
tests/auto/corelib/codecs/utf8/tst_utf8.cpp

Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e

12 years agoShow the type and address of QObjects in debug output.
Stephen Kelly [Sun, 15 Apr 2012 23:17:00 +0000 (01:17 +0200)]
Show the type and address of QObjects in debug output.

Change-Id: I9f44ab80a6fb763adc9cbaf47de8e1b97212332d
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoRemove OpenKode OpenVG and qvfb platformplugins
Jørgen Lind [Mon, 16 Apr 2012 07:29:29 +0000 (09:29 +0200)]
Remove OpenKode OpenVG and qvfb platformplugins

Change-Id: Ic0bd8f68080bf139d81266d033cfd3c96a8d01f4
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoInitialize reference count for QWindowsMsaaAccessible
Jian Liang [Sat, 14 Apr 2012 07:13:20 +0000 (15:13 +0800)]
Initialize reference count for QWindowsMsaaAccessible

Initaliize reference count value to 0 for QWindowsMsaaAccessible.

Change-Id: I15cadd7ced0240322240060f6dd5126cc8add338
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoUse the new plugin metadata method in the QNX QPA plugin.
Sean Harmer [Fri, 13 Apr 2012 13:16:52 +0000 (14:16 +0100)]
Use the new plugin metadata method in the QNX QPA plugin.

Change-Id: Ib40807b97bf8d9ec26e0dfe2797786d9352ce579
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoFix finding EGL on QNX
Thomas McGuire [Thu, 12 Apr 2012 12:54:45 +0000 (14:54 +0200)]
Fix finding EGL on QNX

A recent change in platformsupport required "egl" to be defined,
otherwise the QNX plugin would fail at runtime with unresolved symbols.

Now the EGL config test passes.

Change-Id: I111eb939abac86885bcdb35d5f5899f515bd8c4e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoFixed configure output when no platform plugin is enabled.
Samuel Rødal [Mon, 16 Apr 2012 06:47:39 +0000 (08:47 +0200)]
Fixed configure output when no platform plugin is enabled.

Instead of having to pass -no-xcb -no-eglfs -no-directfb, it's
better to pass -no-qpa-platform-guard which is also resilient
against future platform additions.

Change-Id: Id68bfe3688980fa273665b01b9332f5d6f359491
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
12 years agoqmenu.h includes private headers
Girish Ramakrishnan [Sun, 15 Apr 2012 11:02:31 +0000 (04:02 -0700)]
qmenu.h includes private headers

qpa includes are considered private and should not be included
in public header files.

Change-Id: I26c744ec1d8ddef7b0c11c3d26b593be05f5aa54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoapi: fix constness of QOpenGLContext::getProcAddress
Girish Ramakrishnan [Fri, 13 Apr 2012 22:53:50 +0000 (15:53 -0700)]
api: fix constness of QOpenGLContext::getProcAddress

Should be const just like Qt4's QGLContext::getProcAddress.

Change-Id: I273467d5cf852cd49f48cec3f335c4ddac795363
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoAdding support for obtaining an OpenGL Core Profile context on Mac OSX
Sean Harmer [Wed, 21 Mar 2012 10:39:55 +0000 (10:39 +0000)]
Adding support for obtaining an OpenGL Core Profile context on Mac OSX

Change-Id: I08048ecee9b243b122ee93fce316e498aa7e2d51
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoFix incorrect state of show/hide menu items in Mac application menu
Pasi Matilainen [Thu, 2 Feb 2012 06:18:50 +0000 (08:18 +0200)]
Fix incorrect state of show/hide menu items in Mac application menu

The "Hide <app>", "Hide Others" and "Show All" menu items in Mac
application menu are always enabled, and do not get disabled correctly.
Fix by turning on autoenable for the menu in qt_menu.nib, and by
implementing menu item validation in QCocoaMenuLoader.

Task-number: QTBUG-10705
Change-Id: Ic181dfa26a71acad0067f5269c72517b50b17362
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
(cherry picked from commit 8f23a6be1069455e609e8bea7527726c24bebb36)

12 years agoPut bug numbers on same line as insignificant_test markers.
Jason McDonald [Fri, 13 Apr 2012 07:59:37 +0000 (17:59 +1000)]
Put bug numbers on same line as insignificant_test markers.

This makes it easier to find insignificant tests that have no associated
bug report.

Change-Id: Ia71d59da062818d3860b0365d063e044705267fd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agomoc: Fix parsing of the empty preprocessor command
Olivier Goffart [Tue, 10 Apr 2012 11:38:41 +0000 (13:38 +0200)]
moc: Fix parsing of the empty preprocessor command

When encountering a null preprocessing directive (which is supposed to
be ignored), the moc preprocessor will leave a PP_NEWLINE token in the
token stream. That will confuse the parser.
The PP_NEWLINE token need to be ignored in the preprocessing phase.

Task-number: QTBUG-22717
Change-Id: I1e502a7e5bc6fa8ce2f82109ba7199b95747ff0a
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoUpdate com.trolltech -> org.qtproject in the bootstrapped tools
Thiago Macieira [Thu, 29 Mar 2012 14:14:12 +0000 (11:14 -0300)]
Update com.trolltech -> org.qtproject in the bootstrapped tools

The tools will now generate the new org.qtproject annotations only,
matching the XML generator in the library. They accept both types of
annotations as input though -- and will generate a warning about the
older one.

This commit should be backported to Qt 4, so XML files can start to be
ported.

Task-number: QTBUG-23274
Change-Id: If298c342ab4774cbca1be1898a01af8b46e80446
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
12 years agoIntroduce the new UnknownProperty and PropertyReadOnly errors
Thiago Macieira [Thu, 29 Mar 2012 14:11:51 +0000 (11:11 -0300)]
Introduce the new UnknownProperty and PropertyReadOnly errors

Those error codes have been standardised for years but we haven't used
them until now.

Task-number: QTBUG-23274
Change-Id: Iebc9ded949f363281a4d43fd9d29a284f2e2df08
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
12 years agoFinish cleaning up com.trolltech -> org.qtproject in QtDBus
Thiago Macieira [Thu, 29 Mar 2012 14:11:03 +0000 (11:11 -0300)]
Finish cleaning up com.trolltech -> org.qtproject in QtDBus

Lots of uses of the annotations and error names, plus a bunch of local
unit test names (including one file that had to be renamed).

The meta object generator is updated to support both the old and new
names. That means some references to com.trolltech *must* remain in the
source code.

Task-number: QTBUG-23274
Change-Id: Icc38ae040232f07c437e7546ee744a4703f41726
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
12 years agoUpdate the error codes in QtDBus
Thiago Macieira [Thu, 29 Mar 2012 12:53:06 +0000 (09:53 -0300)]
Update the error codes in QtDBus

Change the old com.trolltech ones to org.qtproject and introduce Use
the alternate domain name for the Qt Project because the dash
character is not valid in interface and error names.

Task-number: QTBUG-23274
Change-Id: Iac1699e70525d67f983c10560932acff6b2ecde6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoMark tst_qabstractitemmodel as insignificant after QHash randomization
Giuseppe D'Angelo [Sun, 15 Apr 2012 18:05:10 +0000 (19:05 +0100)]
Mark tst_qabstractitemmodel as insignificant after QHash randomization

The testChildrenLayoutsChanged fails randomly. This happens rarely,
f.i. wasn't spotted by CI when QHash randomization itself was merged;
but is indeed reproducible by running the test a few times in a row.

This is now blocking api_merges integration, and I have no idea
how to fix it.

This patch marks the test as insignificant for now (the bug
tracking this test failure is QTBUG-25325), and switches the failing
tests from QVERIFY(a == b) to a proper QCOMPARE (so that the
expected values do show up in the build logs).

Change-Id: I16f0e28bcbb06dbac2e7169f4676a19ccf626a92
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agowidgets: Fix painting to a fully transparent top level widget
Holger Hans Peter Freyther [Mon, 2 Apr 2012 09:59:04 +0000 (11:59 +0200)]
widgets: Fix painting to a fully transparent top level widget

QWS used to have a line to change the composite mode from SourceOver
to Source for the top level widget. This wasn't used with QPA and I
removed the internal DontSetCompositionMode in qtbase. It turns out that
the QWS way is the most efficient one to initialize the background of
the widget.

The alternative is to have the QPlatformBackingStore::beginPaint
always clear the entire to be painted area and then paint the background
of the widget. The difference of painting each pixel once or twice is
noticable on embedded platforms and in the range of one to two fps.

Reproduce the issue with:
echo "QWidget {background: transparent}" > style.css
./examples/widgets/wiggly/wiggly -stylesheet style.css

Task-number: QTBUG-24526
Change-Id: Ica4c980bb3bf6eb87ddb5b510ac7493292d01543
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoNow QSplitter can have 0-pixel handle
ABBAPOH [Sat, 25 Feb 2012 19:52:09 +0000 (23:52 +0400)]
Now QSplitter can have 0-pixel handle

Change-Id: Iad920ffcd5d7f4c01504d41d1740f130b7aa53dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoUCD-5.0: apply Corrigendum #6
Konstantin Ritt [Tue, 10 Apr 2012 20:39:40 +0000 (23:39 +0300)]
UCD-5.0: apply Corrigendum #6

http://unicode.org/versions/corrigendum6.html:
> in Unicode 5.0, the list of characters with the Bidi_Mirrored property
> was made consistent for brackets and quotation marks, in preparation for
> new constraints on bidi mirroring. However, after publication of
> Unicode 5.0.0 it was discovered that this change adversely affected
> several quotation mark characters in deployed data.

Task-number: QTBUG-25169
Change-Id: Id49caf401af2d5a1e6dbcc32b2f350aa20b7f901
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFixed broken logic in evdev input plugins.
Samuel Rødal [Fri, 13 Apr 2012 18:31:41 +0000 (20:31 +0200)]
Fixed broken logic in evdev input plugins.

If we do multiple reads we need to accumulate the total amount of bytes
read, instead of just taking the last read amount into account.

Change-Id: Iaa9b90c269f3ed9d09dae67452ca816d9db6217f
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoFold qpaintdevice_qpa.cpp into qpaintdevice.cpp
Girish Ramakrishnan [Sat, 14 Apr 2012 00:02:37 +0000 (17:02 -0700)]
Fold qpaintdevice_qpa.cpp into qpaintdevice.cpp

Change-Id: I274508826b9be4eb00f67fccae5a18ecbdf41a36
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix header inclusion guard
Girish Ramakrishnan [Fri, 13 Apr 2012 23:28:26 +0000 (16:28 -0700)]
Fix header inclusion guard

Change-Id: Icc537d5b52315b9563078da9fa69ddd67b567f76
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix tst_QMdiSubWindow::emittingOfSignals CI failures
Girish Ramakrishnan [Sat, 14 Apr 2012 21:19:45 +0000 (14:19 -0700)]
Fix tst_QMdiSubWindow::emittingOfSignals CI failures

The test fails consistently on the CI (but never fails on any
of the developer machines). This is possibly a timing issue.

Change-Id: Ie40d9c38c3128a93898b0e50bfde5a754bd2b7fb
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agodoc: QWindowSurface is dead
Girish Ramakrishnan [Fri, 13 Apr 2012 16:14:59 +0000 (09:14 -0700)]
doc: QWindowSurface is dead

It goes by the name of QBackingStore these days.

Change-Id: Id46254e47ee0abf9e669862eec6c2205d9634368
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQDoc: add missing newline characters in qdoc -help.
Casper van Donderen [Fri, 13 Apr 2012 10:04:55 +0000 (12:04 +0200)]
QDoc: add missing newline characters in qdoc -help.

Change-Id: Ibd50091693be393c6b479d6ca8927ba1ed578709
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoqdoc: Fixed bugs causing invalid DITA XML
Martin Smith [Fri, 13 Apr 2012 10:55:56 +0000 (12:55 +0200)]
qdoc: Fixed bugs causing invalid DITA XML

Fixed a bug in qdoc that caused too many end elements to be generated.
Also fixed some doc errors that caused invalid DITA to be generated.

Task nr: QTBUG-25302

Change-Id: Ifbbf457d28c51c2691a252888447739da7713bc9
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoQHash security fix (2/2): enable QHash random seed
Giuseppe D'Angelo [Sat, 24 Mar 2012 08:50:02 +0000 (08:50 +0000)]
QHash security fix (2/2): enable QHash random seed

Algorithmic complexity attacks against hash tables have been known
since 2003 (cf. [1, 2]), and they have been left unpatched for years
until the 2011 attacks [3] against many libraries /
(reference) implementations of programming languages.

This patch makes qHash use the QHash seed introduced in the
previous commits, thus truly randomizing bucketing in QHash.

[1] http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf
[2] http://perldoc.perl.org/perlsec.html#Algorithmic-Complexity-Attacks
[3] http://www.ocert.org/advisories/ocert-2011-003.html

Task-number: QTBUG-23529
Change-Id: Ibee9cf6aa820af5d777fcde478647665c728052a
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoQHash: remove optimization for QHash<int, T>
Giuseppe D'Angelo [Fri, 13 Apr 2012 17:59:58 +0000 (18:59 +0100)]
QHash: remove optimization for QHash<int, T>

QHash employs an optimization for int/uints, squashing the hash
value and the key value inside an union. This obviously works
iff qHash(int k) = k. If the hash value gets salted, the hash
table is corrupted.

This patch removes that optimization by means of a #if 0,
so if further research finds out that we want those 4 bytes back
it's pretty simple to revert.

Change-Id: If273f0bf2ff007f4f2f7c46d2aab364a3b455cf1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQHash: fix key() test
Giuseppe D'Angelo [Fri, 13 Apr 2012 18:41:47 +0000 (19:41 +0100)]
QHash: fix key() test

The key returned by QHash::key is an arbitrary one that maps to the
given value. The test instead relied on it being a specific one.

Change-Id: I090351797e8b52036d78160fd810518a11e8107d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>