Commit Graph

519 Commits

Author SHA1 Message Date
Richard Moe Gustavsen
8ab64530b3 Cocoa: respect QT_NO_EXCEPTION in color dialog
If the macro is set, we should not use cocoa exceptions either, as
this causes compile failures

Rev-By: jbache
(cherry picked from commit cdb5729d8e1ffc4a00b52d6d4bbee34a9820a193)
2011-05-10 12:54:43 +02:00
Frederik Gladhorn
0fbeed69a4 Make navigation in TabWidgets consistent.
navigate would not return the right index in the parent if the current
widget was not the visible one.

Reviewed-by: Jan-Arve
(cherry picked from commit fdeeaa9d61efea9cca783a1d4098ae505df24390)
2011-05-10 12:54:43 +02:00
Frederik Gladhorn
d27fb341ec Fix text for checkable buttons, unit tests.
Return Check/Uncheck for checkable buttons.
Partially revive the buttons unit test.

Reviewed-by: Jan-Arve
(cherry picked from commit 6040eeebfb1ab3be3906295c373033cd5b5d9dc3)
2011-05-10 12:54:43 +02:00
Frederik Gladhorn
a5e191de57 Window and Application fixes for accessibility.
Return app name instead of window title for root accessibility object.
Return Window as accessible type for the main window.

Reviewed-by: Jan-Arve
(cherry picked from commit 9a5b0d7a579572cd7e7faf869ab1a6684800f592)
2011-05-10 12:54:43 +02:00
Frederik Gladhorn
8f5b2faaac Call QAccessible::updateAccessibility when changing accessible name.
Reviewed-by: Jan-Arve
(cherry picked from commit e783275cfb71e7325472b3aea54e109a7a854bf7)
2011-05-10 12:54:43 +02:00
Frederik Gladhorn
74060f05d1 Unit test for characterRect in Accessible TextInterface.
(cherry picked from commit 8888cef411ce1d1fc898970429e951f9ef623b0e)
2011-05-10 12:54:43 +02:00
José Millán Soto
ed8f1a09f8 QAccessibleTextEdit: Using x coordinate for calculate character width
Merge-request: 1148
Task-number: QTBUG-18233
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
(cherry picked from commit 6cd51aeec11e7a70ba560c350274d5a4bd43c9b9)
2011-05-10 12:54:43 +02:00
Stephen Kelly
3880eee2d0 Use the virtual API to clear a selection.
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
Merge-request: 980
(cherry picked from commit e3cd651d92a9e550fe52360d1be6ae41d0f2ab85)
2011-05-10 12:54:43 +02:00
Jan-Arve Sæther
97952e918d Avoided calling updateAccessibility() from updateMicroFocus if the item was hidden
This had the following negative effect in qmlviewer:
- Every time the qmlviewer logged something to its QPlainTextEdit
  (regardless of if it was visible or not) it would call
  updateMicroFocus (because appending to QPlainTextEdit would move the
  cursor). The result was that the AT client got overloaded with
  accessibility state changes, and response time got really bad.
(cherry picked from commit ad50e45311cce712fbe35641cde973d616ff560d)

Reviewed-by: Frederik Gladhorn
(cherry picked from commit a825b3a9e6132842090e43fae85d2c6c61b2def6)
2011-05-10 12:35:52 +02:00
Jan-Arve Sæther
0154343608 Notify a11y framework of FocusChanges for QGraphicsObject
(cherry picked from commit 1b5cb7865eb8b48a2721f9b9c3ccd2fb25f8175d)

Reviewed-by: Frederik Gladhorn
(cherry picked from commit 9a02ad74693f1835745ec20798b353f7e62bcd5e)
2011-05-10 12:35:51 +02:00
Jan-Arve Sæther
26acac4052 Call updateAccessibility on the QGraphicsObject in updateMicroFocus
Since QGraphicsObjects now can be in the a11y hierarchy, we should
treat them just like we treat widgets.
(cherry picked from commit 860745a4713b29857d14571572504da71a2ca077)

Reviewed-by: Frederik Gladhorn
(cherry picked from commit 4687938fd03ed65306039af6b4e5e192ec8bf491)
2011-05-10 12:35:50 +02:00
Jan-Arve Sæther
5e8b377cb7 Fix updateAccessibility for QGraphicsObjects
If updateAccessibility is called on a QGraphicsObject, walk up and find
the closest ancestor widget with a HWND.
(cherry picked from commit d4291591dfb6a7b1f5c7d00879e8162e84d9ab1b)

