profile/ivi/qtbase.git
12 years agoMerge master into api_changes
Kent Hansen [Tue, 27 Mar 2012 14:19:29 +0000 (16:19 +0200)]
Merge master into api_changes

Conflicts:
src/corelib/global/qisenum.h
src/dbus/qdbusconnection_p.h
src/widgets/kernel/qwidget.cpp
tests/auto/other/qaccessibility/tst_qaccessibility.cpp

Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d

12 years agoDisable ICC diagnostic 2261 about __assume with side-effects
Thiago Macieira [Mon, 26 Mar 2012 13:37:06 +0000 (10:37 -0300)]
Disable ICC diagnostic 2261 about __assume with side-effects

The warning is presented now that we use __assume in every
Q_ASSERT. It presents itself in code that calls functions, like:

tools/qbitarray.h(128): warning #2261: __assume expression with side effects discarded
  { Q_ASSERT(i >= 0 && i < size());
    ^

Change-Id: I5851b3c35b56c00b9c541c2489233121ef621e04
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agodevice: Add -device and -device-option to configure
Girish Ramakrishnan [Tue, 20 Mar 2012 21:02:21 +0000 (14:02 -0700)]
device: Add -device and -device-option to configure

For some reference platforms and SDKs we will need to pass in
extra paths. Currently users have to modify the mkspec to adjust
paths or set environment variables that will be picked up.

This change introduces the -device <name> and -device-option
<key=value> option. The key value pairs will be written to a
qdevice.pri and can be used by the qmake.conf of the device spec.

The reason to not save the key value pairs in qconfig.pri is
becase of the fact that the device spec loads the qdevice.pri
earlier than the qconfig.pri. qdevice.pri allows the mkspec
to set the compiler flags and qconfig.pri allows configure to
add to those compiler flags.

Done-with: Holger Freyther

Change-Id: I931a197b8be72397e1eedfee09502eefc01c9d4f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
12 years agoMark tst_qdialog as insignificant on mac.
Rohan McGovern [Mon, 26 Mar 2012 23:34:48 +0000 (09:34 +1000)]
Mark tst_qdialog as insignificant on mac.

This autotest gives different results on consecutive runs, and is
therefore insignificant for the purpose of detecting regressions.

Task-number: QTBUG-24977
Change-Id: I5c4dfd663ce5df6b60ae47a29d332c06e3c0585f
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoSync configure with Unix version (-make/-nomake)
Marius Storm-Olsen [Wed, 21 Mar 2012 10:09:59 +0000 (11:09 +0100)]
Sync configure with Unix version (-make/-nomake)

Move previous -make <exe> feature to -make-tool <exe>

Change-Id: I1cbc87e60e2588fd8b2a11c11178988003cac7c1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMake QWidget::mapTo/mapFrom() take const pointers.
Jason McDonald [Mon, 26 Mar 2012 09:59:56 +0000 (19:59 +1000)]
Make QWidget::mapTo/mapFrom() take const pointers.

This commit addresses a long-standing Qt 5 to-do. Whilst a trivial
change, it is binary incompatible.

Task-number: QTBUG-665
Change-Id: I4294233d876dec79eda57113bdf298ce73643e76
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMake QWidget::isEnabledTo() and isVisibleTo() to take const pointers.
Jason McDonald [Mon, 26 Mar 2012 09:09:49 +0000 (19:09 +1000)]
Make QWidget::isEnabledTo() and isVisibleTo() to take const pointers.

This commit addresses a long-standing Qt 5 to-do comment. Whilst a
trivial change, it is binary incompatible.

Task-number: QTBUG-259

Change-Id: I2fc7bfda488318dbabbbea9f5ff9d2b1d6ce0784
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMake QGridLayout::getItemPosition() const.
Jason McDonald [Mon, 26 Mar 2012 15:05:41 +0000 (01:05 +1000)]
Make QGridLayout::getItemPosition() const.

This commit addresses a long-standing Qt 5 to-do. Whilst a trivial
change, it is binary incompatible.

Task-number: QTBUG-1433
Change-Id: I6e31e47fd5791cb6f1373e2696ffc95f7174f0b0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoAdd support for detecting SSE2 and SSE3 on WinCE
Thiago Macieira [Thu, 22 Mar 2012 22:34:41 +0000 (19:34 -0300)]
Add support for detecting SSE2 and SSE3 on WinCE

Change-Id: Ic26ba2073d1f1d7e12338811b86f9b99ea8f1eac
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoCocoa: initialize QCocoaEventDispacherPrivate::lastSerial
Bradley T. Hughes [Mon, 26 Mar 2012 09:58:01 +0000 (11:58 +0200)]
Cocoa: initialize QCocoaEventDispacherPrivate::lastSerial

This silences warnings from valgrind about a conditional depending on an
uninitialized value.

Change-Id: I819a44ed5dc02e163c00849811870c94f66b6651
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoUse ADD/SUB instructions on x86 and x86-64 atomics instead of INC/DEC
Thiago Macieira [Sun, 25 Dec 2011 21:30:15 +0000 (19:30 -0200)]
Use ADD/SUB instructions on x86 and x86-64 atomics instead of INC/DEC

According to the Intel Optimization Manual section 3.5.1.1 Use of INC
and DEC Instructions, those instructions modify only part of the flags
register, so they mey introduce unnecessary data dependencies on
previous flag-setting operations so that the resulting flags are
computed. Preferring ADD and SUB (rule 33) is recommended.

However, we don't do it for 16-bit integers. The reason is that the
presence of the 0x66 prefix may trigger a slower decoding codepath in
the processor (up to 6 cycles, as opposed to 1). The same Intel manual
talks about Length-Changing Prefix, which applies in particular to
instructions with 16-bit immediates. The assembler generally produces
uses the 8-bit immediate variant of the ADD and SUB instructions, but
to be on the safe side, we prefer to use INC and DEC here.

Change-Id: Ic03236ac600a5b4e087614d21df5d3c666ae064e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix the 64-bit i386 atomic according to assembly output
Thiago Macieira [Sun, 8 Jan 2012 22:45:11 +0000 (20:45 -0200)]
Fix the 64-bit i386 atomic according to assembly output

The assembly output showed that GCC was generating some wrong code in
some conditions, so update the constraints so it will do the right
thing: the expectedValue constraint needs to be in/out with early
clobber. In/out because cmpxchg8b really does produce output and, even
if we don't care about it, GCC needs to be told that the registers
used (EAX:EDX) were modified. The early clobber is necessary so it
won't schedule EAX or EDX to be the same as the EBX_reg (the register
we'll xchg EBX with).

Since EAX and EDX are in/out and EBX can't be used, the only remaining
low register for the "sete" instruction is CL. So use it directly and
set ECX to be in/out too.

For whatever reason, it can't find enough registers in debug mode and
this expansion doesn't work. It looks like a bug though, since this
requires 4 registers and one memory operand and in debug mode it must
have EAX, ECX, EDX, ESI and EDI free for use. One of ESI or EDI is
used to xchg EBX with, which means there must be at least one more
free general register.

Change-Id: I1f11e68d776bf9ad216b34ca316a53129122fabe
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoRemove old code that was for the MIPSpro compiler
Thiago Macieira [Fri, 23 Mar 2012 22:16:23 +0000 (19:16 -0300)]
Remove old code that was for the MIPSpro compiler

That compiler is no longer supported

Change-Id: I6ff9003a8b986478850ad2e6e6662a44264236d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix annoying deprecation warning about QImageTextKeyLang
Thiago Macieira [Thu, 1 Mar 2012 16:44:34 +0000 (17:44 +0100)]
Fix annoying deprecation warning about QImageTextKeyLang

If we deprecate the entire class, then we get the warning for every use
of it with GCC, including the three operators defined inside the class.
So instead, mark as only the constructors as deprecated, which should
reduce the warnings to the places where the class was instantiated.

That should be enough to poison the code enough: to fix the warning, you
need to stop using the class there and/or stop calling one of the
deprecated functions that deal with it.

Unfortunately, we still get one more warning inside the inline code, in
QImage::textList. To remove that warning, we disable all deprecation
warnings around that code block.

Change-Id: If3c11647a9d2cab055e15810d7cfe0d8f5e7042f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agolet qtPrepareTool give right path for app_bundle
Bai Jing [Mon, 26 Mar 2012 09:32:52 +0000 (11:32 +0200)]
let qtPrepareTool give right path for app_bundle

Change-Id: Ieb4979244d741c9d9d0c11a035c18ced87ea28f5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoBlackberry mkspecs
Rafael Roquetto [Mon, 19 Mar 2012 16:30:28 +0000 (17:30 +0100)]
Blackberry mkspecs

Unlike QNX mkspecs, these mkspecs target more specific, BlackBerry-only
devices. So far, the only difference is the definition of Q_OS_BLACKBERRY
and linking with -lbps, but this will likely change with time. It will also
allow conditional compilation to distinguish between qnx and blackberry
devices.

Change-Id: Ia44e9b4059f720c308240e9dac7e90f7ae7920d0
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoCocoa: Remove unused qt_mac_is_sheet() function
Bradley T. Hughes [Wed, 21 Mar 2012 09:30:53 +0000 (10:30 +0100)]
Cocoa: Remove unused qt_mac_is_sheet() function

The static qt_mac_is_sheet() function in qcocoafiledialoghelper.mm was
not called anywhere, remove it.

Change-Id: I88785e15aa17ae9c9ffbc33eba30433c8834b798
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCocoa: silence warnings about unused variables
Bradley T. Hughes [Wed, 21 Mar 2012 09:29:24 +0000 (10:29 +0100)]
Cocoa: silence warnings about unused variables

Silence warnings about unused function parameters and local variables
while building the Cocoa platform plugin.

Change-Id: I6aedc4cb21c5fb48d2d6e501561473d3f7112aed
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCocoa: silence warnings from QCocoaBackingStore
Bradley T. Hughes [Tue, 20 Mar 2012 12:30:10 +0000 (13:30 +0100)]
Cocoa: silence warnings from QCocoaBackingStore

Remove unused (and misspelled) flipedRect() function, as well as several
unused variables.

Change-Id: I48a5bf2eaad67686f60523a5c22262cad5314128
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCocoa: QCocoaWindow::clearNSWindow() needs to cleanup properly
Bradley T. Hughes [Fri, 23 Mar 2012 11:53:35 +0000 (12:53 +0100)]
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>
12 years agoReunite NAS support in configure with QSound
Donald Carr [Fri, 23 Mar 2012 21:29:34 +0000 (21:29 +0000)]
Reunite NAS support in configure with QSound

RIP

Change-Id: I7c47052ce4962f10dbcbbb8d48f05b3158d4a69a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoCocoa: don't show window when calling raise()
Bradley T. Hughes [Wed, 21 Mar 2012 08:43:45 +0000 (09:43 +0100)]
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>
12 years agoFix measurement system for the UK
Lars Knoll [Thu, 22 Mar 2012 09:53:45 +0000 (10:53 +0100)]
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>
12 years agoPassword editor mask delay stylable by platform plugin
Pekka Vuorela [Fri, 16 Mar 2012 12:08:13 +0000 (14:08 +0200)]
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>
12 years agoTest mouse events more thoroughly in QWindow autotest
Laszlo Agocs [Sat, 24 Mar 2012 08:48:12 +0000 (10:48 +0200)]
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>
12 years agoCocoa: reimplement QPlatformWindow::setOpacity()
Bradley T. Hughes [Wed, 21 Mar 2012 09:49:39 +0000 (10:49 +0100)]
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>
12 years agoFix for fontconfig 2.9 behavior change
Jiang Jiang [Thu, 22 Mar 2012 12:14:24 +0000 (13:14 +0100)]
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>
12 years agoRemove dummy impl. of shared graphics cache in XCB plugin
Eskil Abrahamsen Blomfeldt [Fri, 23 Mar 2012 13:45:51 +0000 (14:45 +0100)]
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>
12 years agoCocoa: reimplement QPlatformBackingStore::scroll()
Bradley T. Hughes [Tue, 20 Mar 2012 12:27:07 +0000 (13:27 +0100)]
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>
12 years agoFix QGuiApplication::keyboardModifiers()
Bradley T. Hughes [Thu, 22 Mar 2012 16:43:25 +0000 (17:43 +0100)]
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>
12 years agoCocoa: send key events for modifier keys
Bradley T. Hughes [Thu, 22 Mar 2012 16:39:30 +0000 (17:39 +0100)]
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>
12 years agoCocoa: keep a NSWindow pointer in QCocoaWindow
Bradley T. Hughes [Wed, 21 Mar 2012 09:38:32 +0000 (10:38 +0100)]
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>
12 years agoFix qtnamespace compile break on Mac.
Sarah Smith [Wed, 21 Mar 2012 06:45:32 +0000 (16:45 +1000)]
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>
12 years agoFixed qthreadstorage unittest to work from install directory
Kurt Korbatits [Thu, 22 Mar 2012 03:12:21 +0000 (13:12 +1000)]
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>
12 years agoRemove the Q_STATIC_TEMPLATE_SPECIALIZATION macro
Thiago Macieira [Thu, 29 Dec 2011 21:53:30 +0000 (19:53 -0200)]
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>
12 years agoRemove the use of a template qUnused function for ICC
Thiago Macieira [Fri, 11 Nov 2011 19:55:46 +0000 (17:55 -0200)]
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>
12 years agoWork around what apparently is a GCC 4.6.0 bug
Thiago Macieira [Wed, 19 Oct 2011 21:41:17 +0000 (23:41 +0200)]
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>
12 years agoEnable endianness conversions on q(u)int8
João Abecasis [Wed, 21 Mar 2012 17:09:09 +0000 (18:09 +0100)]
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>
12 years agoImprove accessibility test to handle more text events.
Frederik Gladhorn [Wed, 14 Mar 2012 13:01:54 +0000 (14:01 +0100)]
Improve accessibility test to handle more text events.

Change-Id: I67ece6c9bb755e84c786b32e8e3396eaf634fda1
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoUse private futexes for QMutex on Linux if they're available
Thiago Macieira [Tue, 28 Feb 2012 13:55:22 +0000 (14:55 +0100)]
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>
12 years agoUse XCB_TIME_CURRENT_TIME instead of CurrentTime from X.h in xcb plugin.
Samuel Rødal [Fri, 23 Mar 2012 07:00:11 +0000 (08:00 +0100)]
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>
12 years agoRestore Qt4 compat in QDesktopServices::DataLocation
David Faure [Sat, 24 Mar 2012 08:23:25 +0000 (09:23 +0100)]
Restore Qt4 compat in QDesktopServices::DataLocation

"/data/" was appended to the base directory.

Change-Id: I220f2ce74c36b795bc49c7c84106feb0709d1547
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd macros for assuming and unreachable code
Thiago Macieira [Sat, 31 Dec 2011 02:15:06 +0000 (00:15 -0200)]
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>
12 years agoUpdate the C++11 support macros
Thiago Macieira [Sat, 31 Dec 2011 02:14:50 +0000 (00:14 -0200)]
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>
12 years agoUpdate QLocale data from CLDR v1.8.1 to CLDR v1.9.1
Jędrzej Nowacki [Thu, 22 Mar 2012 12:07:07 +0000 (13:07 +0100)]
Update QLocale data from CLDR v1.8.1 to CLDR v1.9.1

Change-Id: Ic84bbc82b364b92605c1bba64b6ec815bff970cb
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQPrinterInfo: remove a test that is too early
Thiago Macieira [Wed, 28 Dec 2011 19:00:27 +0000 (17:00 -0200)]
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>
12 years agoUse QVector<int> instead of QList<int> for storing metatypes in QtDBus
Thiago Macieira [Wed, 16 Nov 2011 16:47:11 +0000 (14:47 -0200)]
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>
12 years agoFix compilation of tst_QSqlThread: no need to use QBasicAtomicInt here
Thiago Macieira [Wed, 19 Oct 2011 21:42:11 +0000 (23:42 +0200)]
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>
12 years agoMake sure windows send accessibility activated updates.
Frederik Gladhorn [Tue, 13 Mar 2012 19:25:12 +0000 (20:25 +0100)]
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>
12 years agoDisable QUrl support in QVariant in bootstrapped mode
Thiago Macieira [Fri, 9 Sep 2011 13:27:36 +0000 (15:27 +0200)]
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>
12 years agoAdded QAccessibleGroupBox
Frederik Gladhorn [Mon, 13 Feb 2012 13:05:51 +0000 (14:05 +0100)]
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)

