Commit Graph

6101 Commits

Author SHA1 Message Date
João Abecasis
5254f562b2 Use Big-Endian conversion functions from qendian.h
These avoids repeating code and documents that the underlying format is
compacted big-endian.

Change-Id: I5a2dc0084945d99368183203a0a9b7c116874620
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-28 00:44:28 +02:00
João Abecasis
8fd09f456a Remove unused argument
The mode argument (third argument to (_)open) is only used when
(_)O_CREAT is also specified. As we're opening the file read-only it is
unused and unnecessary.

Change-Id: Icc16edec5a7d44c57ad02865048c56114c39d4bc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-28 00:44:25 +02:00
João Abecasis
7a0793114b There's no need to check pre-validated input
elfHash and friends are used solely from do_translate, which already
checks for null strings. There's no need to do it again here.

Change-Id: I90a16d2623ca753a444e53952539001988568bdb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-28 00:44:23 +02:00
João Abecasis
d5020b8913 Use accumulating hash, instead of allocating intermediate string
Change-Id: Ie93ac8df3066159ad11ff7f68c7ba85e7f5aa8bc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-28 00:44:20 +02:00
João Abecasis
2e92714090 Make QTranslator testcase independent of Widgets
There isn't really a need for the dependency as LanguageChange events can be
caught in QObject::eventFilter, directly.

Change-Id: I39778fbe1663924d97705b514ae399cfd3749776
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-28 00:44:16 +02:00
Pekka Vuorela
2744105419 Protect QAbstractTextDocumentLayout::anchorAt() from preedit
Previously the method didn't take into account that hitTest()
returns visual index, i.e. containing the preedit, and thus was easily
hitting assertion. Need to compensate for that before checking for actual
link.

Change-Id: I119e7f91088b4db9d347a3da338f6df915ce9719
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-27 23:03:12 +02:00
João Abecasis
a30ee4598f Avoid overflow in boundary check
Change-Id: I4f397795a65d5d6ea237a6751588a8dc6be15bdc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-27 21:42:18 +02:00
Thiago Macieira
5e4ed93b1c Stop erasing mkspecs/modules at every reconfigure.
Developers who are building & rebuilding Qt often end up needing to
recompile all other modules because of this removal even though the
libs are still compatible.

Change-Id: I4ec0e8ab222675dcd2a3f3a2b5e931c1c7f31f69
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-27 21:14:35 +02:00
Thiago Macieira
e2dfd2f4d2 Disable EGL (and thus EGLFS) if we're not using OpenGL ES
EGL support in src/platformsupport/eglconvenience requires OpenGL ES
to be enabled, so it makes no sense to test for the presence of EGL if
we're not enabling OpenGL ES.

EGLFS has similar requirements, so ensure it gets disabled
too. Otherwise we're going to get lots of undefined symbols in the
EGLFS plugin to things in QtPlatformSupport that did not get compiled
in either.

Change-Id: Ie55dd2e2597ec0594aa589ee8aac150c71104b46
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-27 21:14:35 +02:00
Rafael Roquetto
b0b36cc53c Fix scopes on iconv related pro/pri files
Ensure corelib and the iconv configure test link against libiconv on QNX-based
platforms. This now includes the Blackberry mkspecs which were
previously excluded.

Change-Id: I60677ab8506b7cf47f504b880bb1078036984e85
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-27 21:14:35 +02:00
Robin Burchell
e6a7a6a381 Remove xlib plugin.
There's not much point having this with the xcb plugin being present, and xlib
is pretty much unmaintained / broken anyway.

Task-number: QTBUG-24913
Change-Id: I090a9a0e6d2f893c030574e23f1d59f610282bd3
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-27 19:26:45 +02:00
Uli Schlachter
0af9217430 XCB: Simplify xcb error handling
Instead of getting errors just to feed them to the default error handle,
the corresponding unchecked request is used which automatically makes
errors go to the default error handler.

Change-Id: Ib213a860affb72de6f9896f68505e283a809d58f
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-27 19:26:45 +02:00
Bradley T. Hughes
aea0b24d69 Add manual test for window modality
This test allows us to recreate any modal scenario. Multiple top-level
windows with any depth of window and application modal dialogs is
possible.

