Commit Graph

26424 Commits

Author SHA1 Message Date
Sérgio Martins
af499fd7eb Make QWindowGeometrySpecification suitable to use as global
It's used as a global static but according to library policy it's required
to have a trivial dtor and a trivial or constexpr ctor, otherwise it
runs code at library load/unload.

Change-Id: I1fcea3ce388b2a198e3851e6d0aeb91ae0a8e4b1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-02-07 16:49:33 +00:00
Alexander Bersenev
8eaf335259 xcb: Fix not delivering focusIn event on hide/show
Consider a window which was hidden and shown with hide() and show()
methods and mouse pointer was in window when hide() was called.

At first, window got focusOutEvent and then Qt library sends X server
a message to unmap the window.

Then X server will send client two messages:
1) FocusOut(10) detail=Nonlinear(0x03)
2) FocusIn(9) detail=Pointer(0x05)

QXcbWindow has a logic for not seting active window to 0 if there is
a FocusIn coming (see QXcbWindow::doFocusOut).

So QGuiApplicationPrivate::focus_window still points to the current
window.

Then when show() is called, qt compares previous focus with new focus
and, since they are equal, doesn't do anything. Event focusInEvent
isn't delivered to the window.

Here are two links why X server sends FocusIn just after FocusOut:
http://lists.freedesktop.org/archives/xorg/2008-December/041684.html
https://tronche.com/gui/x/xlib/events/input-focus/normal-and-grabbed.html

Proposed fix ignores FocusIn events with detail==Pointer.
The text of explaining comment is taken from the Chromium project:
https://chromium.googlesource.com/chromium/src/+/master/ui/views/widget/desktop_aura/x11_desktop_handler.cc
from X11DesktopHandler::ProcessXEvent function.

[ChangeLog][module][Linux/XCB] Fix not delivering focusIn event on
hide/show with XCB

Task-number: QTBUG-49071
Change-Id: I433c8b638834c25f113cc134ee4185778c44f540
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-06 09:59:17 +00:00
Błażej Szczygieł
b9f76db30d xcb: Correct enter/leave event handling when mouse button is pressed
This patch fixes cursor shape when mouse leaves the window and enters
the window again with pressed mouse button - ignore the mouse enter
and leave event when any of mouse buttons is pressed.

Task-number: QTBUG-46576
Change-Id: Id6ce50cd0d66da51a251d4811bc42cd31606de29
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-06 09:59:11 +00:00
Błażej Szczygieł
e4fb521b3f xcb: XInput2 fixes, enter/leave event fixes
Added enter/leave event handling in XInput2 to avoid problems with
those events when the mouse is grabbed.

This commit amends: 53d289ec4c
This commit amends: ed2e157803

Task-number: QTBUG-50340
Change-Id: I7a120b46daa4f8fa4c218346273ae90b6abfa156
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-06 09:59:04 +00:00
Lada Trimasova
f669ea0d54 Link with -ldl option only when it is supported
-ldl option was used unconditionally while libdl is not supported
when libc is static.
Add build test to configure which checks if libdl is supported.
QMAKE_LIBS_DYNLOAD in "src/corelib/plugin/plugin.pri" is now used only
if libdl is available.
qt_linux_find_symbol_sys from qlibrary_unix is now used only if
QT_NO_DYNAMIC_LIBRARY is not defined.

Initially reported by Buildroot autobuilder here:
http://autobuild.buildroot.net/results/a85/a85a1839a45fb6102e53131ecc8f6dadf92bcdc2

Change-Id: I0397472456efdc4f3ab5f24d01253bee8048a9d1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-05 16:29:09 +00:00
Oswald Buddenhagen
a107c5394a remove redundant namespace qualification
Change-Id: I9fdb7ccc60da2631bc74b3b0a8414c211f4c182f
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-05 16:29:04 +00:00
Friedemann Kleint
c4a53f647f QtWidgets: Fix build & warnings with QT_NO_GRAPHICSVIEW.
kernel\qapplication.cpp(3157,18) :  warning: unused variable 'isGraphicsWidget' [-Wunused-variable]
            bool isGraphicsWidget = false;
                 ^
