Commit Graph

16402 Commits

Author SHA1 Message Date
Friedemann Kleint
097be87a64 Stabilize tst_QGraphicsScene::isActive().
Position windows, use QTRY_VERIFY.

Change-Id: I84349dd696a633840973e9db0c538830aaa96948
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-11-20 18:18:48 +01:00
Frederik Gladhorn
ff4ad44b69 Merge remote-tracking branch 'origin/release' into stable
Conflicts:
	configure

Change-Id: I0d31f23483ea67c4cac5af16014366e1ba5ac093
2013-11-20 17:16:59 +01:00
Gatis Paeglis
486889523c Workaround source compatibility issue introduced by xcb 1.9.3
Previous version of the struct:

typedef struct {
    uint8_t  response_type;  /**< Type of the response */
    uint8_t  pad0;           /**< Padding */
    uint16_t sequence;       /**< Sequence number */
    uint32_t length;
    uint16_t event_type;
    uint16_t pad1;
    uint32_t pad[5];         /**< Padding */
    uint32_t full_sequence;  /**< full sequence */
} xcb_ge_event_t;

New version of it:

typedef struct xcb_ge_event_t {
    uint8_t  response_type; /**<  */
    uint8_t  extension; /**<  */
    uint16_t sequence; /**<  */
    uint32_t length; /**<  */
    uint16_t event_type; /**<  */
    uint8_t  pad0[22]; /**<  */
    uint32_t full_sequence; /**<  */
} xcb_ge_event_t;

Changes are:
- "pad0" became "extension"
- "pad1" and "pad" became "pad0"

More details in https://bugs.freedesktop.org/show_bug.cgi?id=71502

Task-number: QTBUG-34748
Change-Id: Ibd801c11510f75fa82d5c14346b95236142487ac
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-20 16:09:28 +01:00
Tor Arne Vestbø
f1268d137e Allow platform to decide default behavior for show() based on window flags
The ShowIsMaximized and ShowIsFullscreen style hints were not granular
enough to build a default behavior from that would be correct for all
platforms. The recent Android patch that excluded dialogs from being
shown maximized (Ia249e93dbbea1) has now been moved into a platform
override in the Android integration plugin, leaving other platforms
to the default behavior of using the style-hints. We still special
case popup-windows though, as that behavior has been there for a
while.

Task-number: QTBUG-34969
Change-Id: Id36346d71bfc46171383ffe334592ca0b94e456f
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-11-20 16:09:28 +01:00
Frederik Gladhorn
982da20cf2 Remove empty QAccessible2 header
Change-Id: Ia5e9b1adf9280e6b7d7aaf8cb5b5167b694a6070
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-11-20 15:11:24 +01:00
Gunnar Sletta
54b8c27e03 Fix crash when windowcontainer is used in a dockwidget
The dockwidget's toplevel window would be a parent of the container's
window when floating. When plugged back into the mainwindow the
dockwidget's window is destroyed and the container's window along
with it. Added a function toplevelAboutToBeDestroyed to unparent
the containers window before this happens so parentWasChanged will
work correctly.

Change-Id: I06679cfb3a8fa3834c0db0be5973c012b8277275
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-11-20 14:10:37 +01:00
Tor Arne Vestbø
16ad93af49 iOS: Don't use auto resizing masks to deal with maximized/fullscreen
It breaks down when the view-controller is fullscreen and we want to
take statusbar height into account as well. Unfortunately we can't
use constraints either, as it's iOS6+.

The approach of managing the geometry manually is closer to what
Android does as well.

Change-Id: Ib521ba0f50b110c440ab68aacef5a524d5d41154
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-11-20 14:10:18 +01:00
Tor Arne Vestbø
ce6fd574b4 iOS: Report native orientation of QScreen in relation to size
Instead of hard-coding it to assume the properties of the main/device
screen.

Change-Id: I94c978d4334cae5be9d1094a0c315031e54e8e1f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-11-20 14:10:18 +01:00
Tor Arne Vestbø
2e2c7327dd iOS: Prepare platform screen for reacting to dynamic updates to properties
Change-Id: Idb378416da2b559ed88eb5a764cacff149264f70
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-11-20 14:10:18 +01:00
Tor Arne Vestbø
c3e949ac7d iOS: Allow non-top-level windows to be activated
As tested and assumed by tst_QWindow::isActive().

Change-Id: I8d09263ce0acc9c3390a70b4089396257197a1be
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-11-20 14:10:18 +01:00
Tor Arne Vestbø
837228151d iOS: Don't keep around reference to a single QIOSViewController
We might have more of them in a multi-screen setup or when implementing
support for modal windows using sub-viewcontrollers.

