Commit Graph

3582 Commits

Author SHA1 Message Date
Tasuku Suzuki
412dbdf410 Input method on Mac
Restore input method implimentation in Qt4

Task-number: QTBUG-23867
Change-Id: I5d405ccc8b0a73c399d992f6474a0cc38d191157
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-12 21:38:51 +01:00
Shane Kearns
702b4cb5d4 Workaround webkit deadlock on macos x
The webkit AtomicallyInitializedStatic and Qt's Q_GLOBAL_STATIC can
deadlock on the Mac, as the mac compiler inserts calls to
__cxa_guard_acquire and __cxa_guard_release around initialisation of
local statics.
In Q_GLOBAL_STATIC case, this is the QGlobalStaticDeleter local static
Whereas webkit AtomicallyInitializedStatic is a local static variable
in any case.

Problem is triggered because webkit constructs QNetworkConfigurationManager
inside the constructor of a local static - networkStateNotifier
And the generic bearer plugin calls QNetworkInterface::allInterfaces
in the bearer thread, which needs an initialised Q_GLOBAL_STATIC.

Reviewed-by: Laszlo Agocs
(cherry picked from commit 38db40d9a2db44e47b0aabd9487284cd1106b353)
Task-number: QTBUG-24554

Change-Id: Id2c7818faefb46e66b0bbc30ce30595d46d53016
Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
2012-03-12 19:49:52 +01:00
Friedemann Kleint
cf36e571ee Windows: Implement QWindowsIntegration::queryKeyboardModifiers()
Use code from Qt 4.8.

Change-Id: I32d220e04d13ee1e692c0c58268b827bcf519dc7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-12 17:33:15 +01:00
Friedemann Kleint
6e278b8688 Implement QSystemTrayIcon for Windows.
No longer base the implementation on a QWidget which is not
necessary when all that is required is a message window listening
to task-tray messages. Export a service function creating a message
window from the Windows native interface and use that.

Task-number: QTBUG-20978

Change-Id: I01d0faeac777df4eee802c51d2bc722fce814080
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-12 17:33:15 +01:00
Giuseppe D'Angelo
9f266efa8f QRegularExpression: add error strings for translation
Added the error strings from PCRE to be picked up by lupdate,
to enable translations.

Change-Id: Iaeabde5d7a17f9a0273511e0741e67a097d23a98
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-12 17:33:15 +01:00
Frederik Gladhorn
7738f96f09 Add documenation about QAccessibleStateChange event.
Change-Id: Iea34d71d71a6dd58f761722ce20ae8ec2b81ae58
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-12 15:34:18 +01:00
Frederik Gladhorn
ca737f566b Use QAccessibleEvent in test.
Change-Id: I4f9c0f503543caa5704a29c8ccd7c4134b455625
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-12 15:34:06 +01:00
Donald Carr
431eb30e9e Remove stale references to Qtopia
Change-Id: Idd9b5fae8f6a0273636a878325e82e5664a40d43
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-03-12 13:14:05 +01:00
jian liang
86dd454461 Delete QPlatformDragPrivate object in QPlatformDrag's destructor
Change-Id: Ib722df14123b24ca044f6e0846aa1435c7e0e201
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-12 13:14:05 +01:00
Mark Brand
cdc9422c2e QSqlTableModel::indexInQuery: fix inserted row accounting
Commit b979956ec4 introduced a
distinction between rows that have a pending INSERT operation and
rows that have already been inserted in the database but still are
in the change cache. Both cases are rows that are not in the underlying
query. Unfortunately, we overlooked a case where the point of the test
is whether the row is in the query.

Change-Id: I0f58bed232d9336fed6e67c3d140fd580ec35868
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-03-12 13:14:05 +01:00
John Tapsell
4c0de07a0e Harfbuzz GPOS hinting- do not consider a subtable to be invalid if it is just empty
Considering a subtable to be invalid when it was empty meant that it
returned an error causing all further hinting to be aborted.  This means
that we get no hinting in certain cases with certain fonts.

Change-Id: I840c016dc85935b4f2c4373c66a79b4bd8b3a30d
Reviewed-by: Adrian Yanes <ext-adrian.yanes@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-12 13:14:05 +01:00
Stefan Hundhammer
21c98e52c5 Line up underlines if fallback fonts are used (QTBUG-21832)
Change-Id: Icecc514f6c47c0576af8cabd39cdc0987f8d93fa
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-12 13:14:05 +01:00
Jason McDonald
3d8e3421a5 Remove MSVC 6 workaround from QtConcurrent.
MSVC 6 is not supported by Qt 5.

