Commit Graph

80 Commits

Author SHA1 Message Date
Frederik Gladhorn
cea1a6bcd5 Make sure windows send accessibility activated updates.
Both QWindow and QWidgetWindow should update with the
active state signal.

Change-Id: I0219f803aa0fb109765f0faa0aedb120c2a439f0
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-24 17:07:52 +01:00
Frederik Gladhorn
f195a8e2b6 Added QAccessibleGroupBox
Added a new accessible interface for QGroupBox, as QAccessibleDisplay
is not good enough when the QGroupBox is checkable.
AccessibleFactory was modified to return a QAccessibleGroupBox when
the accessible interface of a QGroupBox is requested.

Created tst_QAccessibility::groupBoxTest

Port to Qt5 of the patch by José Millán Soto <fid@gpul.org>

Change-Id: I6c23dcf5562b3ea269b04102e78463b65827188a
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
(cherry picked from commit c03ceb203c65d9e3485fad848bfc0c4b6ee3e9aa)
2012-03-24 15:10:00 +01:00
Jan-Arve Saether
015bc43da0 API cleanup: remove CoordinateType enum
The bridge can do the mapping to and from screen position.
This is now done in the windows bridge.

Change-Id: I5ca5df0fbeeb58202539f55a0f62717fb1685092
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-03-24 11:53:49 +01:00
aavit
b492f54b98 More UTF8 fix of raster autotest
This completes 6c98fd2, for systems where default codec is not UTF8.

Change-Id: I94795785d5d172558c40c06bd3ef4ffaba1624c5
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-03-22 18:59:45 +01:00
aavit
6c98fd2e6c Fix raster autotest: consistently assume scripts in UTF8, not latin1
The Lancelot raster painting autotest assumed latin1 encoding of the
QPS scripts files, while the script engine would import subscripts
as UTF8. This fix standardizes on UTF8.

Change-Id: I9e7c1ee7b6ffe77ff68edc8423f00dfb9ab3e95b
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-03-20 11:44:09 +01:00
Frederik Gladhorn
c2e8db5841 Remove QAccessibleEvent child parameter.
This makes the api cleaner and generally the child should not be there.
It is only sometimes more convenient not to create a QAccessibleInterface
instance, so the functionallity is kept.

Change-Id: I26018a6d3e0549f4d79856775b4167c5660e229d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-19 23:00:10 +01:00
Frederik Gladhorn
477c43260e Accessibility: add text update events
Change-Id: Iece9d100b3f5a379d7d8e29dea67a10d0c918c06
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-19 18:07:30 +01:00
Frederik Gladhorn
36513264da Make copy and assign private for QAccessibleEvent.
Also make the handling of events in the test pointer
based since mac-g++ doesn't seem to like const
references the way they were before.

Change-Id: I7fe39978d4729b8e586be30978b74aa51ca7cfe6
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-18 21:42:38 +01:00
Marc Mutz
d823646db3 containers: add C++11-style c{begin,end}() as alias for const{Begin,End}()
C++11 adds cbegin()/cend() functions for the same reason Qt has
constBegin()/constEnd(). This patch adds these functions to the
Qt containers with the same implementation as constBegin()/constEnd().

It also fixes the return types in the documentation of existing
constFind() functions (documentation only).

