profile/ivi/qtbase.git
12 years agoAdapt Maliit input context to new input method interfaces
Pekka Vuorela [Thu, 29 Mar 2012 13:40:10 +0000 (16:40 +0300)]
Adapt Maliit input context to new input method interfaces

Change-Id: Ia395dbb1689d1c37ef588c49cbb55ad1979f532f
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoRename offset() to setOffset()
Thomas McGuire [Mon, 2 Apr 2012 11:37:12 +0000 (13:37 +0200)]
Rename offset() to setOffset()

Change-Id: Iacf7b0a7f3cb3745711fe646e14317be1711d891
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoFix adding and removing of windows to their screen
Thomas McGuire [Mon, 2 Apr 2012 10:04:53 +0000 (12:04 +0200)]
Fix adding and removing of windows to their screen

Change-Id: I5e0edf1515db60689c86b16b978863ae9e49bfdb
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoGet rid of false positive warning when stopping video playback
Thomas McGuire [Mon, 2 Apr 2012 09:19:05 +0000 (11:19 +0200)]
Get rid of false positive warning when stopping video playback

The multimedia library actually creates two windows, and therefore the
first call to updateHierarchy() would try to update the z-order of
a no longer existing window.

Change-Id: I499d049e2885ff848f38d9cc5880aa63235b1b4c
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoFix indentation
Thomas McGuire [Thu, 29 Mar 2012 15:05:14 +0000 (17:05 +0200)]
Fix indentation

Change-Id: I965e7ba2e20798966a8215427e6724e3666aaeea
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoFix release mode warnings about unused variables.
Friedemann Kleint [Tue, 3 Apr 2012 07:43:34 +0000 (09:43 +0200)]
Fix release mode warnings about unused variables.

Variables that are only used in asserts.

Change-Id: I0984b676ad9b67f5ae72266b8540e8054163918f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQDoc documentation: modified the instructions for documenting signals.
Jerome Pasion [Tue, 3 Apr 2012 08:50:43 +0000 (10:50 +0200)]
QDoc documentation: modified the instructions for documenting signals.

-we document signals, not signal handlers.

Change-Id: I7d52223a393ff0530ead06dfb8a80479e34fd362
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoDon't suppress using separate debug info when cross compiling
Donald Carr [Fri, 30 Mar 2012 18:20:34 +0000 (18:20 +0000)]
Don't suppress using separate debug info when cross compiling

The configure script currently automatically assumes that if you are cross
compiling, we should avoid trying to generate and strip separate debug
information due to toolchain limitations.

Historically there may have been good grounds for this, but it seems like
an aggressively pessimistic assumption which ignores the
standardization/advancement of embedded toolchains as a whole.

This assumption also extends to host compilers which deviate from the
automatically detected "platform" compiler, such as Clang.

Change-Id: Ifed2750325178bb5291d8ca1dde92925bfa36065
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRename clip() to clipData() to avoid confusion and warning
Jiang Jiang [Fri, 30 Mar 2012 13:01:12 +0000 (15:01 +0200)]
Rename clip() to clipData() to avoid confusion and warning

There are already a bunch of clip() functions in this class.
Rename the one for returning clip data to clipData() to make
it clearer. It also eliminate a warning when compiling with
clang.

Change-Id: I1f890ad6bf1c0274a0b38b3116a3ec3d2957d44a
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoPrepare category logging for Qt integration
Wolfgang Beck [Mon, 16 Jan 2012 07:45:23 +0000 (17:45 +1000)]
Prepare category logging for Qt integration

Change-Id: I0c784a945fe87d7ba52a44f5c7246de1709ae888
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Reviewed-by: Peter Yard <peter.yard@nokia.com>
Reviewed-by: Alex <alex.blasche@nokia.com>
12 years agoadd change log entry for QTBUG-23895
Mark Brand [Mon, 2 Apr 2012 20:13:11 +0000 (22:13 +0200)]
add change log entry for QTBUG-23895

Follow-up to 50ad785bdd38fcff9c47125fc545762435aaa158

Change-Id: Ib44a274148631fe96e13b8fe29436b556c14d34d
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
12 years agoWindows: Improve Freetype font database registry check for fonts
Miikka Heikkinen [Fri, 30 Mar 2012 11:51:42 +0000 (14:51 +0300)]
Windows: Improve Freetype font database registry check for fonts

Some non-scalable fonts like "Courier" list some numbers after the font
name in Windows registry, e.g. "Courier 10,12,15". These are not part
of the font name and therefore confused the algorithm looking for font
files. Improved the algorithm to ignore this kind of number list.
Single numbers are still expected to be part of the font name.

Task-number: QTBUG-24970
Change-Id: I3fe45b798f44bee962e5b3aa748fc4717f723353
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoReturn early in QRawFont::setPixelSize.
Pierre Rossi [Fri, 30 Mar 2012 20:33:05 +0000 (22:33 +0200)]
Return early in QRawFont::setPixelSize.

We would otherwise end up cloning the font engine for absolutely no
reason when the pixel size is already right.

Change-Id: I8c34d2b53b596ad49d00031a3fb8e79f3b30d591
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoeglfs: delete screen on exit
Girish Ramakrishnan [Mon, 2 Apr 2012 21:34:36 +0000 (14:34 -0700)]
eglfs: delete screen on exit

Delete the screen when the integration gets deleted. The screen destructor
destroys the window surface and terminates the egl connection. Note that the
egl context is not destroyed since it is managed by QOpenGLContext.

Change-Id: Ifb91c20edb6d5db684c37fb84d5ff40436f40925
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoeglfs: Fix header guards
Girish Ramakrishnan [Mon, 2 Apr 2012 20:41:18 +0000 (13:41 -0700)]
eglfs: Fix header guards

