profile/ivi/qtbase.git
12 years agoExport QTextImageHandler and add accessor for image
Eskil Abrahamsen Blomfeldt [Tue, 20 Sep 2011 08:19:18 +0000 (10:19 +0200)]
Export QTextImageHandler and add accessor for image

To allow optimizations in the scene graph, we export the private
QTextImageHandler class and add a function which will fetch
a given image when required, or return the cached image in the
document resources.

Task-number: QTBUG-20917
Change-Id: If45e51b0d9a267bc198623165e7a2cc1fb2b961f
Reviewed-on: http://codereview.qt-project.org/5227
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agotestlib: Separate the gui- and widgets-specific api
Kent Hansen [Wed, 21 Sep 2011 07:23:51 +0000 (09:23 +0200)]
testlib: Separate the gui- and widgets-specific api

Group the widgets-specific ("legacy") api under as
few ifdefs as possible. (The diff can look confusing;
rest assured that this change "only" moves entire
functions around in the files.)

Change-Id: I27bdec7d1c96d0b040dc22a8fed17e4e47766276
Reviewed-on: http://codereview.qt-project.org/5290
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
12 years agoFix QApplication::startDragDistance()
Kevin Simons [Wed, 21 Sep 2011 10:19:46 +0000 (12:19 +0200)]
Fix QApplication::startDragDistance()

Change-Id: I1b95e25892935b2b6287b8fed719479e37dbcad5
Reviewed-on: http://codereview.qt-project.org/5308
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAccessible Scrollbar: Remove unused function.
Frederik Gladhorn [Thu, 15 Sep 2011 20:35:10 +0000 (22:35 +0200)]
Accessible Scrollbar: Remove unused function.

The default implementation returns the
right role already.

Change-Id: I29146e70cef56a65e2073581ac63cf54e39be89d
Reviewed-on: http://codereview.qt-project.org/5027
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agomerge translate() overloads
Oswald Buddenhagen [Mon, 19 Sep 2011 18:18:08 +0000 (20:18 +0200)]
merge translate() overloads

Change-Id: I58f0d2c2ec6da751860a90096c49c662658643c1
Reviewed-on: http://codereview.qt-project.org/5164
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
12 years agoAccessible Scrollbar: Remove virtual children, value interface
Frederik Gladhorn [Thu, 8 Sep 2011 17:05:18 +0000 (19:05 +0200)]
Accessible Scrollbar: Remove virtual children, value interface

Change-Id: I3a8e74130eb79d289143cb7ac7b8c47cdd3db90c
Reviewed-on: http://codereview.qt-project.org/4819
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoFixes to the Xdnd code in xcb
Lars Knoll [Tue, 20 Sep 2011 16:11:39 +0000 (18:11 +0200)]
Fixes to the Xdnd code in xcb

Make sure we move the drag pixmap when required,
and readd some commented out code from Qt 4.x.

Change-Id: Ib4302b394f4ac7b966d0146267651b9c3860c62b
Reviewed-on: http://codereview.qt-project.org/5262
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix support for drag pixmaps
Lars Knoll [Tue, 20 Sep 2011 16:10:39 +0000 (18:10 +0200)]
Fix support for drag pixmaps

Re-add the support for drag pixmaps to qdnd.
Use the new WindowTransparentForMouseEvents
flag for the window that shows the drag pixmap.

Change-Id: I4b594085c161475988b9be0ffdc02c75fcc37f66
Reviewed-on: http://codereview.qt-project.org/5261
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdd Qt::WindowTransparentForMouseEvents
Lars Knoll [Tue, 20 Sep 2011 16:09:08 +0000 (18:09 +0200)]
Add Qt::WindowTransparentForMouseEvents

Add a flag for output only windows that are
transparent for mouse events and implement it
for the xcb backend.

Change-Id: I24afdb6b27de34bcdf0c061a5a4987ac2880e4ae
Reviewed-on: http://codereview.qt-project.org/5260
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoCreate the window when needed
Lars Knoll [Mon, 19 Sep 2011 19:10:07 +0000 (21:10 +0200)]
Create the window when needed

We need to create the XWindow here to
avoid crashes, when resizing the backing store
before creating the window.

Change-Id: Ib8d9efca3552e5a91f5f63a9262449080ae301e5
Reviewed-on: http://codereview.qt-project.org/5259
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoReturn the correct geometry
Lars Knoll [Mon, 19 Sep 2011 19:08:36 +0000 (21:08 +0200)]
Return the correct geometry

When the platform window is created, it is the
authorative source for geometry information.

It would however be better if we could completely
avoid duplicated places for the geometry data.

Change-Id: Id90b24b9c40acb57f3d11b8b927292c06bac335e
Reviewed-on: http://codereview.qt-project.org/5258
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoCompile
Jan-Arve Saether [Tue, 20 Sep 2011 07:59:13 +0000 (09:59 +0200)]
Compile

Change-Id: I27c2fabf1f4b0fdb9a1c3fd238b92f46a339a721
Reviewed-on: http://codereview.qt-project.org/5209
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCheck argument count before accessing argument.
Frederik Gladhorn [Tue, 13 Sep 2011 12:38:09 +0000 (14:38 +0200)]
Check argument count before accessing argument.

Also use QList::at instead of operator[].

Fixes: QTBUG-21403
Reviewed-by: Gabi
(cherry picked from commit 6997b836f445908cf53c1c96a69e3eb7ba535706)

Change-Id: I5d9de189e931b2b55fbd7baab0baad94adae352b
Reviewed-on: http://codereview.qt-project.org/4782
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
12 years agoRemove testlib's dependency on gui and widgets
Kent Hansen [Fri, 16 Sep 2011 08:03:04 +0000 (10:03 +0200)]
Remove testlib's dependency on gui and widgets

Commit 37d76a679878d7c07f8a2cb17f7bda46f6582572
made testlib depend on gui and widgets. It shouldn't.
Changing the includes was enough.
It's the application (e.g. autotest) that uses the
gui/widgets features that should link against gui/widgets.

Change-Id: If80d30a7eca2cac78cb5c6e5d29c82a06fb9f1dd
Reviewed-on: http://codereview.qt-project.org/5095
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
12 years agotestlib: Remove widgets dependency when only using gui
Kent Hansen [Tue, 20 Sep 2011 05:59:46 +0000 (07:59 +0200)]
testlib: Remove widgets dependency when only using gui

