Commit Graph

6358 Commits

Author SHA1 Message Date
Konstantin Ritt
dab2e1fea7 QThreadPool: unify waitForDone() overloads
Change-Id: I1515a65fab37588372794422a43ed09ac076e108
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-17 18:44:13 +02:00
Konstantin Ritt
cbaf52b099 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>
2012-04-17 18:44:13 +02:00
Konstantin Ritt
95bd974163 fix QChar::decompositionTag() returns wrong result for Hangul syllables
Change-Id: I28e7b14b6a90aa539f8a50107737a66b3484fc00
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-17 18:44:13 +02:00
Konstantin Ritt
087cda285f 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>
2012-04-17 18:44:13 +02:00
Mark Brand
b8d1abe65b 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>
2012-04-17 16:28:46 +02:00
Samuel Rødal
a73125bada 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>
2012-04-17 16:28:46 +02:00
Jason McDonald
e01ecc6d6f 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>
2012-04-17 16:28:46 +02:00
Janne Anttila
ec49bcb2e4 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)
2012-04-17 16:28:46 +02:00
Raphael Kubo da Costa
c7b52e2a2a 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>
2012-04-17 16:28:46 +02:00
Raphael Kubo da Costa
996672933a 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>
2012-04-17 16:28:46 +02:00
Raphael Kubo da Costa
874ebef453 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>
2012-04-17 16:28:46 +02:00
Raphael Kubo da Costa
0e8aabadf9 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>
2012-04-17 16:28:46 +02:00
Raphael Kubo da Costa
1afad60e60 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>
2012-04-17 16:28:46 +02:00
Jason McDonald
d43c931cf0 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>
2012-04-17 16:28:46 +02:00
Pierre Rossi
46556529ec 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>
2012-04-17 16:28:46 +02:00
Jian Liang
addffb71b4 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>
2012-04-17 16:28:46 +02:00
Jørgen Lind
ba1309e1f4 Add function getters in the native interface
Change-Id: I4609071e38c3807479375ef98f260516da03ec15
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-04-17 16:28:46 +02:00
Casper van Donderen
1d0ed55e6e 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>
2012-04-17 16:28:46 +02:00
Jan-Arve Saether
19768e115a Add some missing \internal for accessibility
Change-Id: I42c0a14908cfcccd2218f887b286515fef8d6611
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-04-17 16:28:46 +02:00
Stephen Kelly
7c3684dff7 Fix out of bounds use of QVector API.
This is a regression introduced by commit
22b7d21186.

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

Change-Id: I3f3bfe23af802444b078a29ee5565dd2bd24a34d
Reviewed-by: David Faure <faure@kde.org>
2012-04-17 16:28:46 +02:00
Lars Knoll
576a8e152e Merge "Merge remote-tracking branch 'origin/api_changes'" into refs/staging/master 2012-04-17 13:09:29 +02:00
Bradley T. Hughes
fb7f30d2ba 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>
2012-04-17 13:09:29 +02:00
Bradley T. Hughes
1a1c2b4075 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>
2012-04-17 13:09:29 +02:00
Jason McDonald
86104ac36a Remove insignification of QOpenGL test on Mac OS X.
The failure was fixed by commit e430ddfafc
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>
2012-04-17 13:09:29 +02:00
Lars Knoll
64255ef650 Merge remote-tracking branch 'origin/api_changes'
Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
2012-04-17 12:58:52 +02:00
Friedemann Kleint
7e0beba891 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>
2012-04-17 10:38:28 +02:00
Sergio Ahumada
16b53b2f0e Merge "Merge remote-tracking branch 'origin/master' into api_changes" into refs/staging/api_changes 2012-04-17 10:38:24 +02:00
aavit
4a9fb41a79 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>
2012-04-17 10:15:56 +02:00
aavit
1fa1ce3628 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>
2012-04-17 10:15:48 +02:00
Bradley T. Hughes
93055e81c8 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>
2012-04-17 10:15:44 +02:00
Bradley T. Hughes
bffbfc5b33 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>
2012-04-17 10:15:44 +02:00
Bradley T. Hughes
2afeb07227 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>
2012-04-17 10:15:44 +02:00
Jason McDonald
1bbd9d8ee5 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>
2012-04-17 10:15:44 +02:00
Jason McDonald
5192b06ccb 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>
2012-04-17 08:06:47 +02:00
Rohan McGovern
4e282e3ea2 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>
2012-04-17 07:36:35 +02:00
Girish Ramakrishnan
2c13dc7482 api: remove QWindow::move
QWindow::setPos is the correct api.

Change-Id: I5439338e9bc6933800d66331f20ce554b017c4fb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-17 06:19:52 +02:00
Girish Ramakrishnan
f285356e88 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>
2012-04-17 06:19:49 +02:00
Girish Ramakrishnan
6094197294 api: Make QGuiApplication::styleHints() static
Practically all functions in QGuiApplication are static.

Change-Id: I5948620865c021029a3c04b31901b1110e6c0d27
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-04-17 06:19:47 +02:00
Jędrzej Nowacki
9b06be8646 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>
2012-04-17 06:19:42 +02:00
Bradley T. Hughes
5a57ddebf5 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>
2012-04-17 03:28:29 +02:00
Donald Carr
a2e42a6a0a 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>
2012-04-17 03:26:32 +02:00
Qt4iOS
4a4e9e4a9c 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>
2012-04-17 03:26:32 +02:00
Joerg Bornemann
ac7dd2782f 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>
2012-04-17 03:26:32 +02:00
Joerg Bornemann
8987e5d2cb 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>
2012-04-17 03:26:32 +02:00
Joerg Bornemann
31cfe5ca1b 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>
2012-04-17 03:26:32 +02:00
Joerg Bornemann
ee4d723ecc 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>
2012-04-17 03:26:32 +02:00
Joerg Bornemann
65425be8fe qmake vcproj generator: unused variable removed
Change-Id: Iaf8bb1772846001297e1a421c3860f5e4d090a35
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-17 03:26:32 +02:00
Bradley T. Hughes
768e587cdc 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>
2012-04-17 01:13:52 +02:00
Stephen Kelly
da7880b0f0 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>
2012-04-17 00:47:49 +02:00
Donald Carr
d4c4723583 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>
2012-04-16 22:55:26 +02:00