Match the filename and the header guard defines.

Change-Id: Id9f795ae8522e574d63115a43b62b9ee4ba33005
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoDocument QFile::rename and QDir::rename's copy operation
Vincent A [Tue, 27 Mar 2012 21:02:22 +0000 (23:02 +0200)]
Document QFile::rename and QDir::rename's copy operation

Change-Id: Ie81804f77510cfb73917332c8faaf921525fc26e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove duplicated template code.
Jędrzej Nowacki [Fri, 23 Mar 2012 16:14:52 +0000 (17:14 +0100)]
Remove duplicated template code.

Unify TypeDefinitions specializations. I'm not aware of any reason why
QVariant should have a separate set of supported types during
bootstrapping phase. It would cause only crashes.

As a side effect the patch reduces size of core and gui libraries.

Change-Id: I5140d9d3daee39a0171bc718bf46dab6b28085ec
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoDon't use qstrlen if string is not null
João Abecasis [Fri, 30 Mar 2012 23:27:27 +0000 (01:27 +0200)]
Don't use qstrlen if string is not null

Change-Id: I4f9aec21af2ce24a1d27c6d140764e371bce5017
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agofix typo in change log
Mark Brand [Mon, 2 Apr 2012 20:02:31 +0000 (22:02 +0200)]
fix typo in change log

Change-Id: Id7c3cab500fb3f41fbced5a4012dc0ae5d108192
Reviewed-by: Debao Zhang <dbzhang800@gmail.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoConvert Boolean value into integer
Honglei Zhang [Wed, 7 Mar 2012 10:02:02 +0000 (12:02 +0200)]
Convert Boolean value into integer

According to documentation, SQLite doesn't have a separate Boolean
storage class. Instead, values are stored as integers 0(false) and
1(true). In QSqlQuery::bindValue(), if a boolean value is bound
to a placeholder, it is converted to text true and false. This fix
converts boolean value to integer 0 and 1.

Task-number: QTBUG-23895
Change-Id: I4945971172f0b5e5819446700390033a1a4ce301
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoUse the relevant "\since 5.0" entry (proposed to public since 5.0)
Laszlo Papp [Mon, 2 Apr 2012 19:20:17 +0000 (22:20 +0300)]
Use the relevant "\since 5.0" entry (proposed to public since 5.0)

Change-Id: I189166aeca8875401029128733401bf830d9ee71
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQSqlDriver functions made virtual
Matt Newell [Thu, 22 Mar 2012 20:27:26 +0000 (13:27 -0700)]
QSqlDriver functions made virtual

Certain QSqlDriver functions were marked to be made virtual in Qt5.
subscribeToNotification, unsubscribeFromNotification,
subscribedToNotifications, isIdentifierEscaped, and stripDelimiters.

This patch makes them virtual and removes the no longer needed
Implementation counterpart functions. It also updates the relevant
drivers. This patch has no regressions on the tests in
tests/auto/sql/kernel/, tested with sqlite and postgres.

Change-Id: Ia2e1c18dfb803531523a456eb4e710031048e594
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoAdd a native interface with the possibility to query the window group
Thomas McGuire [Thu, 29 Mar 2012 14:30:19 +0000 (16:30 +0200)]
Add a native interface with the possibility to query the window group

This is needed for QtMultimedia, as it uses the native mmrenderer API
which expects to get passed the window group when creating a video
overlay window.

Change-Id: I07d790e6e20714741c04917068b41b71b8939fa4
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
12 years agoDeprecate QItemSelectionModel::intersect().
Stephen Kelly [Mon, 2 Apr 2012 14:08:15 +0000 (16:08 +0200)]
Deprecate QItemSelectionModel::intersect().

It is already obsolete since the beginning of time (Qt 4.5).

Change-Id: Ia2f9d934f0c0bd2038d693a29d1315867a526dfe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoAdapt QNX platform input contexts to QGuiApplication::focusObject()
Pekka Vuorela [Thu, 29 Mar 2012 13:21:52 +0000 (16:21 +0300)]
Adapt QNX platform input contexts to QGuiApplication::focusObject()

Change-Id: I4c5028f76b52e3838231eff2a599e85347c16598
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoQUuid: mark as Q_PRIMITIVE_TYPE
Marc Mutz [Tue, 27 Mar 2012 08:08:12 +0000 (10:08 +0200)]
QUuid: mark as Q_PRIMITIVE_TYPE

Commit 01674860ac85a42eb152092c6e99f7ad03346977 marked
QUuid as Q_MOVABLE_TYPE, but it's even primitive:
Every bit pattern represents a valid QUuid object (if
not a valid UUID), and memcpy() can be used to obtain
a valid, independent copy of the object.

It might not be a POD, but its close enough.

Change-Id: I0fd2d11472590688a91e9ee424732e4d5ba15df8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
12 years agoFix MSVC warnings in tests.
Friedemann Kleint [Mon, 2 Apr 2012 12:22:04 +0000 (14:22 +0200)]
Fix MSVC warnings in tests.

- Unused variables
- conversion truncations
- Overflow in expressions like '-1 + sizeof()'

Change-Id: Ibbd18497951e9e7e9dccaf596cb4e864b69ec02c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoAdd support for PUT & POST to qget test
Shane Kearns [Thu, 22 Mar 2012 16:24:17 +0000 (16:24 +0000)]
Add support for PUT & POST to qget test

Due to some bugs that are not reproducable with a normal HTTP GET
This patch also adds the option to process multiple URLs
serially (using application level queuing) rather than the default
parallel (using QNetworkAccessManager queuing on 6 TCP connections)
& renames the authentication command line options to match wget.