There's api in testlib that should only be available
if the application links against widgets.

Change-Id: I22e382c6710690866ed8ffed81bae27b548dc830
Reviewed-on: http://codereview.qt-project.org/5094
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
12 years agoDon't run multiexec test with file logging
Jason McDonald [Wed, 21 Sep 2011 00:38:09 +0000 (10:38 +1000)]
Don't run multiexec test with file logging

The multiexec test runs the same test object five times.  If the -o
option is given, the output file is overwritten by each run of the test
object, meaning that tst_selftest only sees 1/5 of the test output in a
file compared with what it sees on the console.  This makes it
impossible to use the expected output file to verify the test for both
console and file output.  This issue is noted in QTBUG-21561.

Change-Id: I00031a2ea43a7ef78e8317473a089306ec062d8e
Reviewed-on: http://codereview.qt-project.org/5270
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove printf calls from warnings selftest
Jason McDonald [Tue, 20 Sep 2011 07:19:26 +0000 (17:19 +1000)]
Remove printf calls from warnings selftest

The warnings selftest verifies that qtestlib correctly handles output
sent via qDebug() and friends.  The test had a number of printf calls
that were used to tell the user what output they should expect to see
next, but by bypassing testlib's logging, these made the testlog differ
depending on whether the test log was directed to the console or a file.

The printf calls are no longer needed, as any regressions in qDebug will
be detected by tst_selftests, which compares the output of the warnings
test with a reference copy of the expected output.

Change-Id: I8c3a3237463141fa494c50ca02062760cb583090
Reviewed-on: http://codereview.qt-project.org/5200
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoThis passes just fine
Lars Knoll [Thu, 15 Sep 2011 12:47:41 +0000 (14:47 +0200)]
This passes just fine

Task-number: QTBUG-21424
Change-Id: Ied95373b2cf3882ec4f352ccbc285b578c66f83d
Reviewed-on: http://codereview.qt-project.org/5003
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoThis test passes fine.
Lars Knoll [Thu, 15 Sep 2011 12:42:45 +0000 (14:42 +0200)]
This test passes fine.

Task-number: QTBUG-21402
Change-Id: Ied00dd2302b08d75e44c102f6025123b41657ca6
Reviewed-on: http://codereview.qt-project.org/5001
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix last few autotest gui/widgets dependencies
Kent Hansen [Tue, 20 Sep 2011 06:00:59 +0000 (08:00 +0200)]
Fix last few autotest gui/widgets dependencies

This is in preparation of removing testlib's
dependency on QtGui and QtWidgets.

Autotests that need QtWidgets api must
explicitly include it (since the types are no
longer provided by the QtGui master header).

Change-Id: Ifd15f72e2c553fba0c399c921957c4e955bb590d
Reviewed-on: http://codereview.qt-project.org/5191
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoImplemented key filter support on platform input context
Pekka Vuorela [Tue, 20 Sep 2011 12:33:27 +0000 (15:33 +0300)]
Implemented key filter support on platform input context

As previously with QInputContext, now supporting filterEvent()
interface. Usage only on XCB so far.

Change-Id: I8e5972626552bda32318fe060017d0217bb79a94
Reviewed-on: http://codereview.qt-project.org/5240
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove stale QtDeclarative dependency on QtOpenGL
Kent Hansen [Tue, 20 Sep 2011 07:29:35 +0000 (09:29 +0200)]
Remove stale QtDeclarative dependency on QtOpenGL

QtDeclarative doesn't link against QtOpenGL anymore.

This line was implicitly causing the QtWidgets library
to get linked in as well.

Change-Id: I56e6e9db52eec7fc924506bfeb4b7931ea04e616
Reviewed-on: http://codereview.qt-project.org/5204
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoCocoa: Adjust touch point rectangle by -0.5.
Bjørn Erik Nilsen [Tue, 20 Sep 2011 13:45:29 +0000 (15:45 +0200)]
Cocoa: Adjust touch point rectangle by -0.5.

The actual touch point is supposed to be in the center of the rectangle,
and since the rectangle is 1x1 it means we have to subtract 0.5 from x
and y.

Change-Id: Ica4aba26dbe61328c8e7cbdcf8b02c96e2f41a40
Reviewed-on: http://codereview.qt-project.org/5256
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
12 years agoCocoa: Update the geometry whenever the window moves.
Bjørn Erik Nilsen [Tue, 20 Sep 2011 13:04:54 +0000 (15:04 +0200)]
Cocoa: Update the geometry whenever the window moves.

Change-Id: I3d47d62aaa0b4ccc88159ba9b6d1a3ebd42fedf5
Reviewed-on: http://codereview.qt-project.org/5255
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
12 years agoCocoa: Add helper functions for NSPoint <-> QPoint(F) conversion.
Bjørn Erik Nilsen [Tue, 20 Sep 2011 12:11:50 +0000 (14:11 +0200)]
Cocoa: Add helper functions for NSPoint <-> QPoint(F) conversion.

... and use [NSEvent mouseLocation] as global mouse position rather than
relying on QCursor::pos() (which is buggy at the moment).

Change-Id: Ieb8000089d0d824bed89abd8b2add9e28273f227
Reviewed-on: http://codereview.qt-project.org/5254
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
12 years agoQWindowSystemInterface: Fix wrong mapping of coordinates.
Bjørn Erik Nilsen [Tue, 20 Sep 2011 10:17:28 +0000 (12:17 +0200)]
QWindowSystemInterface: Fix wrong mapping of coordinates.

QTouchEvent::TouchPoint assumes the rect() is in local coordinates,
whereas QWindowSystemInterface::TouchPoint uses screen coordinates.
We must therefore use QWindowSystemInterface::TouchPoint::area as the
screenRect() rather that the rect() and then use the screen coordinate
to calculate the local coordinate by using mapFromGlobal.

Change-Id: If7a52f5668c3938f46bdd38a5ea82b5313d6b626
Reviewed-on: http://codereview.qt-project.org/5253
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
12 years ago[blitter] Fix memory leak in the blitter paintengine
Holger Hans Peter Freyther [Tue, 20 Sep 2011 13:23:02 +0000 (15:23 +0200)]
[blitter] Fix memory leak in the blitter paintengine

The raster engine and the capabilities were leaked, use the
QScopedPointer to prevent that from happening.

