profile/ivi/qtbase.git
11 years agoRemove duplicate triangulating stroker implementation.
Kim Motoyoshi Kalland [Thu, 5 Jul 2012 15:01:25 +0000 (17:01 +0200)]
Remove duplicate triangulating stroker implementation.

Change-Id: I9d8f609c9ecb02dd25e588313bc98db4b9325974
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
11 years agofixed ce makefileenvironment
Bjoern Breitmeyer [Thu, 5 Jul 2012 13:20:50 +0000 (15:20 +0200)]
fixed ce makefileenvironment

XQMakeSpec is not available after configure
but the QMakeSpec contains the correct value

Change-Id: I6cd4da8b0d6c95565f31842c17611ffd361bc010
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoifdef out the "clears variables previously set" warning
Oswald Buddenhagen [Tue, 3 Jul 2012 09:34:42 +0000 (11:34 +0200)]
ifdef out the "clears variables previously set" warning

it produces way too many false positives to be useful.

Change-Id: Iefa423f96fa5574267b1468abb5efc8454ab54a3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoqt_parts.prf: fixed handling of demos
Rohan McGovern [Thu, 5 Jul 2012 23:03:28 +0000 (09:03 +1000)]
qt_parts.prf: fixed handling of demos

Subdir for demos/demos.pro is 'demos', not 'examples'.

Change-Id: Ic4d80501e5d910891b0436ecd9881b79a4a99090
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoQPlatformScreen::grabWindow() support on Mac
Tasuku Suzuki [Sun, 1 Jul 2012 08:27:30 +0000 (17:27 +0900)]
QPlatformScreen::grabWindow() support on Mac

Added QCocoaScreen::grabWindow() and copied Qt 4 implimentation.
examples/desktop/screenshot works but WId window is not handled yet.

Change-Id: If228bb59d98a5166788ab38293d7e6a6300d1f85
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
11 years agomake QtGui compile when QT_NO_WHEELEVENT is defined
Jeremy Katz [Fri, 29 Jun 2012 11:19:26 +0000 (13:19 +0200)]
make QtGui compile when QT_NO_WHEELEVENT is defined

This is necesary but not sufficient to make the small configuration
build.

Task-number: QTBUG-24816

Change-Id: I1a06555e6f54f4d3c09a34fd50bf76e7b47d469f
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com>
11 years agoImprove QDate, QTime, QDateTime auto tests.
Mitch Curtis [Thu, 28 Jun 2012 13:42:51 +0000 (15:42 +0200)]
Improve QDate, QTime, QDateTime auto tests.

Add more test data, merging operator!= tests in with operator==
to take advantage of added data.

Change-Id: If0426a3d01b8800cb7363385dbf3bcb21af5ed8f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoFix positioning when embedding native widgets such as QGLWidget
Miikka Heikkinen [Fri, 6 Jul 2012 10:24:15 +0000 (13:24 +0300)]
Fix positioning when embedding native widgets such as QGLWidget

Embedding native widgets creates window before ActiveQt has a chance
to set the _q_embedded_native_parent_handle property on the window,
so embedded flag doesn't get set during window creation.
Update embedded flag also when setting window flags.

Task-number: QTBUG-26438
Change-Id: Id29d7123de81d6542dfd6471d6dba3d31bbfe2df
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
11 years agoqdoc: Removed several #if 1 macros.
Martin Smith [Fri, 6 Jul 2012 10:16:59 +0000 (12:16 +0200)]
qdoc: Removed several #if 1 macros.

The code should be there. Also removed
a few obsolete #defines.

Change-Id: Id63418b344157a99ac502329eea4f0bc9dc77849
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
11 years agoQDoc: Fix relative URL generation for cross-linking.
Casper van Donderen [Thu, 5 Jul 2012 12:49:10 +0000 (14:49 +0200)]
QDoc: Fix relative URL generation for cross-linking.

Previously the URL relative to the installdir was used, now we use a
relative URL to the index file.

Change-Id: Ia2485aa49da8240901d0db1f102eb48da689ef2a
Reviewed-by: Martin Smith <martin.smith@nokia.com>
11 years agotst_qudpsocket: Interface fix for Windows Xp
Martin Petersson [Thu, 5 Jul 2012 11:05:21 +0000 (13:05 +0200)]
tst_qudpsocket: Interface fix for Windows Xp

On Windows Xp we can not connect to the pseudo interfaces used for
Teredo, so do not add these to the tests.

Change-Id: I4e20c880fa2d18f266ffcef2f640d8b2e6d0cd21
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
11 years agoImplement nativeResourceFunctionForContext for xcb
Jorgen Lind [Thu, 5 Jul 2012 11:59:22 +0000 (13:59 +0200)]
Implement nativeResourceFunctionForContext for xcb

Change-Id: Icf6c39fb456b39fec58ac2f74c569b9d01993589
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
11 years agoqdoc: Removed several #if 0 blocks.
Martin Smith [Thu, 5 Jul 2012 11:58:17 +0000 (13:58 +0200)]
qdoc: Removed several #if 0 blocks.

Removed a lot of dead code.

Change-Id: I237521efab7dd046d3a47ab92a6a0e083c59ab55
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
11 years agoqt_parts.prf: fixed examples, tests, tools always disabled
Rohan McGovern [Thu, 5 Jul 2012 23:00:08 +0000 (09:00 +1000)]
qt_parts.prf: fixed examples, tests, tools always disabled

exists() resolves the path relative to qmake's current working
directory, which is mkspecs/features.  Explicitly refer to the full
path.

Change-Id: I04e9f377528bffc1ebeeed69c86d73b85a117423
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
11 years agofixed cursor handling on wince
Bjoern Breitmeyer [Wed, 4 Jul 2012 14:14:29 +0000 (16:14 +0200)]
fixed cursor handling on wince