Change-Id: I2aef026eb2ad6a68cd9bcddcf6578cb1a019b21c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-12 13:14:05 +01:00
Jason McDonald
074508c2ca Remove gcc 3.x-specific code from QtConcurrent and its tests.
Change-Id: I4dd0ce50b70a47a0a00f4c7ec18077a1bcbe5705
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-12 13:14:05 +01:00
Andrew den Exter
4dfeb18758 Add a movable type declaration to QGlyphRun.
Allow it to take advantage of QList optimisations for pointer types.

Change-Id: Iddbb9741efef43604e38fc3eeb08b522c0414e21
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-12 13:14:05 +01:00
Sergio Ahumada
0a14ddfacb qdoc: Fix closing 'table class="generic"' tag
Change-Id: I251ed6d4e5788b0816211e06f33ace03d2fa14e8
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-12 13:14:05 +01:00
Debao Zhang
a5c1ffedb8 Convert xlib plugin to new format
Change-Id: I00418a1eb7bf944ec360dbbb1f61f7703f3ecd37
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-12 13:14:05 +01:00
Morten Johan Sorvig
cff24b9fd5 Remove Mac multiple-arch support.
Change-Id: Iaad361301e4772c3d8be6186da88e494cb234801
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-12 13:14:05 +01:00
Morten Johan Sorvig
31043e6b8d Cocoa: Fix accessiiblityPerformAction
Remove hardcoded pressAction();

Change-Id: Ie02e3f2f88a2cd311aec1b39daa160efb3b2b617
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-03-12 13:14:05 +01:00
Sean Harmer
9a81e37107 Rename blackberry QPA plugin to QNX
Changing the naming scheme from Blackberry to QNX in line with pattern
of using platform names.

Change-Id: I048a6a18010bc932311d63c8dde19ccab97894c8
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
2012-03-12 13:14:05 +01:00
Frederik Gladhorn
61692bfefe Remove QAccessible2::TableModelChange.
This was never a good idea since it has issues:
It doesn't really work with more than one update without
the client fetching the data. The same is unlikely to work reliable
since it involves two ipc roundtrips.

Instead we should have an extended QAccessibleEvent that contains
the data so that the bridges can decide how to pass on the data if
needed.

Change-Id: Iaf6b74f49586f7155909a6fe1a17137b71b31175
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-12 13:14:05 +01:00
Frederik Gladhorn
eb57da5b3f Update accessibility StateChange by custom event.
Subclass QAccessibleEvent to give details what changed in the
state change.

Change-Id: I9005d311e85a3c8bfa6e062833fa6a8a7dc6a4a4
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-12 13:14:05 +01:00
Casper van Donderen
0ecec0e903 Remove unnecessary function.
The reconstituteFieldMemberExpression static function was not usedf
anywhere.

Change-Id: Ide23045d7f7c3194a9725ae658df85562ba29ad5
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-12 13:14:05 +01:00
Laszlo Agocs
6a0f84e0a8 Migrate QWindowSystemInterface to use QElapsedTimer
Change-Id: I7dfb0590dce79678d49f5d6ef8f60758719bcf72
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-12 13:14:05 +01:00
Lars Knoll
9abefae4fb Restore some source compatibility
Add an implicit #include back in to avoid
needless SC and compilation breaks.

Add some deprecated method for codecForTr, until
all other modules are ported to mot use it anymore.

Change-Id: I5334b47a0c32819b9eb6b7203cc98ce4e6073a64
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-03-12 10:51:49 +01:00
Vincent A
37546c563e Support Growl >=1.3 in QSystemTrayIcon
The app name has changed in Growl 1.3, but the id
stays the same. Also don't send notifications if
Growl is not running to follow recommendations.

Change-Id: I31ff7df272b4af1b4f1e4db80c47e7ba75038dec
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-12 07:44:01 +01:00
Robin Burchell
70cb55bc6d Force properties to be applied in the order in which they are specified.
Previously, property setting was randomized in order, which means that things
like: qproperty-foo: 4; qproperty-bar: 5; where foo may affect bar worked by
chance - or not at all - depending on the hash function.

