Commit Graph

6101 Commits

Author SHA1 Message Date
Bradley T. Hughes
a9c49816a7 Cocoa: QCocoaWindow::clearNSWindow() needs to cleanup properly
clearNSWindow() should also clear the delegate and remove the
contentView from the window, since we are no longer using that window.
Make sure the QCocoaWindow::~QCocoaWindow() doesn't release the
m_contentView until after clearNSWindow(), to avoid crashes while
trying to cleanup the window and view.

Change-Id: Ia081488f629a4fd4cf10fb1053fb8183b1914d35
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 11:41:07 +02:00
Donald Carr
d8508b8139 Reunite NAS support in configure with QSound
RIP

Change-Id: I7c47052ce4962f10dbcbbb8d48f05b3158d4a69a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-26 11:41:07 +02:00
Bradley T. Hughes
9581e5895a Cocoa: don't show window when calling raise()
Calling raise() on a hidden window should not show it. The setVisible()
function will ensure that the window is raised (since we use orderFront
or makeKeyAndOrderFront). This fixes the failing
tst_QDockWidget::task169808_setFloating() test as well.

Task-number: QTBUG-24774
Change-Id: If34472ebbcd615c10654efafd54c84c03d10bc8c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 11:41:07 +02:00
Lars Knoll
8660f6e385 Fix measurement system for the UK
THe UK still uses the Imperial system at least for distances
and many other things.

Change-Id: I99379de35620114328ad6a7fc9b226a46692bedd
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-03-26 11:41:07 +02:00
Pekka Vuorela
bc0b37d6b6 Password editor mask delay stylable by platform plugin
Replaced hard coding as QT_GUI_PASSWORD_ECHO_DELAY with
a style hint.

Change-Id: I0b78ebad723dbe19d9b9496583203e31545874e2
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-26 11:41:07 +02:00
Laszlo Agocs
083052933f Test mouse events more thoroughly in QWindow autotest
Apparently there are still issues here and there (e.g. in declarative)
with properly recognizing more complex event sequences (like triple
clicks). The behavior of qtbase is correct but we need a test case
that makes sure the functionality will not regress.

Change-Id: I08c558fcfdde0dd06e194b4f0affc6f6896573bf
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-26 11:41:07 +02:00
Bradley T. Hughes
8dac4d367f Cocoa: reimplement QPlatformWindow::setOpacity()
Qt and Cocoa opacity levels are compatible, so we just need to forward
the setOpacity() argument to [NSWindow setAlphaValue]

Change-Id: I5fd5678894fd6949811ad1c4b493e592561f01f6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 09:13:49 +02:00
Jiang Jiang
3c3c445daf Fix for fontconfig 2.9 behavior change
Start from 2.9, fontconfig will reset the result to FcResultNoMatch at
the beginning of FcFontSort().

According to
http://lists.freedesktop.org/archives/fontconfig/2012-March/003857.html
the result value of FcFontSort() can be ignored, checking the nfont
value of the fontset returned is sufficient.

The fix works for pre-2.9 versions as well, since those versions don't
touch the result at all.

Change-Id: Iba6c1157e314088a90867292a4bd970bb873e284
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-26 09:12:05 +02:00
Eskil Abrahamsen Blomfeldt
cb33c3b2b6 Remove dummy impl. of shared graphics cache in XCB plugin
This implementation was disabled and didn't really work
properly, so it doesn't make sense to update or do
bug fixes to it. Removing it completely instead.

Change-Id: I62abe35f0f9a91bb207b87296d25c3c62d58228e
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-03-26 09:10:56 +02:00
Bradley T. Hughes
eac97c5830 Cocoa: reimplement QPlatformBackingStore::scroll()
Use qt_scrollImageInRect() from QtGui to accelerate scrolling in the
Cocoa plugin.

Change-Id: I8ad1377ed3307345f72d17c72049cec5472c97d3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 09:10:27 +02:00
Bradley T. Hughes
b2363a935c Fix QGuiApplication::keyboardModifiers()
Make sure that the keybaord modifiers are maintained properly when
handling window system events.