Change-Id: I10915feb3bba23abbd7a72f9844c03f347f9bff5
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agoChange fatal exit in QPlatformFontDatabase to a warning.
Friedemann Kleint [Mon, 2 Apr 2012 09:41:28 +0000 (11:41 +0200)]
Change fatal exit in QPlatformFontDatabase to a warning.

Only warn if the folder containing the qpf2 files is not found.
The code path is triggered by the QPA 'minimal' plugin.

Change-Id: I12a32001ce867096627033b1d5fb894cab163853
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoCalculate correct bounding rect for glyph runs in QTextLayout
Eskil Abrahamsen Blomfeldt [Mon, 2 Apr 2012 13:07:55 +0000 (15:07 +0200)]
Calculate correct bounding rect for glyph runs in QTextLayout

The positions returned by getGlyphPositions() in QFontEngine are
for the base line of the glyphs. We offset this by -ascent to get
the top of the actual bounding rect.

Task-number: QTBUG-22919
Change-Id: Id82c66ecfbdf58064f5ad26f4193fa55ac26bc7c
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoQNAM: close the channel if bytesAvailable and nothing piplined
Martin Petersson [Mon, 26 Mar 2012 09:49:55 +0000 (11:49 +0200)]
QNAM: close the channel if bytesAvailable and nothing piplined

If there are still bytesAvailable on the socket and we have
nothing pipelined we should close the channel. This was not
done before as the chunked decoder did not read the last
CRLF. This has now been fixed so this close should be enabled
again.

Task-number: QTBUG-24875
Change-Id: I115b60f8d78bf1b83d3fd5887ab3eb9940b6bf00
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoRemove redundant virtual method reimplementations from QToolBar.
Jason McDonald [Mon, 2 Apr 2012 12:53:43 +0000 (22:53 +1000)]
Remove redundant virtual method reimplementations from QToolBar.

Task-number: QTBUG-23524
Change-Id: Ib682d2e2c2ea1078524e2c90cdb10bfec113d259
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove unused dummy vars from print preview widgets.
Jason McDonald [Mon, 2 Apr 2012 12:26:12 +0000 (22:26 +1000)]
Remove unused dummy vars from print preview widgets.

These were private, so there are no source-compatibility implications.

Task-number: QTBUG-23524
Change-Id: I967941f0165ddda657bf1e1ac59b4bf5f2ce184f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoqdoc: Don't lower case <shortdesc> in DITA.
Martin Smith [Mon, 2 Apr 2012 12:51:22 +0000 (14:51 +0200)]
qdoc: Don't lower case <shortdesc> in DITA.

The first letter of a short description no longer has a
lower case letter.

Change-Id: I98f04d2feba070a0a77161316773306386cc6b67
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoIntroduce QArrayDataPointer::needsDetach
João Abecasis [Thu, 16 Feb 2012 22:28:30 +0000 (23:28 +0100)]
Introduce QArrayDataPointer::needsDetach

While QArrayDataPointer offers generic detach() functionality, this is
only useful for operations that may modify data, but don't otherwise
affect the container itself, such as non-const iteration, front() and
back().

For other modifying operations, users of the API typically need to
decide whether a detach is needed based on QArrayData's requirements
(is data mutable? is it currently shared?) and its own (do we have
spare capacity for growth?).

Now that data may be shared, static or otherwise immutable (e.g.,
fromRawData) it no longer suffices to check the ref-count for
isShared().

This commit adds needsDetach() which, from the point-of-view of
QArrayData(Pointer), answers the question: 'Can contained data and
associated metadata be changed?'.

This fixes QArrayDataPointer::setSharable for static data (e.g.,
Q_ARRAY_LITERAL), previously it only catered to shared_null.
SimpleVector is also fixed since it wasn't checking Mutability and it
needs to because it supports fromRawData().

Change-Id: I3c7f9c85c83dfd02333762852fa456208e96d5ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoIntroduce QArrayDataOps::truncate
João Abecasis [Thu, 16 Feb 2012 22:27:44 +0000 (23:27 +0100)]
Introduce QArrayDataOps::truncate

This enables a truncating resize() to be implemented. It is similar to
destroyAll(), but updates the size() as it goes, so it is safe to use
outside a container's destructor (and doesn't necessarily destroy all
elements).

The appendInitialize test was repurposed and now doubles as an
additional test for QArrayDataOps as well as exercising SimpleVector's
resize().

Change-Id: Iee94a685c9ea436c6af5b1b77486734a38c49ca1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoIntroduce QArrayData::detachCapacity
João Abecasis [Mon, 5 Mar 2012 16:43:34 +0000 (17:43 +0100)]
Introduce QArrayData::detachCapacity

This follows QArrayData::detachFlags's lead. Given the (known) size for
a detached container, the function helps determine capacity, ensuring
the capacityReserved flag is respected.

This further helps aggregating behaviour on detach in QArrayData itself.

SimpleVector was previously using qMax(capacity(), newSize), but there's
no reason to pin the previous capacity value if reserve() wasn't
requested. It now uses detachCapacity().

Change-Id: Ide2d99ea7ecd2cd98ae4c1aa397b4475d09c8485
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoIntroduce QArrayDataOps::appendInitialize
João Abecasis [Thu, 16 Feb 2012 22:27:07 +0000 (23:27 +0100)]
Introduce QArrayDataOps::appendInitialize

Adds given number of default-initialized elements at end of array. For
POD types, initialization is reduced to a single memset call. Other
types get default constructed in place.

As part of adding a test for the new functionality the arrayOps test was
extended to verify objects are being constructed and assigned as
desired.