Change-Id: Ifb9813ee72842cefb278cbedb644f24b91113f3f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-03-12 01:50:20 +01:00
Jason McDonald
a4c0109e01 testlib: Improve formatting of QCOMPARE failure messages.
Make the various versions of the failure message align consistently so
that it's a little easier to compare the actual and expected values.  Of
course, the value won't align nicely unless the "actual" and "expected"
strings are the same length, but at least this commit makes that
consistent across all versions of the message.

Change-Id: If9ce231df3b5d279a06f6458fdb5da0aa4586068
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-12 01:50:20 +01:00
Glenn Watson
15c13b91e6 Add Q_IS_ENUM(), and provide as flag in QMetaType::typeFlags()
Add Q_IS_ENUM() macro to determine if a given type is an
enumeration. Use information from that in QMetaType::registerType()
to store whether custom registered metatypes are enums or not.
This information can then be accessed by calling
QMetaType::typeFlags(int type). This is used by the declarative
code to determine whether a custom type in a variant can be safely
cast to an integer, which is required to allow passing non-local
enums as signal/slot params.

Change-Id: I9733837f56af201fa3017b4a22b761437a3c0de4
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-11 23:58:39 +01:00
Jędrzej Nowacki
e3429f764b Crash fix in QMetaType::typeFlags.
The function is public, so it should validate input instead of crashing

Change-Id: Id67463b0b61ab74a76c1ede7f052bdbed37822b6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-11 22:04:21 +01:00
Friedemann Kleint
472cc7ac27 XCB: Implement native events for for windows.
Change-Id: Iacea1231b49ebe57da96f4012d3f314e1b037105
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-10 22:16:05 +01:00
Sergio Martins
d8e6350c16 Remove unneeded check.
It would have already crashed on
QOpenGLSharedResource(ctx->shareGroup()).

Change-Id: Ib68759457a0fa7e4417dcd30cc40fbabf3df232c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-10 22:16:05 +01:00
Martin Smith
11eed81ae9 qdoc3: qdoc user manual update
Changed \bold to \b, \i to \e, and \o to \li.

Task-number:  QTBUG-24578

Change-Id: If02517164f30f05436596224c1b1895a86d9e9f8
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-10 20:23:58 +01:00
Holger Hans Peter Freyther
bc3a6c75f8 byteorder: Fix compilation for MIPS and GCC < 4.6.
Use the pre-processor macros to detect the byte order. This is
how it is done for ARM and other platforms. Use the variant of
the macro with the most underscores to match our ARM detection.

Change-Id: I7d2b34bf45a7f3979b44a1fe2e95f678152a5dcd
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-10 15:37:01 +01:00
ABBAPOH
7a1a0fc76b Remove commented 'comment'
Change-Id: I996a34fb2dc91da8b68039b4bc797a255c99d2e0
Reviewed-by: David Faure <faure@kde.org>
2012-03-10 10:53:16 +01:00
ABBAPOH
bcf8c6984a Fix commas according to qt coding style
Change-Id: Ibf49f1c3d426917d1cfcb382c8ed2771d43d6e99
Reviewed-by: David Faure <faure@kde.org>
2012-03-10 10:52:55 +01:00
Kent Hansen
849b760c90 Revert "QNam: only init channels when needed."
This reverts commit ff25691d00.

The change broke qtdeclarative. Several autotests crash because
QHttpNetworkConnection::transparentProxy() calls proxy() on a
null socket.

Task-number: QTBUG-24717
Change-Id: I57e3ccf5d20683f59cf7450083d1fcb3fa1c40fe
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-03-09 22:37:18 +01:00
Rafael Roquetto
c50e5f321f Updated codecs.pri to reflect new QNX mkspec name
Change-Id: Icd4a9dd774991c2be180b885b3892ff85a3f8dc1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-09 18:50:52 +01:00
Holger Hans Peter Freyther
8b7ea1273d byteorder: Improve the implementation comments for auto-detect
Parts of the auto-detection is using __BYTE_ORDER__. This
pre-processor macro was added in GCC 4.6. Document that in
the auto-detection code. Remove the misleading error message
in qsysinfo.h.

Change-Id: I66430ba1c9a1cdf476889ae6d5f3ca476243e000
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-09 18:50:52 +01:00
Rafael Roquetto
8a15c41d36 Fixes wrong iconv_open call under QNX
The wrong macro logic was causing iconv_open to never be
called under QNX.