Change-Id: Ibe98273a13af981fffe2704a2c05bfd9d3f3e9e0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-11-20 14:10:18 +01:00
Tor Arne Vestbø
49a3fe0cf8 tst_QWindow: Use showNormal() to prevent maximize/fullscreen interference
We don't want platform behavior for whether or not maximized/fullscreen
windows can be resized to affect the test for resize event propagation.

Change-Id: I8c118733ca5d2553aacf24d0b8debeb1a4e27103
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-20 14:10:18 +01:00
Tor Arne Vestbø
0c012b6470 iOS: Send expose events in the window's coordinate system, not the parent's
Change-Id: I4aa1a354ca14864bd9898ebd331871d7b32d3ae0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-20 14:10:18 +01:00
Oswald Buddenhagen
6a1e534627 fix overquoting in some mkdir calls
Change-Id: I2ed418064d43ab8cdab87af48e03d983c023ccf5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-11-20 12:40:06 +01:00
Oswald Buddenhagen
02556c0dc5 clean up mess surrounding PLATFORM_MAC
introduce XPLATFORM_MAC which is properly initialized from the spec
instead of from the host.

use that and BUILD_ON_MAC where appropriate.

minor bug: during command line arg validation we use BUILD_ON_MAC even
when XPLATFORM_MAC would be in order, because the latter is not
available at that point yet. the solution would be delaying the
validation, but that doesn't seem worth the effort now.

Task-number: QTBUG-33896
Change-Id: I63f361212961bfdd82efde2ca71a1f48904a85fb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 12:40:06 +01:00
Oswald Buddenhagen
f0524cedda consolidate all license checking in the earliest place possible
... which is right after performing the platform detection, as proper
license checking needs to know the target platform.

we can do that now, as we moved all more expensive or side effect laden
processing to a later point.

as a side effect, we also get rid of the weird early cmdline parsing.

Change-Id: I0fda0a15a1ea2082603f7097e89aa422853f30fa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 12:40:06 +01:00
Oswald Buddenhagen
a6b9729d1c don't initialize build dir earlier than necessary
this way, platform detection (and later license checking) become
(mostly) read-only operations.

Change-Id: I4c5ffcf80feadfeee2c6e927cf0285f46fa6ea43
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 12:40:06 +01:00
Oswald Buddenhagen
078ad536c8 print help right after parsing command line
is the only sane thing, and now that there are no dependencies on
anything else any more (in particular anything slow or side effect
laden), we can actually do it.

this removes some nasty OPT_HELP checks spread throughout the code, thus
further reducing data dependencies.

Change-Id: Ib0a00e1514e2aa25ec3b527ba9f5719e3214640b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-11-20 12:40:06 +01:00
Frederik Gladhorn
c83c08d84f Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-11-20 12:18:23 +01:00
El Mehdi Fekari
1e446fc991 QLocale: Avoid a deadlock in error case
QBBSystemLocaleData emits qwarnings when it fails to open or read a pps object.
If the user code installs a message handler that will invoke QLocale API again
(i.e QDate, QDateTime, ...) which leads to a deadlock situation, since
the QBBSystemLocaleData global static object's ctor() is not yet done.

This patch logs the QBBSystemLocale's warnings to stderr and
skips the Qt message handler.

Change-Id: I3d51f85761253e09b14a44179dd14a887733b392
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-11-20 10:33:04 +01:00
Arvid Nilsson
711d0a1658 Add QQnxNativeInterface::nativeResourceForContext
This mechanism is used by QtWebEngine to extract the platform GL
context. In the QNX case, the platform context is an EGL context, so
the resource you need to ask for is the "eglcontext". Compare to the
xcb native interface which has a similar implementation already.

Change-Id: I873eaadf96898abb24de347ac624c88cd54254cb
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2013-11-20 10:33:04 +01:00
Andy Shaw
f3a4bc17ab Keep the dockwidget with the mouse when moving to another screen
When you move a dockwidget from one screen to another then it needs to
be kept at the same position on the new screen, i.e. with the mouse
pointer. This fix ensures that this is happening including when the
screens may not 100% align up with each other.

Task-number: QTBUG-33369