Change-Id: I9fb2afe0d92667e76993313fcd370fe129d72b90
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdapt windows input context to QGuiApplication::focusObject()
Pekka Vuorela [Thu, 29 Mar 2012 13:22:54 +0000 (16:22 +0300)]
Adapt windows input context to QGuiApplication::focusObject()

Change-Id: I8c18814d705b456d3285d7a5f2e1e0849af99b70
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQTBUG-24936: Ensure alpha cache is cleared when printing to PDF.
Tarja Sundqvist [Wed, 28 Mar 2012 10:32:10 +0000 (13:32 +0300)]
QTBUG-24936: Ensure alpha cache is cleared when printing to PDF.

Added 'd->alphaCache.clear();' to qtbase/src/gui/painting/qpdf.cpp since
also the alpha cache needs to cleared when printing to PDF.

Task-number: QTBUG-24936
Change-Id: I12c41a98f4bd54c154fa47acebe0421e9a38a3ec
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix a crash in cursorToX() when new block is added
Jiang Jiang [Mon, 2 Apr 2012 10:32:05 +0000 (12:32 +0200)]
Fix a crash in cursorToX() when new block is added

When an empty new block is being added, the layoutData->memory data
will be 0, thus QTextEngine::attributes() will return 0. We should
only access the attributes pointer when some text actually exist.

Task-number: QTBUG-24718
(cherry picked from commit cac12f4592477d99ef6fffaad40345bf85ef53b5)

Change-Id: I203b283dd28653d4b57ba8bfffb259c773f67f19
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoRemove qdoc for obsolete methods of QSet.
Jason McDonald [Sun, 1 Apr 2012 12:14:58 +0000 (22:14 +1000)]
Remove qdoc for obsolete methods of QSet.

The documentation related to functions removed in commit
bb5ae21c417b0c2571f3d5c1025758eaec2c380e.

Change-Id: I2412c02b26a64ee22d700b0dca2945b24f1b3f61
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoQAbstractSocket::waitForConnected check if host name is an IP address
Martin Petersson [Fri, 30 Mar 2012 11:07:33 +0000 (13:07 +0200)]
QAbstractSocket::waitForConnected check if host name is an IP address

If the current host name is an ip address we can create the QHostInfo
directly instead of performing a reverse lookup.

Task-number: QTBUG-18881
Change-Id: If239481e455f4f7fb74d978f685dc5d8e9f22c0a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoFix QTcpServer::listen() returning true when the port is in use on OS X.
Robin Burchell [Fri, 30 Mar 2012 19:21:40 +0000 (21:21 +0200)]
Fix QTcpServer::listen() returning true when the port is in use on OS X.

Way back in the mists of time, someone added SO_REUSEPORT to socket binding,
which was great, because otherwise it meant that multiple UDP sockets couldn't
share the same port on OS X (as platforms with SO_REUSEPORT apparently don't
support rebinding with SO_REUSEADDR).

However: SO_REUSEPORT also means that *any* bind on a port will succeed, which
is most definitely not wanted in the case of TCP sockets, so check the socket
type before performing the actual bind.

Also test that multiple listens don't take effect.

Change-Id: I2f8d450bcfb8a7f3abd8918a4e789a850281dd13
Done-with: Thiago Macieira
Done-with: Shane Kearns
Task-number: QTBUG-6305
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoHarfbuzz-thai - fix buffer overflow when setting item attributes
John Tapsell [Wed, 14 Mar 2012 15:49:07 +0000 (15:49 +0000)]
Harfbuzz-thai - fix buffer overflow when setting item attributes

Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Change-Id: I92de853b57e2e06211193a2b30ac7c308374c961
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoAdd missing include on 32-bit builds
João Abecasis [Mon, 2 Apr 2012 09:39:57 +0000 (11:39 +0200)]
Add missing include on 32-bit builds

Commit cc3ff3c1 introduced uncoditional use of _BitScanForward on
Windows, so adapt include conditions to match use of function.

Change-Id: I46ea4212ea3a01d9c4ecb19377b21e9b0f16e179
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix multicast join/leave when binding to QHostAddress::Any.
Robin Burchell [Fri, 30 Mar 2012 14:23:24 +0000 (16:23 +0200)]
Fix multicast join/leave when binding to QHostAddress::Any.

On OS X and Windows, this was not working, because the socket was being bound
in v6 mode (due to ::Any being for dual mode), but the address passed was a v4
address, meaning it took the wrong codepath. Linux, strangely, apparently works
anyway.

This is fixable in OS X (by using the v6 join path when bound in v6/dual mode),
but the same fix doesn't work on Windows, failing with WSAEADDRNOTAVAIL.

Don't allow this behaviour, and provide a sane error message telling the user
what to do instead.

Done-with: Shane Kearns
Task-number: QTBUG-25047
Change-Id: Iaf5bbee82e13ac92e11b60c558f5af9ce26f474b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoFix build all failed for 'TEMPLATE = aux'
Yuchen Deng [Mon, 2 Apr 2012 03:40:58 +0000 (11:40 +0800)]
Fix build all failed for 'TEMPLATE = aux'

NMAKE : fatal error U1073: don't know how to make 'all'
Stop.

Change-Id: I387a417d37e38811706a1ff460df8ee581c6a33f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoqdoc: Add the \hr command
Martin Smith [Mon, 2 Apr 2012 10:17:06 +0000 (12:17 +0200)]
qdoc: Add the \hr command

Now you can out put a horizontal line
anywhere in your text.

Change-Id: I9b8bbbd6aa312e8386fb1a3b165876d76057f784
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoqdoc: Allow documenting a C++ class as a QML type.
Martin Smith [Fri, 30 Mar 2012 11:43:46 +0000 (13:43 +0200)]
qdoc: Allow documenting a C++ class as a QML type.