12 years agoSilence a warning about a change of sign.
Thiago Macieira [Fri, 30 Dec 2011 16:54:43 +0000 (14:54 -0200)]
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>
12 years agoUpdate the header list for the QtDBus module
Thiago Macieira [Tue, 28 Feb 2012 13:56:22 +0000 (14:56 +0100)]
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>
12 years agoRemove support for Mac OS X compilers without the -Xarch flag
Thiago Macieira [Mon, 27 Feb 2012 14:02:00 +0000 (15:02 +0100)]
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>
12 years agoAdd the missing 'itt eq' instructions to the ARM atomics.
Thiago Macieira [Tue, 24 Jan 2012 15:49:26 +0000 (13:49 -0200)]
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>
12 years agoSilence warnings about GCC #pragma in ICC
Thiago Macieira [Fri, 11 Nov 2011 02:18:40 +0000 (00:18 -0200)]
Silence warnings about GCC #pragma in ICC

Change-Id: I7659ce312f3777ae68190979681656d12306d33c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix warnings about commas at the end of enums
Thiago Macieira [Fri, 30 Dec 2011 16:54:11 +0000 (14:54 -0200)]
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>
12 years agoFix building the XCB platform plugin
Thiago Macieira [Tue, 27 Dec 2011 14:30:20 +0000 (12:30 -0200)]
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>
12 years agoFix deprecation warning about QPlatformWindow::visible
Thiago Macieira [Thu, 1 Mar 2012 16:18:17 +0000 (17:18 +0100)]
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>
12 years agoFix loading of the ICU dynamic libraries on Windows.
Friedemann Kleint [Thu, 22 Mar 2012 14:01:50 +0000 (15:01 +0100)]
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>
12 years agoEnable IAccessible for MinGW32, keep IAccessible2 disabled for MinGW
Jan-Arve Saether [Fri, 23 Mar 2012 10:11:53 +0000 (11:11 +0100)]
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>
12 years agoAPI cleanup: remove CoordinateType enum
Jan-Arve Saether [Thu, 8 Mar 2012 09:18:58 +0000 (10:18 +0100)]
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>
12 years agoxcb: fix (negative) coordinate handling
Marc Mutz [Thu, 22 Mar 2012 16:31:57 +0000 (17:31 +0100)]
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>
12 years agoCompile fix for MinGW.
Friedemann Kleint [Fri, 23 Mar 2012 13:39:08 +0000 (14:39 +0100)]
Compile fix for MinGW.