Change-Id: I3367872fc8440f87fb59667770acd06262aef723
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-09 18:50:52 +01:00
David Faure
816893d91d Fix some duplication between QGuiApplication and QApplication,
for the mouseButtons and keyboardModifiers vars and methods.
Implement queryKeyboardModifiers with a new virtual in
QPlatformIntegration.

Task-number: QTBUG-11243
Change-Id: I9e95841542ac61c73ff72d7682ad962ea8aada42
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-09 18:50:52 +01:00
Rafael Roquetto
657f634c0e Fixes mismatching delete operator
Change-Id: Ib6640daa0fdd12f98f9d7e257c226e0abdcf31dc
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-09 16:54:27 +01:00
Kevin Krammer
5368ad604c Use qt_safe_read to read from low-level file descriptor
Change-Id: I7c7bc379a423be4de471c5972cb98101c90bab8c
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-09 16:54:27 +01:00
Jon Trulson
c3b72e9c2f Start eventTime timer so that the .elapsed method will work.
QWindowSystemInterfacePrivate::eventTime.start() is never called,
resulting in all calls to
QWindowSystemInterfacePrivate::eventTime.elapsed() within
qwindowsysteminterface_qpa.cpp to return 0.  This could cause events
to be lost, such as mouse button press events from the evdevmouse
input plugin.

Change-Id: Iba9d23b51af80e8532d24ccf382e9077c06bb4be
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
2012-03-09 10:57:59 +01:00
Holger Hans Peter Freyther
bbc97c38d5 misc: Fix some random typos and grammar while reading code.
Typos:
recieve   -> receive
descrived -> describe

Grammar:
this types -> these types

Change-Id: Iedacc51a6322996f423ac9472af0a597424a4fed
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-09 07:18:34 +01:00
David Faure
e02c396acb Fix copy/paste error in QAbstractItemModel::insertRow docu.
This method is not virtual.

Change-Id: I1c82a63af07d7e78e7a572c0dfcfb2b82122d421
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-09 01:42:05 +01:00
Donald Carr
d26ef66a66 Remove widgets dependency from eglfs
eglfs uses the (old) OpenGL paint engine for paint operations. This drags in a
QWidget dependency and hence everything bar the kitchen sink. This change
gets eglfs buildable without widget support although anything which relies
on a QPaintDevice will end up rendering nothing to the screen. (Similar
to the QWS simplegl driver)

Change-Id: If7fcdb79038ef7568e771402fd1667bc0318ff5f
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-03-09 01:42:05 +01:00
ABBAPOH
5434295389 Remove calls for default constructors
Change-Id: Ib33013bed9e6b7bb9ef54c858da5cd61f35f2c41
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-09 01:42:05 +01:00
Martin Petersson
47a62485c0 Use SSL_MODE_RELEASE_BUFFERS in QSslSocket
If SSL_MODE_RELEASE_BUFFERS is available we should tell OpenSSL
to release memory early.
http://www.openssl.org/docs/ssl/SSL_CTX_set_mode.html

Task-number: QTBUG-14985
Change-Id: Ib6656ebb3c4d67ca868b317ee83ddbf0983953f9
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Markus Goetz <markus@woboq.com>
2012-03-09 01:42:05 +01:00
Pierre Rossi
7e53debcf2 Fix a performance regression with shouldLoadFontEngineForCharacter.
Calling FcFontMatch should be avoided as much as possible. We can simply
cache the patterns it returns, which should still save memory compared to
loading all font engines as we did before.

Change-Id: I67208a4f919338a948535f717cfd0139dbea2e5f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-08 23:52:34 +01:00
Rafael Roquetto
4ba895a863 Fix platforms.pro to match new qnx mkspec name
Change-Id: Ib159b519d11c9b88979f0f47b87801552586abc0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-08 23:52:34 +01:00
Yuchen Deng
9731607fb3 Build fix when use '-no-stl' option
error C2039: 'move' : is not a member of 'std'
error C3861: 'move': identifier not found