Change-Id: I31ba0117280b48ad942fbb638fb151ccb7b34385
Merge-request: 59
Reviewed-on: http://codereview.qt-project.org/5242
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years ago[blitter] Use QScopedPointer for the engine and blittable
Holger Hans Peter Freyther [Tue, 20 Sep 2011 13:23:03 +0000 (15:23 +0200)]
[blitter] Use QScopedPointer for the engine and blittable

Use the QScopedPointer to prevent memory leaks, right now
the code appears to be sound but make it more clear that
calling ::setBlittable will destroy the old one.

Change-Id: Idc71add7cfd429ff5b9d0ea9908d9fff1e7ce74d
Merge-request: 59
Reviewed-on: http://codereview.qt-project.org/5243
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoUse QT_MAX_CACHED_GLYPH_SIZE in QFontEngineFT
Aleksandar Stojiljkovic [Thu, 8 Sep 2011 09:00:41 +0000 (12:00 +0300)]
Use QT_MAX_CACHED_GLYPH_SIZE in QFontEngineFT

Task-number: QTBUG-21162 - Letters get truncated when font size=72 and set to Italic
Reviewed-by: Eskil
(cherry picked from commit cd43d6386de6e66379fa23c1ea4ec06141167c86)

Change-Id: Ic05f775975d5f21e0274e7b2c3a4903d6a4ae41f
Reviewed-on: http://codereview.qt-project.org/5203
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
12 years agoGenerate glyphs in un-transformed coordinate system.
Samuel Rødal [Fri, 2 Sep 2011 11:48:26 +0000 (13:48 +0200)]
Generate glyphs in un-transformed coordinate system.

Avoids rounding issues with very large coordinates.

Task-number: QTBUG-21262 - QRasterPaintEngine & QFontEngineFT - fonts corrupted when scrolling to the bottom of long texts
Reviewed-by: Eskil
Signed-off-by: Aleksandar Stojiljkovic <aleksandar.stojiljkovic@nokia.com>
(cherry picked from commit 43e013e2048e8193e2d31276cac6348a9f6ce340)

Change-Id: I5810a1a60f2bbdba4889a6b5e493b183018f3976
Reviewed-on: http://codereview.qt-project.org/5202
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
12 years agoAvoid double caching glyphs in raster/QPA/FreeType
Eskil Abrahamsen Blomfeldt [Fri, 16 Sep 2011 14:00:04 +0000 (16:00 +0200)]
Avoid double caching glyphs in raster/QPA/FreeType

Since FreeType has internal caching, it has had a special
code path in the raster engine which avoided using Qt's glyph
cache, as that would be redundant. However, when compiling
with QPA, we want the same behavior without being able to
access the QFontEngineFT class. To achieve this, I've made
a new abstraction and added it to QFontEngine which allows
the FT engine to provide direct pointers into the alpha maps
stored by FT. This requires a locking/unlocking mechanism.

Yes, the QFontEngine::alphaMap* API is slowly becoming a horrible
mess, but due to time constraints, the task of refactoring these
functions into a more flexible API needs to wait. I've added a
TODO comment for this.

Change-Id: I08237403c2967f8fb952258178676f33a87c0353
Reviewed-on: http://codereview.qt-project.org/5155
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoImprove globaldata testlib selftest.
Jason McDonald [Tue, 20 Sep 2011 03:13:34 +0000 (13:13 +1000)]
Improve globaldata testlib selftest.

Make the test use qDebug instead of printf, so that the reference test
output is the same regardless of whether the log goes to the console or
a file.

Also rename the test class, as it was evidently cut-n-pasted from the
subtest selftest without being renamed.

Change-Id: I8df1f0989f2e8c33c1f829ba8110fd740ff70f63
Reviewed-on: http://codereview.qt-project.org/5184
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoSplit subtest selftest
Jason McDonald [Tue, 20 Sep 2011 01:56:31 +0000 (11:56 +1000)]
Split subtest selftest

This test was attempting to verify two completely unrelated things, so
this commit splits it into two tests.

Also, printf calls are replaced by qDebug so that the test does not
bypass the testlib loggers.

Change-Id: I1a202af38ce2c69690a32d93405ba604ec6cabee
Reviewed-on: http://codereview.qt-project.org/5178
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove waitwithoutgui testlib selftest
Jason McDonald [Tue, 20 Sep 2011 00:39:58 +0000 (10:39 +1000)]
Remove waitwithoutgui testlib selftest

This test is not useful for finding bugs in qtestlib's logging code,
because it bypasses the qtestlib loggers and doesn't play nice with
tst_selftest.  Neither is this test very useful for finding bugs in
QTest::qWait(), as the test only proves the qWait() terminates, not that
it waits accurately, or even that it waits at all.

Change-Id: Ia5dd7cbaf3a6fbb4e94e54ed155263580e495694
Reviewed-on: http://codereview.qt-project.org/5173
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix compilation
Lars Knoll [Fri, 16 Sep 2011 12:24:26 +0000 (14:24 +0200)]
Fix compilation

Change-Id: I6eec01349126393183ec8df99a50f96c192ee0c2
Reviewed-on: http://codereview.qt-project.org/5099
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoNo dependencies on opengl, widgets and printsupport
Lars Knoll [Fri, 16 Sep 2011 12:22:48 +0000 (14:22 +0200)]
No dependencies on opengl, widgets and printsupport

The problem is that the libQtPlatformSupport.prl file
will otherwise add these as link dependencies, making any
platform plugin link against these.

Change-Id: Ief71726e86990bb44b12cf86e78b844a1a23ae3c
Reviewed-on: http://codereview.qt-project.org/5098
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFixed wrong mouse coordinate mapping.
Samuel Rødal [Mon, 19 Sep 2011 13:01:19 +0000 (15:01 +0200)]
Fixed wrong mouse coordinate mapping.

QApplication::pickMouseReceiver() does the appropriate mapping if the
receiver changes.

Change-Id: Ieead2dea55e6119fae695af7fa12ab5cb2ef6dac
Reviewed-on: http://codereview.qt-project.org/5148
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoCocoa platform plugin: Reduce multitouch area to be one pixel.
Bjørn Erik Nilsen [Mon, 19 Sep 2011 16:47:20 +0000 (18:47 +0200)]
Cocoa platform plugin: Reduce multitouch area to be one pixel.

Mac only support multitouch points, hence width/height 1. Also add
comment about performance related to multitouch events.