Change-Id: Id8099668dd1a4b137b6f9451be8617d07bc9d0c3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix warnings in qtbase.
Friedemann Kleint [Fri, 23 Mar 2012 10:34:17 +0000 (11:34 +0100)]
Fix warnings in qtbase.

Change-Id: I981e08872440e35eb9bfad32b20543cfce8439c9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoconfigure: Fix x86_64 arch detection (part 2)
Bradley T. Hughes [Fri, 23 Mar 2012 12:30:40 +0000 (13:30 +0100)]
configure: Fix x86_64 arch detection (part 2)

This is a follow-up to comit 70a88331519e6e6439ff23a9cc91b2e3f607acb6.
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>
12 years agoMake QEglFSBackingStore use QtGui-only APIs.
Samuel Rødal [Fri, 23 Mar 2012 07:51:15 +0000 (08:51 +0100)]
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>
12 years agoInitial implementation of QQnxServices
Rafael Roquetto [Mon, 19 Mar 2012 16:13:13 +0000 (17:13 +0100)]
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>
12 years agoGet rid of compilation warning.
Jędrzej Nowacki [Fri, 23 Mar 2012 16:12:50 +0000 (17:12 +0100)]
Get rid of compilation warning.

metaObject pointer will be used in future.

Change-Id: I1f335687ad1aa443def21efcb5d4a2eaf3583c44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd the Q_CORE_EXPORT macros to unit-test-exported code
Thiago Macieira [Fri, 2 Sep 2011 17:19:13 +0000 (19:19 +0200)]
Add the Q_CORE_EXPORT macros to unit-test-exported code