Change-Id: Iea91dde458b0e41a55ba6cb3e157756a1473f653
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
11 years agoClean up attribute arrays flags in OpenGL glyph cache
Eskil Abrahamsen Blomfeldt [Thu, 5 Jul 2012 13:21:56 +0000 (15:21 +0200)]
Clean up attribute arrays flags in OpenGL glyph cache

When used in the SceneGraph we're expected to disable the arrays
after we're done, otherwise we'll get a warning about memory corruption
and crashes.

Change-Id: Ie8e426309716bef4b75d79039e8ca0b4943c79e7
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
11 years agowindows hosts of course also need exclusion from mkspecs_pre
Oswald Buddenhagen [Thu, 5 Jul 2012 13:00:02 +0000 (15:00 +0200)]
windows hosts of course also need exclusion from mkspecs_pre

Change-Id: I90de625b1b521977a4dc1cd499eb6ece02d837f9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
11 years agoeglfs: Allow setting screen size through environment variables.
Robin Burchell [Thu, 5 Jul 2012 12:44:22 +0000 (14:44 +0200)]
eglfs: Allow setting screen size through environment variables.

This adds:
- QT_QPA_EGLFS_WIDTH
- QT_QPA_EGLFS_HEIGHT

If both are set, fb0 detection is completely bypassed, otherwise, the
environment variables act as an override for the fb0 values.

Change-Id: Iaf38c8b0d40ce0a921bb6c5dbf31af788802d3fa
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
11 years agoandroid: work around android's linux/input.h being retarded.
Robin Burchell [Thu, 5 Jul 2012 12:37:21 +0000 (14:37 +0200)]
android: work around android's linux/input.h being retarded.

It seemingly doesn't include many of the required defines for evdev, so do what
everyone else seems to do, and work around it.

Change-Id: I4a6ffb548c7370f675c736177b63220f034d06b8
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
11 years agoandroid: Fix evdev configure test.
Robin Burchell [Thu, 5 Jul 2012 12:38:01 +0000 (14:38 +0200)]
android: Fix evdev configure test.

Android doesn't define a number of items in its input.h for MT, so don't test
for them here. They will still work, they just need manual defines.

Change-Id: I471f55b7c7f8950d2048e525119b2b36c8e9743b
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
11 years agodon't blow away mkspecs/modules-inst when reconfiguring
Oswald Buddenhagen [Tue, 3 Jul 2012 17:32:42 +0000 (19:32 +0200)]
don't blow away mkspecs/modules-inst when reconfiguring

otherwise we get lots of nasty warning messages about missing pri files.

it is arguable whether it is a good idea to do that, but we preserve
mkspecs/modules, too, and the previously built libraries don't just
vanish, either.

Change-Id: Ieded8d8858f1b0135bc3bea894b4a676024ac8ca
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
11 years agocentralize handling of QT_BUILD_PARTS
Oswald Buddenhagen [Tue, 3 Jul 2012 19:26:36 +0000 (21:26 +0200)]
centralize handling of QT_BUILD_PARTS

Change-Id: I33b8c3958a102d87461ad887fa5749bd9a6dc037
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
11 years agomake non-bootstrapped non-installed prefix-built executables runnable
Oswald Buddenhagen [Tue, 3 Jul 2012 17:26:36 +0000 (19:26 +0200)]
make non-bootstrapped non-installed prefix-built executables runnable

tools like idc and lrelease are outside qtbase/bin and depend on libraries
which are not in any search path, so we need some way to let the modules
announce the locations (qt_tool.prf) and use it (in qtPrepareTool()).

Change-Id: I98d5109cbee5e745d86dde94e3dc791d42edc3ec
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
11 years agoset DLLDESTDIR only for non-prefix builds
Oswald Buddenhagen [Tue, 3 Jul 2012 15:41:43 +0000 (17:41 +0200)]
set DLLDESTDIR only for non-prefix builds

a prefix build needs to be installed first anyway

Change-Id: I798861fddad2be289e9e4f182d0373e389b57437
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
11 years agoset DLLDESTDIR to the build dir, not the install dir
Oswald Buddenhagen [Tue, 3 Jul 2012 15:40:53 +0000 (17:40 +0200)]
set DLLDESTDIR to the build dir, not the install dir

Change-Id: I0aa3b512e5d633c5628c4bb285f96a41cda858d9
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
11 years agodon't use a different de-duplication algo for the library list in mingw prl files
Oswald Buddenhagen [Tue, 3 Jul 2012 14:49:53 +0000 (16:49 +0200)]
don't use a different de-duplication algo for the library list in mingw prl files