Change-Id: I307261492366e361e17f9edf446f456c07c87a22
Reviewed-on: http://codereview.qt-project.org/5162
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
12 years agoFix regression causing synthesized oblique glyphs to clip
Eskil Abrahamsen Blomfeldt [Mon, 19 Sep 2011 13:55:39 +0000 (15:55 +0200)]
Fix regression causing synthesized oblique glyphs to clip

In 20009ed797fb30952a889df5716aa2399102be58 I introduced a new
approach to synthesized oblique. However, while the embolden
function in FT alters the glyph metrics accordingly, the
oblique function does not, so the glyphs would be clipped to the
original, unslanted metrics. So I've implemented the same matrix
in the loadGlyph() function and we now apply this to the metrics
manually. This will only work as long as the underlying algorithm
doesn't change significantly.

Task-number: QTBUG-21202
Change-Id: Ic20b2a0fdeac5ce833e95fd06efa12b3b70feee5
Reviewed-on: http://codereview.qt-project.org/5156
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoCocoa platform plugin: update headers for multitouch.
Bjørn Erik Nilsen [Mon, 19 Sep 2011 13:12:20 +0000 (15:12 +0200)]
Cocoa platform plugin: update headers for multitouch.

See commit: b888bf1b515b47bc12dfaeac06f33af762ce0372
(Moved multitouch code from gui/widgets/ to plugins/platforms/cocoa)

Change-Id: I7c71f4d858cba4918392d477c6597b48e271ea99
Reviewed-on: http://codereview.qt-project.org/5154
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
12 years agoCocoa platform plugin: Implement multitouch support.
Bjørn Erik Nilsen [Mon, 19 Sep 2011 13:07:15 +0000 (15:07 +0200)]
Cocoa platform plugin: Implement multitouch support.

Change-Id: Ic4b5bc4e48bd1e70cffedf15530b8a933037de66
Reviewed-on: http://codereview.qt-project.org/5153
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
12 years agoMac: Adapt multitouch code for cocoa to QWindowSystemInterface.
Bjørn Erik Nilsen [Mon, 19 Sep 2011 13:05:12 +0000 (15:05 +0200)]
Mac: Adapt multitouch code for cocoa to QWindowSystemInterface.

Change-Id: I4a80ed8a497dfb1b8b477e4a40ec91a16f1bb541
Reviewed-on: http://codereview.qt-project.org/5152
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
12 years agoMac: Move multitouch support from widgets to cocoa platform plugin.
Bjørn Erik Nilsen [Mon, 19 Sep 2011 13:03:53 +0000 (15:03 +0200)]
Mac: Move multitouch support from widgets to cocoa platform plugin.

Change-Id: I91994801aefa1257e7bda51b409290f70ab9128e
Reviewed-on: http://codereview.qt-project.org/5151
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
12 years agoMake sure to clip in QXcbBackingStore::flush()
Samuel Rødal [Mon, 19 Sep 2011 11:42:20 +0000 (13:42 +0200)]
Make sure to clip in QXcbBackingStore::flush()

Clip to image and window dimensions to prevent X errors.

Change-Id: I7fa581217444e00d6eb83ac356c600f86ae03636
Reviewed-on: http://codereview.qt-project.org/5140
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
12 years agoMove handling of -qmljsdebugger argument to QCoreApplication
Kai Koehne [Mon, 19 Sep 2011 08:56:12 +0000 (10:56 +0200)]
Move handling of -qmljsdebugger argument to QCoreApplication

Move handling of -qmljsdebugger= argument from QApplication
to QCoreApplication. It makes sense to allow debugging also
for applications based on QCoreApplication (which we intend
to support in QtDeclarative).

Change-Id: I5a03a4510fc166cea5aad146da673ee0e7cd5d36
Reviewed-on: http://codereview.qt-project.org/5121
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoRemoving XFail from one test, since QCursor::setPos now works for qpa
Holger Ihrig [Mon, 19 Sep 2011 11:40:00 +0000 (13:40 +0200)]
Removing XFail from one test, since QCursor::setPos now works for qpa

Task-number: QTBUG-20753

Change-Id: I0e381f22f6d94c5991ac3425f75e682708857aa2
Reviewed-on: http://codereview.qt-project.org/5139
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
12 years agoSay hello to QWindow::accessibleRoot()
Jan-Arve Saether [Fri, 16 Sep 2011 11:33:07 +0000 (13:33 +0200)]
Say hello to QWindow::accessibleRoot()

Change-Id: I1efa71f01f8af46c9addf2aae21e4b6fc086ad2e
Reviewed-on: http://codereview.qt-project.org/5087
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoAdd parent and child functions to QAccessibleInterface.
Frederik Gladhorn [Thu, 15 Sep 2011 19:41:54 +0000 (21:41 +0200)]
Add parent and child functions to QAccessibleInterface.

Stop the mis-use of navigate to find the parent.
In order to make navigation straight forward
parent and child functions are now part of
QAccessibleInterface.
This allows navigating the hierarchy of
accessible objects without the 1-based indexes in the
navigate function which lead to confusion.

Eventually the support for Ancestor in navigate can be completely removed
and forwarded in the windows bridge if needed.

In addition default parameters for virtual children.
This will make the transition smooth since it allows to remove the integer
already.

Change-Id: I278287ce17161f9fa46797ac244676778c859576
Reviewed-on: http://codereview.qt-project.org/5024
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoInitialize in the right order
Gunnar Sletta [Mon, 19 Sep 2011 08:32:48 +0000 (10:32 +0200)]
Initialize in the right order

Change-Id: I605c92bb43ea304cc812f85dc9937c161b2279f6
Reviewed-on: http://codereview.qt-project.org/5120
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
12 years agoFix autotest gui/widgets dependencies
Kent Hansen [Fri, 16 Sep 2011 12:07:05 +0000 (14:07 +0200)]
Fix autotest gui/widgets dependencies

This is in preparation of removing testlib's
dependency on QtGui and QtWidgets.

Autotests that need QtWidgets api must
explicitly include it (since the types are no
longer provided by the QtGui master header).

Autotests that don't need QtGui or QtWidgets
api shouldn't link against those libraries.

Change-Id: I2808289068514fcac582808828ad4634e2631733
Reviewed-on: http://codereview.qt-project.org/5093
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemoved insignificant_test from tst_v8
Holger Ihrig [Thu, 15 Sep 2011 13:06:07 +0000 (15:06 +0200)]
Removed insignificant_test from tst_v8