Now qdoc can handle the case where a C++ class is
documented as a QML type of the same name, or as
both a C++ class and a QML type of the same name.

And collisions pages are created for both the HTML
and the DITA XML output. A collision page is created
when two items have the same name. The collision
pages will be augmented later to include the list
of pages where ambiguous links to one of the items
listed on the collision page are actually located,
so the writer can go back to those links and add
the appropriate qualifier.

Change-Id: I5a9632b2d2209e0784392047056bed8962005624
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoLogging: Make sure documentation shows up
Kai Koehne [Mon, 2 Apr 2012 10:17:28 +0000 (12:17 +0200)]
Logging: Make sure documentation shows up

Move the documentation for qDebug, qWarning, qCritical, qFatal,
QMessageHandler, QtMsgHandler, qtInstallMsgHandler,
qInstallMessageHandler from qlogging.cpp to qglobal.cpp. For some
reason it's not picked up from qlogging.cpp otherwise.

Also, tweak the output so that e.g. qDebug and friends are correctly
listed as macros.

Change-Id: I8cabf04bae0e8ae9a31a40ebe2d3272c3a33653b
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoImprove documentation for QMessageLogger
Kai Koehne [Mon, 2 Apr 2012 08:26:42 +0000 (10:26 +0200)]
Improve documentation for QMessageLogger

Change-Id: I6c52b74b9fa0d894492f335e2f303f927ee6307b
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoDocument preedit details on QTextLayout
Pekka Vuorela [Tue, 28 Feb 2012 15:41:40 +0000 (17:41 +0200)]
Document preedit details on QTextLayout

Change-Id: Ic73f6d2c748b2ac02b1a8b8c0b00721793557cfd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agodevice: Add device support for the Broadcom 97425 platform
Holger Hans Peter Freyther [Wed, 7 Mar 2012 13:42:32 +0000 (14:42 +0100)]
device: Add device support for the Broadcom 97425 platform

Add mkspec for the Broadcom 97425 platform using the new device.pri
support. This allows to build Qt with the application libraries provided
by Broadcom.

Change-Id: Icad442be5da071e4f936e41236d4136234c5d16f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoSet QNetworkInterface::IsPointToPoint on Windows
Martin Petersson [Fri, 30 Mar 2012 11:19:28 +0000 (13:19 +0200)]
Set QNetworkInterface::IsPointToPoint on Windows

This was never set on Windows Xp or later as we only checked for this
in the old interfaceListingWin2K() function.

Task-number: QTBUG-10170
Change-Id: Ib0808a945d9d1b31019967a69e668ec216702799
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove extra lines in mimetypes
ABBAPOH [Sun, 1 Apr 2012 18:01:50 +0000 (22:01 +0400)]
Remove extra lines in mimetypes

Change-Id: Ic7ec295b2a0b23a21f44f880f29df13503f8ef3a
Reviewed-by: David Faure <faure@kde.org>
12 years agoRemove QMimeTypeParserBase from doc
ABBAPOH [Sun, 1 Apr 2012 17:46:48 +0000 (21:46 +0400)]
Remove QMimeTypeParserBase from doc

Change-Id: I64d6b4f3209316e28bddb98f221a2c5a45e3e3d0
Reviewed-by: David Faure <faure@kde.org>
12 years agoFix wrong method signature in documentation
ABBAPOH [Sun, 1 Apr 2012 17:31:18 +0000 (21:31 +0400)]
Fix wrong method signature in documentation

Change-Id: Ib1b4ce93e8d584e07e69253231c3c993627f00db
Reviewed-by: David Faure <faure@kde.org>
12 years agoAdded some convenience API for platform input contexts
Pekka Vuorela [Thu, 23 Feb 2012 13:57:14 +0000 (15:57 +0200)]
Added some convenience API for platform input contexts

QPlatformInputContext now gets notified on changed focus and
has inputMethodAccepted() telling whether current focus object
accepts input method events.

Also adapted IBus plugin to use this. Key event filtering for
focused objects without input method support got fixed by the
change.

Change-Id: I6910aa6af2459d752a5763f0ae88fa8c34e5b165
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoTestability for password mask delay
Pekka Vuorela [Fri, 16 Mar 2012 12:08:13 +0000 (14:08 +0200)]
Testability for password mask delay

Unit test to override mask delay value so running it is not dependent
on platform style hint.

Change-Id: Ic5cc12d32cf97e64729b3af54250bdc05c0c95ad
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoFix platforms.pro scope to match all QNX platforms
Rafael Roquetto [Thu, 29 Mar 2012 13:48:37 +0000 (15:48 +0200)]
Fix platforms.pro scope to match all QNX platforms

Change-Id: I4d8963bcdf91482cff9938df583178ac493b4b09
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQNetworkAccessFtpBackend: remove entry from QNetworkAccessCache
Martin Petersson [Tue, 27 Mar 2012 15:14:24 +0000 (17:14 +0200)]
QNetworkAccessFtpBackend: remove entry from QNetworkAccessCache

When FTP login fails we fail to remove the entry from the cache.
This is because the cache key is created from the url with the
userInfo. So this needs to be set again to match the key used
when inserted.

Task-number: QTBUG-11824
Change-Id: Ib3fd2d737581653ae59c56d0810d42e2d8dc2176
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoQDoc: Fix assert and remove duplicate description.
Casper van Donderen [Fri, 30 Mar 2012 10:48:46 +0000 (12:48 +0200)]
QDoc: Fix assert and remove duplicate description.

