Commit Graph

2772 Commits

Author SHA1 Message Date
Thiago Macieira
1955353149 Port the IA-64 atomics to the new QBasicAtomicXXX architecture
The IA-64 architecture supports the actual memory ordering semantics
in many instructions, but not all. We actually implement the functions
for all operations, so we get the best possible output.

It does support proper load-acquire and store-release semantics, but
we don't need instructions for it: the ABI requires that a volatile
load be acquire and a volatile store be release.

The Intel and HP compiler codepaths are rewritten, but untested.

Change-Id: I7aa62a4ec65f63a97d1bbd8418bb2492c2be465f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-24 01:08:42 +01:00
Thiago Macieira
99fb1bea49 Port the MIPS atomics to the new QBasicAtomicXXX architecture
The LL/SC instructions are only present on MIPS II and up, so don't
pretend to support MIPS I. The previous implementation emitted the
instructions by telling the assembler to change instruction sets. Now,
the user must pass an -march= option to GCC telling it which
architecture or processor is being targetted.

On MIPS64, the 64-bit implementation allows supporting for long long
too.

Change-Id: I6dae6f8f61e563aba6a663227d91c5ddf554aa6a
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-24 01:08:38 +01:00
Thiago Macieira
dc5388e79b Port the ARM atomics to the new QBasicAtomicXXX architecture
The implementation is divided in two files, as it used to be in the
previous implementation: one for ARMv5, one for ARMv6 and up.

For the ARMv5 implementation:

    Drop the non-Linux EABI version of the atomics, as it's not
    ABI-compatible with the ARMv6 and ARMv7 implementations. This
    means this ARMv5 implementation only works on Linux. If other
    systems implement kernel helpers like Linux, they can be added
    too.

    We use the __kernel_cmpxchg located at 0xffff0fc0 to implement the
    operations, except for fetchAndStore, for which we use the SWP
    instruction.

    Also introduce the use of __kernel_dmb (at 0xffff0fa0) for the
    memory barrier. Now this code is SMP-safe even when built with
    ARMv5.

    The kernel cmpxchg helper was introduced in Linux 2.6.12, whereas
    the dmb helper was introduced in 2.6.15. That means 2.6.15 is the
    minimum version now.

For ARMv6 and up:

    Introduce byte, half-word and doubleword atomics that work on
    ARMv6K and up.

    For ARMv6 specifically, the memory barrier instruction (DMB) isn't
    present, so we need to accomplish the same with the MCR
    coprocessor instruction.

Change-Id: Ife7f9b920bcc7d1eef7611761f6c59ea940ec7df
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-24 01:08:36 +01:00
Bradley T. Hughes
835a2b9902 Make clang compile the new i386 and x86_64 atomic code
The input type needs to match the output type, otherwise we get this
error:

src/corelib/arch/qatomic_x86_64.h:288:25: error: unsupported inline asm:
      input with type '<dependent type>' matching output with type 'T':
                   "0" (valueToAdd * QAtomicAdditiveType<T>::AddScale)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: I26d4efdbcab089dea71ef08e3e65df5b7482865a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-24 01:08:31 +01:00