Change-Id: If21658bd5e4af0fdcc403b054fc1b8f46b5fcfb0
Reviewed-by: David Faure <faure@kde.org>
12 years agoOptimise QHostAddress a little
Thiago Macieira [Mon, 17 Oct 2011 11:46:44 +0000 (13:46 +0200)]
Optimise QHostAddress a little

In QHostAddress::setAddress(SpecialAddress), avoid parsing strings.

Change-Id: Icb756b4c8b06c21dbc231f8c7f0b0dac29ed97c3
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoAdd detection of AVX and AVX2 support in the compiler.
Thiago Macieira [Fri, 30 Dec 2011 00:44:16 +0000 (22:44 -0200)]
Add detection of AVX and AVX2 support in the compiler.

Intel CC 12.1 supports AVX2 but only with -march=core-avx2. The -mavx2
option produces a warning.

GCC 4.6 does not recognise any option.

GCC 4.7 recognises both -mavx2 and -march=core-avx2 so let's use the
latter for now. We may need to change to -mavx2 when there's an AMD
processor that supports AVX2 too.

Change-Id: I529240e6e6c2c0e3942d357e0320212d954fe4de
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove detection for MMX support and related technology
Thiago Macieira [Thu, 29 Dec 2011 21:24:54 +0000 (19:24 -0200)]
Remove detection for MMX support and related technology