Change-Id: Ie75cbe5eb509c29e3d2291694f2de509fbf3098a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-26 08:47:48 +02:00
Bradley T. Hughes
37010812a2 Cocoa: send key events for modifier keys
Implement -flagsChanged: in QNSView so that we can calculate the
necessary modifier key events to send.

Change-Id: I3de89537d6e22b4a6d69ae646a71d9722dd9f82a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 08:41:37 +02:00
Bradley T. Hughes
595021e0f7 Cocoa: keep a NSWindow pointer in QCocoaWindow
The NSWindow we create could either be a QNSWindow (our NSWindow
subclass) or a QNSPanel (our NSPanel subclass).

Change-Id: I6e5c18328bf0fd1786a042d1fddc5b3e8be17f89
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 08:19:39 +02:00
Sarah Smith
a760289038 Fix qtnamespace compile break on Mac.
Appears as though the QT_NAMESPACE macros are incorrect here.

In fact in qisenum.h because the #define is no respecter of a namespace
in most of these conditional compile cases they will be ignored
effectively. The QT_HEADER also - if qtypetraits.h conditional compile
occurs then it will result in adding extern "C" { twice.  For the macros
invoking them will not cause the extern "C" { to be used anyway, so just
remove this altogether.

Task-number: QTBUG-24903
Change-Id: I710dc330f58357f395241a0cf3172e41a5864576
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
2012-03-26 05:39:37 +02:00
Kurt Korbatits
1dc7aed0e9 Fixed qthreadstorage unittest to work from install directory
- Added install of crashonexit sub program

Change-Id: I2cc3043d5c1b879665930552487b4fe54407fd25
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-26 03:42:10 +02:00
Thiago Macieira
38f33e035f Remove the Q_STATIC_TEMPLATE_SPECIALIZATION macro
This was necessary only for older MS Visual Studio versions, which are
no longer supported anyway.

Change-Id: I6c96fb2340296c34b480716303c93b892419229b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-26 01:02:15 +02:00
Thiago Macieira
d3951a5b0f Remove the use of a template qUnused function for ICC
ICC 12 does not seem to need this.

Change-Id: I98e9d530e767c4d24424f0c2b5d763f863e85fe4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-25 23:04:08 +02:00
Thiago Macieira
1904970dad Work around what apparently is a GCC 4.6.0 bug
The QFlags::operator int() isn't being called, so GCC complains that
this isn't an integer expression.

Change-Id: I537d06fd4a52ecbcddf0ef67807b298c42d3e911
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-03-25 15:09:52 +02:00
João Abecasis
fe778b94bd Enable endianness conversions on q(u)int8
Lack of support for these types is not a real issue as endian
conversions on byte-sized types are no-ops. Still, the conversions are
useful as they facilitate writing of generic code. They can also be used
explicitly as a way to document in code an endian-specific binary
format:

     uchar *data;
     quint8 tag = qFromLittleEndian<quint8>(data++);
     quint32 size = qFromLittleEndian<quint32>(data);

This commit also adds a test for functions documented in the QtEndian
header.

Change-Id: I2f6c876ce89d2adb8c03a1c8a25921d225bf6f92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-25 13:12:24 +02:00
Frederik Gladhorn
b4ec690bbd Improve accessibility test to handle more text events.
Change-Id: I67ece6c9bb755e84c786b32e8e3396eaf634fda1
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-25 08:27:53 +02:00
Thiago Macieira
c192e64962 Use private futexes for QMutex on Linux if they're available
Futexes on Linux can be used across processes, for inter-process
synchronisation. The private flag tells the kernel that this futex is
not used with other processes, so it does not need to check for waiters
outside the current process.

This feature had been proposed in Merge Request 25, but was lost.

Change-Id: Ieafa8b8df0949bd9ae73709b3ec63f7709b0b2a6
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-25 06:30:16 +02:00
Samuel Rødal
efa0f1f0a7 Use XCB_TIME_CURRENT_TIME instead of CurrentTime from X.h in xcb plugin.
The less X header dependencies the better, we might at some time in the
future be able to do without the XCB_USE_XLIB define as well.

Change-Id: Ib45986036febef70798851ee8455e054eafc9d22
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jan Arne Petersen <jpetersen@openismus.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-24 21:07:08 +01:00
David Faure
518a4cb5ab Restore Qt4 compat in QDesktopServices::DataLocation
"/data/" was appended to the base directory.

Change-Id: I220f2ce74c36b795bc49c7c84106feb0709d1547
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-24 19:07:22 +01:00
Thiago Macieira
ad81f75429 Add macros for assuming and unreachable code
Use these macros to tell the compiler about conditions that may
happen, so it will generate better code. But do not assume that they
will do anything special.

Change-Id: I89ec4f65f48a9340ccf5ffc4ae4b8c3d8897c8b1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-03-24 19:07:22 +01:00
Thiago Macieira
4131c323a3 Update the C++11 support macros
Move them all to a central place and document each macro, so we
don't give typo names by accident

Change-Id: Ia863ac3f7ca82e4d2f8388b3e691a12c7e482283
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-24 19:07:22 +01:00
Jędrzej Nowacki
552e162a67 Update QLocale data from CLDR v1.8.1 to CLDR v1.9.1
Change-Id: Ic84bbc82b364b92605c1bba64b6ec815bff970cb
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-24 18:32:16 +01:00
Thiago Macieira
7e1aec215d QPrinterInfo: remove a test that is too early
If we want to have any chance of getting the missing printers
reported, we cannot check the size beforehand.

Change-Id: I450897fe53c04aeb1a4b217bd0c1f548c455a428
Reviewed-by: John Layt <jlayt@kde.org>
2012-03-24 17:07:52 +01:00
Thiago Macieira
e22a6108fd Use QVector<int> instead of QList<int> for storing metatypes in QtDBus
Change I00020eed fixed a bug present in 64-bit machines because it
tried to access QList<int>'s internal array data, assuming it was a
vector of ints. That worked in 32-bit, but not 64-bit.

The fix involves a conversion between QList and QVector. Now fix it
properly by changing everything to be QVector. The benefit is that on
64-bit, they are real vectors, not the 50%-overhead pointer array that
QList is.

Change-Id: I989ad279d0d8b2c9ab262a1eed413ab2365b5461
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-24 17:07:52 +01:00
Thiago Macieira
387ec9c2a3 Fix compilation of tst_QSqlThread: no need to use QBasicAtomicInt here
Change-Id: Ib474fe62501ee1ee5e3d7008c3b561f8db79265c
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-24 17:07:52 +01:00
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
Thiago Macieira
6ab6b0fc1c Disable QUrl support in QVariant in bootstrapped mode
The only use of QUrl in qmake, moc, uic and rcc is due to QVariant's
internals, so let's disable it. This means those binaries are now
probably a lot smaller since the parsing and IDNA code don't need to
be present.

Change-Id: Ie156b0817d119b2ba5d3dcb9712a9fea2ee7d4a1
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-24 16:30:58 +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
Thiago Macieira
f49f94434e Silence a warning about a change of sign.
GLuint is, like the name says, unsigned. To store -1 in it, a change
of sign happens. Silence the warning by casting the -1 to GLuint
first.

Change-Id: I165a32c486358a60f7c5fd0c439204ed2f9f7f16
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-24 15:10:00 +01:00
Thiago Macieira
b8625fd70e Update the header list for the QtDBus module
qdbusintrospection_p.h was missing from the header list. And this module
has the public headers in a separate variable.

Change-Id: I9fd85a2930af71d081b7cabd04eb29d94c285382
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-24 15:10:00 +01:00
Thiago Macieira
14cae3a705 Remove support for Mac OS X compilers without the -Xarch flag
This was necessary in order to support Universal builds when this flag
wasn't present. This flag can be considered present in all builds
now. What's more, Apple doesn't support PowerPC builds anymore anyway,
so we won't either.

Change-Id: I79c45a450ddf7d58cd4b7da03d6bbf7d3feb0d9a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-24 15:10:00 +01:00
Thiago Macieira
acc9716331 Add the missing 'itt eq' instructions to the ARM atomics.
This affected the 16- and 64-bit sizes only. Must have been a C&P failure.

Change-Id: If7b1e534a61d812226a6e4970909b53b0cc5a9a6
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-24 15:10:00 +01:00
Thiago Macieira
1ba5796d09 Silence warnings about GCC #pragma in ICC
Change-Id: I7659ce312f3777ae68190979681656d12306d33c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-24 15:10:00 +01:00
Thiago Macieira
ce9d760d59 Fix warnings about commas at the end of enums
It's non-standard to accept them, so remove them and silence the
warnings.

Change-Id: I51c5afe99eac408f326ab9fcf40435b60e953b54
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-24 15:10:00 +01:00
Thiago Macieira
a8d4e6d04e Fix building the XCB platform plugin
The dlxxx functions are in libdl and the xcb_shm functions are in
libxcb-shm.

Change-Id: I412e1df4dc2939b7dac4f6b244c46e23c79da630
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-24 15:10:00 +01:00
Thiago Macieira
94cc945aa8 Fix deprecation warning about QPlatformWindow::visible
The proper getter name of a boolean property is prefixed with is-.

Change-Id: Id1fae9ccd11db3e92903c51012bbe75d52726a5a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-24 15:10:00 +01:00
Friedemann Kleint
7efda762da Fix loading of the ICU dynamic libraries on Windows.
- Account for differing library name on Windows.
- Improve error messages.

Acked-by: John Layt <jlayt@kde.org>

Change-Id: Ib567f8c79ab4b5655cdb2fe050f91013e9305263
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-03-24 15:10:00 +01:00
Jan-Arve Saether
5e9089135b Enable IAccessible for MinGW32, keep IAccessible2 disabled for MinGW
No surprise, the files generated by midl contains code that only
the MS compiler will understand.
However, since the generated files are only needed for IA2, we
can still compile the old IAccessible/MSAA implementation for mingw
(like it was before the introduction of IA2)

I used mingw 4.6.1 to test this.

Change-Id: Iad581f2fee087bd7b796ac5a01548f2fcacbd595
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-24 13:11:09 +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
Marc Mutz
d86e101d1b xcb: fix (negative) coordinate handling
For some reason, XCB accepts positions as unsigned
integers, even though the X protocol explicitly
allows negative values (windows overlapping the
left/top screen border).

After discussion with Samuel and Laszlo, use a
reinterpret_cast to convert from the signed
representation to the unsigned one.

I also extended the clipping of the extents to
the position. I guess if X can't handle widths
beyond XCOORD_MAX, it won't be happy with
x-coordinates exceeding that limit, either.

Change-Id: I2fa0e61f823b6cd45dad6471eaa55f38bb3c3e52
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
2012-03-24 09:15:00 +01:00
Friedemann Kleint
9c6c7038ac Compile fix for MinGW.
Change-Id: Id8099668dd1a4b137b6f9451be8617d07bc9d0c3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-24 08:56:35 +01:00
Friedemann Kleint
b895dfd641 Fix warnings in qtbase.
Change-Id: I981e08872440e35eb9bfad32b20543cfce8439c9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-24 02:46:33 +01:00
Bradley T. Hughes
7df980031b configure: Fix x86_64 arch detection (part 2)
This is a follow-up to comit 70a8833151.
The regular expression for CFG_HOST_ARCH was not updated in the above
commit.

Change-Id: I2baf0b42d851f1df096c2f6ad54aeec57940e661
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-03-24 00:55:50 +01:00
Samuel Rødal
4a79b52bde Make QEglFSBackingStore use QtGui-only APIs.
We now have better replacements for QGLPaintDevice etc.

Change-Id: I3ac563f0ac26a563b3c788d16c77e0237d9d96d9
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
2012-03-23 22:05:56 +01:00
Rafael Roquetto
400e59201b Initial implementation of QQnxServices
Extends platform services for QNX devices.

Change-Id: I1eb685cdb38591cd73eaaf40ffb5691db0142953
Reviewed-by: Jeff Kehres <jkehres@rim.com>
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-23 21:53:53 +01:00
Jędrzej Nowacki
5e0406cbdf Get rid of compilation warning.
metaObject pointer will be used in future.

Change-Id: I1f335687ad1aa443def21efcb5d4a2eaf3583c44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-23 19:43:00 +01:00