i have no idea why that was done (the commit message says "not sure why
it works elsewhere"), but it makes no sense whatsoever, specifically
doing it only on mingw. probably some workaround, as usual. the
de-duplication is broken by design anyway.

This reverts commit 7a6302c2baf6861fdaf65992b71a7676859860c2.

Change-Id: I6edecaa062570e59eccd24d50919ba132e65a403
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
11 years agoDisable dedicated screen event thread by default.
Rafael Roquetto [Wed, 4 Jul 2012 15:41:53 +0000 (17:41 +0200)]
Disable dedicated screen event thread by default.

Screen events should come through QEventDispatcherBlackberry by default.

Change-Id: I64d17b99e9dd8edf23f68e1186e9318849f1a398
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
11 years agotst_QTcpServer::linkLocal fix for Windows Xp
Martin Petersson [Tue, 3 Jul 2012 13:16:28 +0000 (15:16 +0200)]
tst_QTcpServer::linkLocal fix for Windows Xp

Do not try to connect to the Terdo Tunneling Pseudo-Interface as
this will fail for Windows Xp.

Change-Id: I6dcd8369ba1e8642224cd4ac53f4032ed46d050d
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
11 years agoQHeaderView - adding an auto test with saveState and restoreState
Thorbjørn Lund Martsum [Sat, 23 Jun 2012 18:06:19 +0000 (20:06 +0200)]
QHeaderView - adding an auto test with saveState and restoreState

This test is nice to have regardless though the main reason for it
is a refactor of hiddenSections in QHeaderView.

Change-Id: Id41a1d5edda2ef75bf432a78cdb3e952303eae92
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoQHeaderView - resizeSection improvement
Thorbjørn Lund Martsum [Sun, 1 Apr 2012 04:31:43 +0000 (06:31 +0200)]
QHeaderView - resizeSection improvement

This patch improves the manual resizeSection a bit. Before we didn't
consider that the program could maybe resize other sections when the
user was resizing one section.

The main issue with that is that setOffset is so smart that it helps
moving the mouse cursor - however it really shouldn't do if the
program is trying to change something too.

Maybe this won't solve all (possible) problems at once - but it is
a fixed needed just to make something work - trying to make anything
work without this fix is horrible....

Change-Id: I3cefa375a9b8ee4c1ef1e08ba0900025c671e4c6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoFix event loop throughput issue
Rafael Roquetto [Wed, 4 Jul 2012 15:23:03 +0000 (17:23 +0200)]
Fix event loop throughput issue

Currently, only one bps event can be handled per event loop iteration,
bringing about a huge performance penalty. This patch fixes this issue by
bulk processing events whenever they are available.

Change-Id: Iecce1e86730bd90c3c81a7c6ebdf9ed83189e58e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
11 years agoDo not delete m_blitProgram more than once
Jiang Jiang [Thu, 5 Jul 2012 09:20:40 +0000 (11:20 +0200)]
Do not delete m_blitProgram more than once

When m_blitProgram is created the constructor will add it to
QOpenGLContext as a child of that QObject, so it will be deleted
when that QOpenGLContext is deleted as QObject will delete its
children in destructor. Delete it here will cause crash in
thread termination.

Change-Id: If9d3287d159cc3276b6a840a584a1b212b9c9fd0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
11 years agoFix FRAMEWORK_INCLUDE for Mac
Iikka Eklund [Thu, 5 Jul 2012 04:14:22 +0000 (07:14 +0300)]
Fix FRAMEWORK_INCLUDE for Mac

On Mac the framework include paths were generated wrong.
The $${MODULE_NAME} was missing.
This patch fixes the framework include path generation.

Change-Id: Ic0e8d69ac7ac63be755302dc822c28240c9bc3d2
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
11 years agoSupport for overlay-scrollbars on Mac
Christoph Schleifenbaum [Wed, 11 Apr 2012 18:12:48 +0000 (20:12 +0200)]
Support for overlay-scrollbars on Mac

On Lion scroll bars are within the scroll area itself and are not being
shown as long as the user is not scrolling.

This patch draws the new scroll bars and makes them fade away. Further
it introduces a pixel metric checking for this behaviour. It's used by
QAbstractScrollArea to put the viewport to the correct place.

Task-number: QTBUG-21673

Change-Id: Id530265043549318ac420b392de6b8642deaa4c6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
11 years agoSync QWindow properties on NSWindow creation.
Morten Johan Sorvig [Fri, 18 May 2012 05:55:53 +0000 (07:55 +0200)]
Sync QWindow properties on NSWindow creation.

Synchronize size hints, window title, flags and state.

Change-Id: Ibc2358d8d4d0625aaddfbcad159e3682e3e79d3c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
11 years agoqdoc: The \br macro is promoted to a qdoc command
Martin Smith [Thu, 5 Jul 2012 08:44:34 +0000 (10:44 +0200)]
qdoc: The \br macro is promoted to a qdoc command

The \br macro, which is used to insert a line break in the output
text, is now promoted to be a qdoc command. For html, it outputs a
<br/>. For DITA XML it does nothing.

Task Nr: QTBUG-26435

Change-Id: Ie0542c9053f68473ccaa2f50ace74baa30f78dd0
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
11 years agoRemove insignificant flag because all tests are passing.
Toby Tomkins [Thu, 5 Jul 2012 04:05:55 +0000 (14:05 +1000)]
Remove insignificant flag because all tests are passing.

Task-number: QTBUG-26432
Task-number: QTBUG-23050

Change-Id: Iafec02ed5008fc53b32f405a431e0987322c0d3a
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
11 years agoReplace insignificant test with QEXPECT_FAIL.
Toby Tomkins [Thu, 5 Jul 2012 01:52:07 +0000 (11:52 +1000)]
Replace insignificant test with QEXPECT_FAIL.

Task-number: QTBUG-26430

Change-Id: I647388701b7e6a71bb011f7714ff3b96c833a837
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoNative drag implementation on Mac
James Turner [Wed, 20 Jun 2012 13:01:56 +0000 (15:01 +0200)]
Native drag implementation on Mac

Create a native implementation of QCocoaDrag, using the 10.6 (and earlier) Cocoa
dragging API. This matches the implementation in Qt4 closely for the moment.
In the future it may be desirable to create an alternative implementation using
the new (non-blocking) drag API introduced in 10.7, but that will require deeper
changes to the mime-data handling.

This changes makes one more method on QPlatformDrag virtual, since the
Cocoa behaviour diverges from the base version: ::defaultAction is customised.

Change-Id: I1843293a62b2b4973a07b5e75ea3c312dc064018
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCocoa: Fix size hint and resize increment setting.
Morten Johan Sorvig [Fri, 18 May 2012 05:53:40 +0000 (07:53 +0200)]
Cocoa: Fix size hint and resize increment setting.

Call the corresponding NSWindow size functions.
Add special cases where Qt returns null or empty sizes.

Change-Id: I880c50c04e92271dc342ad587191c8cb2c006dba
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoQHeaderView - prevent negative default+minimum section sizes
Thorbjørn Lund Martsum [Mon, 25 Jun 2012 04:31:58 +0000 (06:31 +0200)]
QHeaderView - prevent negative default+minimum section sizes

In 96f1fe8855082017fbbecccdab1eb11fd8c1f870 we agreed that sections
with negative sizes did not make sense. Of the same reason default
section sizes and minimum section sizes should be not negative.

Change-Id: I6a770e7f510d8e2bb90bfd8f38b4fa0566fc137b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoProperly detect the max texture size when using QOpenGLPaintDevice.
Jocelyn Turcotte [Tue, 3 Jul 2012 14:36:30 +0000 (16:36 +0200)]
Properly detect the max texture size when using QOpenGLPaintDevice.

The value is currently hard-coded to 1024, this is a problem since
any image painted with a size higher that this will be scaled down before
being uploaded.

This patch copies the implementation from QGLContext which works correctly.

Change-Id: Ia2bda60cf21d9adf13c91cea4854a2b20e4041f2
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
12 years agodisable building uic when -no-widgets is set
Tasuku Suzuki [Tue, 3 Jul 2012 01:32:20 +0000 (10:32 +0900)]
disable building uic when -no-widgets is set

Change-Id: I86040ec086621913fefcf6d349fe603758991c4e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix socket notifier registration on Blackberry.
Rafael Roquetto [Thu, 28 Jun 2012 12:16:46 +0000 (14:16 +0200)]
Fix socket notifier registration on Blackberry.

This fixes a bug on QEventDispatcherBlackberry, where registerSocketNotifier()
and unregisterSocketNotifier() wrongly assumed that a file descriptor was
being watched exclusively by one QSocketNotifier, while in fact there can be
more than one QSocketNotifier associated with a single file descriptor.

Change-Id: I0ce54bf809df109ad97f4a7f170f448d5d04d453
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
12 years agoSkip (re-)creation of cmake files during build passes.
Stephen Kelly [Wed, 4 Jul 2012 08:18:35 +0000 (10:18 +0200)]
Skip (re-)creation of cmake files during build passes.

Change-Id: I03973220c17c065bc6ea391300b677e27f48a46f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoUppercase the CONFIG for verbatim mode.
Stephen Kelly [Tue, 3 Jul 2012 20:29:45 +0000 (22:29 +0200)]
Uppercase the CONFIG for verbatim mode.

Change-Id: Iec883e0218af80fc329d866affb2b95db72c54d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoAdd a Q_PROPERTY for the sourceModel of a proxy model.
Stephen Kelly [Mon, 2 Jul 2012 15:11:18 +0000 (17:11 +0200)]
Add a Q_PROPERTY for the sourceModel of a proxy model.

Now that Q_PROPERTY with a QObject derived type is more powerful.

This property can be used in QML so that wrappers for proxy models
do not need to be created, such as in the example
at https://codereview.qt-project.org/#change,13007

Change-Id: I6ba676549d2135585d429a28e214fef0b2a6b1f9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoSet the language of a STATIC library.
Stephen Kelly [Sun, 24 Jun 2012 18:00:58 +0000 (20:00 +0200)]
Set the language of a STATIC library.

This is used as a hint for the linker.

Change-Id: I869039c1ea50f1926809ead4064317628ebbb2e7
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agotst_qwidget: remove QEXPECT_FAIL for QTBUG-8911
Joerg Bornemann [Wed, 4 Jul 2012 10:53:29 +0000 (12:53 +0200)]
tst_qwidget: remove QEXPECT_FAIL for QTBUG-8911

QTBUG-8911 has been fixed some time ago.

Change-Id: I19dae0571b1829f6b3b797f7e0ec5c24a4241db8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoMake QGenericPlugin and QGenericPluginFactory public API
Girish Ramakrishnan [Tue, 3 Jul 2012 16:25:46 +0000 (21:55 +0530)]
Make QGenericPlugin and QGenericPluginFactory public API

These classes are not specific to QPA.

Discussed in QtCS 2012.

Change-Id: I32bc5fad4f0fa5e7095af86d61966fdf4d9e4ad7
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoRemoved private header warning from public QOpenGLPaintDevice header.
Samuel Rødal [Thu, 28 Jun 2012 08:27:00 +0000 (10:27 +0200)]
Removed private header warning from public QOpenGLPaintDevice header.

Change-Id: I9f2068d7271778e98251d8cbcfffa3a8c3e58f3d
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
12 years agoenable platformsupport for -no-widgets
Tasuku Suzuki [Tue, 3 Jul 2012 01:30:30 +0000 (10:30 +0900)]
enable platformsupport for -no-widgets

qpa plugins need platformsupport

Change-Id: I6ebfac327940c00e1ab591045cf1a3bb3ac689e0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoReplace insignificant test with QEXPECT_FAIL.
Toby Tomkins [Tue, 3 Jul 2012 04:39:54 +0000 (14:39 +1000)]
Replace insignificant test with QEXPECT_FAIL.

Task-number: QTBUG-26403

Change-Id: Id933665a35be056f2b2a6fa2152f324810a7f057
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoAvoid load(testcase) for installing test helper apps
Rohan McGovern [Fri, 22 Jun 2012 02:03:39 +0000 (12:03 +1000)]
Avoid load(testcase) for installing test helper apps

Make test projects declare TEST_HELPER_INSTALLS rather than calling a
function exported by testcase.prf.  load(testcase) may be unsafe, as
testcase.prf should be processed after default_post.prf.

Fixes silent disabling of various autotests.

Change-Id: I56b35ffd653a637ad5ab18d64dd1a1edadfac59f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
12 years agoRevert "Allow moc to handle symbols that have been redefined."
Matthew Vogt [Tue, 3 Jul 2012 06:06:01 +0000 (16:06 +1000)]
Revert "Allow moc to handle symbols that have been redefined."

This reverts commit 5bb1408927b4eb5a03e8ab9f7cbc68f80d8a3962.

The temporary measure used to support redefinition of QtDeclarative
class names during the transition period is no longer required.

Task-number: QTBUG-24517
Change-Id: Ib90f08fcdfb02e004e594ac72b698eaa0325d98d
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoAdd some quotes to prevent damage from spaces in the paths
Stephen Kelly [Tue, 3 Jul 2012 12:28:08 +0000 (14:28 +0200)]
Add some quotes to prevent damage from spaces in the paths

This is a forward-port of 0331a5adde45583e3bca351f2814aea971474671
in cmake.git.

Change-Id: I8d889389a487f8b820182bd66e8a3df7aa5dc8d9
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoImprove basename extraction in qt5_add_dbus_interfaces
Stephen Kelly [Tue, 3 Jul 2012 12:16:21 +0000 (14:16 +0200)]
Improve basename extraction in qt5_add_dbus_interfaces

This is a forward port of f46903b4b21e5d1c8af9a60e9ea87805b170ed73
in cmake.git.

Change-Id: I627b17259182497c1353ccf4cd3fa4a61546be5d
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoFix QWidget/widgetAt() test.
Friedemann Kleint [Tue, 3 Jul 2012 13:24:27 +0000 (15:24 +0200)]
Fix QWidget/widgetAt() test.

Prevent a crash by giving the widget some time to show up.

Task-number: QTBUG-22326
Change-Id: Idaa23b21121e7c4f7098e8d51efd313bcc467e9a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoRemove Unicode escape sequence, which MSVC does not support.
Friedemann Kleint [Tue, 3 Jul 2012 15:01:18 +0000 (17:01 +0200)]
Remove Unicode escape sequence, which MSVC does not support.

Task-number: QTBUG-25924

Change-Id: I352bb5c674d90891df4103849bf5b5ac5778a2ee
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoexport QMAKESPEC to the project
Oswald Buddenhagen [Mon, 30 Jan 2012 19:14:29 +0000 (20:14 +0100)]
export QMAKESPEC to the project

this makes it unnecessary to dump qmakespec to .qmake.cache and
qmodule.pri.

Task-number: QTBUG-22700
Change-Id: I678c7ee7df2512184b9cd06d7a3be8bbd0b0da15
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agostore QT_BUILD_PARTS in qmodule.pri also on unix
Oswald Buddenhagen [Mon, 2 Jul 2012 09:59:42 +0000 (11:59 +0200)]
store QT_BUILD_PARTS in qmodule.pri also on unix

modules other than qtbase also need it.
the windows configure already does it that way.

Change-Id: I9adb469f7a0726663b7939e80d8be1e83a6d12d3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoremove special handling of the default{,-host} specs
Oswald Buddenhagen [Mon, 2 Jul 2012 10:29:12 +0000 (12:29 +0200)]
remove special handling of the default{,-host} specs

cp is perfectly capable of properly copying the symlinks

Change-Id: Ia45a4521af2ffb70af4e111480c0d6b7999c96c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agodon't match on the spec name in qconfig.pri
Oswald Buddenhagen [Tue, 3 Jul 2012 14:19:28 +0000 (16:19 +0200)]
don't match on the spec name in qconfig.pri

this will fail now even on unix (and wouldn't have ever worked on
windows), as the full spec name is known only after reading the spec,
and qconfig.pri is read from inside the spec.
matching on the host_build flag is cleaner anyway.

Change-Id: I7da144e89ab3db0fad942d755d8cb0a0f3b85588
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Donald Carr <sirspudd@gmail.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoPlatform-plugin support for QSystemTrayIcon.
Christoph Schleifenbaum [Fri, 11 May 2012 12:35:49 +0000 (14:35 +0200)]
Platform-plugin support for QSystemTrayIcon.

Implement QPlatformSystemTrayIcon providing QPA-plugin-support for
system tray icons. Make QSystemTrayIcon use this as new backend.

Ported over qsystemtrayicon_mac.mm to qcocoasystemtrayicon.mm to provide
Cocoa support for the new interface. It had to be changed to match the
interface, especially for icon and menu handling.

This interface is made to not use QStyle or QMenu which are related
classes of QSystemTrayIcon. It's therefore not introducing QtWidget
dependency into the platform plugin.

Task-number: QTBUG-20978

Change-Id: I0d0a73835698b3b4f97219d4f5bbcfa2af57dbe2
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoUse qmake dirname function correctly.
Stephen Kelly [Tue, 3 Jul 2012 07:00:00 +0000 (09:00 +0200)]
Use qmake dirname function correctly.

It takes a variable name apparently.

Change-Id: I9e2e2a0f6f5c42ecf9d07e4ac45954f14676d559
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoSimplify the creation of QMetaTypeId specializations.
Stephen Kelly [Mon, 2 Jul 2012 08:21:54 +0000 (10:21 +0200)]
Simplify the creation of QMetaTypeId specializations.

Change-Id: I07405f91b6f73a4e129859ca45a983d3ec7029ab
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoFix focus handling when the application has QAxWidgets.
Miikka Heikkinen [Mon, 18 Jun 2012 14:26:30 +0000 (17:26 +0300)]
Fix focus handling when the application has QAxWidgets.

Removed old defunct platform specific code from
QWidget::isActiveWindow() and added call to
QPlatformWindow::isActive() instead. This is done because
the embedded native windows inside QAxWidgets can have
focus but are not part of the parent application's Qt
window hierarchy, so native methods are required to determine
if they are part of the active window or not.

QWidgetPrivate::setFocus_sys() was implemented to activate
the window of the focused widget if the focus was elsewhere.
This is required because embedded native windows can steal the
focus from the main application window.

Focus event handling in Windows platform adaptation plugin was
fixed to correctly identify the active window in cases where
the are embedded native widgets that can have focus.

Also fixed three test cases that were affected by these changes.

Task-number: QTBUG-25852
Task-number: QTBUG-23699
Change-Id: I817e0ce4317e88955bb49b034eacd630a876ccf0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoImplement automatic mouse grabbing on mouse button press.
Miikka Heikkinen [Mon, 25 Jun 2012 13:56:16 +0000 (16:56 +0300)]
Implement automatic mouse grabbing on mouse button press.

QWidget::grabMouse() documentation states that Qt automatically grabs
the mouse when a button is pressed and ungrabs it when it is released.
Implemented this functionality to make Qt5 behavior similar to Qt4.

Task-number: QTBUG-25977
Change-Id: I17aa7e8190f4f5224ebc382d62970c86ae492bdb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix QDockWidgets on XCB.
Friedemann Kleint [Thu, 28 Jun 2012 08:19:17 +0000 (10:19 +0200)]
Fix QDockWidgets on XCB.

Do not use native decoration.

Task-number: QTBUG-26296
Change-Id: I15a6ace737a08003ee196bde3d0b5ca65aa00408
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQNX: fix compilation with C++11 enabled
Marc Mutz [Tue, 3 Jul 2012 08:28:55 +0000 (10:28 +0200)]
QNX: fix compilation with C++11 enabled

QNX uses GCC, but by default not libstdc++ as the standard library,
but 'libcpp', a Dinkumware-derived implementation that doesn't sport
many of the C++11 features, yet.

Thus, the compiler detection sets Q_COMPILER_INITIALIZER_LIST, which is true,
in a way, but we're lacking stdlib support, so the next
  \#include <initializer_list> will fail.

So, simply don't define Q_COMPILER_INITIALIZER_LIST if we're on QNX
and detect a Dinkumware signature (taken from Boost.Config).

This is a hot-fix. I'm also preparing a more comprehensive solution
(qstdlibdetection.h).

Change-Id: Ieeb147251c2935517faba61f75d1580a9e1649c4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
12 years agoRemove platform specific DirectWrite font engine from QtGui
Eskil Abrahamsen Blomfeldt [Mon, 2 Jul 2012 14:24:06 +0000 (16:24 +0200)]
Remove platform specific DirectWrite font engine from QtGui

This has moved into the platform plugin, but it was still lying
around in QtGui and hindering it from compiling.

Change-Id: I47fa730453cbd8aa230ccc4651afd2e774023db6
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoCompile when -directwrite is passed to configure
Eskil Abrahamsen Blomfeldt [Tue, 3 Jul 2012 08:47:07 +0000 (10:47 +0200)]
Compile when -directwrite is passed to configure

The signature for alphaRGBMapForGlyph() was updated in the
header but not the implementation. The include with
QT_BUILD_GUI_LIB defined would re-export several symbols in
QtGui from the plugin which would make the link against QtGui
fail.

Change-Id: I23c67f97ca68f984b7a1603059c6f177fef60cca
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agotst_QTcpServer::clientServerLoop fix for Windows Xp
Martin Petersson [Tue, 3 Jul 2012 12:20:37 +0000 (14:20 +0200)]
tst_QTcpServer::clientServerLoop fix for Windows Xp

When we do not have dual stack the listen on QHostAddress::Any will
result in a serverAddress that is AnyIPv4.

Change-Id: I3c2c21c9412cd46a57e3ed7ce1c1bd2ef42d4bd9
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoQNativeSocketEngine: remove compile watning on Windows
Martin Petersson [Tue, 3 Jul 2012 08:58:20 +0000 (10:58 +0200)]
QNativeSocketEngine: remove compile watning on Windows

Remove warning of unused variable.

Change-Id: Ia361dcb9081cd47c7018f5e75cdb8eb74f5474d4
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoSocketEngine Windows: If not dual stack, use IPv4 for AnyIPProtocol
Martin Petersson [Tue, 3 Jul 2012 08:46:36 +0000 (10:46 +0200)]
SocketEngine Windows: If not dual stack, use IPv4 for AnyIPProtocol

If the Windows version doesn't support dual stack then we should bind
to IPv4. So we should change the socketProtocol to
QAbstractSocket::IPv4Protocol as well.

Change-Id: I7f9d0bdd861f82d720e347d3fa968198de720d1a
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoAdd QChar::SoftHyphen enum value
Konstantin Ritt [Fri, 29 Jun 2012 06:07:34 +0000 (09:07 +0300)]
Add QChar::SoftHyphen enum value

Just like for the QChar::ByteOrderMark, `ch == QChar::SoftHyphen`
is much more readable than `ch == 0x00ad // (soft-hyphen)`, etc.

Change-Id: I9c85f14cfd979037d35103c3259a435fd729b869
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQNX: set QMAKE_CXXFLAGS_CXX11
Marc Mutz [Tue, 3 Jul 2012 08:54:29 +0000 (10:54 +0200)]
QNX: set QMAKE_CXXFLAGS_CXX11

Rationale:
  QCC is a wrapper around GCC, but it doesn't understand -std,
  so we need to pass it via -Wc.

  The underlying GCC is v4.4, which doesn't know -std=c++11
  yet, only c++0x.

  We can't use -std=c++0x here, because the QNX headers
  depend on some GNU extensions (nanosleep() was one that I
  saw), so it has to be gnu++0x, ie. STD C++ + GNU extensions.

Change-Id: Ia5caf68f558b1638224e4876f1bbec84a0a93f67
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
12 years agoremoved ancient left-over test from tst_qwidget
Joerg Bornemann [Tue, 3 Jul 2012 11:49:11 +0000 (13:49 +0200)]
removed ancient left-over test from tst_qwidget

The part of tst_qwidget::reparent() that "makes sense only on Windows"
is antiquated at least since the introduction of alien widgets.
It basically tests if QWidget::winId() returns a valid window handle
(has been replaced with winHandleOf here in the meantime).
This is always successful, because winId() creates a valid window handle.

Change-Id: I52c370e26fd9b34861bd4d52c12dded243382d43
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoSuppress QWindowSystemInterface inclusion warnings.
Girish Ramakrishnan [Tue, 3 Jul 2012 03:46:36 +0000 (09:16 +0530)]
Suppress QWindowSystemInterface inclusion warnings.

Since QWindowSystemInterface is now part of QPA API. The correct
inclusion is:
    #include <qpa/qwindowsysteminterface.h>
    #include <qpa/qwindowsysteminterface_p.h>

Bulk of the work was done by:
    find . -type f | xargs sed -i -e 's,#include <\(QtGui/\)\?QWindowSystemInterface>,#include <qpa/qwindowsysteminterface.h>,g'

Change-Id: If75fc32611e72ef1cf58505794def375b1acf74a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agotst_QWidget::gdiPainting fixed
Joerg Bornemann [Mon, 2 Jul 2012 15:49:16 +0000 (17:49 +0200)]
tst_QWidget::gdiPainting fixed

We cannot use QWidget::grab for widgets that have WA_PaintOnScreen set.
QScreen::grabWindow copies the real screen contents for us.

Change-Id: If1f6233ec48bcb2b941ea683c56ce71a39642e67
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agofix QWidget::grab(QRect(x, y, -1, -1))
Joerg Bornemann [Mon, 2 Jul 2012 15:08:43 +0000 (17:08 +0200)]
fix QWidget::grab(QRect(x, y, -1, -1))

Grabbing a widget with a position != (0,0) and an invalid size returned
a pixmap of the widget's size. As we're grabbing just a part of the
widget, the pixmap must be smaller by the amount of x, respective y.

Autotest: tst_QWidget::grab()

Change-Id: I3d5103e6e7c042cc6112038ace236e3f69060bda
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agorevive the noPaintOnScreen fix on Windows
Joerg Bornemann [Tue, 3 Jul 2012 10:19:38 +0000 (12:19 +0200)]
revive the noPaintOnScreen fix on Windows

The original commit message follows.

Fixes:   Fix the windows PaintOnScreen issue once and for all

Details: To allow both the case where X11 people accidentally set
         PaintOnScreen (which should not have any effect on windows)
         and where people set it and subclass with paintEngine() {
         return 0 } to use GDI / DirectX we do this rather nasty hack.

Original commit in Qt4: 07a2f68bd5869152471e4ffc4a63c683ef141ae8
Autotest: tst_QWidget::paintOnScreenPossible

Change-Id: Ifbb7dc4611959be3ecc362c29a1c3436b0e0fa82
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoAdd support for SQLSTATE error codes
Andras Mantia [Sun, 1 Jul 2012 14:11:00 +0000 (17:11 +0300)]
Add support for SQLSTATE error codes

Postgres can report detailed information about an error using error codes.
See http://www.postgresql.org/docs/8.1/static/errcodes-appendix.html .
The current driver doesn't report the error, nor is it supported by the
QSqlError object.
The patch appends the error to the error message, helping applications to:
- handle different errors in a specific way
- show correct, translated error messages, independently on the language of the postgres installation

Change-Id: Ica3530ac33d3aaa9985e06f6c1f302ece9891033
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoRemove _qpa from cpp filenames
Girish Ramakrishnan [Tue, 26 Jun 2012 01:27:22 +0000 (18:27 -0700)]
Remove _qpa from cpp filenames

36547f4eff44361f7a6acd0cff107c0e47561f93 removed the _qpa from .h
files and promised to remove it from .cpp files at a later date.

Change-Id: I24a5c3796f6b07dd9a1931b699f3212d315edb12
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
12 years agoFixed warnings in qnetworkreply unit test
Kurt Korbatits [Tue, 3 Jul 2012 00:04:41 +0000 (10:04 +1000)]
Fixed warnings in qnetworkreply unit test

On windows without ssl there was a disconnect on sslError signal
that was not wrapped in ifdef.

Change-Id: I9b1327adfa853d4dc8f1d8a0120f8f0ed7c13e9e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoMIPS DSP composition functions optimizations.
Damir Tatalovic [Fri, 22 Jun 2012 16:13:02 +0000 (18:13 +0200)]
MIPS DSP composition functions optimizations.

List of optimized routines:
- comp_func_DestinationOver
- comp_func_SourceIn
- comp_func_DestinationIn
- comp_func_DestinationOut
- comp_func_SourceAtop
- comp_func_DestinationAtop
- comp_func_XOR
- comp_func_SourceOut
- comp_func_solid_SourceOver
- comp_func_solid_DestinationOver
- comp_func_solid_SourceIn
- comp_func_solid_DestinationIn
- comp_func_solid_SourceAtop
- comp_func_solid_DestinationAtop
- copm_func_solid_XOR
- comp_func_solid_SourceOut

Previously optimized routines qt_blend_argb32_on_argb32_mips_dsp and
comp_func_Source_mips_dsp are redesigned and rewritten.

Overall improvement by running tst_bench_blendbench benchmark app
from tests/benchmarks/gui/image/blendbench/ is 27%.

Change-Id: I6ab09b17cac10f4aded59787074ab4c89e72ccac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoSilence clang warning in QVector::reallocData()
Kent Hansen [Tue, 19 Jun 2012 08:46:05 +0000 (10:46 +0200)]
Silence clang warning in QVector::reallocData()

qvector.h:459:30: warning: destination for this 'memcpy' call is a
pointer to dynamic class 'QImage';
vtable pointer will be overwritten [-Wdynamic-class-memaccess]
          ::memcpy(dst, srcBegin, (srcEnd - srcBegin) * sizeof(T));
          ~~~~~~~~ ^
qvector.h:459:30: note: explicitly cast the pointer to silence
this warning
          ::memcpy(dst, srcBegin, (srcEnd - srcBegin) * sizeof(T));
                   ^
                   (void*)

QImage inherits from QPaintDevice, which has virtual functions.
qimage.h declares QImage as a movable type, so
QTypeInfo<QImage>::isStatic is false. Hence, the memcpy codepath will
be reached when the vector is not shared.

We should trust that people declaring such type traits know what
they're doing, so silence the warning.

Change-Id: If36582f57a398fc237fb4bd4f72938fb09667118
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd erase operation to QArrayDataOps
João Abecasis [Fri, 8 Jun 2012 15:35:50 +0000 (17:35 +0200)]
Add erase operation to QArrayDataOps

Change-Id: I37d3ac465f5beddb5038e22e9cda32acb16c78fc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMake QWindowSystemInterface part of QPA API
Girish Ramakrishnan [Tue, 19 Jun 2012 20:21:35 +0000 (13:21 -0700)]
Make QWindowSystemInterface part of QPA API

As discussed on mailing list and QtCS 2012.

Any file starting with qwindowsystem is now marked as
QPA API.

This change drops _qpa from the filenames and adds gui-private
where required for the code to compile. This change is backward
compatible otherwise and compat headers are created for
the old inclusion headers.

Change-Id: I72ea0f394dee74f46e614fcf11ab5500ac9fef2a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agofixed compile for mouse button handling on wince
Bjoern Breitmeyer [Mon, 2 Jul 2012 08:36:25 +0000 (10:36 +0200)]
fixed compile for mouse button handling on wince

WinCE does not support SM_SWAPBUTTON, so the define will
let ce fail the function call and correctly assume normal mouse
button handling

Change-Id: Id603b3b6a995e22d8800e19a5566a56df95c8962
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoremove unused variable from QPlainTextEdit::paintEvent
Joerg Bornemann [Mon, 2 Jul 2012 16:26:30 +0000 (18:26 +0200)]
remove unused variable from QPlainTextEdit::paintEvent

Change-Id: I0959acebaca0685f799465999ed002242f3b0ec3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoMove DirectFB tests into qpa
Girish Ramakrishnan [Mon, 2 Jul 2012 03:54:16 +0000 (09:24 +0530)]
Move DirectFB tests into qpa

Change-Id: I15c90e2e8befef5529b35fa02d3ca6d67a409cc7
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQtGui: add member-swap to shared classes
Marc Mutz [Thu, 5 Apr 2012 12:49:02 +0000 (14:49 +0200)]
QtGui: add member-swap to shared classes

Implemented as in other shared classes (e.g. QPen).

Change-Id: I5b96d4a4795870d6252aa53de6fbaedde7c0095a
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoQSslCertificate::fromPath fix wildcard handling
Martin Petersson [Fri, 8 Jun 2012 08:39:37 +0000 (10:39 +0200)]
QSslCertificate::fromPath fix wildcard handling

The reqExp used to handle wildcards in the path was broken. So we
always searched the working directory and not the specified path.
Autotest where passing because of a hack used for Windows paths
where we removed the first two chars in the path string.

This fix will not use nativeSeparators thus removing the Windows hack
and fix the regExp to match wildcard chars.

Task-number: QTBUG-23573
Change-Id: I56fadbb67f25b8ce9c0f17cb6232e0bdb9148b1c
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoAdd null httpReply checks to QHttpThreadDelegate
Shane Kearns [Thu, 28 Jun 2012 13:52:45 +0000 (14:52 +0100)]
Add null httpReply checks to QHttpThreadDelegate

If a request is aborted while under load, the abort signal can be
queued in front of a signal emitted from the httpReply.
The abort slot is deleting the httpReply and setting it to null.
So when the queued slot is processed the httpReply is null and
caused an MMU fault.

Removed qWarning from existing null checks, as these are expected
if abort is called with precise timing so that it races with the
reply finishing on the socket.

Task-number: QTBUG-26245
Change-Id: I0a7e0223fda1bc01d117fe8a993c7f6e43fd72ff
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoOptimize QWindowsFontEngineDirectWrite::initFontInfo() a bit
Konstantin Ritt [Sun, 1 Jul 2012 10:10:10 +0000 (13:10 +0300)]
Optimize QWindowsFontEngineDirectWrite::initFontInfo() a bit

by using QVarLengthArray instead of allocating memory on a heap
and by skipping a subsequent checks & calls in some cases.

Change-Id: I300d8eaf02ef718ce50833b7c2ca7ebe8cfd0224
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoconfigure: properly quote glesv2 flags
Robin Burchell [Fri, 29 Jun 2012 07:16:15 +0000 (09:16 +0200)]
configure: properly quote glesv2 flags

pkg-config returns glesv2 build flags, which are parsed into a few
variables. However, extra spaces get included in these variables and
quoted, which makes includes paths not work.

This problem can only be hit, if you do not have GL ES 2 headers
installed system-wide, but you do have installed into $prefix, and
pkg-config configured to return the configuration for $prefix. Even
though pkg-config returns correct paths, extra space gets included.

Fix it by parsing the strings returned by pkg-config just like a shell
would parse a command line. pkg-config escapes e.g. spaces, so those
escape sequences need to be interpreted, while doing word-splitting. The
result is a quoted list, as expected in the qmake files.

Done-with: Pekka Paalanen <ppaalanen@gmail.com>
Change-Id: I0593ef7e0606ac5ea80da046e45f86806206951a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQtCore: add member-swap to shared classes
Marc Mutz [Thu, 5 Apr 2012 12:49:02 +0000 (14:49 +0200)]
QtCore: add member-swap to shared classes

Implemented as in other shared classes (e.g. QPen).

Special case:
 QUrlQuery: document existing swap().

Change-Id: I4b36cc9577fbf2232d4b2a2d8822d26e41e22cad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoDirectWrite font engine: don't leak the font table buffer
Konstantin Ritt [Mon, 2 Jul 2012 04:44:27 +0000 (07:44 +0300)]
DirectWrite font engine: don't leak the font table buffer

Ideally, each TryGetFontTable() call sequence should be followed
by the call to ReleaseFontTable() with the context value
taken from the first TryGetFontTable() call,
otherwise we'll leak the buffer allocated for the font table.

Change-Id: I627bf0133b7f61798e82929723ccfb780ce9ee69
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoqmake: improve the .pc files generator
Konstantin Ritt [Sat, 30 Jun 2012 06:05:13 +0000 (09:05 +0300)]
qmake: improve the .pc files generator

Don't hardcode the "qt_config" EXTRA variable and use QMAKE_PKGCONFIG_VARIABLES instead.
This allows qmake create the .pc files that are unrelated to Qt.

Change-Id: Ic72005e8819a15f6c50f3aaf79424a247fba20af
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>