Change-Id: Idac8488c1a2ba8cabe584244a0ea9a824a31cd65
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoFix inputMask accessor of QLineControl.
Friedemann Kleint [Fri, 23 Mar 2012 12:48:02 +0000 (13:48 +0100)]
Fix inputMask accessor of QLineControl.

Do not append blank character if it is the default.

Task-number: QTBUG-20834
Change-Id: I17f6ac4058f295f25ff49f33c41bd9ee40b75811
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQRegularExpression: operator<<(QDebug, PatternOptions) improvements
Giuseppe D'Angelo [Fri, 23 Mar 2012 05:51:11 +0000 (05:51 +0000)]
QRegularExpression: operator<<(QDebug, PatternOptions) improvements

Avoid building a QStringList and then joining the strings with pipes;
directly append the flags to a QByteArray instead.

Change-Id: Ic352b756ed1e3b6b579b9ca412636a2b394d2eb5
Reviewed-by: hjk <qthjk@ovi.com>
12 years agoRemove all calls to, and deprecate qMalloc, qRealloc and qFree.
Robin Burchell [Thu, 22 Mar 2012 20:44:13 +0000 (21:44 +0100)]
Remove all calls to, and deprecate qMalloc, qRealloc and qFree.

Callers should just call the standard allocation functions directly.

Adding an extra function call onto all basic memory management for the sake of
making it instrumentable in rare cases isn't really fair to everyone else.

What's more, this wasn't completely reliable, as not everything was using them
in a number of places. Memory management can still be overridden using tricks
like LD_PRELOAD if needed.

Their aligned equivilents cannot be deprecated, as no standard equivilents
exist, although investigation into posix_memalign(3) is a possibility
for the future.

Change-Id: Ic5f74b14be33f8bc188fe7236c55e15c36a23fc7
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRename the 'declarative debug support' to 'qml debug support'
Kai Koehne [Fri, 30 Mar 2012 11:43:10 +0000 (13:43 +0200)]
Rename the 'declarative debug support' to 'qml debug support'

Since the library and almost everything got renamed to qml, we
should do so for the debugging support, too.

(CONFIG+=declarative_debug will continue to work for some time
being, but prints a deprecated warning).

Change-Id: I295155dce873e2585c1452d2bf0625ea6ce219c4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoDocumentation cleanup
Debao Zhang [Wed, 28 Mar 2012 21:36:48 +0000 (14:36 -0700)]
Documentation cleanup

They are comments of Qt3 support members which have been removed already.

Change-Id: I4b3dfaac1e5e1c3c13b83e41d0505dd16a4b6a8e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoWindows: Make tst_qprinter significant again since the test is passing
Miikka Heikkinen [Fri, 30 Mar 2012 12:27:59 +0000 (15:27 +0300)]
Windows: Make tst_qprinter significant again since the test is passing

The commit b188221fee0eaacec115b514185a0508ef655897 fixed the test.

Change-Id: I630ede91ad6050b6a22d2b65947dd341ce7d9aa9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoEnable Windows font tests..
Friedemann Kleint [Fri, 30 Mar 2012 10:54:34 +0000 (12:54 +0200)]
Enable Windows font tests..

Application fonts have been added in
4f1820e3a77b3fdda32a1b935502b187e73059cf

Task-number: QTBUG-24193
Task-number: QTBUG-24195
Task-number: QTBUG-24196

Change-Id: I45d0bbb183562b7355e07ce7fa93b0046dfd4665
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoAdd payload to QSqlDriver notification with PSQL implementation.
Matt Newell [Thu, 22 Mar 2012 17:42:56 +0000 (10:42 -0700)]
Add payload to QSqlDriver notification with PSQL implementation.

Postgres async notifications can contain a payload parameter
that is currently discarded. This patch provides the QSqlDriver
api change necessary to deliver a payload with each emitted
notification by adding a QVariant parameter to the notification
signal. It also provides the implementation for the qsqlpsql driver.
The qsql_ibase driver has been updated to reflect the change to the
notification signal signature.

The eventNotificationPSQL test in the qsqldatabase test has
been expanded to test proper payload sending and receiving.
All tests/auto/sql/kernel tests have been run with sqllite and
postgres with no regressions.

Task-number: QTBUG-13500
Change-Id: I9137f6acc8cfca93f45791ca930e0287d93d5d0d
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoExpand QtSql tests covering boundValues and boundValueName
Matt Newell [Mon, 5 Mar 2012 22:24:54 +0000 (23:24 +0100)]
Expand QtSql tests covering boundValues and boundValueName

Tests added that cover boundValues with positional binding,
and boundValueName.

Change-Id: I2962d76607b716d19d3e0be958109be2f032f2d9
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoOverwrite the LIB_DEPENDENCIES of modules.
Stephen Kelly [Mon, 26 Mar 2012 04:41:04 +0000 (06:41 +0200)]
Overwrite the LIB_DEPENDENCIES of modules.

This way if a module is found more than once, the list does not grow
duplicates.

Change-Id: I08e3e2a83453f45a49fe79e803a4b50d115709a3
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoEnsure that the variable for the installation prefix is unique.
Stephen Kelly [Mon, 26 Mar 2012 04:33:05 +0000 (06:33 +0200)]
Ensure that the variable for the installation prefix is unique.

Using the same variable for multiple config files can lead to
conflicts.

Change-Id: Ie6a22618c4c2e64567874e5c7e8b278e067fedae
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoFix postgres notification support in the QPSQLDriver.
Matt Newell [Thu, 22 Mar 2012 17:42:56 +0000 (10:42 -0700)]
Fix postgres notification support in the QPSQLDriver.