Change-Id: I40beb59f893a8969275154664c947889eb570c95
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-08 23:52:34 +01:00
Shane Kearns
3650ce5a85 Add debug stream operator for QNetworkProxy
Change-Id: Ib8e7ba041ede33dc9c751432e39be2d6a9f4662d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-08 23:52:34 +01:00
Rick Stockton
a0933f4d74 BlackBerry Plugin: support 8 mouse buttons, instead of just 3.
The mask of possible mouse buttons in QNX provides tracking for the
up/down State of up to 8 mouse buttons. This update adds support
for the 5 buttons which we previously ignored in Qt on this Platform.

Task-number: QTBUG-24682

Change-Id: I8c1d2b2a5d0deb3b857fb387c242c3792e21ff95
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-08 23:52:34 +01:00
Giuseppe D'Angelo
824cc94921 QRegularExpression: minor fix to captureIndexForName
Although passing a null pointer to pcre16_get_stringnumber for
the compiled pattern should simply make it error out, it's actually
an undocumented behaviour, so let's stay safe and add an explicit
check.

Tests for this codepath are added.

Change-Id: Ifd9c87874f6812ba487104ec1a5bbc83c3b16761
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-08 22:00:53 +01:00
Giuseppe D'Angelo
b543141992 QRegularExpression: improve JIT memory handling
PCRE's JIT uses by default 32K on the pcre_exec caller's stack. This
is fine for most situations, but in some cases (esp. patterns with
lot of recursion) more memory is required.

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

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

Change-Id: Ica5fb7d517068befff88ebb198a603a26ec5d8a7
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-08 22:00:47 +01:00
Friedemann Kleint
c35d65e27d Windows: Fix flag handling.
Fix a typo that caused a variable to be hidden such that
the Qt::WindowFlags were not used.

Change-Id: Iea4456b0cd4c968e0fbfdd53e5006ffee0298b24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-08 21:45:34 +01:00
Martin Petersson
4c0df9feb2 QtNetwork: blacklist two more certificates
The comodogate 72:03:21:05:c5:0c:08:57:3d:8e:a5:30:4e:fe:e8:b0
certificate is a test certificate and the MD5 Collisions was created
as a proof of concept deliberately made to be expired at the time
of it's creation.

Task-number: QTBUG-24654
Change-Id: Ic8eb417363569fe50bf19cd229658f5e371862f7
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-03-08 19:00:39 +01:00
Oswald Buddenhagen
adfcd98922 replace uses of QMAKE_INCDIR_QT and QMAKE_LIBDIR_QT with module-specific variables
Change-Id: Id410887fa97f345a229e0cbf395633ccf303fa2f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-08 18:57:56 +01:00
Oswald Buddenhagen
deea66c9f4 remove obviously counterproductive uses of QT_SOURCE_TREE & QT_BUILD_TREE
Change-Id: I77cf734b58f350d82277c084a680ab56fdf82f08
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-08 18:57:13 +01:00
Donald Carr
4035375c57 Remove legacy pre-QPA gui/egl implementation
Change-Id: I22a100cec7064df87eb2036adbca8a41aab5a10d
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-08 18:23:56 +01:00
Frederik Gladhorn
2a72e10ed9 QAccessibleEvent needs a virtual destructor.
Change-Id: Ia0cd82c5457d39fe501e7ee6b5468ccb0f62f35a
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-08 16:07:55 +01:00
Lars Knoll
3ca1a2c28e Defer window activation if the window hasn't beenn mapped yet.
Change-Id: I60d616fc60d3be9b55ab2599abadede5f7c11f93
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-08 16:06:59 +01:00
Lars Knoll
763790bb5c Fix a bug in the assignment operators for QJsonObject and Array
When objects or arrays where being used read only, several objects
can share the same d pointer, but will have different pointers into
the binary data. Correctly change the pointer into the binary
data even if the d-pointer is the same.

Change-Id: Ife0ea5ac5daf46586f855dccdf35b51ec696a623
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-08 16:06:48 +01:00
Jędrzej Nowacki
cf6dd5baca Crash fix in QMetaType::typeName.
The function is public, so it should validate input instead of crashing

Change-Id: Ifd9f1110f8631f942929d85db6a57eee7afffb6a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-08 16:04:02 +01:00
Jędrzej Nowacki
f71487da3a Fix crash in QVariant::canConvert.
The function was crashing when an unsupported type id was given
as an input argument.

Change-Id: I2b0e3e6d43f6f248dc71532f8e6485efe68e8120
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-08 16:03:52 +01:00
Giuseppe D'Angelo
84984af0e1 Remove usage of QtXml from rcc, add test
Ported from QDom to QXmlStreamReader. This enables removal of QtXml
classes from bootstrap.

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