Reviewed-by: Frederik Gladhorn
(cherry picked from commit 96406a7dd609e75340f7b4a05726c60c197786b8)
2011-05-10 12:35:49 +02:00
Jan-Arve Sæther
068545f2cd Make accessibility work on Windows with alien
This means that there will be no implicit conversion to windows handles
anymore!
Enabler for making QML accessible on windows.
(cherry picked from commit a3ac7deb5dfe48c5fdd0e170c20b6852c3bb41de)

Reviewed-by: Frederik Gladhorn
(cherry picked from commit d289e54f2d2aa066cb383d8c8249bd7594bdf7b0)
2011-05-10 12:35:48 +02:00
Qt Continuous Integration System
fde6021547 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Rename QGlyphs -> QGlyphRun
2011-05-10 20:26:33 +10:00
Eskil Abrahamsen Blomfeldt
051ef6f294 Rename QGlyphs -> QGlyphRun
API clean-up for QGlyphRun:
1. QGlyphs -> QGlyphRun
2. QGlyphRun's font()/setFont() -> rawFont()/setRawFont()
3. QPainter::drawGlyphs() -> drawGlyphRun()
4. QTextLayout and QTextFragment's glyphs() -> glyphRuns()

Reviewed-by: Jiang Jiang
(cherry picked from commit 84ef364302728b68d2d29ea9c4ccbec32c7bb115)
2011-05-10 12:20:13 +02:00
Samuel Rødal
d1622207ba Prevent crash in QWidgetWindow::handleMouseEvent().
Don't use mapFrom() between widgets not in the same hierarchy.
2011-05-10 12:09:40 +02:00
Qt Continuous Integration System
c5d63be839 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging:
  Respect capacity in QVector::append().
2011-05-10 20:07:16 +10:00
Qt Continuous Integration System
41e14a4175 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Add internal documentation for QUnifiedToolbarSurface.
  Fix the autotest condition.
  Change the repaint() call to an update().
  Fix the update() autotest for raster.
  Change the repaint() to an update().
  Set the default graphics system to raster.
  Revert "Switch the default graphics system to raster on Mac."
  Fix an race condition in the auto test.
  Fix an race condition in the auto test.
  Fix a race condition when the main window is being destructed.
  Switch the default graphics system to raster on Mac.
2011-05-10 19:50:02 +10:00
Fabien Freling
a35b2d58d9 Add internal documentation for QUnifiedToolbarSurface.
This document is aimed for developers. This is why
it is directly written in the header file. This is
not part of the public API.

Reviewed-by: Richard Moe Gustavsen
(cherry picked from commit 891b6ac7236d21b69bdb54b00051422cee004059)
2011-05-10 11:45:42 +02:00
Fabien Freling
4367928b5e Fix the autotest condition.
The previous preprocessor directive was aimed to
exclude Mac OS X.
With the raster engine, the behavior is unified
and we don't need to have a separate path for
Mac OS X/Cocoa.
The new condition excludes only Mac OS X with a
graphics system other than raster or Carbon.

Reviewed-by: Jiang Jiang
(cherry picked from commit 2c6af885d959f90b801c74dc5d389a720dc9fd1d)
2011-05-10 11:45:42 +02:00
Fabien Freling
daf3795461 Change the repaint() call to an update().
In show_sys(), if we directly call repaint() this
will triggers too many UpdateRequest events.
This fixes the qwidget autotest
"compatibilityChildInsertedEvents".

Reviewed-by: Richard Moe Gustavsen
(cherry picked from commit 747962e6ec20a59b7e2ed67c5cd685258f199a86)
2011-05-10 11:45:33 +02:00
Fabien Freling
1dab1ce6af Fix the update() autotest for raster.
With the CoreGraphics engine, we expect the test
to fail with update(), but with the raster
engine the behavior is the same across platforms.
Hence we don't need a special case for Mac OS X
with the raster engine.

Reviewed-by: Samuel Rødal
(cherry picked from commit 75d2387fbf005b022437855ab6433790372639f8)
2011-05-10 11:45:30 +02:00
Fabien Freling
5839b221a0 Change the repaint() to an update().
Forcing to repaint might cause a recursive
repaint. Since there is no apparent reason to
directly repaint, we just call update().