This patch fixes a critical bug in the qsqlpsql driver where
notifications aren't delivered when received. Any blocking libpq
function(specifically PQexec) will read all the incoming data
from the socket, including any pending notifications. This would
cause the socket notifier to never be fired for incoming
notifications that are already queued inside libpq. The qsqldriver
test case was skipping the postgres notification test because of
this bug, now its enabled and passing. In order to fix this
bug I made a wrapper function for PQexec in QPSQLDriverPrivate
that calls _q_handleNotification via QMetaObject::callMethod
QueuedConnection in order to deliver pending notifications
when control returns to the event loop. I also added a flag
to ensure only one call is made each time the event loop is
entered.

Change-Id: I19f5297094ae7ae46bfb0717e4fca744d69f7b92
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoAdd support for screen overlays / foreign windows
Thomas McGuire [Thu, 29 Mar 2012 14:13:52 +0000 (16:13 +0200)]
Add support for screen overlays / foreign windows

We're not the only one creating native windows. When using the
multimedia API, the multimedia library creates a video window
for video display. Here we need to deal with giving this video
window overlay a proper z-order, otherwise it will never get
visible.

Change-Id: Ibff0382ebee5cda87408b91c8181a4104fc4a1a3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoRemove static methods in QQnxScreen
Thomas McGuire [Thu, 29 Mar 2012 13:23:57 +0000 (15:23 +0200)]
Remove static methods in QQnxScreen

Change-Id: If0fd910848ba70d3b0a2d948065b09337f8e51c3
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoDon't assume windows and GL contexts are created on the primary screen
Thomas McGuire [Thu, 29 Mar 2012 13:20:35 +0000 (15:20 +0200)]
Don't assume windows and GL contexts are created on the primary screen

Change-Id: Ib4f1c377bf93b1041b5f5e3fc56c0e01e35aeb38
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoFix QFileSystemEngine::tempPath on Blackberry OS
Rafael Roquetto [Wed, 28 Mar 2012 16:12:38 +0000 (18:12 +0200)]
Fix QFileSystemEngine::tempPath on Blackberry OS

Unlike Unix, Blackberry OS stores the location of the temporary directory into
the TEMP environment variable.

Change-Id: I5905763258ea01541c756361870258b421a00967
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoForward native key codes to QWindowSystemInterface
Rafael Roquetto [Thu, 29 Mar 2012 08:54:29 +0000 (10:54 +0200)]
Forward native key codes to QWindowSystemInterface

Using QWindowSystemInterface::handleExtendedKeyEvent() instead of
QWindowSystemInterface::handleKeyEvent(). While the former allows
us to forward the native key codes to QWindowSystemInterface, the
latter initializes them with 0, causing QKeyEvent::native*() to
return 0, instead of the actual values.

Change-Id: I596ad2e07645e091529ca514682c98d095244a73
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoFix crash when an invalid filter is set
Honglei Zhang [Wed, 7 Mar 2012 16:54:58 +0000 (18:54 +0200)]
Fix crash when an invalid filter is set

QSqlTableModel::headerData() generates a crash if an invalid filter
is set. QSqlQueryModel::indexInQuery() should check the index value
before applied to d->colOffsets[].
QSqlQueryModel::initRecordAndPrimaryIndex() is updated to sync the
size of rec and colOffsets.

Task-number: QTBUG-23879
Change-Id: Ic9f88bb288592aa6fb3c1415cc818632dadaab56
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoUpdate QSqlRelationalTableModel about reference table alias
Honglei Zhang [Fri, 2 Dec 2011 07:32:51 +0000 (09:32 +0200)]
Update QSqlRelationalTableModel about reference table alias

The current documentation does not mention how the reference
table name is aliased in the relational table model. This makes
it difficult to use function setFilter(). This commit adds relevant
information to the documentation.

Task-number: QTBUG-15989
Change-Id: I02cbefb3f2b66c9772557a1fea3d93c2d1696ee9
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agodevice: Add device support for Amlogic 8726M board
Girish Ramakrishnan [Fri, 16 Mar 2012 23:51:09 +0000 (16:51 -0700)]
device: Add device support for Amlogic 8726M board

Add mkspec for the Amlogic 8726M platform using the -device
support in configure. This allows to build Qt with the application
libraries provided by Amlogic.

The 8726M is an ARM Cortex-A9 that support NEON and has a Mali 400-M GPU.

Change-Id: I01ea0c8e7d34dcb165653980a1856f6e22318c4d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
12 years agoMake numerus unsigned
João Abecasis [Wed, 28 Mar 2012 13:49:46 +0000 (15:49 +0200)]
Make numerus unsigned

It's the index number of the translation to be used.

Change-Id: I959c6aaa1aad09e74286d201ea356bfc4409f02a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoPre-validate numerus rules: fail early, fail gracefully
João Abecasis [Wed, 28 Mar 2012 13:15:10 +0000 (15:15 +0200)]
Pre-validate numerus rules: fail early, fail gracefully

Change-Id: Ibb3d27b9ff3d2f356a7c5c98b98686342f001f8f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoVerify presence of "magic cookie" before more expensive reads
João Abecasis [Wed, 28 Mar 2012 13:10:52 +0000 (15:10 +0200)]
Verify presence of "magic cookie" before more expensive reads

Moved this simple sanitation out of do_load as it will prevent us from
loading misplaced (or misfound) files into memory in the first place.

We'll still load anything minimally looking like a translation file.

Change-Id: Ia138be010979d4a66d330f7414fce3df20727e68
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix QWheelEvent::angleDelta() returning QPoint().
Marcel Krems [Mon, 26 Mar 2012 18:12:21 +0000 (20:12 +0200)]
Fix QWheelEvent::angleDelta() returning QPoint().