Change-Id: I15d23dfda45de851a421156951ce2a60af4c1f7f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-03-08 09:59:31 +01:00
Jiang Jiang
7de046db73 Enablers for shared graphics cache in raster paint engine
Required changes for using shared graphics cache for distance field
raster glyph rendering. Most of the logic is in platform plugins.

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

Change-Id: Icf0a396e722e43b4caa2c1849aae38753cde38f1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-08 09:39:26 +01:00
Pierre Rossi
a44da8fc12 Remove dead code.
This logic was introduced as part of change I92dfb39289a359f49caa02c2caf8baf66098fb59
but isn't used anymore.

Change-Id: I5bcfea99a7a2993434e1e978195a70dae52d6cfa
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-08 09:36:31 +01:00
Jason McDonald
d78fab531a testlib: Make QTestResult::verify() more robust.
The statementStr parameter should always be non-null, so assert if it is
null.  The description parameter can be null in some cases (particularly
when the verify is successful, and thus no error description is going to
be displayed), so tolerate this.

Change-Id: I87b416d5f3b793bc608cd4aca14a4f7fe7527488
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-08 07:30:36 +01:00
Frederik Gladhorn
48209e21ec Add accessible role Desktop.
Another role that is mostly needed to make Qt based desktops accessible.
Would be nice to have for KDE's Plasma in the future.

Change-Id: I1d2ce9d55d677f73cc59f0a3646ee5e588c1d948
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
(cherry picked from commit edc6fae534835a2c72edffb52255fe522a37928f)
2012-03-08 07:28:21 +01:00
Frederik Gladhorn
b55ed97e79 Call updateAccessibility with the right index.
In Qt 4 index 0 was the widget itself.
With the cleanup of child index this now changed.
The default constructor uses -1 as parameter to signify that
the widget is the cause, not a child.

Change-Id: I329a1cc91bf2d1d1d8534739acbddfe107f40364
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-08 07:28:21 +01:00
Nick Ratelle
4560ea230f Fixes potential memory leak in qtextcodec.cpp
Change-Id: I56c0a1a6cc261bd15653bc4cbb94daed1f8aa811
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-03-08 07:28:21 +01:00
Jason McDonald
d81b065bb3 testlib: Improve verbose and XPASS output
Previously, verbose (-v2) and XPASS test output showed all QCOMPAREs as
"COMPARE()", making it impossible to see what was compared and difficult
to match the output to the source of a test containing many calls to
QCOMPARE.

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

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

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

Change-Id: I8baa46d5dd30e6c43b26f366c34dc5b64aab5f7c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-08 05:31:40 +01:00
Jason McDonald
0eb95222ac testlib: Document a known limitation of QFINDTESTDATA.
Change-Id: I72740e394bfe2a95f5b48566b29c9ef9200a8035
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-08 05:31:40 +01:00
Andy Shaw
46c5850263 Call wait() after calling quit() so that it can gracefully finish
There was a problem with slow https connections that if the download
was ongoing when quit() was called then it tended to cause a crash
because it tries to shutdown the SSL connection.

Task-number: QTBUG-24594
Change-Id: I6b161bc7a9bb99e41849537462de2d7c92661902
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-03-08 05:31:40 +01:00
Shane Kearns
4cc8209998 Windows - handle both auto detect proxy settings together
If both "automatically detect settings" and "use automatic configuration
script" are selected in internet options, then respect that.
Because of performance issues, these are tried separately, and
disabled if they fail.

Task-number: QTBUG-13957
Task-number: QTBUG-10238
Change-Id: Ibc824d3039afeaf12c5ea82ed95287e5cf4e1776
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-03-08 05:31:40 +01:00
Shane Kearns
ea92d02b6b Fix a number of bugs with windows system proxies
TcpServer requests always returned no proxy, even if socks was available
Tag handling was broken for empty tag (if system proxies were tagged)
Tag handling was broken for unknown tags - now handled the same as if
    no tag was given at all.
When there are different proxies for http and https, windows returns
the http proxy first. However we should prefer to use the https proxy
for general sockets, as it's more likely to support the CONNECT method.