Thiago Macieira
ba660ea754 Port the i386 and x86-64 atomics to the new QBasicAtomic architecture
Both implementations now are very similar to one another, to the point
we could share the code if we wanted to. They are based on assembly
code for the Relaxed functions only, as the i386 and x86-64
architectures only allow for full memory ordering or something that
closely resembles it (see 8.2 "Memory ordering" in the Intel 64 and
IA-32 Architectures Software Developer's Manual Volume 3A). We could
add "lfence/mfence/sfence" in future versions if we wanted to (SSE2+).

Change-Id: I76966d9f8694edfece2c5ebd3387348fac721447
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-24 01:08:28 +01:00
Thiago Macieira
161d5eb323 Port the bootstrap atomics to the new QBasicAtomic architecture
The code is now much simpler and much more complete. Now the bootstrap
atomics (which aren't atomic at all) contain the full set of
operations.

The only integer supported is int, but all others would work too.

Change-Id: Id99f07818f9da059c4ff02520f9cbf2d1a71a514
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-24 01:08:24 +01:00
Bradley T. Hughes
1831abb5bb Remove QEventLoop::DeferredDeletion
This flag has been deprecated since Qt 4.4, so remove it.
tst_QApplication had 2 nearly identical tests, one for testing the
QEventLoop::DeferredDeletion flag, and one to test sendPostedEvents()
with QEvent::DeferredDelete. The latter is the preferred way, so keep
that test, but remove the test for the obsoleted flag.

Change-Id: Icdb7483c32b3c920bda31d2bbb4f7414ece6d826
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-23 14:47:10 +01:00
Morten Johan Sorvig
95ea9cb191 Use QObject pointer as QCocoaAccessibleElement id.
Each QCocoaAccessibleElement needs to provide a
unique stable id through the -(NSUnterger)hash
method.

The previous approach of basing the hash on the parent
hash plus the child index is unpractical now that
childAt() can return distant descendants instead
of immediate children only. Use the QObject pointer,
which is set for all accessible interfaces today.

Change-Id: I5868e3a81c1b4da7233504f30003ab8060e9fa3f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-23 14:47:10 +01:00
Laszlo Agocs
7ed6a247bf Fix synthesizing mouse events when touches change ordering
There is no guarantee the touches will be listed in the same order in
an update: the platform/generic plug-in, the drivers, etc. are all
free to shuffle the list of touch points in each report (even though
the order is fairly stable with most systems).

Therefore, to be safe, move and release events should be generated not
from the first point in the list but from the one with the matching
id.

Change-Id: I6615224cbf2cfdc440143eb3191482a23d85c6a4
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-23 13:10:00 +01:00
Robin Burchell
141e5c3878 Revert "Blow up earlier when adding test rows without columns."
This seems to break a number of tests using the qmltest library.
Functionality will be restored in a future commit, once the breakage has been
identified.

This reverts commit fdedb49b76.

Task-number: QTBUG-23845
Change-Id: I0ca4dbd54132e4250702f06738edbad5e8fc4f36
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-01-23 13:07:47 +01:00
Armin Berres
d0cb57a4e7 QPropertyAnimation::setTargetObject() fails if new and old target object have the same address
If a target object is destroyed QPropertyAnimationPrivate::targetValue
reflects this while QPropertyAnimationPrivate::target stays unchanged.
QPropertyAnimation::setTargetObject() checks if a new target matches
QPropertyAnimationPrivate::target - to bad if the former target has
been destroyed in the meanwhile but the new one has the same memory
address. targetValue is not updated in this case. It will still point
to null and QPropertyAnimation::targetObject() returns 0.
This is not just a theoretical problem - we stubled upon this in
Harmattan when suddenly animations complained that they are having no
target.

Change-Id: Ib4a9c234d04d6f8a3f7aed251d5e79471d95168a
Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-23 13:06:12 +01:00
Holger Hans Peter Freyther
43696a9e42 directfb: Deal with Qt trying to create a QSize(0, 0) platfom window
Qt will attempt to create a platform window with the above size and
DirectFB will fail to create the window. Make sure the width/height
is at least 1 before handing it to DirectFB.

According to Samuel it is legitimate to create a QPlatformWindow  with
QSize(0, 0) and it is the job of the platform plugin to make it work.
Follow the approach of the XCB plugin and increase the size.

Change-Id: Ifc92780b46f1a73123945988d06bd21a3deb6bb0
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-23 12:52:27 +01:00
Robin Burchell
cdb61839f4 Remove uses of qMalloc/qFree from out of line code.
There is no need to use these, and we are trying to deprecate them.

Change-Id: I70e6f27aca322fe74c31d8ad8496f230cd29e503
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-01-23 12:49:55 +01:00
Friedemann Kleint
0b1586f86c Windows: Implement native event filters.
Change-Id: Ibdf556428e4dbb9156c87504b923ec9600bcf871
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
2012-01-23 11:02:18 +01:00
Friedemann Kleint
e309e7a3e8 XCB: Introduce enumeration for event filter types.
Remove QByteArray-construction and hash lookup in the event
handling; use an enumeration indexing an array instead.

Change-Id: I4d272b32a5ff71c8da58197cf3a0b38c1e61d489
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
2012-01-23 11:02:18 +01:00
Alex Wilson
ccb059b0e2 Mark QTriangulatingStroker as Q_GUI_EXPORT
Change-Id: I6083ba122c33769cd4626f2c4a32959e535da8a4
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-01-23 11:02:18 +01:00
Joerg Bornemann
51b10b55f0 qfilesystemengine_win.cpp: compile with namespaced Qt
SidCleanup struct must not be in the INCLUDE_NAMESPACE.

Change-Id: Ic51f1734af583c0ba7f715f7b27f314211e698c5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-23 11:02:18 +01:00
Uli Schlachter
bd2ce747fc xcb: Correctly check the X11 connection
Commit e08453f31a added a check which makes
sure qt prints an error message instead of segfaulting when it can't
connect to the X11 server.

However, libxcb will never return NULL from xcb_connect() and thus that
commit only works if XCB_USE_XLIB is defined and used.

Change-Id: I8cc1496494a94f07055a3ac5093ce362dd347c5b
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-23 11:02:18 +01:00
Xizhi Zhu
07993161b1 Remove Symbian specific code from QtXml.
Change-Id: I29979c80e401f5d6c2c2b38c4e502340f2025a12
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-23 11:02:18 +01:00
Xizhi Zhu
4b3cdc3c1a Remove Symbian specific code from QtSql.
Change-Id: I3fc538862c7334914ec9e4331ef2d3db5c699ea9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-23 11:02:18 +01:00
Uli Schlachter
04a4b99902 xcb: Don't crash on missing mouse pointer
The draganddrop examples all crashed here because they were using a
default-constructed QImage() (i.e. one without any content).

I guess this happens here because I don't have any mouse theme set.
To test, one could start a second X server, but without any WM or DE.

The "evil" QImage() came from QGuiApplicationPrivate::getPixmapCursor().
This function seems to just always "return QPixmap();".

This fix is correct because the only caller has another fallback if the
createNonStandardCursor()-fallback didn't work. This caller is
QXcbCursor::createFontCursor().

Change-Id: I7ec7fbcfdf0203e983149b5e73016cc7e85ecf40
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-23 11:02:18 +01:00
Richard Moore
27df9a5a97 Remove dead code.
Task-number: QTBUG-23524
Change-Id: I6a80af450b599022e9242cccec945887b871f2b0
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-23 09:34:39 +01:00
Richard Moore
696daf0d25 Remove invalid comment.
No point in making this protected: it breaks existing code including
the unit tests, and the base class has this method as public.

Task-number: QTBUG-23524
Change-Id: I8fae019088fc368213ff7caa4b19fe7ab60488dd
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-23 09:34:34 +01:00
Robin Burchell
fdedb49b76 Blow up earlier when adding test rows without columns.
Previously, the assertation triggered was rather unhelpful:
 QFATAL : tst_QHash::qhash_qt4() ASSERT: "d->dataCount <
  d->parent->elementCount()" in file qtestdata.cpp,  line 88"

We now try a bit harder to be user-friendly.

Change-Id: I2e3a5ae27914d44fc1dc89af2a084e3d798fe221
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-23 06:49:12 +01:00
Jason McDonald
7827c1861f Update obsolete contact address.
Replace Nokia contact email address with Qt Project website.

Change-Id: Id689fdb78727abafba033bed7b0402e2cf27aba1
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-23 04:04:33 +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
Harald Fernengel
0696071316 Remove dependency of QtDBus onto QtXml
Replace the QDom based code in qdbusxmlparser
with code using QXmlStreamReader.

Task-number: QTBUG-20856
Change-Id: I294e3ebd6faa813c20806be3ae225ac00befb622
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-22 22:10:02 +01:00
Robin Burchell
7c247d3e70 Obsolete QInputDialog::getInteger() 'officially'.
It has long since been obsolete in code and removed from the documentation, but
was never marked QT_DEPRECATED. Do so, and inline the implementation.

Change-Id: Ic7bfdaf76269b7f9addeba83e64bc9525c581dda
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-22 22:10:02 +01:00
Robin Burchell
10a034f027 Merge overloads of QInputDialog::getText() and QInputDialog::getItem()
Change-Id: Ifaefaa5c3faa698c8570da4ef00e130c211b2609
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-21 19:17:03 +01:00
Robin Burchell
75292d0442 Merge overloads of QFontDialog::getFont().
Per Qt 5 comment. Note that this leaves one overload of getFont() intact, as
removing it would be a source-incompatible change.

Change-Id: Ieb6ddfef9aa86750c14928ab2e0a9bfb84d322ab
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-01-21 19:17:03 +01:00
Robin Burchell
02ad2c1829 Remove note about source-incompatible change.
There's no real gain to be had from doing this.

Change-Id: Ifa5fefe4a354cfe1f9a8a915a7041d0cfebccce1
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-21 17:49:58 +01:00
Robin Burchell
a9c1d6c3dd Remove copy of libgq.
Nothing in the source tree uses this after the removal of the icd bearer plugin
in 0e0eb207c4, so there is no point keeping it
around anymore.

Change-Id: I6ea05c84d561965636e2ca5b03c7ee8edc48c093
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-21 16:15:24 +01:00
Robin Burchell
9d7123e4de Remove unnecessary sizehint overload.
Change-Id: Id6b3e206d59df25f6252da48ac99265226313635
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-21 16:15:07 +01:00
Thorbjørn Lund Martsum
5ff1a76a53 Change QMessageBox::question to default to yes/no buttons instead of ok
Beside that it also removes a suggestion about making Ok==Yes and
No==Cancel. It would be a problem since we (at least)
can have messageboxes with both yes, no and cancel.

Change-Id: I567979b2e697e7103968d6512fe4835f86888ca3
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-21 14:29:49 +01:00
Robin Burchell
3b42024fcc Fix incorrect check for error when monitoring a path using inotify.
Per the manpage, inotify_add_watch will return -1 in the case of error, 0 is
a valid watch descriptor.

Task-number: QTBUG-12564
Change-Id: I56a54de2f5cf18b40aaeddc6de51d18dacbf8daf
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-21 05:07:06 +01:00
Mark Brand
3a3356a850 remove obsolete codec plugin loading code
Change-Id: I1f3dbb5c10009413f701947b1b89ed3dbc94bf3d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-20 18:48:22 +01:00
Mark Brand
712cfb5094 cosmetic adjustments for files moved to core/codecs
-update old reference to 'plugin'
-rename multiple inclusion guards
-add private header warning text

Change-Id: I4c582dcba549d871bd8d929bee5372586117eabb
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-20 18:48:22 +01:00
Mark Brand
15e4df7d83 update private header references
Change-Id: I092d879653b6900532a0c4534c1eb2be84e9d0f6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-20 18:48:22 +01:00
Mark Brand
2ae91491b4 move plugin text codecs to QtCore
Having plugin text codecs adds considerable complexity to
configuring Qt. The plugin interface is designed for optional
features, but text codecs tend to be used for essential functions.
A dramatic example is loading a codec plugin from a file whose path
needs to be converted by the codec.

Codec plugins can also be a nuisance to builders of applications
linking to static Qt. This is because the application might need
to explicilty import the static codec plugins which are actually
dependencies of QtCore.

For these reasons, it has been decided not to have text codec plugins
any longer.

Change-Id: Ic6c80a9c949bd42e881e932d1edae23fe4fe4c88
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-20 18:48:22 +01:00
Mark Brand
7ee3d8c8ec build and load text codecs regardless of iconv and platform
Otherwise applications linking to static Qt may have to import
the static plugins to avoid linking failure even if they do not
use the codecs, which is a nuisance.

Also, this is preparation for moving these codecs into QtCore
proper.

Change-Id: I71f3bbb0bac6261983143d0578757b34997d1364
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-20 18:48:22 +01:00
Mark Brand
10f6c5981c fix whitespace
Change-Id: I0cfccae085c000d4368386a34f288c1e6f01a88f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-20 15:51:03 +01:00
Morten Johan Sorvig
ab7b849c41 Add atomic implementation for Native Client.
Uses gcc compiler intrinsics, similar to avr32.

Change-Id: I10cc2bd3cad67ee002386bab1ea764a4ff5ce727
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-20 14:23:01 +01:00
Pasi Matilainen
2c8a0a90be Fix cursor disappearance in QLineEdit on Mac when deleting all text
On Mac OS X, if all text in the QLineEdit was selected and then deleted, cursor
visibility was not updated, and so the cursor remained hidden. Fixed
to update cursor visibility also when the text is empty.

Task-number: QTBUG-13169
Change-Id: Id52a20b07bb96609a78c42eb630ee2b20ed7cbcb
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
(cherry picked from commit 181456d0a31b7250da97eafba75e6bc657391777)
2012-01-20 14:22:03 +01:00
Jiang Jiang
91fa4b7043 Fix glyphsEnd range check
For a character generating more than one glyphs, glyphsRun() needs
to check the next glyph index after the requested range. If that
glyph index is more than one larger than the glyphsEnd we currently
get from logClusters, then glyphsEnd need to be set to the next
glyph index minus one.

Change-Id: I795c595d349418ba755b088d6fe6ff24a6e7dd15
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-01-20 14:19:59 +01:00
Friedemann Kleint
fc366046b4 Windows: Work on QPlatformScreen implementation.
Implement virtual desktops (which is the default for
EnumDisplayMonitors) and change notifications.

Change-Id: Id24a1b6d9766903901ddf1ded8e9933aa03589d4
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
2012-01-20 14:17:41 +01:00
Friedemann Kleint
688d463f4a uic: Add translation-attributes to string list properties.
Task-number: QTBUG-8926
Task-number: QTBUG-20440

Change-Id: I57d92110bf532c717451336bd1943c9571020478
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
2012-01-20 14:17:41 +01:00
Friedemann Kleint
0f8ad242fb Add a virtual sendPostedEvents() to QEventDispatcherWin32.
Reimplement this in QWindowGuiEventDispatcher to send both Qt posted events and
queued QPA window system events. We need to do this at a well defined place,
instead of sending events outside of the eventloop from the Windows proc.

This fixes various hangs for example in tst_qinputdialog, which used a 0-timer
to close a dialog.

Change-Id: I64e0b8f1209fb434059a7fa667ed585902c19db4
Initial-patch-by: bhughes <bradley.hughes@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-20 14:17:41 +01:00
Eskil Abrahamsen Blomfeldt
c274ea7cf5 Introducing QPlatformSharedGraphicsCache
Interface to provide cross-process caching mechanisms in a platform
plugin. Can be used for shared glyph caches and icon caches etc.

Change-Id: If0d89a0a50bbd6eee05daf908448262ff270fc5b
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-01-20 14:17:41 +01:00
David Faure
47d5d349d8 Remove QBool and use bool instead.
QBool was introduced with Qt-4.0, to detect Qt3-like code like
 if (c.contains(d) == 2) and break compilation on such constructs.
This isn't necessary anymore, given that such code couldn't possibly
compile in Qt4 times.
And QBool was confusing developers, and creating compile errors (e.g.
QVariant doesn't have support for it), so better remove it for Qt 5.

Change-Id: I6642f43f5e12b872f98abb56600186179f072b09
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-20 14:17:41 +01:00
Anselmo L. S. Melo
841b0c4fac Docs: Fix typo in the QWindow class documentation
It was 'windw' instead of 'window'

Change-Id: I3a7b361a22e4ea09ee1fb3d9b551c1a88d401ff1
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-20 12:48:19 +01:00
Simon Hausmann
ef2efafcc6 Allow generic plugins to set defaults for window system properties
In order for generic plugins to set defaults on "startup" time - such
as the meego integration plugin to set the correct screen orientation -
it is necessary to construct the plugins when the application startup is
done. Then the plugin can "inject" the values the usual way, using
QWindowSystemInterface::handle*Change. Afterwards we need to process those
events - take them from the window system event queue and let QGuiApplication
process them.

Change-Id: I84de022ad565a33ae3ef5dfc34f540d6bf488b03
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-20 12:43:55 +01:00
Simon Hausmann
1ca05bb0c1 Add support for platform plugin specific event filters.
The setEventFilter on the platform native interface allows subscribing to
events on the backend by event name.

Change-Id: Ib10077fbc69f0207edbae1177e7bbd18c8d0f9ae
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com>
2012-01-20 12:43:52 +01:00
Robin Burchell
03700a293e Change visibility of eventFilter().
Change-Id: I2d47e3d1f5a8fac5a1fe4638dce87a9e036f8544
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-20 12:42:10 +01:00
Bradley T. Hughes
77fcba22c4 Add Contact: information in the license header
Contact point is the Qt Project, and needs to be included for
all new files added to the repository.

Change-Id: Id0e7219e1d11a169f1a91439728cbda55ab29eeb
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-20 12:27:11 +01:00
Bradley T. Hughes
085d3af48c Silence warning from clang
QBasicAtomicPointer is forward declared as a class, keep the actual
declaration of QBasicAtomicInteger and QBasicAtomicPointer as class with
all public members (qoldbasicatomic.h does the same).

src/corelib/thread/qbasicatomic.h:158:1: warning:
      'QBasicAtomicPointer' defined as a struct template here but
      previously declared as a class template [-Wmismatched-tags]
struct QBasicAtomicPointer
^
src/corelib/global/qglobal.h:1861:23: note: did you mean struct here?
template <typename T> class QBasicAtomicPointer;
                      ^~~~~
                      struct

Change-Id: I38c59c29d7f796dde772e7f403bbf98b04571a08
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-20 12:27:04 +01:00
Bradley T. Hughes
db10b7b40f Use Q_FOREVER instead of forever
Public headers should compile with QT_NO_KEYWORDS defined.

Change-Id: I5620b4b2600f5e39bb402b97d14fdb257dfe9942
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-20 12:26:37 +01:00
Thiago Macieira
1f843ca39e Add the new QBasicAtomicXXX implementation - no backends yet
The new implementation is API- and ABI-compatible with the old
implementation, provided that QBasicAtomicInt isn't used as an
argument in a function call or the return value: now, QBasicAtomicInt
is a typedef to QBasicAtomicInteger<int>.

The new design is based on CRTP: the QGenericAtomicOps template class
takes as a template parameter the derived class itself. This way, we
implement a "poor man's virtual" without a virtual table and
everything is inline.

QGenericAtomicOps implements most of the atomics code that is repeated
in many classes all over:

 * Acquire semantics are obtained by placing an acquire barrier after
   the Relaxed operation
 * Release semantics are obtained by placing a release barrier before
   the Relaxed operation
 * Ordered semantics are obtained by placing an ordered barrier before
   the Relaxed operation (either way would be fine)
 * fetchAndStoreRelaxed and fetchAndAddRelaxed are implemented on top
   of testAndSetRelaxed
 * ref and deref are implemented on top of fetchAndAddRelaxed

It also adds load, loadAcquire, store and storeRelease: the default
implementations of loadAcquire and storeRelease operate on a volatile
variable and add barriers. There are no direct operators for accessing
the value.

Each architecture-specific implementation can override any of the
functions or the memory barrier functions. It must implement at least
the testAndSetRelaxed function.

In addition, by specialising one template class, the implementations
can allow QBasicAtomicInteger for additional types (of different
sizes). At the very least, int, unsigned and pointers must be supported.

Change-Id: I6da647e225bb330d3cfc16f84d0e7849dff85ec7
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-20 12:26:26 +01:00
Mark Brand
ce2428c608 fix case of included windows headers
Allows cross-building on unix.

Change-Id: If389138c2d3bf5e72c62c85d054785ac9232f158
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-19 23:58:34 +01:00
Xizhi Zhu
3c0777936e Remove the useless connManager() function.
Change-Id: Ifac0796ec22d0656ccfcf31b8d45b2342c2ee646
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-19 22:26:43 +01:00
Robin Burchell
ce14c36475 Remove Q_CC_MWERKS.
This is no longer supported.

Change-Id: I3914f5007595fd699fa1e9a565a0a3f59a0e135e
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-01-19 21:13:48 +01:00
Robin Burchell
9e940ec8fc Remove Q_CC_NOKIAX86.
This is no longer supported.

Change-Id: Ic393bc48c4c842514da69b6696cfb62b54360070
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
2012-01-19 18:40:45 +01:00
Lars Knoll
253c801c56 Remove QDir::convertSeparators()
This method has been deprecated since Qt 4.2.
QDir::toNativeSeparators() replaces it since then.

Change-Id: I49e6e1bfd50f26aa30134e599ee82067709549a7
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-19 16:41:44 +01:00
Jonas M. Gastal
8bbf1a46a5 Removing QHttpHeader and QHttpResponseHeader.
QAuthenticator used it for the convinience of QHttpSocketEngine only.
QHttpSocketEngine has now been ported to use QHttpNetworkReply to parse
HTTP responses.

Change-Id: Idf6e70aa76613aad6e3d789d81ca1b4fd73575c2
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-19 14:31:10 +01:00
Lars Knoll
658a239eb9 Rename all our interfaces from com.trolltech to org.qt-project
Change-Id: I6db7211fcf6b24bd75e360645bbb2fdf1ef8a8bc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-19 14:28:49 +01:00
Jan-Arve Saether
408a347d80 Cleanup: No need to have two code paths that both return Unrelated.
QAccessibleInterface::relatedTo() does the job for us already.

Change-Id: I816022041e38c5f9dd742df1c4b9ca61b8d6a186
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-19 12:58:26 +01:00
Bradley T. Hughes
a84d893bae Add "nswindow" resource to the Cocoa native interface implementation
This will return the NSWindow* for the given QWindow*. Port the QWidget
autotest helper to use the native interface and the "nswindow" resource.

Change-Id: I754b7e9288690ac3c99c3ec65c5526d5fe121234
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-19 11:31:22 +01:00
Bradley T. Hughes
1e29040c17 Prevent menubar related crashes
The native menubar interface does not communicate menubar destruction
down to the implementation, so we cannot keep naked pointers (otherwise
they become dangling). This happens often while running autotests as
windows, menus, widgets, etc. are quickly created, tested, and then
destroyed.

Work-around the crashes for now by using QWeakPointer. A proper fix will
need to be investigated to prevent the menubars hash from holding
dangling key pointers.

Change-Id: Ie8e50cbc52f9510e844fc3c0c5ae6a0865320282
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-19 11:31:22 +01:00
Joerg Bornemann
49d1b06898 Revert "fix NTFS mount points"
We agreed on treating neither junctions nor mount points as symlinks.
This will be handled in another commit.

This reverts commit 1656c4780c.

Change-Id: I41a87b6df9f7fba333df4c967ee9f0c1f3940952
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-19 11:31:22 +01:00
Friedemann Kleint
911fd94913 Fix compiler warnings in Qt Network.
- Missing return value
- Wrong format for qint64

Change-Id: Id0de58c85b7c8ed2a62f7237fd23e6c5a5ac92ec
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-19 11:31:22 +01:00
Friedemann Kleint
114079e224 Windows: Implement QPlatformScreen::name()
Change-Id: I04ec91b12936bdcc179b79558ac2285b70281dcd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-19 10:09:09 +01:00
Jan-Arve Saether
ec550e28d2 Remove all references to QAccessible::Self
navigate() to Self does not make any sense (its basically a clone).
It seems that its not that useful to return Self from relationTo(),
since it was only one place where relationTo() was called where it
checked for the Self flag. This was in the windows bridge, and we
could easily work around that.
If it really turns out that Self is useful, we can always add that
enum value back later.

Change-Id: I9ebb60da059a843de5e6fcab9e815b919afc6f2a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-19 08:05:05 +01:00
Xizhi Zhu
f4d2acdb8e Remove QNetworkConfigurationPrivate::bearerTypeName().
Also, use QStringLiteral instead of QLatin1String.

Change-Id: I232fc02a56261929864c2ea66993ef1c74bc1237
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
2012-01-19 06:22:16 +01:00
Xizhi Zhu
b12d27ecb0 Remove the useless undef for "interface".
"interface" is not used by QNetworkConfiguration.

Change-Id: I742fe179d415ab1424bfddb1f6c034fc98c55e61
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-19 06:22:14 +01:00
Xizhi Zhu
a4402fdc89 Add the missing Q_DISABLE_COPY for public bearer classes.
QNetworkConfigurationManager and QNetworkSession are QObject, which
should not be thought of as values that can be copied or assigned, but
as unique identities.

Change-Id: I6ff0124a613862c2b411da2df31f03d5033315a9
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-19 06:22:10 +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
Jan-Arve Saether
f4ea85f8fe Remove all references to Self in relation to navigate.
After this change, Self should only be used in the context of
relationTo().

Change-Id: I04bb2bf7c480f9350aceb6e53d78e5cf1808d53e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-19 00:17:35 +01:00
Pekka Vuorela
a3a0b03735 QWidget editors to return correct value for Qt::ImEnabled
Qt::ImEnabled input method query was added for Qt5.
Enhancing source compatibility with Qt4 by setting query value
in QWidget if widget does not return any valid value.

Change-Id: I274c1f6c47a5cb08ecf550b25e5b358622e21d90
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-19 00:16:42 +01:00
Xizhi Zhu
8ecc2da31d Remove QNetworkConfiguration::bearerName().
It was added only to maintain source compatibility with Qt Mobility.

Change-Id: Iea8d40e401bd1f8d5115268e09b256eacca69ea0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-18 12:53:13 +01:00
Lars Knoll
4f25e66f7a Add a constructor that explicitly takes a size to QLatin1String
This is useful in a couple of situations where the size is known
at runtime and one wants to avoid a call to strlen.

Change-Id: Ic20587b0d365a4573d4636c5853c206b571b8d6b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-18 10:21:30 +01:00
Jędrzej Nowacki
f8696140b0 Fix visibility of QVariant functions.
Change "Refactor QVariant handlers."
08863b6fda changed visibility of two
methods; QVariant::create and QVariant::cmp. These methods are internal
for Qt usage, but there is no need for breaking a dependent code.

Change-Id: Ic3a7f95dea5fa3e697f0686ae5d32dade24f14df
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-01-18 08:53:03 +01:00
Jason McDonald
8fbad679e9 Change QSKIP to fail for outdated tests.
Be more insistent that tests using the old two-argument version of QSKIP
should be updated.  After a grace period the warning will be removed and
incorrect usage of QSKIP will revert to a compilation failure.

Change-Id: Ifa19b856d9f45738bd9d790bb65a8741f965d0f4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-18 02:10:09 +01:00
Morten Johan Sorvig
81e55fede7 Improve accessibility actions descriptions on Mac
Use built-in descriptions for built-in actions

Change-Id: Ic5581e89e4568abcc6c3add126d492345d26d87d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-17 19:24:29 +01:00
Joerg Bornemann
1656c4780c fix NTFS mount points
NTFS mount points are not treated as symlinks, because they might
not have a link target.
This is the case when a volume is mounted as a single mount point
without a drive letter.
This patch fixes building Qt in an NTFS mount point.

Task-number: QTBUG-20431
Change-Id: Ie2e15212e1a7ca7fa0067b7ca8857e243e42c21a
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
2012-01-17 19:24:29 +01:00
Samuel Rødal
b41fd5cf12 Added libxrender-dev to xcb's README.
Task-number: QTBUG-23633
Change-Id: I9428d04dab9e769f531a5aaffb943c6c2fa79f9a
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-17 17:41:14 +01:00
Raphael Kubo da Costa
3de1e6f26b Remove the default address parameter from QDBusServer's constructor.
Commit 5be6cf0a6e306ed3a51ed5ba89317b1317544eea introduced an implicit
cast from const char* to QString in QDBusServer's constructor, which
breaks the compilation of applications which use QtDBus when
QT_NO_CAST_FROM_ASCII is defined and clang is used.

Fix it by splitting the current constructor with the broken default
argument into one which takes a non-default QString and one which only
takes a QObject* parent and calls the other with the current default
argument.

It would have been better not to have mostly duplicate code in both
constructors, but QDBusConnectionPrivate is also used in other places.

Task-number: QTBUG-23398
Change-Id: Ia001d63878e7ff720c6630a3372adc571124448d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-17 17:41:14 +01:00
Jiang Jiang
314da0ae01 Fix isolated Thai SARA AM handling
Since 5e07a3ac58f93bd5e09715d43b58c20950c2befa Thai text layout is
handled by libthai to special case of the SARA AM. It didn't handle
isolated SARA AM. This patch fixed it and added detailed explaination
on the special case.

The dotted circle should be shown rather than hidden.

Add an test case to verify that with Waree.

Change-Id: I4967715627cbe15f5a3e9ab3e3844420ab541aed
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-17 16:12:53 +01:00
Simon Hausmann
6e24833dc9 Support current screen orientation changes on Harmattan
Subscribe to the corresponding property via DBus and report it
through QWindowSystemInterface::handleScreenOrientationChanged.

Change-Id: Ibd2901de798866e177aba898374ee2b9877310ed
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-17 16:12:53 +01:00
Mark Brand
0f7a413683 remove trailing whitespace
Change-Id: If53a0bd1794e69b4856f993c6e2959369bd007d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-17 14:44:30 +01:00
C. Boemann
efc355e8ed Fix that right aligned tabs can cause text overlapping
Eventhough there is a unittest that shows it shouldn't overlap it does
at drawing.

I've not been able to figure out why the unittet doesn't fail, but it
has before been the case that layout and drawing don't correspond.

Change-Id: I13250d0510cd0d963721b05f67ac82b1d499fbac
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-01-17 14:44:30 +01:00
Lars Knoll
bf805455d4 Fix ### Qt5 for QKeySequence
Change-Id: I32e582d264991e4a42e4ca6678d477835d15dbce
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-01-17 14:44:30 +01:00
Lars Knoll
445c4cb011 Mark obsolete methods in qregion as deprecated
Make them inline as well, so they don't
create symbols.

Change-Id: I779103d6752e75809d16632c8c0eb374cdbd9705
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-01-17 14:44:30 +01:00
Pekka Vuorela
cf0d5d4554 Move keyboardInput data back to QApplication
Deprecated interface, rest of Qt now adapted to
QInputPanel.

Change-Id: Iacbbcac90dd7c037a24b45df1ee868f04090b21b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-17 13:15:04 +01:00
Erik Verbruggen
90a3e6c7c4 Conditionally define Qt C++ "extension" macros.
This patch makes it possible to disable the definition of meta-object
related macros like SIGNAL, Q_SIGNALS, etc. This changes makes it
possible for tools to define the macros in a way that can be used with
them.

Change-Id: Ie8efb1983536f57755cbc59a8f71f1d04bf080be
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-17 12:45:36 +01:00
Simon Hausmann
14e237816d Add support for QWindow::setOrientation on Harmattan
Set the _MEEGOTOUCH_ORIENTATION_ANGLE property on the window, just like
Qt Components for MeeGo and MeegoTouch itself.

Change-Id: I0b9adf4550593678bbcba89a2d4f1f65c1f4bd20
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-17 12:21:56 +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
Samuel Rødal
82340ea5cd Fixed crash in GL 2 paint engine on Intel Atom.
The GPU in question supports GL 2 but not framebuffer objects. Since we
anyway have a font rendering path that doesn't use FBOs we might as well
not require framebuffer objects in order to use the GL 2 engine.

Task-number: QTBUG-22483
Change-Id: I2a80343fedda276e73e603ffe54edff58801af5b
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
(cherry picked from commit f13d0078d9f829cde2cd5b8b9eac40635a883ec6)
2012-01-17 10:30:17 +01:00
Leandro Melo
85a14abd2e Join user state of removed text blocks
Note: Indentation of surrounding code was fixed.

Done-with: mae
(cherry picked from commit 8d3d3381c127f0f4dd9fc507c3069acddbf40535)
Change-Id: I8d3d3381c127f0f4dd9fc507c3069acddbf40535
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-01-17 09:09:03 +01:00
Jason McDonald
2ba0d1e550 Move pass/fail/skip counters from QTestResult to QTestLog.
This change will enable further simplification of QTestResult and
QTestLog in the future, including removing a circular dependency between
the two classes.

The "getter" functions in QTestResult are retained for now, but will be
removed in a future commit, once QtQuickTest has been changed to call
the getters that this commit adds to QTestLog.

This commit is adapted from an unfinished change by Henrik Hartz.

Change-Id: Ife7f80ac6a4310449a4712e96e0bea6c02139a5a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-17 01:17:35 +01:00
Stephen Kelly
6acdb32561 Clarify docs that everything must be re-queried on model reset.
Change-Id: I05970302d4f52d092a7c65a45b9e5a3570b1d144
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-16 17:07:12 +01:00
Frederik Gladhorn
7a0099183a Accessibility plugin is for widgets.
Change-Id: Ifbfe1a7ec62979097ad82343b20be823579d99b9
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-16 15:27:50 +01:00
Jan-Arve Saether
56c80382c6 Remove all reimplementations of relationTo() returning Unrelated.
QAccessibleInterface::relationTo() already return
QAccessible::Unrelated by default. No need to duplicate that code.

Change-Id: I40e6758b946c43ca8773cdb2d28407edf99aad49
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-16 15:27:50 +01:00
Morten Johan Sorvig
1f7aa83661 Remove Qt4 Mac accessibility backend files.
Change-Id: I2c41050b5965756ae4c2ecfe73ba5926880ed98d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-16 13:48:30 +01:00
Lars Knoll
d6fb349751 Remove a ###
Change-Id: Ibc92317b07f3746c7978e571cae105535c01e1d6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-16 13:48:30 +01:00
Lars Knoll
1d7db25bd6 Merge the makeEncoder/Decoder overloads.
Change-Id: I9fdeeafe08dd70c0ab9ce26a2fce3b8d803ca280
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-16 13:48:30 +01:00
Lars Knoll
6bf72a98ac Remove unused variable
Change-Id: Ib8725e89e40d6e12172b1da687da2e4d559444f3
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-16 13:48:30 +01:00
Lars Knoll
3b973971fb Fix ###'es in qrect.h
Change-Id: Id9635b6faeaf12ba2f7a0f70055b0df01cd16587
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-16 13:48:30 +01:00
Lars Knoll
bb5ae21c41 Fix ### comments in QSet
Change-Id: I302be7dc4cd7a9c2b9e35e8142ca100d6f86da7c
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-16 13:48:30 +01:00
Samuel Rødal
e469323407 Use QFunctionPointer in QOpenGLContext as well.
Change-Id: I7192e6aea721c75257bfbd1d205d5ce7764d915f
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-01-16 13:48:30 +01:00
Bradley T. Hughes
802c3580e0 Cleanup properly when destroying QCocoaWindow
[NSNotificationCenter addObserver]'s documentation clearly states that
removeObserver needs to be called before releasing the object being
observed. The m_contentView we create was never released either, so be
sure to release that as well.

Change-Id: Ia54eb1c5c751f4cb0edb21ad559b261cb8f24208
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-16 13:48:30 +01:00
Samuel Rødal
9702400e2d Fixed QGLContext::getProcAddress() to return a function pointer.
Task-number: QTBUG-5729
Change-Id: I57e71f89a2c5ca7f74f73c66adcbf4a6cc073813
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-01-16 11:47:32 +01:00
Xizhi Zhu
5b1aa4c75d Fixed build break when bearer is disabled.
Change-Id: I29e88b046f6502c84acc9c6f566ecc328cf24e38
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-16 11:29:04 +01:00
Uli Schlachter
23a372ab8d xcb: Obey maximum request length when uploading images
When connecting to an X11 server, the server tells the client what its
maximum allowed request size is. Larger requests are not permitted.
Thus, libxcb verifies that all requests which are sent are smaller than
this size limit and possibly kills the connection (without any good
error message).

Thus, when uploading an image, we could be trying to send more pixel
data than fit into a single request. If this would be the case, the
code will now use multiple requests where each request only sends a
part of the allowed rows.

In case all the data fits into a single request, this commit shouldn't
change any behavior.

Change-Id: I84a4ebfcdb6de7e206015c37e3e33cba3bd309b1
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-16 11:01:09 +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
Frederik Gladhorn
15598b46c1 Accessible docs - editable text interface.
Change-Id: Id8b64ff9674b7cd4ac8551528239e8ab97563764
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-16 08:49:15 +01:00
Rohan McGovern
e08453f31a xcb: abort (rather than segfault) when X is not available
Be more user-friendly (e.g. when logging into a machine by ssh and
forgetting to export DISPLAY).

Change-Id: I9d07b0af9c5b4841827826053bb27b507801ae61
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-16 08:26:16 +01:00
Olivier Goffart
24a72c4efa qglobal: Remove symbian specific features
Change-Id: Ie0480b0c80b68a86e77bf3552546f494cdaf66c1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-16 03:52:32 +01:00
Olivier Goffart
a03b4e4417 Improve the documentation of QStringLiteral
Change-Id: I4bbe18ecc342f034fbc8e9fd14b700ee5272076f
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-16 03:51:14 +01:00
Jason McDonald
51cb2dd00a Remove unused QTestResult::allDataPassed().
The removed function was private API and was not used anywhere in Qt.

Change-Id: Ia262d119ebba30f6968cb7145043475bf88ffa39
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 01:57:23 +01:00
Jason McDonald
1066d185a6 Rename QTestLog::addIgnoreMessage to QTestLog::ignoreMessage.
Change-Id: I4cfcd00d444d0812c58afab6ffd43dee37db1340
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 01:56:51 +01:00
Olivier Goffart
d057065cbb Document Q_DECL_CONSTEXPR
Change-Id: I61f4017186e8c7b943855723d7c677a01f7a7bf7
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-01-14 10:27:35 +01:00
Morten Johan Sorvig
e97d77d5bc Clean up QCocoaIntegration destruction.
Fix memory leak - delete the font database. Remove
the NAApplication delegate.

Change-Id: I7c69eb4df01c8450c0abde360f77fbb318b20c83
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-14 05:36:12 +01:00
Martin Smith
e58e1abbd9 qdoc3: Don't put \relates in class member functions.
This removes two uses of \relates that were unnecessary.

Task-number:  QTBUG-23599
Change-Id: I3e10375159f6535f56622f9d24e16151938c63c3
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-14 03:55:26 +01:00
Janne Anttila
106bab644a Fix qsystemerror for WinCE
Windows CE does not have strerror(_r), so lets use string formatting
provided by windowsErrorString function.

In order to use windowsErrorString it was moved before
standardLibraryErrorString function.

Task-number: QTBUG-22498
Change-Id: Ifa20c4ac314ac8a26de6b0c5b67ced96b262c2b4
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
2012-01-14 03:55:03 +01:00
Mark Brand
f0841fe4cf remove symbian support vestiges from text codecs
Change-Id: I7b577d360cb9c7225da108ee56fd927a91a04dee
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-14 03:54:41 +01:00
Janne Anttila
1135aeb1d8 Fixed sqlite for Windows CE.
Windows CE does not declare the localtime function, for this reason
sqlite3.c defines it for Windows CE. However the localtime define
was too late in sqlite.c code since the osLocaltime function
introduced inside ifndef SQLITE_OMIT_LOCALTIME needs it also.

Task-number: QTBUG-22508
Change-Id: I97b9bc6316809178cbcf7e304c5dcd7deb9005cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-01-14 03:54:18 +01:00
Jonas M. Gastal
14b929e9c4 Cleaning up header includes.
QNetworkCookie doesn't need to know about QNetworkCookieJar and for
QNetworkCookieJar header a forward declared QNetworkCookie is enough.

Change-Id: I21145ce0f67a0a6bd68a46a5e757f82105cdf520
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-13 20:54:23 +01:00
Janne Anttila
7ce13d00db libpng config for WEC7
WEC7 is missing some time conversion related functions ->
configured libpng for WinCE accordingly.

Task-number: QTBUG-22506
Change-Id: Ia4038aaf44944883be8f3e25817a638118c1a73d
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-01-13 13:23:20 +01:00
Laszlo Agocs
77cfaf1f2c Update touchscreen plug-in's readme
To match the new mouse-for-unhandled-touch-event feature in
QGuiApplication.

Change-Id: Ifa3872ab51a8e95bee235a3681b0a9d1ec13081c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-13 13:23:20 +01:00
Janne Anttila
952df2ffd6 Fixed QFile::link behaviour for WinCE devices.
In WEC7 both arguments given for ScCreateShortcut needs to be given in
Windows format. Apparently older WinCE devices has accepted also Unix
format but this is not anymore true for WEC7. The Windows format works
for older WinCE versions as well.

Change-Id: Ic1f394e20bae8ad42acb46929d3ff4af92daf310
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-01-13 13:23:20 +01:00
Janne Anttila
dd5e72e2da Build fix for WINCE to qlocale_tools.cpp
Task-number: QTBUG-22500

Change-Id: If530799cf8ef971f5caf78d0c6dbeeda719d148f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-01-13 13:23:20 +01:00
Miikka Heikkinen
49c5c3e5c5 Windows: Fix qt_ntfs_permission_lookup
Specifying qt_ntfs_permission_lookup++ in application code didn't
make qfilesystemengine_win.cpp respect Windows ACL as it was supposed
to. This was because GetTokenInformation for TokenUser failed always in
resolveLibs() function, because the TOKEN_USER struct that was given to
it wasn't large enough to contain both TOKEN_USER and SID structs that
GetTokenInformation wants to return in this case.

Fixed by calling GetTokenInformation twice, first to determine the
required size, and then another time to get the actual token info.
Additionally, the SID returned as part of the token info needs to be
stored for the lifetime of the application, as the TRUSTEE_W struct
has a pointer to it (currentUserTrusteeW).

The worldTrusteeW initialization also required a change to properly
store the SID.

Note: The dynamic resolution of FreeSid and other SID manipulating
functions doesn't appear to be necessary, as they are found on the
same ifdef level (in winbase.h) as the GetTokenInformation, which
already isn't dynamically resolved.

Task-number: QTBUG-247
Change-Id: I0294c85ea903c86d03c2fcd3d801502b378dc0e5
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-01-13 11:30:43 +01:00
Janne Anttila
2fab348c81 Build fix for WINCE to qfsfileengine_win.cpp
QFileSystemEngine::currentPath() returns QFileSystemEntry, but
this method expects QString return value.
-> Code does not compile for WinCE

Switched code to use "QFileSystemEngine::currentPath().filePath()"
correspondigly as Windows desktop does if filename does not contain
drive letter. This is ok, since WinCE does not support drive letters.

Task-number: QTBUG-22499
Change-Id: Ic4935357c40cda30efcd2e1c7d69bf2ef7b31dd0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2012-01-13 11:30:43 +01:00
Mark Brand
621b121c07 add missing multiple inclusion guard
Change-Id: I82e9d1ddfc1a46bf47b8948dce800dcbcc1a0305
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Constantin Makshin <cmakshin@gmail.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-13 11:30:43 +01:00
Friedemann Kleint
7549dc9e54 Windows: Use a message-only window as clipboard viewer or for GL.
Change-Id: Ib8d287404b157aae2f4493ef8eba220afaba6c47
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-13 11:30:43 +01:00
Samuel Rødal
e50416066c Added application flags to translate between touch and mouse events.
The current way we do it of having the platform or touch plugin send
both mouse and touch events is not ideal. There's no good way to write
an application that works sanely both on a touch-only device and on a
desktop except by restricting yourself to only handling mouse events. If
you try to handle touch events you don't get any events at all on
desktop, and if you try to handle both, you end up getting duplicate
events on touch devices.

Instead, we should get rid of the code in the plugins that automatically
sends mouse events translated from touch events. This change enables
that by making the behaviour fully configurable in QtGui.

Two new application attributes are added to explicitly say whether
unhandled touch events should be sent as synthesized mouse events and
vice versa, and no duplicates are automatically sent as the current
situation. Synthesized mouse events are enabled by default.

We also get rid of the QTouchEvent::TouchPoint::Primary flag, which
was only used to signal that the windowing system automatically
generated mouse events for that touch point. Now we only generate mouse
events from the first touch point in the list.

Change-Id: I8e20f3480407ca8c31b42de0a4d2b319e1346b65
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-01-13 09:38:05 +01:00
Debao Zhang
b54cfb3124 QEventDispatcherWin32's internal Window should be a Message-Only Window
A message-only window enables you to send and receive messages. It is
not visible, has no z-order, cannot be enumerated, and does not receive
broadcast messages. The window simply dispatches messages.

Task-number: QTBUG-17144

Change-Id: Ibaf18f9ef5165166bf0b88e2f4952faba96d5eef
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-13 09:38:05 +01:00
Morten Johan Sorvig
7407045388 Cocoa: Send window activation events.
Change-Id: I599b4316f1535bf4855b205bfb2117bbcee63bf0
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
2012-01-13 07:47:47 +01:00
Olivier Goffart
56b2a229a3 Remove the Q_NO_DATA_RELOCATION hack
This hack was there because symbian used to have a problem with
relocations in the data section, between libraries. Hence, this was needed
so the metaobject could have a pointer to the base metaobject, despite
being in another library.

Anyway, I was told that symbian was fixed eventually. but the hack had to
stay there because of compatibility. But now that we don't even support
symbian, we can get rid of this hack totally.

Change-Id: I7249971ece35d952efa92bf8b04bf3aa3667624c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-13 05:57:39 +01:00
Martin Smith
c373c538e8 qdoc3: Don't put a \table in a \value
In qdoc, the \value command is meant to document a single value of an
enum. e.g.

\value TypeOfService Text describing the type of service. It runs until
the next \value or a blank line.

Although it doesn't say you can't build a \table in the \value text,
it doesn't work. For now, the fix is to remove the \table from the
\value text and make the table separate from the enum \value list and
let the description of the \table refer to the value that it belongs
to.

Task-number:  QTBUG-23599
Change-Id: I88b456dca419a565eece30ba20fe09c0bcd4d98d
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-13 04:04:09 +01:00
Martin Smith
9b1dcfe901 qdoc3: Don't put \relates in class member functions.
This removes two uses of \relates that were unnecessary.

Task-number:  QTBUG-23600
Change-Id: Id9bbcfa6f95d42ad552054e4839dbacb69fd1b2a
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-13 04:04:04 +01:00
Alexander Færøy
ced306d403 Remove shadowing members in QNetworkReplyHttpImplPrivate
Task-number: QTBUG-23512

Change-Id: I072dfde1741a1d32a6125f63e52cc22bc499987f
Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
2012-01-12 20:47:34 +01:00
David Faure
22225b1b06 Fix compilation of public headers with -Werror=shadow
Change-Id: Id47623002abca1e03fdfb9e9bd9cbc1b5542a2db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-12 18:44:56 +01:00
David Faure
eb8fce6e56 Fix compilation of Qt itself with QT_NO_DEBUG_STREAM
Change-Id: I07087dff0f109347ea80434f17eeb7cc1c13114c
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-12 16:15:00 +01:00
Jan-Arve Saether
0fda46932d Remove invokeMethod in favor of the recommended virtual_hook()
We don't remove the Method enum (yet), since there are functions in
dependent modules that still refer to it.
Unfortunately there is no way we can commit to several repos
"atomically".

Change-Id: Ia1923dc4bf0751a9ba67727d14da5a2e60bd4e74
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-12 15:15:30 +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
Frederik Gladhorn
ad16382135 Remove QAccessibleEvent
It was unused and I don't quite understand its purpose any more.

Change-Id: I5c946a1644fd64508cb4aad78320ae96fd935d31
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-12 15:02:54 +01:00
Lars Knoll
265ce60718 Compile if the header files from QtWidgets are unavailable
Change-Id: I0a774fc1492e882bc6c02d913e6dace189fdb992
Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
2012-01-12 14:50:28 +01:00
Jonas M. Gastal
1453f74cc5 Make QFtp private.
All references to QFtp in documentation have been removed, QFtp's
documentaiton was marked internal. The QFtp example was removed.

Task-number: QTBUG-23199
Change-Id: Ifff83cac069fb350e8ebeae63e605850e65c0c30
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-01-12 14:38:55 +01:00
Bradley T. Hughes
ad28d83f6d Add Q_COMPILER_* defines for C++11 features supported by clang
Change-Id: I9487720c33e6ac628f7e13f80057524a950c4c5d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-12 14:38:38 +01:00
Bradley T. Hughes
a43986e2a5 Don't crash during QApplication construction
The QCoreApplication::init() function calls the virtual
QCoreApplicationPrivate::createEventDispatcher(), which for
QApplication, also creates the plaform integration. Unfortunately, the
Cocoa menubar integration uses qApp before QApplication is constructed,
causing a crash. Circumvent this by using QGuiApplicationPrivate
directly.

Change-Id: Ib36f628641761e70f9e9e39dd23e70e7537a165b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-12 14:38:29 +01:00
Bradley T. Hughes
9834b3681f Make QFileSystemWatcherEngines children of QFileSystemWatcher
To support moving QFileSystemWatcher to another thread, the engines need
to follow when the watcher is moved. The easiest way to do this is by
parenting the engines to the watcher.

Change-Id: Ie2bb701c0c148da9cc2302d4de23286b8ef42c4d
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-12 14:38:18 +01:00
Bradley T. Hughes
716905cd56 Do not call moveToThread(this) in QWindowsFileSystemWatcherEngineThread
This is considered bad practice, and gives no benefit as the threads do
not use an eventloop.

Change-Id: I0de9eca97948571cf5091e2f1b19bb1faab3e2ac
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-12 14:38:11 +01:00
Lars Knoll
d613f30bd4 Add setPalette to QGuiApplication
If we have a getter, we also need the setter to be
symmetric.

Change-Id: Ibcb20d66c711e4c1bebd448781fa9eddb9cd773f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-12 14:35:42 +01:00
Lars Knoll
84cad0bfc6 Don't include qdialog.h
Change-Id: I67d48653b90f31d018c77ec069eb559ac46f9275
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-12 14:35:17 +01:00
Samuel Rødal
16c2622fe7 Made it possible to report screen changes through QWindowSystemInterface.
This makes it possible for platform plugin independent code (such as
generic plugins) to report changes to screen properties. An example
would be an accelerometer plugin that reports orientation changes
without knowing anything about the windowing system.

Change-Id: I984984b6d064327772c264bc942269422451da37
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-12 12:08:19 +01:00
Friedemann Kleint
738896d6b9 QFileSystemWatcher/Windows: Output paths if FindNext fails.
Change-Id: I72bd28868c84d37e3dd4ea8ab892fa092d853d4a
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-12 12:08:19 +01:00
Morten Johan Sorvig
ff5ae4a578 Ignore uninteresting accessibile interfaces.
Certain interface roles should be ignored and not
be a part of the user-visible accessibility interface
tree.

Change-Id: I264fef909052c528ee505875e3a211a33114d881
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-12 10:19:49 +01:00
Laszlo Agocs
893eb97b2a Do not mark any touch points as primary when no mouse event is sent
The touchscreen plug-in generates touch events only and therefore no
touch point must be marked as primary because that would mean there
is also a mouse event created from that point which is not the case.

Change-Id: I80c5fdbc52b048cd74c834900b6c8100963210e6
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-12 10:19:49 +01:00
Samuel Rødal
8ff37ff535 Make show() default to sane sizing behaviour based on the platform.
Traditionally it's been hard to write a Qt app that behaves sanely
across embedded and desktop platforms, i.e. defaults to fullscreen on
embedded and non-fullscreen on desktop. For Qt 5 we can fix this by
making the behaviour of the default QWindow::show() be customizable by
the platform plugin.

If the application developer wants to override this behaviour he can
still use the explicit showFullScreen(), showNormal() etc functions.

Change-Id: I26a907b404058e345d841c818daefbb57a26d3fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-12 10:19:49 +01:00
David Faure
1319bd48c8 QTreeView: fix crash when starting a drag with hidden columns.
Crash was introduced by d639105759491 (pre-Qt-4.8 only)

Task-number: QTBUG-15834
Merge-request: MR-2725

(cherry picked from qt4 commit fd25323de7b5d5f3e0ffb1bd81ea4d251e071566)

Change-Id: I59959d3ba4c9bcb0d39bdbe58432817bbbfdd9f1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-12 08:31:17 +01:00
David Faure
22b7d21186 Set missing flags in the option when rendering QTreeView drag pixmap
QAbstractItemViewPrivate::renderToPixmap was not setting all the flags
that the normal QTreeView painting sets:
option.showDecorationSelected, option.viewItemPosition (so the drag pixmap
looked wrong on Windows 7, with rects around each cell), and then the
unittest also discovered that State_Children/State_Sibling wasn't set either.

Task-number: QTBUG-15834
Merge-request: 2517

(cherry picked from Qt4 commit d63910575949106f84dacf04abaa14fc866aa66b)

Change-Id: I0a5014d960543c3ed8fea73d6df578e7e521b0e0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-12 08:31:17 +01:00
Michael Brasser
fa699c8f96 Abstract QUnifiedTimer.
QUnifiedTimer now controls QAbstractAnimationTimers, which
in turn can be used to drive specific animation systems.

The purpose of this change is to allow the QML animation
system to be rewritten so that it does not depend on
QAbstractAnimation.

Change-Id: If06475002e41ba85b1b86b5dd4788de6d27d035d
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-01-12 06:29:37 +01:00
Bradley T. Hughes
b409a81da5 Ensure proper locking in QFileInfoGatherer
The mutex is used to protect the QFileSystemWatcher instance created by
QFileInfoGatherer, except when calling getFileInfos(). Add a locker
before using QFileSystemWatcher in this function.

Note: it appears that QFileInfoGatherer is misusing QFileSystemWatcher
by calling it from multiple threads. QFileSystemWatcher is an event
driven class, and as such, not thread-safe. So far, no problems have
been reported related to this, so I've left the code as-is.

Change-Id: Ib1429d9399e37120acf8e8d3b989b83c4ce24203
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-12 00:45:19 +01:00
Bradley T. Hughes
93a466c6fc Remove unnecessary QMutexes in QFileSystemWatcher implementations
The polling, inotify, and kqueue implementations are no longer threaded,
and as such, do not need mutexes to protect their internal data (since
QFileSystemWatcher itself is not documented as a thread-safe API).

The Windows implementation is unchanged as it uses multiple threads
explicitly.

Change-Id: Ia82510397e576bf704ce3aed3d776b58b39f7ff3
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-12 00:45:13 +01:00
Bradley T. Hughes
d6e0306a90 Avoid races when destroying QFileSystemWatcher
On Mac OS X, socket notifiers need to be disabled/destroyed before
closing their associated file descriptor, otherwise we cause races
inside the CFSocket system. The documentation for CFSocketInvalidate()
says that we close the file descriptor after calling this function when
the kCFSocketCloseOnInvalidate flag is explicitly cleared
(QCocoaEventDispatcher clears this flag).

Do the same on the Linux inotify watcher as well, for symmetry.

Change-Id: I5592cc4bb5be4b752e48d895a685d3c92826acc7
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-12 00:45:10 +01:00
Kim Motoyoshi Kalland
e77ef98683 Fixed QOpenGLShader::log().
log() returned an empty string because the compile log was stored
in a local variable rather than the member variable.

Change-Id: I60142fd0bccfcbb495cea430b583f81fb0241329
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-11 23:55:58 +01:00
Janne Anttila
fc4cc4598e Docs: Forward-ported typo and link fixes from Qt 4.8
This commit brings already accepted doc fixes to Qt5.

Task-number: QTBUG-9224
Task-number: QTBUG-13442
Task-number: QTBUG-19858
Task-number: QTBUG-21447

Change-Id: I2ebc7c3e74427545367bdcec51e9e710a4925747
Merge-request: 1402
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-11 23:55:21 +01:00
Friedemann Kleint
1fbe8242ec QStyleHelper: Base DPI-calculation on QScreen.
- Use qt_defaultDpiX() to obtain the resolution, which
  obtains it from QScreen. This implies that for X11,
  which previously used a hardcoded default of 96 DPI,
  the real resolution will be used (typically 75).

- Since many tests (layouts, graphicsview) contain
  test data for 96 DPI, add an attribute to
  QCoreApplication making it possible to set the
  resolution to 96 DPI for testing.

Change-Id: I77c8233a96b0d75de07406f58d48886a89c3de06
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-11 22:22:34 +01:00
David Faure
f65a10b733 Remove unused QT_NO_TEXTSTREAM.
It was checked in a few places, but it didn't actually remove QTextStream,
so it was pretty useless.

Change-Id: I8eaf28893cd6c7acbe1c0b69d58de90742aee755
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-11 22:17:46 +01:00
Friedemann Kleint
aa4c2bbce9 qlocalsocket_win.cpp: Fix compiler warning.
Change-Id: Ibdb57f99b98b0c603be3c9be043737687034a958
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-01-11 21:59:19 +01:00
Stephen Kelly
0fd8816340 Add QModelIndex as a built-in metatype.
Change-Id: Ib87cfff8b4baee78189f3df5e20d2e1a00d690e1
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-01-11 19:32:34 +01:00
Harald Fernengel
f29e92e96c Fix Q_ASSERT_X to handle QT_FORCE_ASSERTS
This change aligns the behavior of Q_ASSERT and Q_ASSERT_X

Change-Id: Iac9f399da6462fcf70826d3ce1177522bed9f897
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-11 15:48:07 +01:00
Pekka Vuorela
8ae55a3484 Input direction/locale to come from platform input context
Change-Id: Ib049693211a08dcffc9dbe49add54e7feab38978
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-11 11:18:51 +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
Morten Johan Sorvig
630131d585 Add support for accessibility actions.
Match Cocoa and Qt actions manually. Some have no
corresponding action on the other side.

Change-Id: I775cb8987ab843bd88d57d856ef7c0403290db00
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-11 11:18:51 +01:00
C. Boemann
d060b6f04f Add methods for font stretch and absolute letter spacing
We basicaly just rely on the methods in QFont

Change-Id: Iaf8cbf4d90d0c5b10b3a85983de7ca58763e0371
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-01-11 09:24:07 +01:00
Jędrzej Nowacki
4d868ece50 Remove redundant parameter from qVariantToHelper.
Change-Id: I3664a74eb8602651547c0c80dc4f628f909d97b4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-11 05:01:01 +01:00
Albert Astals Cid
657038ca30 Match the name in the cpp file
Which is actually the name Lars wanted i just forgot to fix it everywhere

Change-Id: Iaa190da6c17d0a423c34202c986d69feec01af96
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-11 01:11:47 +01:00
Friedemann Kleint
da71c1c755 Introduce a QVariant themeHint() to QPlatformTheme.
Start on removing platform-specific code from QtWidgets.

Change-Id: Ic2163a0ce6f2db2151cdf7ca93766b2d861eeb55
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-11 01:11:47 +01:00
Frederik Gladhorn
15db15d448 Document enum value QAccessible::Expandable.
Change-Id: I5280bf3eadf7ef876f89de318a4d6168078d929e
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-01-10 23:18:32 +01:00
Frederik Gladhorn
e8482bb457 Accessibility docs: interfaces: value/action/text.
Change-Id: Ic57305cf9c008c8e861c1bdc66886b43d78c2d76
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-01-10 23:18:19 +01:00
Frederik Gladhorn
8b757325b2 Improve Accessibility documentation 2.
More cleanup, make sure links work.

Change-Id: If72f9cfc0d44aa1fb261be2aace8ddd457295993
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-10 23:18:10 +01:00
Friedemann Kleint
dc5ea80963 Tests: Remove duplicate QTRY_VERIFY/QTRY_COMPARE macros in bearer.
Introduce QTRY_VERIFY_WITH_TIMEOUT and QTRY_COMPARE_WITH_TIMEOUT
to be able to specify a timeout value.

Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>

Change-Id: Iaeaa4938eb14f2c431537055f626510cba183ce3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-10 19:54:03 +01:00
Friedemann Kleint
75af95cbeb Fix QWidget::saveGeometry().
Bring back code that was accidentally removed.

Change-Id: Ie1a4d22caa206bc8bb8e678879935e79009e9622
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-10 19:53:25 +01:00
Robin Burchell
d7ec8bf29a Remove thread from QFileSystemWatcherEngine implementations.
These threads are actually counterproductive, as generally speaking, processing
watches is not that expensive an operation, so instead, they process at full
speed and can (in the case of slow processing in the thread processing the
events) stack up and consume resources for no good reason.

Threads also have an additional resource consumption per engine (some ~8mb of
thread stack on Linux), so doing away with them is nice.

A side effect of this change is that events are now effectively rate-limited by
the eventloop speed of the thread they run in, so if your thread runs too slow,
and you recieve a lot of events, on some platforms, events may be dropped now
where in the past, they would be read by the monitor thread and turned into Qt
signals (thus not visibly showing as a problem, apart from invisibly bloating
memory usage).

Task-number: QTBUG-20028
Change-Id: I345a56a8c709f6f778ca9a0b55b57c05229ba477
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-10 16:19:32 +01:00
Stephen Kelly
c42a969b2f Rename internal method check to doCheck
Mac OSX has a check macro in /usr/include/AssertMacros.h which can
conflict with this API if used together.

http://boost.2283326.n4.nabble.com/Boost-with-Darwin-Mac-gcc-4-0-1-td2580330.html

Change-Id: I93ddd08fa2b51b198bbc02ce501d79ed97a32c34
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-10 16:11:59 +01:00
Stephen Kelly
c11cb16f3f Add defines for explicit virtual overrides.
Change-Id: Ia9a610e81eeaaa0a08ca6ef4945b002bdb13fe8a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-10 16:11:50 +01:00
Stephen Kelly
20abd88e71 Make the supportedDragActions a virtual accessor.
Change-Id: I4001fcabc67e5b46465b3c9111c33247c52e5788
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2012-01-10 16:11:43 +01:00
Friedemann Kleint
c95aea407b Fix a crash in QDialog.
Call d->helperDone before deleting 'this'.

Change-Id: I06224f4d3a868dccd505b1f1d3ed56af6f339ba3
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-10 16:11:19 +01:00
Bradley T. Hughes
7776beacf7 Document timer accuracy behavior on UNIX.
Change-Id: I5e8b383cc4d8ce0d249be164c5ef596328bdc50c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-10 16:11:15 +01:00
Bradley T. Hughes
46b2e5f37d Remove win*Message() exported functions
They are nothing more than wrappers around the Win32 API, and marked
for removable in Qt 5.

Change-Id: Iaf34d463488feb7840185c7b46f65a031232e34a
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-10 16:11:09 +01:00
Bradley T. Hughes
f2edb41c38 Use Qt::TimerType on Windows when starting timers
Make all Qt::PreciseTimers and timers with intervals < 20ms use
Multimedia timers for maximum accuracy. Qt::CoarseTimers and
Qt::VeryCoarseTimers use normal Windows timers, with
Qt::VeryCoarseTimers having their interval rounded to the nearest
full second.

Note that the Windows timer implementation does not attempt to align
timers and reduce CPU wakeups like the UNIX implementation does. This
might be done in the future, though. However, this change does the
best we can do now, keeping most timers working as-is, while allowing
explicit use of Multimedia timers via Qt::PreciseTimer.

Change-Id: I1898272b101c572a2a9b9454fef27a651eb178f5
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-10 16:11:00 +01:00
Stephen Kelly
c3ad8c1c06 Make the roleNames a virtual accessor.
This is consistent with the rest of the API of QAbstractItemModel
(which is virtual) and removes the need for code like this
in the constructor (where it doesn't belong):

QHash<int, QByteArray> myRoleNames = roleNames();
myRoleNames.insert(Qt::UserRole + 1, "myCustomRole");
setRoleNames(myRoleNames);

in favor of

MyModel::roleNames() const {
  QHash<int, QByteArray> myRoleNames = QAbstractItemModel::roleNames();
  myRoleNames.insert(Qt::UserRole + 1, "myCustomRole");
  return myRoleNames;
}

which is consistent with all other QAIM API (eg, flags()).

This is a source compatible change.

Change-Id: I7e1ce17f8dab2292c4c7b6dbd3c09ec71b5c793b
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Marius Bugge Monsen <marius@cutehacks.com>
2012-01-10 11:37:28 +01:00
Frederik Gladhorn
1e10e4deb9 Generate docs for accessible interfaces.
Change-Id: Ic385dd416a6d6bce1b999e14a4b36cdd06127ff1
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-10 09:13:11 +01:00
Jørgen Lind
58bdf5c49c We should return texture id 0 for invalid images and pixmaps
in the texture cache

Change-Id: Ib9bb136fa451c571fce2adbee29998b3f3593b31
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-10 09:13:11 +01:00
Jędrzej Nowacki
f85b9f8242 Reimplement QVariant to QDebug streaming.
New implementation fixes some commented code marked as FIXME.

Change-Id: If8f5bebedd65bcf8f839d804c2022ca79ef82ddf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-10 09:13:11 +01:00
Friedemann Kleint
7024ddba4b Platform style hints: Introduce keyboard repeat rate.
Change-Id: I556c2ecec7d5368122875a659af3ae7db88aa481
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-10 09:13:11 +01:00
Zeno Albisser
1f6f1de163 Fix key codes on mac.
Qt key codes match the unicode character in upper case format.

Change-Id: I92b43463921e71f2607e569ba7ee23d6f844c50a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-10 09:13:11 +01:00
Frederik Gladhorn
39a052c664 Accessiblity State as bit field.
We would like to add more flags that will be over the 32 bit boundary.
On Windows enums don't seem to digest values >32 bit.
This patch changes the state flags to be a bit field instead.

The windows part of the patch was written by Jan-Arve Sæther.

Change-Id: I2d1d87807f920ce4d4a5c7bfea8b1122ed44eb08
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-10 07:14:34 +01:00
Jason McDonald
5313c28b30 Update year in Nokia copyright headers.
The previous change missed some headers from years prior to 2011, and a
few new files were merged after the previous change.

Change-Id: Ib7d1a2b7062228c2a5373da64242b2ee1f0981e1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-10 07:12:41 +01:00