Change-Id: I29460bd5a3f485dcd460edc52239d748e7faf6e0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoCocoa: Fix combo box flicker on show.
Morten Sorvig [Fri, 30 Mar 2012 07:59:12 +0000 (09:59 +0200)]
Cocoa: Fix combo box flicker on show.

Replace Q_WS_MAC -> Q_OS_MAC, restore Qt 4 behavior
that does not disable updates on first show.

Change-Id: Ibc7f58add2a44c95879bd3c4772cea36dd7905fa
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoCocoa: set window levels when creating NSWindow/NSPanel
Bradley T. Hughes [Wed, 28 Mar 2012 07:21:15 +0000 (09:21 +0200)]
Cocoa: set window levels when creating NSWindow/NSPanel

Port the QWidgetPrivate::setWindowLevel() function from Qt 4 so that we
get compatible window level behavior in Qt 5.

Change-Id: I67f036941f1e460be678b28e7079d36b1a6622ac
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCocoa: don't call non-existent NSWindow setFrameSize
Bradley T. Hughes [Wed, 21 Mar 2012 09:39:39 +0000 (10:39 +0100)]
Cocoa: don't call non-existent NSWindow setFrameSize

Commit 140579cb3ef676aa3a7c3fc322ddfcc6ec1b70f2 changed a setFrame call
in propagateSizeHints() to setFrameSize, which doesn't exist in
NSWindow. Change it back to setFrame.

Spotted due to this objc warning:

qcocoawindow.mm:232:9: warning: instance method '-setFrameSize:display:'
      not found (return type defaults to 'id')
     [m_nsWindow setFrameSize : NSMakeSize(baseSize.width(),...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...

Change-Id: Ieb7e022694ced7e59c07fdd2fc53048dab1e93c7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoQDoc: Write proper output file name for debug output.
Casper van Donderen [Fri, 30 Mar 2012 08:18:23 +0000 (10:18 +0200)]
QDoc: Write proper output file name for debug output.

Change-Id: I55138c47960a4d9e1595ef648a8d0982e3bfd19b
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoSeparate virtual keyboard interface and implementation
Kevin Krammer [Tue, 27 Mar 2012 15:43:43 +0000 (17:43 +0200)]
Separate virtual keyboard interface and implementation

Allows us to create a BPS based implementation and drop it in
without further changes to users of the interface.

Change-Id: I16313717e1200d717c330cbb18c3314567af51c2
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoAdd tests to verify QByteArray's zero termination
João Abecasis [Wed, 28 Mar 2012 22:24:50 +0000 (00:24 +0200)]
Add tests to verify QByteArray's zero termination

For data allocated and maintained by QByteArray, there's a guarantee
that data() is null-terminated. This holds true even for null and empty,
where logically the terminating character should never be dereferenced.

For tests that modify or generate QByteArrays, this ensures the
invariant is kept.

In the toFromHex() text, const-ness of temporary variables was dropped
to enable the test macro to be used, as the qualification didn't add
much to the test otherwise.

Change-Id: I7ee52e79e3a9df7de18c743f3698dab688e6bf0e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoUse unsigned variable for size and index
João Abecasis [Wed, 28 Mar 2012 13:16:51 +0000 (15:16 +0200)]
Use unsigned variable for size and index

rulesSize is passed from unsigned variable numerusRulesLength, so don't
bring sign bit into equation; array index variable i also made unsigned.

Change-Id: I0cb4e8483272c1e60339298149fb118215aa2183
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoAdd Mac OS 10.8 define.
Morten Sorvig [Wed, 28 Mar 2012 11:25:32 +0000 (13:25 +0200)]
Add Mac OS 10.8 define.

Change-Id: Ief687d3d6188b11c39d9ac4879928b35d8b467d0
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix "unused variable" warning in QVariant header.
Morten Sorvig [Wed, 28 Mar 2012 11:39:44 +0000 (13:39 +0200)]
Fix "unused variable" warning in QVariant header.

Change-Id: Ia70ee372e277b1f95b893c461820fe97f381b8b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoUpdate tests/manual/windowmodality to test native dialogs
Bradley T. Hughes [Thu, 29 Mar 2012 12:16:02 +0000 (14:16 +0200)]
Update tests/manual/windowmodality to test native dialogs

Window- and ApplicationModal native dialogs need to send WindowBlocked
and WindowUnblocked events as well. This will let us test that they work
properly.

Change-Id: Iaa4ddb79bb0872f9ab1e61336a5decb262472283
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoAllow named bind values to be used multiple times per query
Matt Newell [Mon, 26 Mar 2012 17:46:22 +0000 (10:46 -0700)]
Allow named bind values to be used multiple times per query

Prepared queries should be able to use a name parameter more than
once. Currently this will result in undefined behavior and crashes.
This patch fixes the bug and implements the needed test case.

Task-number: QTBUG-6420
Change-Id: I07d6537e432a9b2781e9ef3d9f597bceb054527e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
12 years agoFix comments out of touch with reality
João Abecasis [Tue, 27 Mar 2012 13:20:42 +0000 (15:20 +0200)]
Fix comments out of touch with reality

Change-Id: Id060626b0bb6c28f4e67c9b3c7a0fbc456f7dcc6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoPlug memory leak when gestures are grabbed but never triggered
Andy Shaw [Wed, 28 Mar 2012 19:54:52 +0000 (21:54 +0200)]
Plug memory leak when gestures are grabbed but never triggered

When a gesture is grabbed by QAbstractScrollArea but never triggered
then the deletion of the QAbstractScrollArea would mean that the gesture
created for it would not be deleted.  This ensures that it always
deletes the gestures waiting to be deleted even if no gesture event is
triggered

Task-number: QTBUG-25011

Change-Id: I36118b82baaa60ac4e014896159060e1af76b2d2
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>