Change-Id: I55dcadf2e142367e857f94e55fdbb0c4ddb513a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-03-08 05:31:40 +01:00
Shane Kearns
276f64d21d Windows - fall back on static proxy config if autoproxy fails
If both manual proxy settings are configured and the autodetect
setting is enabled, fall back on the manual configuration when
auto detection fails.

Task-number: QTBUG-10428
Change-Id: If008c7c967eec6256ce3c614fff0ec258190d451
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-03-08 05:31:40 +01:00
Shane Kearns
25c05ce3bb Windows - handle proxy autoconfiguration resulting in no proxy
The PAC file may result in direct connection, in which case
WinHttp returns null strings for the proxies and the connection
type marked as direct.
In this case, return the default list (no proxy)

Change-Id: I601033f56a841bb92ea80a28174bb993b024ad79
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-08 05:31:40 +01:00
Shane Kearns
a7489b2ba3 Windows - fix proxy types for manually specified proxies
When the windows internet options are used to specify a
different proxy for each protocol, assume the proxy server type
matches that protocol too.
e.g. "socks=qt-test-server:1080" is both tagged for socks, and
assumed to be a socks server.
"ftp=qt-test-server:2121" is assumed to be an ftp proxy
"ftp=http://qt-test-server:3128" is overridden to be a http proxy
used for ftp.

Task-number: QTBUG-10502
Change-Id: I70615c89d6ede53f0e7d62e6d0754b90d042aa2e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-08 05:31:40 +01:00
Sean Harmer
fd4c61c75e Allow compilation of 3rdparty/pcre on QNX
Change-Id: If9a56d5e042c8da9626feab377388e9bfc22b129
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-08 05:31:40 +01:00
Frederik Gladhorn
e2f8cdf9a6 Fix typo: remember not remembet
Change-Id: I6e3bc6a233e7ec8ba94ecaeeafc730b18dd32f02
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-08 05:31:40 +01:00
Lars Knoll
448a3cfe17 Move qdoc into qtbase and bootstrap it
We need qdoc in qtbase to be able to properly
modularize our documentation and build it
when building the different Qt modules.

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

Change-Id: I9f748459382a11cf5d5153d1ee611d7a5d3f4ac1
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-08 05:31:40 +01:00
Friedemann Kleint
b319d44798 QCursor: Associate cursor with screen.
- Introduce cursor() accessor to QPlatformScreen.
- Remove screen member of QPlatformCursor (a
  cursor can be shared by multiple screens
  of a virtual desktop).
- Add QCursor::pos()/ QCursor::setPos() taking
  a QScreen-parameter, use primaryScreen() for
  old overloads.  QCursor::pos() can then query
  the platform cursor for the position and return
  the position even if the mouse position is outside
  the windows owned by the Qt application.
- Fix tests

Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>

Task-number: QTBUG-22457
Task-number: QTBUG-22565
Task-number: QTBUG-20753
Change-Id: Ia69f37343f95772e934eab1cd806bd54cbdbbe51
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-07 22:43:43 +01:00
Debao Zhang
b7915a4d0d Fix dockwidgets behavior when window resized or central widgets is set.
When adding and showing a central widget in a QMainWindow then the
layout does not respect the size policy of the central widget.

This is a side effect of 059be19781a22d2e41f22072152589857d0fabf9

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

Task-number: QTBUG-15689
Change-Id: Idfccb7b4ae057a99f431c2ed54e3b9fcfb6ef54c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-07 19:52:27 +01:00
Giuseppe D'Angelo
eb70933398 QRegularExpression: add optimizations autotest
Exporting the counter that controls the optimization of a compiled
pattern lets us to forcibly optimize all patterns. Therefore,
two tests are now run: one with default optimization values
and another one which always optimizes the pattern.

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

Change-Id: I56602433d37adc127772b2d0d2cdaf2e49d43c71
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-07 19:18:22 +01:00
Debao Zhang
3bb9024952 QWidget: fix wrong mouse behavior
Widgets will receive extra mouse press events when double clicked. This
is a side effect of change Id Ief6af12c666b23e544da4a68cb835cd577265469
which has partially fixed the folowing bug.

Task-number:QTBUG-24649
Change-Id: I030ac6ba641050d40ac8989720a1c261ab15f849
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-07 16:38:08 +01:00
Miikka Heikkinen
7bc576771d Fix sending simulated keyboard events to popup widgets
Popup widgets steal the keyboard grab stealthily without it being
visible via QWidget::keyboardGrabber(). To more accurately simulate a
real keyboard event, prioritize sending simulated keyboard events to
the active popup widget over QGuiApplication::focusWindow().

