Commit Graph

5579 Commits

Author SHA1 Message Date
Friedemann Kleint
2c4845ce33 Fix some compiler warnings in tests.
- Unused variables
- Deprecated conversion from const char * to char *.

Change-Id: Iea0b9c4613ea74cead6d95ba12ad1028f531cbff
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-03-27 16:35:39 +02:00
Pekka Vuorela
0ee1b4a1de Reverted use of tentative commit use in QWidget editors
Feature to be reimplemented simplified. Cases when input method
needs to be reset with possibility to commit use
QInputMethod::commit() again.

Change-Id: Ibfe7aecc0799e7a76c7ac4f5d860971cfe6e97ca
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-03-27 12:51:38 +02:00
Friedemann Kleint
4f92f9b725 Introduce FontSmoothingGamma as a platform style hint.
- Allocate gamma tables on the heap in a thread-safe way, use
  font smoothing returned by the style hints of the platform to
  calculate them.
- Improve font rendering on Windows.

Change-Id: I8cd39b51cf03cbd642474c02b9076814baecd597
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-27 12:33:42 +02:00
Jan-Arve Saether
8d28f263aa Fix IAccessible2 for Windows, enable MSAA/IAccessible for MinGW.
Commit 5e9089135b had some problems:
* It left out the cast to IServiceProvider in the refactoring of
   QueryInterface. This broke IAccessible2.
* It also failed to enable the codepath for MinGW inside wrap(), which
  effectively caused MSAA for MinGW to be disabled.

It also adds an autotest to the bridge (finally). It is simple,
but it should help avoiding committing stuff that completely breaks
the bridge.

Change-Id: I459d89c3bdb93e54ddea85872b50fc1dba0fe4a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-27 12:29:46 +02:00
Bradley T. Hughes
6540a42ee0 Cocoa: silence warning about QCocoaWindow member initialization order
qcocoawindow.mm:99:7: warning: field 'm_glContext' will be initialized
      after field 'm_inConstructor' [-Wreorder]
    , m_glContext(0)
      ^

Change-Id: I9e090ddeeaeea581b480b2e7b2b99360062c0632
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-27 12:07:52 +02:00
Alexei Rousskikh
7ecbc49c55 QJsonParseError improvements
- added human-readable error message
- improved enum value names

Change-Id: I86d4bb419f9581f85d61b6e090048f1943017f9e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-27 12:06:54 +02:00
Donald Carr
4535913c4f Configure QPA cleanup
PLATFORM_QPA is always true
PLATFORM_X11 is always false

remove/collapse all related conditional statements to lend greater clarity
to the configure script

Change-Id: I4998edf5402019370333ed79effcd0cacafbe87d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-27 12:04:47 +02:00
Marius Storm-Olsen
ac02d4e7ad Remove 'tests' as default build part.
This requires 'configure -make tests' if you want to automatically
build autotests for a module by default.

You can still go into the individual tests/ directories and
    'qmake && make check'
to build and run the autotests.

configure -developer-build will enable the tests by default,
like it did in Qt4.

Change-Id: If4d870987de0947a8328509dcc227fa9e6284201
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-27 12:01:59 +02:00
Jason McDonald
b72fd8482e Uncomment disabled code in QSettings autotest.
The code in question was already commented out before the test was added
to the Qt repository in 2006.  After changing the code to use
QFile::rename() for portability, the test appears to pass.

Change-Id: I52a8578a47da419cabf5826b633cc4f2ac2c5218
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-27 09:11:04 +02:00
Thiago Macieira
cbc883da69 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>
2012-03-27 05:35:57 +02:00
Girish Ramakrishnan
84e98fd9d2 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>
2012-03-27 05:35:57 +02:00
Rohan McGovern
4c655bef5e 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>
2012-03-27 03:36:33 +02:00
Marius Storm-Olsen
b9a498bf51 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>
2012-03-27 03:36:30 +02:00
Bradley T. Hughes
d24873c4f2 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>
2012-03-26 14:57:11 +02:00
Thiago Macieira
aad02f130c 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>
2012-03-26 14:51:36 +02:00
Thiago Macieira
c28e61a0f4 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>
2012-03-26 14:45:29 +02:00
Bai Jing
de37821c56 let qtPrepareTool give right path for app_bundle
Change-Id: Ieb4979244d741c9d9d0c11a035c18ced87ea28f5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-26 14:06:51 +02:00
Rafael Roquetto
e1c22d426f 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>
2012-03-26 14:02:07 +02:00
Bradley T. Hughes
1f61980a0f 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>
2012-03-26 14:02:07 +02:00
Bradley T. Hughes
155d5ecf34 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>
2012-03-26 14:02:07 +02:00
Bradley T. Hughes
f6b25fa213 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>
2012-03-26 14:02:07 +02:00
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
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
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
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