Change-Id: Ieef2c557d2f9ad2d2b2d2b598e9415f4c1e2dcb5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-27 19:26:45 +02:00
Bradley T. Hughes
798ccb30cf Update documentation for QAbstractEventDispatcher::TimerInfo
This type is not a typedef anymore, it's a proper class.

Change-Id: I611df067f2983baf262d84a82fb98e61124956d2
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-27 19:26:45 +02:00
Qt4iOS
c95fc3c3b1 Fix compilation when QT_NO_PRINTDIALOG is defined.
Some code intended to be disabled when QT_NO_PRINTDIALOG is defined
was being compiled due to misplaced #ifdef and/or #endif.

Change-Id: Ic8587872fae03cac2895e54e34f8f20cb575d92b
Reviewed-by: John Layt <jlayt@kde.org>
2012-03-27 19:26:45 +02:00
Marc Mutz
f1963324d2 QUuid: mark constructors constexpr
See e.g. f3141c58ba for rationale.

The problematic part here is the array member
which in C++98 cannot be initialised in the
ctor-initializer-list. For this, C++11 Uniform
Initialisation is needed, for which Qt does
not yet have a Q_COMPILER_* macro. I'm not sure
we need one, either, since I doubt that there's
a compiler that implements std::initializer_list,
but not uniform initialisation.

Change-Id: I4fa8f4f9db8703096358634fb2e6f5de61f0fedd
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-27 19:26:45 +02:00
Kent Hansen
d236fe2214 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
2012-03-27 19:22:48 +02:00
Laszlo Agocs
59a5c78e20 Add QPA notes to QCursor pos() and setPos()
Change-Id: I7173816e0d792d6d26497b4fd59a57a50e512afd
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-27 17:36:26 +02:00
Martin Petersson
854256cc69 QHttpNetworkConnection test: avoid integer divide by zero exception.
The speed calculation caused a dived by zero exception.

Change-Id: I83281c8e66b9c18e7d282920901ccac1e9444a68
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-03-27 17:16:26 +02:00
Orgad Shaneh
a4d0c56a59 Fix keyboard navigation order for buttons with RTL layout
On RTL layout, right key should move to previous button, and left key should
move to next button.

Task-number: QTBUG-15790
Change-Id: If0753f9082b3a3624b95276840f5f3799b5e14bf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-27 17:12:47 +02:00
Miikka Heikkinen
4f1820e3a7 Implement application font loading for Windows
For FreeType Windows font database, use the application font loading
implementation of the parent class.
For native Windows font database, the implementation was adapted from
Qt 4.8.

Also fixed a bug in font database population, where old data was not
destroyed before population, resulting in fonts not getting properly
repopulated when a new font was added.

Task-number: QTBUG-24193
Task-number: QTBUG-24195
Task-number: QTBUG-24196
Change-Id: Ie224a87baf7500b9867aaafa807f62dd4503dee8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-27 17:06:59 +02:00
Jason McDonald
d41e0564f5 Remove obsolete references to QWS from configure script.
Task-number: QTBUG-24027
Change-Id: Id7be20aa4438e590d629ec96f5ad817866f83764
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-27 17:03:34 +02:00
Thiago Macieira
a861463c3c Add a Q_NORETURN macro to mark a function that never returns
This is implemented for GCC, ICC, Clang and MSVC. With this macro, the
compiler can generate better code because it knows that the function
being called will not return.

Change-Id: Iea2bc7be464606639be65ccb73911d7ed1b29a64
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-27 16:51:30 +02:00
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
Jason McDonald
2b17b0235b 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>
2012-03-26 21:31:02 +02:00
Jason McDonald
13d936b0f2 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>
2012-03-26 21:30:54 +02:00
Jason McDonald
6a1d1165c2 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>
2012-03-26 21:30:45 +02:00
Thiago Macieira
15e9b77cac 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>
2012-03-26 18:39:29 +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
7db5f0dd6a 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>
2012-03-26 14:54:29 +02:00
Thiago Macieira
99802f0c14 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>
2012-03-26 14:54:08 +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