Task-number: QTBUG-24326
Change-Id: Id7a75c613d934e24657b521f1684ce7cce92556a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-03-07 16:37:55 +01:00
Miikka Heikkinen
83d113feb0 Windows: Fix override cursor logic
Fixed a logic error that prevented override cursors being applied in
Windows plugin. The logic for override cursor handling is already
in crossplatform code, so no need to do extra checks in plugin.

Task-number: QTBUG-24657
Change-Id: Ied9b36b57f22607ef5bb5c30f2926b0053eebca5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-07 16:37:42 +01:00
Friedemann Kleint
24be238fcc Cocoa: Implement Drag-and-Drop.
Implement drag and drop support for drags originating
from outside Qt. Port mime and pasteboard code from
Qt 4. Use QSimpleDrag from from platform support to
implement internal Qt drags.

Change-Id: I5b664a95ebb00f48de2bd21c24dfb579af16123e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-07 16:37:24 +01:00
Olivier Goffart
5713dde8a1 Fix deadlock in QPropertyAnimation
Commit 1e6514a714 changed the mutex from
recursive to non-recursive, which could introduce dead lock if the
animation starts other animation (This is the case in QMainWindow
layouts)

Change-Id: I1b149b78a802748eb24b5700fffeca0b8555f005
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-07 12:48:49 +01:00
Friedemann Kleint
83cabda862 Add fonts to QPlatformTheme.
- Remove QPlatformFontDatabase::defaultFonts() returning
  a hash containing widget name ->font and the Windows
  implementation.
- Add enumeration and font accessor to QPlatformTheme. The value
  returned for the enumeration value overwrites the default font
  of the font database.
- Implement for Windows, Mac and KDE.
- Add more Windows palettes.

Task-number: QTBUG-23686

Change-Id: I8a2abdfd216df23daa7c9630c54264cdf61295db
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-07 12:43:32 +01:00
Jędrzej Nowacki
7439fb47cd Add nicer error message in qMetaTypeId function.
The function can be used only with a registered type and it would fail
to compile for other types. By adding the static assert we can print
an almost user friendly compilation error message.

Change-Id: I59ab148cabf32afe0baef186b82cb03303b57780
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-03-07 12:31:46 +01:00
Eskil Abrahamsen Blomfeldt
3d6901066a Fix support for scripts that require OpenType
We need to load OpenType tables when initializing fonts for
scripts that require them. This fixes support for many Brahmic
scripts.

Change-Id: Ib5e50f2c7e5edb4b3e3ecf9fd004f2cf62634add
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-07 09:55:26 +01:00
Mark Brand
79c0d9adbe QSqlTableModel::selectRow(): complete documentation
Mention in changes and document Qt version (merci à dfaure).
Follow-up to 291e2c7d54.

Change-Id: Ie5626e9cd268812c1173ca494ccd8d6bd9be2687
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-03-07 09:33:44 +01:00
Andy Shaw
678ab52ccb Improve type detection for query results
When an aggregate function is used for a column in a SQL resultset then
it should ensure that the right data type is reported for that column.
This also concerns expressions when the returned column does not map
directly to a table column.

Test included for this.

Task-number: QTBUG-22038
Change-Id: I07487694c0ed393d46af06e232914fe923356a99
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-03-07 07:26:37 +01:00
Sarah Smith
3ae2dce911 Compile with -qtnamespace
Mac has to work with -qtnamespace as well, and other files have gotten
this right, so follow their example.

Change-Id: I551e1843e8a0e82a82d1d5ea8c8cd5f20e6880fa
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-07 02:02:50 +01:00
Giuseppe D'Angelo
a47d974e19 QRegularExpression: fix optimizePattern, document the issue
The studyData pointer is atomically set by the pointer assignment,
but another processor running a different thread might see the
new studyData value but not the memory it points to.

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

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

Change-Id: I4502c336077bb98a1751011aa93ffd4f585ed101
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-07 02:02:50 +01:00
Donald Carr
484e2923b4 Query udev build parameters from pkg-config
Change-Id: Ia3b7329d7359684ee7bf572a7e5fb681105108f4
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-07 00:10:09 +01:00