Reviewed-by: Richard Moe Gustavsen
(cherry picked from commit 244fedd484b022881b906b1bc794d5af19d02843)
2011-05-10 11:45:30 +02:00
Fabien Freling
68857f9045 Set the default graphics system to raster.
This change is specific to Mac OS X/Cocoa.

Reviewed-by: Lars Knoll
(cherry picked from commit 2c2026df66f237b7313397dd74f6bc3212b94596)
2011-05-10 11:45:19 +02:00
Fabien Freling
8ac73771c6 Revert "Switch the default graphics system to raster on Mac."
This reverts commit a5d40fd3814ab7c8e865912c03a918bfd5994998.

We have to fix the regressions due to the raster engine before putting
it by default.
(cherry picked from commit 3197fe2af911673c6291db0102e90a0d7f6ae926)
2011-05-10 11:44:57 +02:00
Fabien Freling
5edb03f855 Fix an race condition in the auto test.
Deleting the page in the wizard without removing it
first leads to a crash when the wizard tries to
access a deleted page.

Reviewed-by: Samuel Rødal
(cherry picked from commit 4024a08239c3e69bb2e0ca045ccbdf3fc900f675)
2011-05-10 11:44:54 +02:00
Fabien Freling
e37d9e9691 Fix an race condition in the auto test.
Deleting the page in the wizard without removing it
first leads to a crash when the wizard tries to
access a deleted page.

Reviewed-by: jasplin
(cherry picked from commit 3bff1637cd49617d334c1be63c20e008fac93be1)
2011-05-10 11:44:54 +02:00
Fabien Freling
e27baeff28 Fix a race condition when the main window is being destructed.
During the destructor of QWidget, we delete the
layout. If the layout is not set to 0 afterwards,
a check on the layout might turn true, but any access
will end with a segfault.

Reviewed-by: João Abecasis
(cherry picked from commit abc5a632942c23496d75c49b3b0b4a674cdafdf8)
2011-05-10 11:44:34 +02:00
Liang Qi
44b7877c87 Respect capacity in QVector::append().
Fix a bug in QVector::append(), it should use the capacity for new size,
when it is implicit shared and capacity is bigger than the new size.

Autotest included.

Task-number: QTBUG-11763
Reviewed-by: joao
Reviewed-by: Olivier Goffart
2011-05-10 11:38:53 +02:00
Fabien Freling
e7de0c2e12 Switch the default graphics system to raster on Mac.
Reviewed-by: Lars Knoll
(cherry picked from commit a5d40fd3814ab7c8e865912c03a918bfd5994998)
2011-05-10 11:34:15 +02:00
Qt Continuous Integration System
e14d3aa5c4 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Fixed detection of QtBase directory.
2011-05-10 19:19:12 +10:00
axis
ba3436cda1 Fixed detection of QtBase directory.
The old check would fail for an installed copy of Qt. Instead, base
the check on using QTDIR if it present, otherwise use the parent of
the bin directory, and then check that "mkspecs" is present.

Reviewed-by: Olivier Goffart
2011-05-10 11:14:36 +02:00
Qt Continuous Integration System
d0343621a3 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Remove const from QPlatformClipboard::mimeData().
2011-05-10 18:17:06 +10:00
Laszlo Agocs
edd56d531b Remove const from QPlatformClipboard::mimeData().
Most implementations will anyway do non-const operations in there, the
change avoids the need for const_cast or mutable.
2011-05-10 10:09:44 +02:00
Qt Continuous Integration System
94021247c1 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Retrieve the actual data in the Wayland clipboard only when requested.
2011-05-10 17:54:22 +10:00
Qt Continuous Integration System
7f9c32bd39 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Fix QDefaultAnimationDriver
2011-05-10 17:24:49 +10:00
Laszlo Agocs
04549f2eed Retrieve the actual data in the Wayland clipboard only when requested. 2011-05-10 09:17:55 +02:00
Alan Alpert
8fb5928469 Fix QDefaultAnimationDriver
Animation drivers were changed to used signals instead of virtual
functions, but the default animation driver was left behind.