Change-Id: If414effdd0e0415629ca31a86f8bbe382dd29f80
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-11-20 10:33:04 +01:00
Friedemann Kleint
829b1d13b2 Ensure Qt::WA_Mapped is set in case of obscured native windows.
Task-number: QTBUG-33520
Change-Id: I51f9b4634be29fd32f4ad9cc8b5d3e10b19ea2f5
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-20 09:39:56 +01:00
David Faure
e1c0a1b56c QProgressDialog: add unittest for the auto-show feature
Change-Id: I244d0b740467a09e8833f4debb95b19e45df371f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-11-20 09:03:09 +01:00
Andy Shaw
cefa54d478 When we get a WindowBlocked event then reset the qt_button_down value
Whenever a window gets blocked, then the qt_button_down variable should
be reset as it is not going to receive the release event for the mouse.
This fixes problems with the mouse cursor not being updated when moving
over widgets (such as QLineEdit) after a dialog is shown in response to
a press event.

Change-Id: Idfd072eaf36f51b816a0b2a0391cdc447d7a5d9d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-11-20 08:44:46 +01:00
Oswald Buddenhagen
558b0a24d6 make help independent from options and environment
the help would echo the defaults adjusted by command line overrides and
environment variables for some options. this was entirely pointless.
it also printed the result of the os detection, which was mostly
useless.

but the primary reason for doing this is reducing data dependencies,
so the code can be moved up.

not touching the windows configure, as it's a lot harder and currently
that behavior isn't in the way of what i need to do.

Change-Id: Ide62119091c8494fb3bea2b607f140268f057919
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 08:04:12 +01:00
Oswald Buddenhagen
925899dcd6 do CONFIG+=silent after configure tests
it's counterproductive to do it earlier: it's passed down to configure
tests, which then log less info than they could.

but primarily, this serves the purpose of minimizing the amount of code
executed before platform detection.

Change-Id: Iff19b8555de19d048ea6d9341af965871b314c54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 08:04:07 +01:00
Oswald Buddenhagen
862fbd98cd move some option validations to more relevant places
minimizing the amount of code executed before platform detection.

Change-Id: Ib2c0d97ce5040ced8c4c41d74f428fe7d0f75664
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 08:04:04 +01:00
Oswald Buddenhagen
d1990a7132 don't automatically display help on error
it's entirely pointless to flood the user with information and force him
to scroll back when he most likely just made a typo.

apart from that, this reduces the data dependencies, thus easing further
refactoring.

Change-Id: I7b24274d453de54a4f02481a66d77e27d4ab0657
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 08:03:59 +01:00
Oswald Buddenhagen
c9692fbd6e remove hacks to support solaris 2.[56] and aix < 5
moving dead code out of the way of further refactoring.

Change-Id: If558406cdf13d61478634dd7eff644dc67b0e53d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 08:03:51 +01:00
Oswald Buddenhagen
7faf1a73ef initialize WHICH, AWK, PERL and MAKE a bit earlier
have this option independent code out of the way before starting option
processing.

Change-Id: I5a08caeb25689b155c256ef82505c000112f5039
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-20 08:03:45 +01:00
Sergio Ahumada
97abe053e2 Bump Qt version to 5.2.1
Change-Id: I6ee560e48625307e1ea24854fe58fdc190650a4f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-11-20 00:38:49 +01:00
Sérgio Martins
9943ac440e Doc: Q_REVISION/Q_INVOKABLE are added to declaration not definition.
Change-Id: Ia06d33df1b5d38783e22b0c45956a5154338ed33
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-11-19 22:56:55 +01:00
Friedemann Kleint
1b9be3f481 Testlib.selftest: Improve process execution, run on openSUSE.
Give processes a more complete environment (openSUSE
requires more variables to start an X11-process),
add test column indicating whether a test is
supposed to crash. If it is not, report crash reason.

Change-Id: I1e0ad59824963f69ee425f331d845741be2b3928
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-11-19 22:47:43 +01:00
Gunnar Sletta
1f22d924e8 Clear focus from active widget when windowcontainer gets focus.
Task-number: QTBUG-31853
Change-Id: If0d29ee0a125464b32be99332502473b7c626bb0
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-11-19 20:32:41 +01:00
Alberto Mardegan
911cfc4e90 XCB: do not assume that sizeof(long)==4
The code was using the "long" type when a 32 bit type was actually
needed. This can cause bugs in those systems where "long" is 64 bits
wide, such as Linux x86-64 (which is LP64).

Task-number: QTBUG-34861
Change-Id: Iab289b2af3847dd62d8b4ecea51896936ca4c7a2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-11-19 14:31:08 +01:00
Peter Hartmann
09644cb12f mkspecs: add qfeatures.pri to installed files
... so it will be found when included. That file was added with
commit 3b6b615334,
"export QT_NO_<foo> equivalents to the build system"