This also removes the check for SSE, but the check for SSE2 and
further technologies is kept. If SSE2 is present, then SSE is too. We
don't have any code that uses the original SSE instructions only.

Remove the CMOV detection, since we don't use that anywhere and we're
not likely to ever use them..

Change-Id: I3faf2c555ad1c007c52a54644138902f716c1fe1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFallback implementation of Q_ALIGNOF
João Abecasis [Mon, 12 Mar 2012 16:14:48 +0000 (17:14 +0100)]
Fallback implementation of Q_ALIGNOF

For all practical purposes, the fallback introduced here returns the
desired value. Having a fallback enables unconditional use of Q_ALIGNOF.

For compilers that provide native support for it, Q_ALIGNOF is otherwise
 #defined in qcompilerdetection.h.

Change-Id: Ie148ca8936cbbf8b80fe87771a14797c39a9d30c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd test cases to tst_QByteArray
Jędrzej Nowacki [Thu, 22 Mar 2012 08:44:17 +0000 (09:44 +0100)]
Add test cases to tst_QByteArray

Internally we construct QByteArrays from QStaticByteArrays. For example
moc is generating QStaticByteArray structure for every string it saves.
New test cases check if a QByteArray constructed from a QStaticByteArray
behaves as a not statically constructed one.

Change-Id: Ia4aa9a1a5bc0209507636c683a782dda00eae85c
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoMerge "Merge master into api_changes" into refs/staging/api_changes
Kent Hansen [Fri, 23 Mar 2012 13:31:28 +0000 (14:31 +0100)]
Merge "Merge master into api_changes" into refs/staging/api_changes