C++11 only adds cbegin()/cend() (and crbegin()/crend(), which Qt doesn't have).
In particular, it doesn't add cfind(), so I didn't supply these, even though
Qt comes with constFind().

This is a forward-port of https://qt.gitorious.org/qt/qt/merge_requests/1365.

Change-Id: Ida086b64246b24e25254eafbcb06c8e33388502b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-03-17 09:10:57 +01:00
Johannes Zellner
8a79e8b645 Remove unmaintained and broken VNC platform plugin
Change-Id: Ie0a07c3a6822870b095a20d997b63fb1635f20be
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Robert Griebl <robert.griebl@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-03-15 02:45:31 +01:00
Rohan McGovern
329469d5a1 headersclean: omit -Wcast-align also on MIPS
These issues are permitted to go unfixed for ARM and MIPS, for the time
being.

Change-Id: Ibdf33dc42e3de19ef20e9dc50f12f451ea6dbf23
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-15 00:50:47 +01:00
Frederik Gladhorn
2c515ea42c Print all accessibility event strings.
Change-Id: I2488fe86fb2c154a8b7d91c6e4f2cd9c9e7b9ecb
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-13 18:14:25 +01:00
Frederik Gladhorn
6d85d77a5d Clean up test, check radio button and checkbox.
Change-Id: I4dcfa2014256aee10feb08146ae6fc3f402ac8fb
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-13 10:11:22 +01:00
Frederik Gladhorn
76ddc9bc0c Autotest details of QAccessibleEvent.
Change-Id: Ieec33c23e7b18cfedf061088d6561203a5e7ac39
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-13 10:11:22 +01:00
Marc Mutz
edea0e1917 tst_exceptionsafety_objects: add virtual ~AbstractTester
GCC complained about undefined behaviour when
deleting subclasses of AbstractTester through
pointers to AbstractTester, and it's doing so
correctly...

Change-Id: Ie641281d8aafe32c5c9784e8aa39672ff0b699c7
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-12 15:37:40 +01:00
Frederik Gladhorn
ca737f566b Use QAccessibleEvent in test.
Change-Id: I4f9c0f503543caa5704a29c8ccd7c4134b455625
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-12 15:34:06 +01:00
Frederik Gladhorn
eb57da5b3f Update accessibility StateChange by custom event.
Subclass QAccessibleEvent to give details what changed in the
state change.

Change-Id: I9005d311e85a3c8bfa6e062833fa6a8a7dc6a4a4
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-12 13:14:05 +01:00
Frederik Gladhorn
b55ed97e79 Call updateAccessibility with the right index.
In Qt 4 index 0 was the widget itself.
With the cleanup of child index this now changed.
The default constructor uses -1 as parameter to signify that
the widget is the cause, not a child.

Change-Id: I329a1cc91bf2d1d1d8534739acbddfe107f40364
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-08 07:28:21 +01:00
Rohan McGovern
dd7a06d0c9 Refactor headersclean for usage from modules other than qtbase
headersclean enforces various rules which all Qt headers are supposed to
abide by.  It fails compilation if these rules are broken.

These rules should be followed also by modules hosted outside of
qtbase.  Split the test up so that it can be easily reused by other
modules.

Change-Id: Icf09cbfde411c926ed87914dc821e6dfc569b0de
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-03-07 03:49:59 +01:00
Rohan McGovern
961c3f958f Stabilize tst_QAccessibility::actionTest
show() on a window is asynchronous.  Wait for it to complete before
continuing with the test.

Change-Id: Icd0daa0c0e8f287171c57708bb2fce0b6cf0906a
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-03-06 01:34:50 +01:00
Lars Knoll
96232be146 Merge remote-tracking branch 'origin/api_changes'
Conflicts:
	dist/changes-5.0.0
	mkspecs/features/qt_module_config.prf
	qmake/project.cpp
	qmake/property.cpp

Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
2012-03-04 21:45:05 +01:00
Bradley T. Hughes
d964981252 Remove ARMFPA support and Q_DOUBLE_FORMAT detection
Remove the -armfpa option the config.tests/unix/doubleformat*
detection. The places where we used QT_ARMFPA and Q_DOUBLE_FORMAT
has been removed as well.

Rationale: ARM FPA with GCC does not work with EABI. Qt currently
does not support compiling without EABI, making ARM FPA an
impossibility. It is unknown whether other compilers provide ARM FPA
support with EABI. Support for ARM FPA can be re-added in the future
should the need arise, but since ARM VFP is available for ARMv5 and up,
we should encourage implementors to instead use soft-floats or VFP.

Change-Id: I3671aba575118ae3e3e6d769759301c8f2f496f5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-01 16:26:55 +01:00
Friedemann Kleint
9e893f6810 Skip the network SSL test on Windows.
For SSL, this would require an OpenSSL library to be installed.

Change-Id: I2a320e7faf40ef925c90dbe539f912e4a8fc13fc
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-03-01 10:40:08 +01:00
Marc Mutz
1cd4d6b181 QEvent (and subclasses): make ctors explicit
Do this regardless of whether the event subclass
is public API or only used in examples. Examples
are examples, used by others as templates or even
copied verbatim, so they should also follow sound
engineering rules.

Anyway, there's only one in examples/...

Change-Id: I586ff16407a956c9e89288fdd4377eed73f45c0f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-01 08:44:34 +01:00
Jędrzej Nowacki
beab403d9f Reduce QtCore lib binary size by around ~3KB, by removing template code
Reusing a template is much better then creating a new one, even if it
should inline the same code.

For some reason replacing T* by void* force gcc to remove a few bytes
per template instantiation too, it is not really significant, but it
alows us to simplify the code.

Benchmarks don't show any regressions.

Change-Id: I4fdf1e4dc311b23021eb5758605602937d05b183
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-27 12:57:02 +01:00
Caroline Chao
4ee14d6f87 CodeCoverage: Skip headersclean test.
The code coverage tool adds #line when instrumenting the code using the gcc
syntax.

Since tst_headersclean now uses the -pedantic-errors flag (qtbase commit
7e970eb58c), it causes a fatal error when the code is
instrumented with the coverage tool.

Change-Id: Icb1888d1c1f0a982c0c56aa168e70a76a246a18c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-24 06:48:46 +01:00
Oswald Buddenhagen
d91cf1e53b clean up qmake-generated projects
remove "header" and assignmets which are defaults or bogus,
reorder some assignments.

Change-Id: I67403872168c890ca3b696753ceb01c605d19be7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-24 05:18:30 +01:00
Friedemann Kleint
541949aed2 Add further theme hints to QPlatformTheme.
- Add hints for QDialog/QDialogButtonBox.
- Add hint for available popup-menu area.
- Add keyboard scheme hint replacing
  QGuiApplicationPrivate::currentKeyPlatform()

Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>

Task-number: QTBUG-24204
Task-number: QTBUG-24315

Change-Id: I6653786b0dcb49a6fc264d3b9891dbfee502bd3e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-22 17:28:51 +01:00
Robin Burchell
186692f81f Remove custom text codec for C strings.
This setting is extremely harmful, as code cannot know whether or not to expect
it. It also made the behaviour of QString::fromAscii and ::toAscii unintuitive,
and caused a lot of people to make mistakes with it.

Change-Id: I2f429fa7ef93bd75bb93a7f64c56db15b7283388
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-22 14:00:32 +01:00
João Abecasis
7bbe79fe5f Drop file-engine abstraction from public API
This abstraction imposed serious performance penalties and is being
dropped from the public API.

In particular, by allowing file names to be arbitrarily hijacked by
different file engines, and requiring engines to be instantiated in
order to decide, it imposed unnecessary overhead on all file operations.

Another flaw in the design with direct impact on performance is how
engines have no way to provide (or retain) additional information
obtained when querying the filesystem. In many places this has meant
repeated operations on the file system, where useful information is
immediately discarded to be queried again subsequently.

For Qt 4.8 a major refactoring of the code base took place to allow
bypassing the file-engine abstraction in select places, with
considerable performance gains observed. In Qt 5 it is expected we'll be
able to take this further, reaping even more benefits, but the
abstraction has to go.

[Dropping this now does not preclude that virtual file systems make an
appearance in Qt at a later point in Qt 5's lifecycle. Hopefully with a
new and improved abstraction.]

Forward declarations for QFileExtension(Result) were dropped, as the
classes were never used or defined.

Tests using "internalized" classes will only fully run on developer
builds. QFSFileEngine was removed altogether from exception safety test,
as it isn't its intent to test internal API.

Change-Id: Ie910e6c2628be202ea9e05366b091d6d529b246b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-22 00:07:31 +01:00
Shane Kearns
3f91cde588 Test for QT_NO_SSL instead of QT_NO_OPENSSL
Change the ifdefs in our own code (except openssl backend) to use the
new configure flag.

Change-Id: I8774734771c66b22164b5fae8fdb27814ac3df7b
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-02-21 15:28:40 +01:00
David Faure
7e970eb58c Ensure that Qt public headers compile with strict flags
Those from
http://wiki.qt-project.org/Coding_Conventions#Conventions_for_public_header_files
(unfortunatey -Wold-style-cast cannot be used due to the glibc macro bswap_16)
and many Qt defines that disable casts.

Change-Id: I97ac707a101df9819e8c031fa75a31b30e20247f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-17 16:42:28 +01:00
Kurt Korbatits
c08fb806bb Removed rfc3252.txt from networkselftest unittest
- no longer needed after test that used it was removed

Change-Id: I63fc8a9db07f9250507becb9bf6c2aefe0fdc254
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-17 08:23:10 +01:00
Miikka Heikkinen
fc8f92106d Remove fileLineEndingTest from networkselftest.
The fileLineEndingTest case doesn't test network in any way and it is
conceptually wrong, too, as any tests where line endings are an issue
should be handled with .gitattributes rather than forcing user to
check out the repo with unix line endings.

Task-number: QTBUG-24271
Change-Id: I73986993edc227cb68b8f61d51cc1cf458d20989
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
2012-02-15 02:35:58 +01:00
Jan-Arve Saether
ff2886db6a Move all usages of Relation enum values to QAccessible::relations()
Next step is to remove navigate(), but that has to be done in
qtdeclarative first.

Change-Id: I01ea1386c092446be04cc19d0f70adf53f094adc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-02-10 15:21:46 +01:00
José Millán Soto
4c9266fd16 Make copy and cut methods work in QAccessibleTextEdit
Correct the implementation of cutText and copyText in QAccessibleTextEdit so
they use cut() and copy() methods of QTextEdit

Cherry picked from Qt 4 - 36202cf8fca822492615d418bd563a40bee4af08

Change-Id: I86a531ed7059b1a928cb8515c2743d4d8b596b36
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-02-08 07:48:46 +01:00
José Millán Soto
009cd671ec Do not check isActiveWindow in QAccessibleWidget::state
QWidget::isActiveWindow() was being checked in QAccessibleWidget::state
to determine if a widget is focusable. As a result, focusable widgets
were reported to be not focusable when the window was not active.

Change-Id: I73c47181ed132a84f0251cb67d0e20912e29a1a6
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-02-08 03:13:10 +01:00
João Abecasis
2bf186a2e5 Allow function types to be registered without workarounds
Commit 4b8ceb41ae added the requirement
that pointed-to types need to be registered when registering pointer
types. Unfortunately, the implementation also affects function pointer
types.

This change whitelists 0, 1, 2 and 3 argument functions as not deriving
from QObject, forgoing the need to workaround details of the type
registration implementation when registering those function pointer
types.

Change-Id: I4d855e9d70a8179a6e31b84623ad5bf063e0d6d8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-31 16:17:55 +01:00
Lars Knoll
cf20c06756 QDirectPainter is gone in Qt5
Change-Id: I3ba8985c9c38be978198a4abd58775aa6f525968
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-01-31 11:58:03 +01:00
Jason McDonald
5635823e17 Remove "All rights reserved" line from license headers.
As in the past, to avoid rewriting various autotests that contain
line-number information, an extra blank line has been inserted at the
end of the license text to ensure that this commit does not change the
total number of lines in the license header.

Change-Id: I311e001373776812699d6efc045b5f742890c689
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-30 03:54:59 +01:00
Giuseppe D'Angelo
601d685849 Make mid() and midRef() properly return empty, non-null objects
If we request a substring starting at the very end of the string,
QString::mid should return an empty string, not a null string.
For instance, QString("abc").mid(3, 0) used to return a null
one, while this patch makes it return an empty one. The
same thing applies to QString::midRef() and QByteArray::mid().

Change-Id: Ie9efd7a0622d429efd0fb682c19856c19e9469af
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-24 17:36:11 +01:00
Stephen Kelly
4b8ceb41ae Store the is-a QObject fact with the metatype declaration.
This is a source incompatible change for Q_DECLARE_METATYPE(T*),
which now requires T to be fully defined.

The consequences of this are:
 * Forward declared types can no longer be declared as a metatype.
     (though this is a very uncommon thing to do).

There is a trivial workaround where necessary.

Change-Id: Id74c40088b8c0b466fcd7c55abd616f69acc82c8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-24 15:27:25 +01:00
Jason McDonald
629d6eda5c Update contact information in license headers.
Replace Nokia contact email address with Qt Project website.

Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-23 04:04:33 +01:00
Bradley T. Hughes
3ad7cd3a60 Replace Q_WS_MAC with Q_OS_MAC in tests/auto/other
Change-Id: If805ea762047d07872a278956fc7637e5bafc6db
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-19 11:31:22 +01:00
Jan-Arve Saether
67a3698b3c Remove all references to QAccessible::(Covers|Covered)
These were not used in any bridges, and none of the bridges
(MSAA, Cocoa, AT-SPI/IA2) can hardly make use of this information.

Change-Id: If3cad6b6c1928535dd932f46c9ec6883a4a19c76
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-19 00:17:38 +01:00
Morten Johan Sorvig
bc02ef882b Delete src/widgets/platforms/mac
This looks like the mac port but isn't any more,
remove it to prevent confusion.

Change-Id: I498f536d77d1a3c53e687f696ca6992539a1a90b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-17 12:19:29 +01:00
Frederik Gladhorn
ba888bb8c8 Clean up and extend QAccessible::State.
The state should contain useful and clear information.
Some of the old enum/bitfield members were not really clear.
Make them follow Qt terminology and shift the burden of interpreting
them to the bridge.

Apart from the previous commit changing from enum to bitfield, these
flags have changed names:

unavailable -> disabled
mixed -> checkStateMixed
protected -> passwordEdit (in the last commit)

floating is completely removed, even MSAA documentation states it is unsupported.

Some new states have been added.
Documentation added.

Change-Id: I152256e77a061f28ee5780f527524c80a2c7e333
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-16 08:55:37 +01:00
Jan-Arve Saether
1133c0dd22 Remove all references to QAccessible::(Up|Down|Left|Right)
It is now the resonsibility of the bridge to support this
(by querying for QAccessibleInterface::rect())

The windows bridge (currently the only bridge in need of this) has
already been updated to reflect this in commit
7dca461620

Change-Id: Ief1339ab6edc118e2d47e3875e09fa885db65c2f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-12 15:05:57 +01:00
Friedemann Kleint
bffbcfd0cc Stabilize Language-Change test.
- Introduce separate state machine class with a timer instead of
  using semi-synchronous qWait(). Also invoke closeAllWindows()
  repeatedly should the file dialog be slow on Windows.
- Use QTemporaryDir for test data to avoid conflicts with
  remains from previous tests.

Change-Id: Ibd95176b44ff20d6f326dc3139fb386472f64c2b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-12 08:31:17 +01:00
Frederik Gladhorn
30ad53a0a6 Make QAccessibleInterface::indexOfChild() 0-based.
Makes the code nicer and more consistent with the rest of the world.

Change-Id: I5ba0ee39f5b0afd1a079a3cea9990d123955ed3f
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-11 11:18:51 +01:00