Change-Id: I38208aafe5b274d5976cec5d5149a41e6a963798
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-11-19 14:26:23 +01:00
Friedemann Kleint
dcd71a0897 Android: Remove usage of QObject::tr()
Change-Id: I948d9fc36aa52d2d247a84b5d9b2cf949b93387d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-11-19 10:39:20 +01:00
Jorgen Lind
20272ad6e5 Fix configure script to not dictate OpenGL ES 2 when EGL is enabled
Change-Id: I4d940ef436f21fd915f3d03558fd4fb4c7b3e5b7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-19 10:14:39 +01:00
Jorgen Lind
f087ffdc53 Remove the GLES 2 dependency for eglfs and kms
Change-Id: If7b80487e01db726367f5a67d2860073f60a0844
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-19 10:14:30 +01:00
Christoph Schleifenbaum
7e768dde39 Widgets: Never revoke focus by click on focused widget.
When clicking on a widget currently focused, w/o having Qt::ClickFocus
set as focus policy, the focus should stay on the widget and not get
propagated to the widget's parent.

Task-number: QTBUG-34042

Change-Id: I53f1153829cc7228de02a90e38125b5cf4ee5008
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-11-18 20:38:41 +01:00
Tor Arne Vestbø
eccd365ac5 iOS: Don't enable kEAGLDrawablePropertyRetainedBacking
We report our swap-behavior as QSurfaceFormat::DoubleBuffer, which means
there's no point in using retained backing. This was a left-over from
when we reported single-buffered swaps, which didn't work to well as
clients would wrongly assume swap was not needed at all.

Change-Id: Id26df2f8b282892c720d48cfe85eb9e010f1500d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-18 19:26:56 +01:00
Tor Arne Vestbø
69a8c59b3f tst_QWindow: Set explicit window position to please qWaitForWindowActive
qWaitForWindowActive waits until the timeout for the window to receive
a non-0x0 position, even when it's active, just in case the WM sets
the position as a response to focus-in.

Change-Id: I748cce2747f406a8cdff556465175f02675fcd13
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-18 19:26:47 +01:00
BogDan Vatra
98f0b46689 Android: Use native platform menus.
This is an Android only patch, a proper implementation
will be pushed soon to stable branch.


Task-number: QTBUG-29462
Task-number: QTBUG-33588

Change-Id: I3447c523b4533a768d7f95e4ae60541b09a7944f
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-18 19:26:21 +01:00
Frederik Gladhorn
72ea790085 Merge remote-tracking branch 'origin/release' into stable
Change-Id: Ie6d44caf1d630cb029178a1af40c637f24a25ee7
2013-11-18 12:27:04 +01:00
Sérgio Martins
cd93a2c0e1 Windows: Fix bug where windows stopped painting after a restore.
This is an improvement over 6800728d where we only fixed it if
the window was in "normal" state (Qt::WindowNoState) before
minimizing.

With this patch, if the window was previously maximized or
full-screen it will also get the expose events when being
restored.

Change-Id: I4a30423145e0999c5d0a5ee2a989730b83f4e3f2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
2013-11-18 10:14:30 +01:00
Thorbjørn Martsum
aafbd7392e QHeaderView - do not ignore -1 as minimum section size
We claim that -1 is a special automatic value, but calling
setMinimumSectionSize with -1 is unfortunately ignored due a
regression in 524c3e05e8

Change-Id: I7d7e5dbbf78e561849d2f2352c9edb2df36aa181
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-11-17 20:49:00 +01:00
Marc Mutz
eb122a6fe4 tst_QAlgorithms: fix compilation with C++11 enabled
GCC refuses to use a merely static const uint array in a constexpr function.

Fix by making the array constexpr if supported by the compiler.

Change-Id: Idd59d3f74f8f4e98aad82bc892f4a6469932df9f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-17 09:48:17 +01:00
Marc Mutz
e721cf1508 QCollatorSortKey: inline operator<
This code was duplicated in every qcollator_platform.cpp and identical everywhere,
except in _icu, which uses a QByteArray m_key and the implementation used
QByteArray::operator<, which is semantically and probably code-wise identical to
what the other implementations did (after inlining).

Inlining this function removes a potential maintenance problem and increases
speed without violating encapsulation.

Change-Id: If3e9d38a7d4326b49f0611a9f4187c53960e8a03
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-17 09:47:34 +01:00
Marc Mutz
70bc2e882f QCollator(SortKey): declare as shared
This enables specialisations of (std and q) swap using member-swap
and declares the types movable for efficient use in Qt containers,
and QList in particular.

This is a binary-incompatible change, so cannot wait for 5.2.1.

Change-Id: I7e90b6397ac4d00d0a7a5c42bae166c1b43e1994
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-17 09:47:21 +01:00