Problem was fixed by Change Ie172e935: Revert accidental v8 submodule version downgrade

Change-Id: Ie0467170df70e9fcc10837150103d48ddd48734b
Reviewed-on: http://codereview.qt-project.org/5006
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
12 years agoMove the module qdoc files from qtdoc and split up doc/src.
Casper van Donderen [Fri, 16 Sep 2011 12:14:43 +0000 (14:14 +0200)]
Move the module qdoc files from qtdoc and split up doc/src.

Change-Id: I7d992889379d78e07a0b7023facebd7421cf6d22
Reviewed-on: http://codereview.qt-project.org/5092
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
12 years agoSupport synthesized oblique and bold in SceneGraph
Eskil Abrahamsen Blomfeldt [Fri, 16 Sep 2011 09:58:09 +0000 (11:58 +0200)]
Support synthesized oblique and bold in SceneGraph

When fetching the outlines we need to synthesize the weight and
style of the requested font. This is currently only supported
on FreeType versions that have the Embolden and Oblique functions.
We also use FreeType's Oblique function for regular text when
possible, and only use the matrix approach when that function
is unavailable.

Task-number: QTBUG-21202
Change-Id: I0656ab66cc3ec70d6a7675b8c78d06632625261c
Reviewed-on: http://codereview.qt-project.org/5076
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoEnable glyph caching on QPA
Eskil Abrahamsen Blomfeldt [Fri, 16 Sep 2011 12:16:44 +0000 (14:16 +0200)]
Enable glyph caching on QPA

The glyph caching was disabled on QPA, possibly due to some
bugs which have gone away now. To avoid the performance hit
of this, we need to enable it. Simple tests of QTextEdit
indicate that this works fine.

Change-Id: I40845b327331b366161f1ca55bf00853bca87358
Reviewed-on: http://codereview.qt-project.org/5096
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove gui-related ifdef from testlib/qbenchmark.cpp
Kent Hansen [Fri, 16 Sep 2011 06:29:53 +0000 (08:29 +0200)]
Remove gui-related ifdef from testlib/qbenchmark.cpp

It didn't make sense, since testlib doesn't link against
gui. The QApplication api wasn't used anywhere anyway.

Change-Id: Idb1bd20c7bcd0f9f16a9b526a7dabe4afccecfc4
Reviewed-on: http://codereview.qt-project.org/5058
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoTreat QTestFontEngine properly
Jiang Jiang [Fri, 16 Sep 2011 14:11:46 +0000 (16:11 +0200)]
Treat QTestFontEngine properly

Do not try to fill fontDef when it's a test font engine, otherwise
it will cause a crash because desc.family is 0.

Change-Id: I008b784bae3e60a25c33c285d944442a3616a9a2
Reviewed-on: http://codereview.qt-project.org/5103
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoFixed xcb-render config test.
Samuel Rødal [Fri, 16 Sep 2011 10:56:01 +0000 (12:56 +0200)]
Fixed xcb-render config test.

Change-Id: I5f9f2beb57a2bc6b4e44dcd71a03cfdcf69cae45
Reviewed-on: http://codereview.qt-project.org/5086
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix the test case
Lars Knoll [Thu, 15 Sep 2011 12:40:09 +0000 (14:40 +0200)]
Fix the test case

If the MKSPEC we get is an absolute path, we should
pass that one on to qmake. Otherwise it'll try to
find the mkspec in the install location. This fails
as 'make check' is being run before installation.

Task-number: QTBUG-21402
Change-Id: Ie872546f2ee7c5d737e50a1779637e393538ccc2
Reviewed-on: http://codereview.qt-project.org/4999
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agocorrectly initialise private data in QTouchEventSequence constructor
Matthew Cattell [Thu, 15 Sep 2011 10:52:30 +0000 (12:52 +0200)]
correctly initialise private data in QTouchEventSequence constructor

Change-Id: Ia43ab0af4dfbaa824e76f744030e98f29e898bac
Reviewed-on: http://codereview.qt-project.org/4973
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
12 years agoMake sure libQtPlatformSupport has proper flags
Jiang Jiang [Thu, 15 Sep 2011 09:47:06 +0000 (11:47 +0200)]
Make sure libQtPlatformSupport has proper flags

If we don't have Q_FONTCONFIGDATABASE flag, QGenericFontDatabase
will be defined to QBasicUnixFontDatabase even when fontconfig is
available.

Change-Id: I0e79ed8488163cea32352e3fc300acd92ca4bd93
Reviewed-on: http://codereview.qt-project.org/4962
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoSimplify selftest
Jason McDonald [Fri, 16 Sep 2011 06:56:07 +0000 (16:56 +1000)]
Simplify selftest

Don't store separate strings for the logger name and the associated file
suffix -- just use the same string everywhere.

Change-Id: Ie7d1af6bf906b5ac09fbd5fcc5754b68036fb370
Reviewed-on: http://codereview.qt-project.org/5060
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImprove cleanup of selftests
Jason McDonald [Fri, 16 Sep 2011 05:03:44 +0000 (15:03 +1000)]
Improve cleanup of selftests

The selftest was only attempting to delete the output file at the end of
the entire test run.  This file should actually be deleted after each
subtest to ensure that it does not cause confusing errors if the next
subtest fails to overwrite the output file.

Change-Id: Ia3827926f71a697c6108de3f2b08c969f761d978
Reviewed-on: http://codereview.qt-project.org/5051
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove obsolete QEXPECT_FAIL calls
Jason McDonald [Fri, 16 Sep 2011 04:48:56 +0000 (14:48 +1000)]
Remove obsolete QEXPECT_FAIL calls

The removed calls related to tests that were removed when redundant
logging functionality was removed.

Change-Id: Iaebbc109eaaddb440ae78e1f4a1b4e874a8b2960
Reviewed-on: http://codereview.qt-project.org/5050
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImprove compliance with Qt coding guidelines
Jason McDonald [Fri, 16 Sep 2011 04:42:51 +0000 (14:42 +1000)]
Improve compliance with Qt coding guidelines

* Use C++ comment delimiters consistently
* Use a space after control flow keywords
* Don't nest "else if" blocks unnecessarily
* Follow indenting rules
* Added comments describing some internal functions

Change-Id: I72fd1eaf5c5f3130945fbd2b64fa59e19ad2913d
Reviewed-on: http://codereview.qt-project.org/5049
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix XFAIL in testlib selftest
Jason McDonald [Fri, 16 Sep 2011 01:25:29 +0000 (11:25 +1000)]
Fix XFAIL in testlib selftest