kernel\qwidget.cpp(6446,18) :  warning: unused variable 'window' [-Wunused-variable]
    if (QWidget *window = w->window()) {
                                          ^
kernel\qwidget.cpp(7949,50) :  error: no member named 'proxyWidget' in 'QWExtra'
        if ((q->isWindow() && (!extra || !extra->proxyWidget))
                                          ~~~~~  ^
kernel\qwidget.cpp(8084,50) :  error: no member named 'proxyWidget' in 'QWExtra'
        if ((q->isWindow() && (!extra || !extra->proxyWidget))

Change-Id: I8474ab0ab4617c6588707ce0c2f7a97e4d0e54da
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-02-05 13:42:21 +00:00
Gabriel Pannwitz
ce29de5c33 Doc: correct minor typo
Change-Id: If19900309bbef8b65d3dbda4f7795113bfe0678f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2016-02-05 13:33:52 +00:00
Andy Shaw
3904950af4 If the font is not being found then get the English name regardless
In a case of having a non English system locale, then the face and name of
the font may be localized but will not match up what is in the registry.
Therefore we need to try with the English name if is possible that there
is one, so in the case of when registerAlias is false we should try to get
the English name if necessary.

Change-Id: Id1064b6f5263677320374dbddfad852f30f041c5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2016-02-05 13:20:05 +00:00
Nico Vertriest
918b8d4e9e Doc: corrected minor link issues
Task-number: QTBUG-43810
Change-Id: I98eafe0c7ed55f309640e8495c83ffcef355aa08
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2016-02-05 13:01:16 +00:00
Laszlo Agocs
4c1b6cdd29 Support arbitrary strides in the QPlatformBackingStore compositor
Otherwise platform backingstores providing QImages with extra pixels
would break horribly. The only such platform is wayland for now.

Previously the need to support this case was masked by the RGBA8888
image conversion that happened always with wayland due to its ARGB32_Pre
format. With the recent improvements this is not done anymore and so
the problems became apparent.

Task-number: QTBUG-50894
Change-Id: I27d7a1c8e25d152ca1227af1e2c38f7d4b6acbab
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2016-02-05 12:27:30 +00:00
Friedemann Kleint
73c062d605 Windows QPA: Remove dead code as detected by Clang.
Task-number: QTBUG-50804
Change-Id: Id87ca4ac98eb17b1e743a10080554da38d609588
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-05 08:16:56 +00:00
Andy Shaw
798e0064e9 Fix crash introduced by 75b705fec8
This fixes the crash introduced by
75b705fec8. The drag only needs to be ended
on the hide if it is actually in the middle of dragging. This enables the
case of dragging the dock widget out with the mouse to continue to work.

Task-number: QTBUG-50890
Change-Id: I72309dd40ee670319f2ff607ae201c46f8de4652
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-05 08:15:34 +00:00
Friedemann Kleint
1c7e1d99b7 Windows QPA: Add missing override declarations.
Task-number: QTBUG-50804
Change-Id: I27017b0d0fd44cf746d180fdb126d1e6593e7d7b
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-05 08:13:33 +00:00
Morten Johan Sørvig
b6630a5181 Scale offset as well on QBackingStore flush
Also use the target window ("win") as context instead
of d->window.

Change-Id: I5b0fa3bb857526e4a4bc9c5e44670593da1dfe7c
Task-number: QTBUG-50487
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2016-02-05 04:14:43 +00:00
Eirik Aavitsland
e4f71b0cb5 Crash fix: reject certain malformed bmp images
A malformed bmp file header could specify a negative color table
size. The bmp handler would then return a QImage that claimed to be
valid, but actually was invalid, having an empty color table. This
would cause crash later, e.g. when attempting to paint it.

Change-Id: I7df7c40867557a82dbcee44c7de061226ff232c0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-02-05 04:14:35 +00:00
Andreas Holzammer
786d23bb49 Fix dbus wince build
interface is a define under wince. This define is included even
with standard header includes already. It needs to be undefined
for using it.

Task-number: QTBUG-50853
Change-Id: Ie44681f03709848e9747a8aec11835c8d62aa409
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-02-05 04:14:28 +00:00
Laszlo Agocs
d482805856 Do not change depth for the backingstore's underlying image
The depth cannot change. This means that RGB16 cannot be upgraded
to 8565 for example as that would be a 24 bit format whereas the
backingstores and the underlying platform may expect a 16 bit
format.

Task-number: QTBUG-50869
Change-Id: I648b39287d43a80fae8097a33bbf3b8bbdcb8816
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2016-02-05 04:14:17 +00:00
Friedemann Kleint
cb6d4d1f16 Revert "QWidgetWindow: call base class close event impl".
The patch causes the window creation on reshowing nested QWidget
with native windows to create child windows with 0-parent handles,
which can have adverse effects on the various platforms.
The patch might be re-applied on top of
73c86fcb40.

This reverts commit 470c8b68df.

Task-number: QTBUG-43344
Task-number: QTBUG-50854
Change-Id: I2ad837c3800fc71cccf04d455d1b9c3600b233e7
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2016-02-05 04:14:09 +00:00
Anton Kudryavtsev
4748acbf1e qmake: use QString::replace() overloaded with QLatin1String
instead of QStringLiteral, QString, const char*.

Results: reduce .rodata, prevent re-creation of QString.

Change-Id: Ie2e3089974c42e6733457bbe58521bccd1da3a53
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-04 15:10:49 +00:00
Frederik Gladhorn
4a251da5bb Accessibility OS X: Improve password handling
Set the right sub role (NSAccessibilitySecureTextFieldSubrole) and
return the bullet point character for the text contents. This alignes
the behavior with native widgets.

Change-Id: I7305e08dca61097dd8c050aed64c792c06de0a4d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-02-04 11:42:53 +00:00
Friedemann Kleint
1568074a60 Windows QPA/Accessibility: Fix Clang warnings about comparing different enums.
accessible\iaccessible2.cpp(1708,40) :  warning: comparison of two values with different enumeration types ('IA2Role' and 'QAccessible::Role') [-Wenum-compare]
Q_STATIC_ASSERT(IA2_ROLE_COLOR_CHOOSER == QAccessible::ColorChooser);

Task-number: QTBUG-50804
Change-Id: I25a1f00fdbd687ff23f875542a6aa0cc0cab3d23
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2016-02-04 10:21:51 +00:00
Edward Welbourne
f432d64019 Make findAmPm actually return the relevant enum, instead of int.
The enum needed a name to make that possible, of course.
The one overt int return -1 needed to be made explicitly Neither, too.

Change-Id: I3930bf03a7ee5e1619a1c74f9ca54faf6a6c5b2f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-02-04 09:14:02 +00:00
Edward Welbourne
a054349be3 Removed redundant and distracting test from conditional.
If argumentTypes is NULL then it is indeed not equal to the address of
a local static variable, so there is no need to follow the NULL-check
with a check that it's not equal to that non-NULL address.

Change-Id: I62362db747c0620b2195f7997368f026f535d57c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-02-04 10:37:33 +00:00
Friedemann Kleint
debfed863a Direct2D: Spell out ~QWindowsDirect2DPaintDevice.
Fixes warning about deleting the incomplete type
QWindowsDirect2DPaintDevicePrivate.

Task-number: QTBUG-50860
Change-Id: I11edb49e6e3996963913155e307fd5f3944bffd2
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2016-02-04 08:29:30 +00:00
Andy Shaw
75b705fec8 End the drag if the dockwidget is being hidden
When the window flags are changed for the widget then it is possible to
minimize the dockwidget via the titlebar. This will cause it to be ready
to start a drag internally but since the dockwidget never gets a mouse
release event it doesn't end it. Therefore it ends up being in an invalid
state later on when restored, so the endDrag() needs to happen in the hide
event to ensure this is not an issue later on.

Change-Id: Ia84bee96b9eed49896869e6a15d4de6d01964264
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-04 08:14:39 +00:00
Friedemann Kleint
0026688285 QWizard/Windows: Add missing override.
Task-number: QTBUG-50804
Change-Id: Ia1c73b40d96ddea01e440e0e3e010ff3fcb88793
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2016-02-04 07:56:51 +00:00
Laszlo Agocs
16d0d1c942 egldevice: Add a way to force mode setting
Normally setting the mode again and again on each application startup
is not desirable as it takes time and considerably affects the application
startup experience.

However, in some cases (like shutting down the X server) the output
gets powered down and there seems to be no way to detect this. Here
setting the mode again becomes necessary. Until there is a better
solution, add an environment variable QT_QPA_EGLFS_ALWAYS_SET_MODE
which, upon a non-zero value, leads to always calling drmModeSetCrtc.

The issue is not specific to Qt, the same is visible with the NV examples
as they try to minimize redundant mode set calls in the same manner.

Change-Id: If2b5e3fda74e077a747dd03cee65c936560a5026
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2016-02-04 07:46:18 +00:00
Dmitry Shachnev
f83816ec4f dbusmenu: Fix return type for QDBusMenuAdaptor::EventGroup method
Change-Id: If7454eeaafb31737f023e7359b2a1c513dd5772f
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-03 18:43:56 +00:00
Dmitry Shachnev
68f97cdf5f dbusmenu: Add missing methods for getting QDBusPlatformMenu properties
Similar to the existing methods for QDBusPlatformMenuItem. These methods
will be needed for implementing the D-Bus platform menu bar.

Change-Id: Iae3a5892b71fa9a7c72c323ee4b3ab2afd7d4d76
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-03 18:43:55 +00:00
Nico Vertriest
3b0c75316c Doc: Replaced Trolltech logo with Qt logo
Task-number: QTBUG-37505
Change-Id: If59039b2f7e60ffea3e8c7803d38e528acf35383
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2016-02-03 12:37:37 +00:00
Alexander Volkov
40e4949674 xcb: Take into account the orientation of touch points
Add support for ABS_MT_ORIENTATION value. Linux kernel multi-touch
protocol allows it to be in a wide range:
https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt,
but we need only to know whether the touch point rect is rotated
by 90 degress. So adjust the angle to the closest axis.

Change-Id: Ie20725dc4bef509e2f9b19571efc69502d00c019
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-03 07:44:14 +00:00
Tor Arne Vestbø
10bf53ae19 Don't include <qtest.h> from qtestblacklist.cpp
It's only supposed to be included by clients of the library, and
confuses qmake's dependency resolution into thinking the header-only
features such as qtestkeyboard.h and qtestmouse.h are dependencies
of this source file.

Change-Id: I5fe73b752c1c491ee0088bced77f997696d96c62
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-02-02 23:29:52 +00:00
Allan Sandfeld Jensen
6ec7d7658d Fix rounding error in fetchTransformedBilinear
To calculate the real count we need to use the actual fixed point
increment and can not use the floating point value increment wass based
on since it might round differently.

Includes auto-test by Gabriel de Dietrich.

Task-number: QTBUG-50153
Change-Id: Ia973088f361c90370fa20bac14a4b8f373b5d234
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-02 22:47:10 +00:00
Jędrzej Nowacki
38e602d0f2 Fix QT_DEPRECATED_SINCE usage
The deprecation was introduced in 5.6

Change-Id: Ief6b749b40ec75c3c9f904caed8447bfb5ef5439
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-02 19:24:12 +00:00
Thiago Macieira
628d3b7d3a Swap the GCC and Clang versions of supported FreeBSD mkspecs
Modern FreeBSD doesn't come with GCC by default anymore and doesn't even
provide the "gcc" or "g++" falback that OS X does. So there's no point
in keeping the freebsd-clang mkspec in unsupported/ since it's the only
one that works, or keeping the freebsd-g++* ones outside, as they won't
compile.

I'm not removing the GCC mkspecs because you can still install GCC from
the ports tree.

[ChangeLog][FreeBSD] The "freebsd-clang" mkspec is no longer in the
unsupported/ subdir. If you have scripts you use to build Qt, you'll need to
update them to say -platform freebsd-clang or remove the -platform argument.

Change-Id: I7a9e11d7b64a4cc78e24ffff142dfc11d3aabb1e
Reviewed-by: Raphael Kubo da Costa <rakuco@FreeBSD.org>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-02 19:23:53 +00:00
Thiago Macieira
ccf74b5928 Fix build on FreeBSD: 'environ' is not defined in a library
On FreeBSD, this variable is defined as a common symbol in the object file
/usr/lib/crt1.o, which is injected into the final application by the
compiler. This means when linking any library, 'environ' cannot be found
and we can't use -Wl,-no-undefined on FreeBSD.

I don't know why this wasn't caught before. Most likely, we failed to
pass the linker flag until some recent change to the buildsystem.

qprocess_unix.cpp:279: undefined reference to `environ'

Change-Id: I7a9e11d7b64a4cc78e24ffff142e02dbf188bca5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-02 19:23:47 +00:00
Thiago Macieira
3726c46735 Work around Clang < 3.7 integrated assembler bug PC-relative relocs
The qversiontagging.h inline assembly expands to:

  .long qt_version_tag@GOTPCREL

Which, with GCC, Clang >= 3.7 and with the option -no-integrated-as in
previous versions, produces the proper relocation (a R_X86_64_GOTPCREL).
With Clang < 3.7, it instead produces a R_X86_64_32, which is unsuitable
for use in shared libraries: 32-bit displacement is insufficiently wide
and would produce linker errors like

 obj/qftp.o: requires dynamic R_X86_64_32 reloc against 'qt_version_tag' which may overflow at runtime; recompile with -fPIC

Instead, force a 64-bit relocation (an R_X86_64_GOT64), which like the
32-bit version is simply an offset into the GOT of where the address of
the symbol is stored.

Task-number: QTBUG-50749
Change-Id: I7a9e11d7b64a4cc78e24ffff142e039c172b802c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-02-02 19:23:36 +00:00
Thiago Macieira
46c73be471 Fix livelock at application exit if threads were running
This only happened in debug mode, though, because in release mode the
warning wasn't printed and the socket notifier was removed. In debug
mode, this loop in closingDown() never exited:

    while (!d->sn_read.isEmpty())
        unregisterSocketNotifier((*(d->sn_read.begin()))->obj);

[ChangeLog][QtCore][QThread] Fixed a bug that would cause debug-mode
applications to live lock on exit if they had a global static containing
a QThread that wasn't properly exited.

Task-number: QTBUG-49870
Change-Id: I7a9e11d7b64a4cc78e24ffff142e457a4540d6b6
Reviewed-by: Mat Sutcliffe <oktal3700@gmail.com>
Reviewed-by: Roland Winklmeier <Roland.M.Winklmeier@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-02-02 19:23:28 +00:00
Samuli Piippo
e5e9387f9a Use extra compilers for the linker version script
This ensures correct separator handling and quoting.

Change-Id: I0f9cc7024cac579ea4c81f0c28754b1424ae2bd4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-02 19:23:16 +00:00
Tor Arne Vestbø
09559b5b79 BIC: Rename back symbol that was mistakenly thought to be private
Being called from an inline function we were breaking BIC (however
insignificant) by renaming the symbol in c7e5e1d9e0.

Change-Id: I683bfd53a5ad0de7db0fae6d9aa7d175e00f96ed
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-02-02 19:22:55 +00:00
Edward Welbourne
72b57a5dfa Disintermediate QDateTimeParser::SectionNode operations.
The name, format and maxChange of a Section depend only on the
section, not on the details of the currently parsed text it matches;
so we don't need the parser object's list of all sections to work them
out.  Move these methods to the SectionNode and act directly on that
instead of going via the section list.

Make the name take a Section enum instead of an int.
Likewise, make stateName take a State enum instead of an int.

Change-Id: Ie340d042ab95aec517013c4dcc30901d40305c78
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-02-02 16:28:48 +00:00
Edward Welbourne
a965d505a0 Make interleaving of QDateTimeParser::Section values evident.
The actual section members grew up to the internal value, leading to
interleaving of subsequently-added values.  Change existing enum
values to make this go away (class is private, so no BC constraint
forbids this).

Change-Id: If266b557817eae19d375519bf38268f0f2a0d372
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-02-02 16:28:40 +00:00
Edward Welbourne
2564de7b1e Deconfuse some heavy use of the preprocessor.
One #if...#endif started in one function's body and ended in
another's, which is worth remarking on in comments at both ends.

A later #if...#else... opened blocks in both halves, that were closed
just after their #endif, leading to simplistic brace-matching failure;
so move that closing brace to inside both halves, so each half is
brace-balanced and the function, as a whole, brace-balances simply.

Commented on each #endif that was distant from its #if.

Change-Id: I74d97b6dc4b291ec05053d299077a61cecf41ca1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-02 16:28:24 +00:00
Edward Welbourne
3d64f898d1 Correct usage of Apple-related #if-ery.
As requested by sanity-bot.

Change-Id: I8f6793a26f5cf600d4e6225ca219496cfbb25799
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-02 16:28:18 +00:00
Edward Welbourne
bb1924c345 Pass -silent to lrelease to avoid cruft in test logs.
Change-Id: I7cf2808187f97b6319f7561fe06ddef476fa9aa0
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-02-02 16:28:07 +00:00
Edward Welbourne
04def3a878 Don't clutter up the source tree with .qm files generated by testing.
Generate the qundo*.qm files for tst_QUndo*::commandTextFormat() in
the current directory (out of source, for a shadow build) rather than
alongside the qundo*.ts from which they're derived (in the source
tree); and remove them once loaded, if that succeeds.  (On failure, we
might even want to look at them.)

Task-number: QTBUG-49081
Change-Id: I666985fa3ceb8c25c917b617d6d39141eddebb76
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-02-02 16:27:55 +00:00
Dmitry Shachnev
f5ea4baa0d dbusmenu: Add support for shortcuts
To do that, split out and export a QKeySequencePrivate::keyName() function
that returns the key text representation without the modifiers.

The implementation is compatible with libdbusmenu-qt.

Change-Id: Ibc3190a3949813a1610728cf89574027e5d2778d
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-02 16:27:38 +00:00
Błażej Szczygieł
751e2ce44f Clean up tst_qwidgetwindow
Rename TestWidget to PaintTestWidget, because this class tests only
whether paint event occurs.

Remove unused variables.

Remove reset() method, because there is no need to reset only one
variable in class method.

Change-Id: I8f442c73598e3431baf2b0433fefc157d3f10ea6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-02-02 15:18:19 +00:00
Oswald Buddenhagen
615534f14c Merge 5.6 into 5.6.0
Change-Id: I95962e28b6fc101cbbad41230585e2b61f1f6c0f
2016-02-02 13:12:21 +01:00