12 years agoMerge master into api_changes
Kent Hansen [Fri, 23 Mar 2012 12:36:29 +0000 (13:36 +0100)]
Merge master into api_changes

Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1

12 years agoRemove QWorkspace.
Debao Zhang [Wed, 21 Mar 2012 03:21:30 +0000 (20:21 -0700)]
Remove QWorkspace.

QWorkspace had been called Q3Workspace before Qt4.0 finally released.
In a sense, it is a Qt3 support Widget. And QWorkspace has been
deprecated and replaced by QMdiArea at Qt4.3.

Change-Id: Iea1bf831c9960c23c2b21d51fdc7c13b303642ea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoCleanup Q3* items
Debao Zhang [Sun, 18 Mar 2012 04:37:17 +0000 (21:37 -0700)]
Cleanup Q3* items

Cleanup Q3* items from QtCore and QtGui modules.

Change-Id: Id214a077a50e99d820c84e96e34866492a0130d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoImplement QSystemTrayIcon for X11.
Friedemann Kleint [Fri, 9 Mar 2012 10:38:55 +0000 (11:38 +0100)]
Implement QSystemTrayIcon for X11.

Reimplement using a QWidget. Use X

Change-Id: I7f8326598fb7210d59bc1d682cdada4526d5b6dd
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove #if 0 sections from QRegExp autotest
Giuseppe D'Angelo [Fri, 23 Mar 2012 05:24:09 +0000 (05:24 +0000)]
Remove #if 0 sections from QRegExp autotest

Use QEXPECT_FAIL instead (QRegExp is bugged w.r.t. the specific
test data).

Task-number: QTBUG-22466
Change-Id: Id5af01fa0d5c0536845fd4db19d4264498a8675b
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoFix performance problem with NTLM auth in http POST
Shane Kearns [Thu, 22 Mar 2012 15:10:26 +0000 (15:10 +0000)]
Fix performance problem with NTLM auth in http POST