Commit 949be8cbdd2d346647accbbd9bdab879256470ec modified the assert test
case but failed to update the line number of the assert in the expected
test output files.

Change-Id: I0d4f55c0b8bc1de8487dd8c6267aa459000cda26
Reviewed-on: http://codereview.qt-project.org/5048
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agominor docu fixes
Konstantin Ritt [Thu, 15 Sep 2011 23:37:35 +0000 (01:37 +0200)]
minor docu fixes

Merge-request: 2646
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
(cherry picked from commit 2fa6d410c6733863b19393c13efbdcb7efd59fc0)

Change-Id: Ic66de960c5ec63a669b164ebf6fadcc4f59295f6
Reviewed-on: http://codereview.qt-project.org/5033
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoWrap calls to Sequence::push_back
João Abecasis [Fri, 26 Aug 2011 13:43:06 +0000 (15:43 +0200)]
Wrap calls to Sequence::push_back

In C++11 push_back is overloaded to support rvalue-references,

   void std::vector<T>::push_back(const T &);
   void std::vector<T>::push_back(T &&);

so attempting to get the address for push_back is ambiguous.

Instead of hardcoding the function signature, the better and more
general solution is to allow the compiler to do the required overload
resolution itself, also allowing for implicit conversions to take place.

Task-number: QTBUG-18996
Done-with: Liang Qi
Reviewed-by: Olivier Goffart
(cherry picked from commit ca34cc75294e0d2a8bc491a2c679fe8a69cd0408)

Change-Id: Id271118e489f888905e491dd4cfc3d2db7697552
Reviewed-on: http://codereview.qt-project.org/4642
Reviewed-by: Liang Qi <liang.qi@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
12 years agoCompile in C++0x mode
Lars Knoll [Thu, 15 Sep 2011 20:28:43 +0000 (22:28 +0200)]
Compile in C++0x mode

Change-Id: If97bdd94a51756e48167990a4014ba1059d0a507
Reviewed-on: http://codereview.qt-project.org/5026
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFixed XComposite hardware integration in wayland plugin.
Samuel Rødal [Wed, 14 Sep 2011 12:10:05 +0000 (14:10 +0200)]
Fixed XComposite hardware integration in wayland plugin.

We should set both the pixmap and window bits for XComposite to work on
a stricter EGL / GLX implementation.

Change-Id: Ie1be44ebcc68fed87f48c74dffd887ffae1189d5
Reviewed-on: http://codereview.qt-project.org/4893
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
12 years agoSet the correct buffer pointer (protected member variables are evil).
Samuel Rødal [Tue, 13 Sep 2011 20:59:54 +0000 (22:59 +0200)]
Set the correct buffer pointer (protected member variables are evil).

Change-Id: I6cdd64fbee5a9b46b44d8fadfc0f443dd1f4b140
Reviewed-on: http://codereview.qt-project.org/4862
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix trailing spaces problem by not adding it to QScriptLine.length
Jiang Jiang [Thu, 8 Sep 2011 14:31:53 +0000 (16:31 +0200)]
Fix trailing spaces problem by not adding it to QScriptLine.length

It seems to be the only sane way to fix it. Previous attempts to
fix it by compensating the trailing space width all failed in some
cases, one of the trickiest is when we are having embedded LTR text
that has trailing spaces in a RTL paragraph.

In this patch we leave line.length not including the trailing space
length, but saving it to a separated variable, so that we can always
add it back when needed (QTextLine::textLength() for instance).

It fixed all the problems in different alignments of both RTL and
LTR text. And no regression is found yet.

Reviewed-by: Eskil
(cherry picked from commit 80294c375eca9687d1c34e9ab048294373e7f00c)

Change-Id: Id248ab6f54f8cc25ba0e9d1626703463dfefbcea
Reviewed-on: http://codereview.qt-project.org/4778
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
12 years agoAvoid fontconfig access in fontEngine creation
Jiang Jiang [Tue, 13 Sep 2011 11:33:44 +0000 (13:33 +0200)]
Avoid fontconfig access in fontEngine creation

The only thing we need to know at fontEngine creation is the hinting
style, we can just store it in enumeration process and get it back
from user data pointer. So that fontEngines can be created without
access to fontconfig at all. (Since we are doing our own matching.)

Change-Id: I5ab2d1f27e28787447aedcbdef16555fb0f1b604
Reviewed-on: http://codereview.qt-project.org/4769
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoMac: fix linking with Qt frameworks which don't exist at qmake time
Rohan McGovern [Thu, 15 Sep 2011 22:47:33 +0000 (08:47 +1000)]
Mac: fix linking with Qt frameworks which don't exist at qmake time

This restores the forced-vs-detection logic for Qt frameworks which
was removed by commit ceed409b40fd5b8fe5c62ac33144e66f50b28ede.

The problem of linking against Qt modules compiled as a static
library is solved a different way: the module must explicitly state
in the module .pri file that it is built as a static lib.

Change-Id: Ie3d726f7b3933e5b5d27f15c6112ec1c7dee1ea2
Reviewed-on: http://codereview.qt-project.org/5034
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoFixed Test for QStyleSheetStyle after refactor merge
Holger Ihrig [Thu, 15 Sep 2011 09:49:27 +0000 (11:49 +0200)]
Fixed Test for QStyleSheetStyle after refactor merge

Task-number: QTBUG-21468

Change-Id: I869ae07c834f6d76180d2e29871b8dc9ccb3f523
Reviewed-on: http://codereview.qt-project.org/4963
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
12 years agoAccessibility: TabWidget - remove virt children, add action interface.
Frederik Gladhorn [Tue, 13 Sep 2011 14:27:13 +0000 (16:27 +0200)]
Accessibility: TabWidget - remove virt children, add action interface.

Remove virtual children by creating accessible objects for
tab buttons. Add action interface to activate tabs.

Change-Id: Ifc5e8ae6ec2708df97bbb9a94ddc1421d431ff87
Reviewed-on: http://codereview.qt-project.org/4793
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoSet accessible name on QTabBar buttons.
Frederik Gladhorn [Tue, 13 Sep 2011 14:26:07 +0000 (16:26 +0200)]
Set accessible name on QTabBar buttons.