Reviewed-by: Michael Brasser
2011-05-10 13:43:58 +10:00
Qt Continuous Integration System
4bcd4c08fe Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Turned on private headers for some plugins.
2011-05-10 01:16:35 +10:00
Jonni Rainisto
7eef0de091 Turned on private headers for some plugins.
Reviewed-by: axis
2011-05-09 16:55:33 +02:00
Samuel Rødal
5dc3a46a2a Wayland plugin compile fixes. 2011-05-09 14:08:19 +02:00
Qt Continuous Integration System
e8aceff195 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging:
  Skip test on MacOS due to problems with corewlan plugin
  Fix QNetworkConfigurationManager usage outside main thread first
  Update QTBUG-17223 for Qt 4.8
  fix tst_qnetworkreply::httpProxyCommands autotest
  Send User-Agent from the network request in http proxy CONNECT command
  Add autotests for configuration dependent network proxies
  Fix QNetworkReplyImpl error handling
  Enable per network configuration proxy settings in QNetworkAccessManager
  Allow a network configuration to be included in a proxy query
  Fix error handling in write for socks socket engine
2011-05-09 21:54:18 +10:00
Shane Kearns
9398867209 Skip test on MacOS due to problems with corewlan plugin
Reviewed-by: Cristiano di Flora
2011-05-09 13:50:09 +02:00
Shane Kearns
a590e77fd8 Fix QNetworkConfigurationManager usage outside main thread first
QNetworkConfigurationManager creates the engines loaded from plugins
as objects in the main thread.
If a QNetworkConfigurationManager instance is created in a worker thread
without any instance previously existing in the main thread, then it
is uninitialised until the main thread has run.
This causes allConfigurations() to return an empty list if called
immediately after instantiation, for example.

This fix initialises the plugins using blocking queued connections,
which causes the worker thread to block until the initialisation function
has been called in the context of the main thread.
Deadlock is possible if the main thread is for some reason waiting on the
worker thread, but it will not deadlock on QNetworkConfigurationManager's
mutex.
If this is a problem for an application, it should use
QNetworkConfigurationManager from the main thread first to preload the
plugins.

Task-number: QTBUG-18795
Task-number: QTBUG-18799
Reviewed-by: Cristiano Di Flora
2011-05-09 13:50:02 +02:00
Samuel Rødal
df677b9653 Exports for QtWidgets to link. 2011-05-09 13:40:34 +02:00
Shane Kearns
7dd503c62f Update QTBUG-17223 for Qt 4.8
In Qt 4.7, http network requests are assigned to http connection
channels before connecting the channel.
In Qt 4.8, channels are connected "blind" as this gives a performance
improvement in certain circumstances.

On the assumption that User-Agent should be the same for all the
requests being sent to the server in a given burst, we use the first
queued request to set the user agent for a http proxy.

Task-number: QTBUG-17223
Reviewed-by: Markus Goetz
Reviewed-by: Martin Petersson
2011-05-09 13:16:41 +02:00
Shane Kearns
9c1293283e fix tst_qnetworkreply::httpProxyCommands autotest
Due to architecture changes in Qt 4.8, clearing the proxy before the
request is complete causes the http connection to not use any proxy.
The issue is that the proxy isn't resolved until after the bearer has
been started (which is correct in the general case, as system proxy
is unknown until that time).

Also increased the test's timeout from 1 second to 15, as starting a
bearer can be slow.

Reviewed-by: Markus Goetz
2011-05-09 13:16:24 +02:00
Shane Kearns
e01faeb5c7 Send User-Agent from the network request in http proxy CONNECT command
Some proxies can discriminate based on the User-Agent when sent a
CONNECT command for establishing a HTTPS connection.
With this change, if the User-Agent header is set in the QNetworkRequest
then it will be passed to the http socket engine for use in the connect
command sent to the proxy.
As before, "Mozilla/5.0" will be used by default when no user agent
has been set.

Task-number: QTBUG-17223
Reviewed-by: Markus Goetz
2011-05-09 13:16:13 +02:00
Shane Kearns
724671feca Add autotests for configuration dependent network proxies
1. test that systemProxyForQuery returns something for all configs
2. test that QNetworkAccessManager uses the settings for the
   configuration it was started with.

Task-number: QTBUG-18618
Reviewed-by: Peter Hartmann
2011-05-09 13:15:47 +02:00
Shane Kearns
a342ba933a Fix QNetworkReplyImpl error handling
The backend was never started when compiled without bearer management,
now it is.
Now emits the error signal in case of startup errors which would leave
the state machine hanging. Previously it just printed a warning.

Reviewed-by: Peter Hartmann
2011-05-09 13:15:23 +02:00