A combination of other fixes resulted in authentication credentials
with a blank username & password being incorrectly added to the
cache only for NTLM.
This caused authentication to be attempted with blank credentials
first (which would fail), before the authenticationRequired
signal was emitted.
It caused a performance issue because of the extra 2 requests to the
server (and possibly delays inserted by the server following a failed
login)

Change-Id: Ic588a20cfe7c24d5e60cd384caff0673a587e484
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agoOnly create cmake files if MODULE is set.
Stephen Kelly [Thu, 22 Mar 2012 14:51:16 +0000 (15:51 +0100)]
Only create cmake files if MODULE is set.

WinMain does not set MODULE, though it uses qt_module_config and
generates incomplete cmake files in the wrong locations as a result.

Change-Id: I5081a13a19469ab8cd01970a55684b8451bc79d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMove the UTF-8 data into a separate .cpp so I can use later
Thiago Macieira [Mon, 5 Sep 2011 18:34:38 +0000 (20:34 +0200)]
Move the UTF-8 data into a separate .cpp so I can use later

This allows me to keep the UTF-8 invalid data in one safe place. I
won't need to copy & paste it.

Change-Id: Icb909d08b7f8d0e1ffbc28e01a0ba0c1fa9dccf0
Reviewed-by: David Faure <faure@kde.org>
12 years agotst_qsslsocket*: don't inherit from QSharedPointer
Marc Mutz [Tue, 6 Mar 2012 10:46:02 +0000 (11:46 +0100)]
tst_qsslsocket*: don't inherit from QSharedPointer

QSharedPointer is about to become final.

Instead of inheriting from it to add implicit
conversions to and from QSslSocket*, make
QSslSocketPtr a typedef, and make the
conversions explicit.

Change-Id: I4eebb262ab5aef348f4d676f9e839325d4ed13da
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agotst_qsharedpointer: don't inherit from QSharedPointer
Marc Mutz [Tue, 6 Mar 2012 07:33:32 +0000 (08:33 +0100)]
tst_qsharedpointer: don't inherit from QSharedPointer

QSharedPointer is about to be made final. Instead
of inheriting from it to gain access to the
d-pointer, cast it to a layout-compatible struct
and access the pointer from there.

Assert liberally to ensure layout compatibility.

Change-Id: Ifc0fa6a6608e861469286673844325663f4f7fcc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQDirIterator: don't inherit from QDir
Marc Mutz [Mon, 5 Mar 2012 17:27:10 +0000 (18:27 +0100)]
QDirIterator: don't inherit from QDir

Remove the inheritance hack used in
QDirIterator to gain access to QDir's
d-pointer by simply making QDirIterator
a friend of QDir.

This allows to turn QDir into a final class.

Change-Id: I97efef8714bb194d62b9fe5192ce240a90f2bf97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQtDBus: don't inherit from QString, QVariant
Marc Mutz [Fri, 2 Mar 2012 12:40:22 +0000 (13:40 +0100)]
QtDBus: don't inherit from QString, QVariant

QString and QVariant are about to be marked
Q_DECL_FINAL_CLASS, so change inheritance to
composition.

At least this was private inheritance...

Change-Id: I43caaa6c03041b8f0bd0f7987ddb4c6ff8309e50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agotst_qnetworkreply: don't inherit from QSharedPointer
Marc Mutz [Tue, 6 Mar 2012 07:52:11 +0000 (08:52 +0100)]
tst_qnetworkreply: don't inherit from QSharedPointer

QSharedPointer isn't meant to be used as a
base class.

Instead of inheriting from it to add implicit
conversions to and from QNetworkReply*, make
QNetworkReplyPtr a typedef, overload two
oft-used functions to take a QNetworkReplyPtr
in addition to QNetworkReply*, and otherwise
make the conversions explicit.

Change-Id: I1eff1793a19f2d5bad1cce8de74c0786675a50f3
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoQLocalSocket: remove double buffer on qlocalsocket_unix
Martin Petersson [Thu, 22 Mar 2012 09:39:31 +0000 (10:39 +0100)]
QLocalSocket: remove double buffer on qlocalsocket_unix

The QLocalSocket is using a QLocalUnixSocket which is a QTcpSocket
that has buffering enabled. Because QLocalSocket is a QIODevice it
also has its own read buffer. By opening the QIODevice Unbuffered
we only use the buffer in the QLocalUnixSocket.