Change-Id: Id1993d75ec56952b26f158997414b43b857808cd
Reviewed-on: http://codereview.qt-project.org/4791
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoFor complex widgets try to return accessible interfaces.
Frederik Gladhorn [Tue, 13 Sep 2011 14:23:33 +0000 (16:23 +0200)]
For complex widgets try to return accessible interfaces.

Some of the complex' widgets children can return
QAccessibleInterfaces.
Ideally all complex widgets should be removed, this eases the transition.

Change-Id: If3d7f28f97dac8cf5018a2c4c4b33709a3d4595c
Reviewed-on: http://codereview.qt-project.org/4788
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoFix xcb-icccm 3.8 support
Jędrzej Nowacki [Tue, 13 Sep 2011 12:47:38 +0000 (14:47 +0200)]
Fix xcb-icccm 3.8 support

Build fix on platforms having xcb-icccm >= 3.8

Change-Id: Ia20c9a439d57e147db90d635679e471bfa02c840
Reviewed-on: http://codereview.qt-project.org/4779
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix Xcb autodetection during configure.
Jędrzej Nowacki [Tue, 13 Sep 2011 13:03:49 +0000 (15:03 +0200)]
Fix Xcb autodetection during configure.

Change-Id: I550e633d49cfcf4df393ae7d691e7f407276eb58
Reviewed-on: http://codereview.qt-project.org/4781
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoBoost performance of QChar::isSpace
Kent Hansen [Wed, 14 Sep 2011 12:11:17 +0000 (14:11 +0200)]
Boost performance of QChar::isSpace

Make it inline; add fast checks for typical spaces;
add fallback function that uses the fastcall calling
convention.

On ia32, this change makes isSpace ~340x faster for
ascii spaces, ~170x faster for non-space ascii
characters, and ~1.3x faster for non-ascii characters.

Note that this change is NOT binary compatible.

Also add an autotest with expected results from
before the optimization, to ensure that the behavior
is the same.

Change-Id: I9438d0ad3c9ba2e80560c4bee7eed05115265798
Reviewed-on: http://codereview.qt-project.org/4905
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoBoost performance of QChar::isLetterOrNumber
Kent Hansen [Wed, 14 Sep 2011 11:50:36 +0000 (13:50 +0200)]
Boost performance of QChar::isLetterOrNumber

Make it inline; add fast checks for ascii letters
and digits; add fallback function that uses the
fastcall calling convention.

On ia32, this change makes isLetterOrNumber ~120x
faster for ascii letters and digits, ~150x faster
for non-letter/digit ascii characters, and ~1.3x
faster for non-ascii characters.

Note that this change is NOT binary compatible.

Also add an autotest with expected results from
before the optimization, to ensure that the
behavior is the same.

Change-Id: Ia4e13692f4dd79f6aa0b96da29449e0487971b0e
Reviewed-on: http://codereview.qt-project.org/4904
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoBoost performance of QChar::isLetter
Kent Hansen [Wed, 14 Sep 2011 11:38:39 +0000 (13:38 +0200)]
Boost performance of QChar::isLetter

Make it inline; add fast checks for ascii letters;
add fallback function that uses the fastcall calling
convention.

On ia32, this change makes isLetter ~370x faster for
ascii letters, ~250x faster for non-letter ascii
characters, and ~1.5x faster for non-ascii characters.

Note that this change is NOT binary compatible.

Also add an autotest with expected results from
before the optimization, to ensure that the
behavior is the same.

Change-Id: I06f8d3d43114537cee5567e670898cef6494c20a
Reviewed-on: http://codereview.qt-project.org/4903
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoBoost performance of QChar::isDigit
Kent Hansen [Wed, 14 Sep 2011 10:53:20 +0000 (12:53 +0200)]
Boost performance of QChar::isDigit

Make it inline; add fast checks for ascii digits;
add fallback function that uses the fastcall calling
convention.

On ia32, this change makes isDigit ~370x faster for
ascii digit characters, ~250x faster for non-digit
ascii characters, and ~1.5x faster for non-ascii
characters.

Note that this change is NOT binary compatible.

Also add an autotest with expected results from
before the optimization, to ensure that the
behavior is the same.

Change-Id: I718fadecda3f591d6f4c22374d8e476f4724fd83
Reviewed-on: http://codereview.qt-project.org/4902
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoBoost performance of QChar::is{Upper,Lower}
Kent Hansen [Wed, 14 Sep 2011 10:15:07 +0000 (12:15 +0200)]
Boost performance of QChar::is{Upper,Lower}

Calling QChar::category() is slow; do some fast checks to
detect ascii characters before falling back to the generic
handling.

On ia32, this change makes isUpper ~260x faster for uppercase
ascii characters, and ~180x faster for non-uppercase ascii
characters. Similar numbers for isLower.

Even with the additional checks, these versions are slightly
faster than before for non-ascii characters as well, since
we now call the static fastcall category(ushort) function,
which is faster than the category() member function (which
uses the stack to pass the unicode value).

Change-Id: I6ae0df466bb4835ca0d5319fd6018862c849313b
Reviewed-on: http://codereview.qt-project.org/4901
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoAdd benchmark for QChar
Kent Hansen [Wed, 14 Sep 2011 08:53:50 +0000 (10:53 +0200)]
Add benchmark for QChar

The benchmark isn't exhaustive, but tests the functions
that are heavily used by QtDeclarative.

For performance reasons, QtDeclarative has its own
implementation of various QChar functions (in
qdeclarativeutils_p.h). But we want to make the actual
QChar functions as fast, so that QtDeclarative can also
use them.

Change-Id: Ic25f30651224c39f2824380d679b8500739f38c3
Reviewed-on: http://codereview.qt-project.org/4900
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix include path.
Frederik Gladhorn [Wed, 14 Sep 2011 14:51:04 +0000 (16:51 +0200)]
Fix include path.

Reviewed-by: Gabi
Change-Id: I99b08f8b41f483c92ae175630b812e4b299069b6
Reviewed-on: http://codereview.qt-project.org/4916
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
12 years agoThe Q_WS_X11 define exists no longer. Use Q_OS_UNIX.
Frederik Gladhorn [Tue, 13 Sep 2011 13:55:41 +0000 (15:55 +0200)]
The Q_WS_X11 define exists no longer. Use Q_OS_UNIX.