Change-Id: I4b9091522f73b0831b20efb4a2a00c2603fc748b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoCheck if Qt::ImEnabled is true before handling im events on Mac
Tasuku Suzuki [Mon, 19 Mar 2012 02:04:26 +0000 (11:04 +0900)]
Check if Qt::ImEnabled is true before handling im events on Mac

Key events were not sent to items on graphics view after the change
412dbdf410c765e75c60d1f48143dd6c02a69493. This is because the change
only checks if QGuiApplication::focusObject() exists. Qt::ImEnabled
needs to be checked too.

Change-Id: I2a78af717a7a1a5d84fbc8b521253bdc25b43286
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCocoa: Add window fullscreen button on OS X Lion.
Morten Johan Sorvig [Wed, 21 Mar 2012 13:58:20 +0000 (14:58 +0100)]
Cocoa: Add window fullscreen button on OS X Lion.

Use the heuristic that windows that are not an
NSPanel and has the MaximizedButtonHint get the
fullscreen button.

Change-Id: I9a3520b7e4cd1833421d5d2f5b73da7edbfc3e74
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoAdd QPA readme.
Morten Johan Sorvig [Thu, 22 Mar 2012 10:21:32 +0000 (11:21 +0100)]
Add QPA readme.

Change-Id: Ibc3a95f3560af909a45d147098184c2194187932
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoRewrite QMap to use a RB tree
Lars Knoll [Mon, 19 Mar 2012 19:53:20 +0000 (20:53 +0100)]
Rewrite QMap to use a RB tree

QMap used to use a skiplist in Qt 4.x, which has variable
sized nodes and we can thus not optimise using custom
allocators.

The rewrite now uses a red-black tree, and all allocations
and tree operations happen in the cpp file. This will allow
us to introduce custom allocation schemes in later versions
of Qt.

Added some more tests and a benchmark. Memory consumption
of the new QMap implementation is pretty much the same as before.
Performance of insertion and lookup has increased by 10-30%. iteration
is slower, but still extremely fast and should not matter compared
to the work usually done when iterating.

Change-Id: I8796c0e4b207d01111e2ead7ae55afb464dd88f5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoconfigure: Fix x86_64 detection
Bradley T. Hughes [Fri, 23 Mar 2012 06:02:47 +0000 (07:02 +0100)]
configure: Fix x86_64 detection

The regular expression should look for underscores in addition to
alphanumeric characters.

Change-Id: Idc3dbd67291ec1420f818d74fba8413b1e7cbcf1
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix udev building after commit 7a169fb52a2d57ec6b3b8e6196e5d4ce084e3eb0
Thiago Macieira [Mon, 5 Mar 2012 17:45:17 +0000 (09:45 -0800)]
Fix udev building after commit 7a169fb52a2d57ec6b3b8e6196e5d4ce084e3eb0

Change-Id: I13fcc6f58376657d54d3c0efd02f5ffba2a79cca
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoDeprecate QInputMethodEvent::setTentativeCommitString()
Pekka Vuorela [Tue, 28 Feb 2012 12:23:36 +0000 (14:23 +0200)]
Deprecate QInputMethodEvent::setTentativeCommitString()

Free form tentative commit proved to require too much fiddling on
rendered text vs. logical content. Needs simpler mechanism.

Change-Id: Ia4e341abf342d25675fd1129efb11094dde410b2
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoWhitespace fix for brace in qstring.cpp
Thiago Macieira [Thu, 22 Mar 2012 14:55:18 +0000 (11:55 -0300)]
Whitespace fix for brace in qstring.cpp

Change-Id: Ia6cf0d2babd931c9ac2a441a9cfec35f2297dddb
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoQuick optimisations to QString: no const-ref for QLatin1XXX
Thiago Macieira [Mon, 17 Oct 2011 22:32:52 +0000 (00:32 +0200)]
Quick optimisations to QString: no const-ref for QLatin1XXX

Change-Id: I2c96adc6ae451f085024464791e53739b2d38bab
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoUse the same ifdef-based debugging as the other engines.
Robin Burchell [Sat, 17 Mar 2012 22:47:22 +0000 (23:47 +0100)]
Use the same ifdef-based debugging as the other engines.

Just so I have a similar workflow all over the place.

Change-Id: I99df5042eac1b4fbf3613f339e8a4522f94ed1f5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>