Change-Id: I1c4b5d4187e1593aa52bc9162d9692959b55e077
Reviewed-on: http://codereview.qt-project.org/4786
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
12 years agoFix warning when building objects with a Q_OBJECT macro
Tobias Hunger [Thu, 15 Sep 2011 09:29:34 +0000 (11:29 +0200)]
Fix warning when building objects with a Q_OBJECT macro

Do not trigger a self-assign warning when running into code containing
a Q_OBJECT macro. Currently this happens a lot e.g. when using clang
to build code using Qt.

Change-Id: I68995624b18406f337318599e463f36f87486e66
Reviewed-on: http://codereview.qt-project.org/4960
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRe-add QT_GCC_*_VERSION qmake variables
Simon Hausmann [Thu, 15 Sep 2011 10:29:08 +0000 (12:29 +0200)]
Re-add QT_GCC_*_VERSION qmake variables

Commit 7493ee1c44a16dc3b155a5bf3ed7ca966a71072a accidentally removed them.

Change-Id: Ia5132b374ded047ae19479bc98d8564f527e5be2
Reviewed-on: http://codereview.qt-project.org/4970
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agodoc: Fix incorrect enum name in QRawFont::alphaMapForGlyph docs
Eskil Abrahamsen Blomfeldt [Tue, 13 Sep 2011 11:16:35 +0000 (13:16 +0200)]
doc: Fix incorrect enum name in QRawFont::alphaMapForGlyph docs

There's no QImage::Format_A8 format. This is a term used in the
corresponding QFontEngineGlyphCache enum.

Reviewed-by: Jiang Jiang
(cherry picked from commit e453fce2731069dce993a94b0c2291307cc7806c)

Change-Id: I68a190abdf4446d05231af89ac861380ac79b188
Reviewed-on: http://codereview.qt-project.org/4773
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
12 years agoProperly register preedit text in QLineControl
Eskil Abrahamsen Blomfeldt [Thu, 15 Sep 2011 08:51:50 +0000 (10:51 +0200)]
Properly register preedit text in QLineControl

Removes the QT_NO_IM macro which was a temporary measure during
refactoring work. This macro disabled the setPreeditArea() call
and caused only the formats of the preedit text to be registered,
not the actual string.

Task-number: QTBUG-21261
Change-Id: I76cdf116043520fa2185ddcd34739da031c0fcdc
Reviewed-on: http://codereview.qt-project.org/4958
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agocompile when shadowing is an error
Gunnar Sletta [Thu, 15 Sep 2011 06:48:10 +0000 (08:48 +0200)]
compile when shadowing is an error

Change-Id: If12cd19821d07303e808e19be1ee3984c90110b1
Reviewed-on: http://codereview.qt-project.org/4946
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoGet the 'dockwidgets' example to compile.
Jason Barron [Wed, 14 Sep 2011 14:38:06 +0000 (16:38 +0200)]
Get the 'dockwidgets' example to compile.

Required printersupport.

Change-Id: Idd525e847f793631b70204d25c4fc949279801bf
Reviewed-on: http://codereview.qt-project.org/4915
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoGet the Windows GL context to compile.
Jason Barron [Wed, 14 Sep 2011 14:35:22 +0000 (16:35 +0200)]
Get the Windows GL context to compile.

Not sure why this was not the case all along, but on my MSVC2008
installation the include must be prefixed by the 'GL' directory.

Change-Id: Icb29b072446bab386b5c62ab0df453ded41b8ede
Reviewed-on: http://codereview.qt-project.org/4914
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMake the Windows input context compile after the refactoring.
Jason Barron [Wed, 14 Sep 2011 14:26:13 +0000 (16:26 +0200)]
Make the Windows input context compile after the refactoring.

There is no longer a focusObject setter/getter in the input context.
Instead the object can be gotten from the new input panel API. Instead
of reimplementing setFocusObject(), implementations should now connect
to the inputItemChanged() signal of QInputPanel.

Change-Id: I6c674424da5a0c8c3995e5f5acd191ef91ba8a00
Reviewed-on: http://codereview.qt-project.org/4913
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFixed crash in tst_QPathClipper.
Samuel Rødal [Tue, 13 Sep 2011 12:38:53 +0000 (14:38 +0200)]
Fixed crash in tst_QPathClipper.

QPathClipper uses QPainter which requires QGuiApplication.

Task-number: QTBUG-21402
Change-Id: If08b0ddee97cad347450fa06878f787e94292854
Reviewed-on: http://codereview.qt-project.org/4777
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFixed tst_QIcon::task184901_badCache().
Samuel Rødal [Tue, 13 Sep 2011 12:34:03 +0000 (14:34 +0200)]
Fixed tst_QIcon::task184901_badCache().

QIcon has not been moved to QtGui after all, re-introduce
QtWidgets-dependent code path.

Task-number: QTBUG-21402
Change-Id: I61c37babaeceadf7d53c10736bcc847758adaf1b
Reviewed-on: http://codereview.qt-project.org/4775
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFixed tst_qpixmap::grabWidget().
Samuel Rødal [Tue, 13 Sep 2011 12:02:02 +0000 (14:02 +0200)]
Fixed tst_qpixmap::grabWidget().

prepareToRender() might call adjustSize() resulting in the widget's size
changing, so we should make sure to call adjustSize() _before_ we decide
on the required pixmap dimensions.

Task-number: QTBUG-21402
Change-Id: Ie72b46bc8e8e22f848769f78187f47ae9f4e37d3
Reviewed-on: http://codereview.qt-project.org/4772
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove AccessibleEx classes.
Frederik Gladhorn [Mon, 29 Aug 2011 11:28:23 +0000 (13:28 +0200)]
Remove AccessibleEx classes.

This was a binary compatibility hack to extend the accessibility
framework towards IAccessible2. Start fixing it properly.

Change-Id: I82bb0daa6469930c5bf6e440c919159603d56a83
Reviewed-on: http://codereview.qt-project.org/4750
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoRevert accidental v8 submodule version downgrade
Kent Hansen [Wed, 14 Sep 2011 13:27:09 +0000 (15:27 +0200)]
Revert accidental v8 submodule version downgrade

It seems as the refactor merge replaced the v8 submodule
SHA1 by an older version. This commit reinstates Aaron's
version from commit b57c3cc40f24277c9bab0a6811bddc79c83ad0ec

Change-Id: Ie172e935561e2f6510dd81c035b17816d8da9e4b
Reviewed-on: http://codereview.qt-project.org/4899
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>