Commit Graph

27304 Commits

Author SHA1 Message Date
Liang Qi
50d0f57b77 Merge remote-tracking branch 'origin/5.6' into 5.7
This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define
and undef in src/corelib/tools/qsimd_p.h.

This change is also squashed with "Fall back to c++11 standard
compiler flag for host builds" which is done by Peter Seiderer.

Conflicts:
	mkspecs/features/default_post.prf
	src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch
	src/3rdparty/sqlite/sqlite3.c
	src/corelib/tools/qsimd_p.h
	src/gui/kernel/qevent.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/gui/kernel/qwindowsysteminterface_p.h
	src/plugins/bearer/blackberry/blackberry.pro
	src/plugins/platforms/cocoa/qcocoasystemsettings.mm
	src/plugins/platformthemes/gtk2/gtk2.pro
	src/plugins/styles/bb10style/bb10style.pro
	src/sql/drivers/sqlite2/qsql_sqlite2.cpp
	tools/configure/configureapp.cpp

Task-number: QTBUG-51644
Done-with: Peter Seiderer <ps.report@gmx.net>
Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
2016-03-11 20:08:50 +01:00
Friedemann Kleint
45dc347a95 tst_QStaticText: Output verbose message for test failures.
Factor out function to check on the pixel color that
outputs a verbose message on failure.

Change-Id: I2331fe45f35327d1ff8ae547a58d93a2e6fe9184
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-03-10 12:37:47 +00:00
Marc Mutz
1fd0d57ce3 qmake: fix UB in QMakeParser::putHashStr()
Found by UBSan:

  qmake/library/qmakeparser.cpp:278:33: runtime error: null pointer passed as argument 2, which is declared to never be null

Guard the call.

Change-Id: I99341ab439a511f366dae9344ddcc8727c33b9b6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-10 12:30:46 +00:00
Oswald Buddenhagen
f3487308e4 fix file separators in target.targets INSTALLS
Task-number: QTBUG-51775
Change-Id: I8d9442bfd5084f1670b79dfdd422638bc62780aa
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-03-10 12:21:57 +00:00
Allan Sandfeld Jensen
5655d061b2 Xft antialias settings must not override requested NoAntialias
If Xft enabled font antialiasing, QFont::NoAntialias would have no
effect as it would be overridden.

Change-Id: I4dae264bc6674ae81f181cc9ce85851174d42544
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-10 12:11:26 +00:00
Eskil Abrahamsen Blomfeldt
713282dfe4 Deobfuscate SFNT tag creation on Windows
The fact that we override the big endian MAKE_TAG macro
(from qfontengine_p.h) with a little endian version on Windows
caused some confusion and was a bug waiting to happen. This patch
renames it instead to avoid future confusion.

Change-Id: I6224a4bfbd80eafc849ecd82e7fe5f83ee1953af
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-03-10 11:58:53 +00:00
Eskil Abrahamsen Blomfeldt
437f5662d3 Allow overriding Android NDK host on Windows
The -android-ndk-host argument to configure existed in the shell
script, but not in the Windows version. When using a 64-bit NDK
but a 32-bit host compiler (which is what we bundle with our
SDK), we would not detect the correct NDK host, making it impossible
to build Qt with this combo.

[ChangeLog][Android] Added -android-ndk-host configure option on
Windows.

Change-Id: Ie6a92b66e6875ed53f46fe41ecced70c3ec67585
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-10 11:57:39 +00:00
Marc Mutz
fb196e8807 QMimeMagicRule: fix UB (misaligned load) in matchNumber<T>()
Found by UBSan:

  qmimemagicrule.cpp:166:53: runtime error: load of misaligned address 0x00000124bcb9 for type 'const short unsigned int', which requires 2 byte alignment
  qmimemagicrule.cpp:166:53: runtime error: load of misaligned address 0x00000124bcb9 for type 'const unsigned int', which requires 4 byte alignment

Fix by using new qUnalignedLoad<T>() instead of a
load through a type-punned pointer and misaligned
pointer.

Change-Id: I6b876f1ce7e01369fbb25a51263d1ad04be07d52
Reviewed-by: David Faure <david.faure@kdab.com>
2016-03-10 10:57:53 +00:00
Friedemann Kleint
62e0a98282 Fix debug operators for QPageSize/QPageLayout.
Remove placeholder formatting and add noquote.

Change-Id: I4a89f88778caf007ce42bbf57edfb514fe76bcdb
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2016-03-10 10:53:51 +00:00
Marc Mutz
807240a883 QJsonParser: fix UB (misaligned store) in Parser::parseNumber()
Found by UBSan:

  qjsonparser.cpp:741:30: runtime error: store to misaligned address 0x0000019b1e94 for type 'quint64', which requires 8 byte alignment

Fix by using the qToLittleEndian() overload that can
store to misaligned memory.

Change-Id: Ib84bd30b13c68f7fdb8870c9fbbfac15cff0112d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-10 09:45:34 +00:00
Marc Mutz
f647375275 Fix signed integer overflows in tst_QAtomicInteger
Signed integer overflows and underflows are undefined
behavior. A test that invokes UB tests nothing, because
the standard permits any outcome.

Fix by guarding the respective operations so
they are not executed if they would overflow
or underflow.

Change-Id: I40354ee88f40e4b47b70eac7790dc3a79ac70a57
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-10 07:17:55 +00:00
Gabriel de Dietrich
85a57f7a2e Wheel event widget: Harden logic an extra bit
This is quite an unlikely scenario, but not impossible.

It could be that the wheel widget is destroyed during
an update phase event. In that case, wheel_widget would
be a dangling pointer for any subsequent wheel event.
We protect against this with a QPointer.

However, that would mean that if the next wheel event
were to be an end phase event, that event would be lost.
So we go through the usual code path, except that we won't
set wheel_widget in the case of an end phase event.

Change-Id: I59a912b845dcc249e1edc60b4dc28bf308d807d9
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-03-09 23:46:50 +00:00
Marc Mutz
2020d2cb63 QObject: fix GCC 6 warning about qt_static_metacall's 'hidden' attribute use
This warning is triggered when we try to apply the Q_DECL_HIDDEN
attribute to a class in an unnamed namespace. Such classes are
already not exported.

  qobjectdefs.h:175:108: warning: ‘visibility’ attribute ignored [-Wattributes]
  qobjectdefs.h:198:108: warning: ‘visibility’ attribute ignored [-Wattributes]

Added a test on gadgets (and QObjects) in unnamed namespaces,
because qtbase currently does not contain such Q_GADGETs.

Done-with: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Ic747cc2ab45e4dc6bb70ffff1438c747b05c5672
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-09 20:11:28 +00:00
Dyami Caliri
f8f1bac3f0 Accept LFCRLF to mark end of HTTP Headers
Some embedded servers use LF to mark the end of an individual header,
but use CRLF to mark the end of all the headers. The GoPro WiFi
interface does this, as an example.

Change-Id: I227ab73622c84f439a6cf8703d020393c4d8bf69
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2016-03-09 15:47:18 +00:00
Shawn Rutledge
d7db6c6c19 xcb: mark mouse events from tablet devices as synthesized
Task-number: QTBUG-51617
Change-Id: Ic1d258c56165947ff821b1bf4d044bcf29b41a3b
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-03-09 14:42:30 +00:00
Friedemann Kleint
d29443c9c8 Manual touch test: Remove QDebug operator for QTouchDevice.
It now exists in QtGui.

Task-number: QTBUG-48849
Change-Id: I9107c96e0010252bc50bcb02ef006cb46bd942df
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-03-09 14:26:04 +00:00
Volker Krause
ce7fa976aa Add device mkspec for NVIDIA Jetson TK1 development boards.
Despite the very similar name and hardware, the software stack is
completely different compared to the Jetson TK1 Pro we already have
a mkspec for.

Change-Id: I45353ece195035e961ff47df55d6361569aabb04
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-03-09 13:53:34 +00:00
Jarek Kobus
cb24903ef4 Generate QVariant::fromValue(enum_value) for enum values
Instead of just QVariant(enum_value).

Task-number: QTBUG-49383
Change-Id: Id57c65b68d4328816046bc35301dc6afba47b727
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-03-09 13:51:39 +00:00
Friedemann Kleint
7d374b7ba6 QString::vasprintf(): Use quintptr when casting pointer for %p.
Previously, the macro Q_OS_WIN64 was checked, causing warnings:

tools\qstring.cpp(6183): warning C4311: 'reinterpret_cast': pointer truncation from 'void *' to 'unsigned long'
tools\qstring.cpp(6183): warning C4302: 'reinterpret_cast': truncation from 'void *' to 'unsigned long'

when compiling WinRT/64bit, where it is not defined.

Change-Id: Ib9d8405108c85170aba18b13f9c64083136bc5ee
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-03-09 13:45:26 +00:00
Marc Mutz
62e89f4745 tst_QMetaType: fix misleading indention
As found by GCC 6:

  tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp:1476:9: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
         tn += ">";
         ^~
  tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp:1474:5: note: ...this ‘if’ clause, but it is not
     if (tn.endsWith('>'))
     ^~

Fix += argument from char[2] to char as a drive-by.

Change-Id: I814dc58830934cac7fcf81eb7fd7564b2abeb631
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-03-09 13:18:26 +00:00
Marc Mutz
3856099d9a QGestureManager: fix UB in filterEvent()
The code infers from the presence of an address in a
QHash<QGesture *, ...> that the address belongs to a
QGesture. So far that is fine enough.

But in order to perform the lookup, it static_cast<>s
the QObject* argument to a QGesture* for the QHash::
contains() call. Even though the pointer is not
dereferenced, the cast is UB. Says UBSan:

  qgesturemanager.cpp:558:73: runtime error: downcast of address 0x2ab83364f3a0 which does not point to an object of type 'QGesture'
  0x2ab83364f3a0: note: object is of type 'QDBusConnectionManager'

which is a particularly hideous error message because
of the constantly-changing completely-unrelated actual
type in the second line of the message:

     52 QDBusConnectionManager
     19 QSocketNotifier
     14 QFusionStyle
     13 QAction
      6 QApplication
      3 QGraphicsWidget
      1 Window
      1 TestRunnable
      1 RectWidget
      1 QTimer
      1 QSingleShotTimer
      1 QOffscreenSurface
      1 QGraphicsProxyWidget
      1 QDefaultAnimationDriver
      1 QDBusPendingCallWatcherHelper

This error is also _very_ common, triggered 116 times
in a single run of make -C tests/auto check.

Fix by using qobject_cast first and then doing the
lookup only when the cast succeeded.

Depending on the performance of qobject_cast<>, this
may actually perform better, too.

Change-Id: I884ec7d885711acc3c1d004ce93c628268d8fc18
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-09 13:18:19 +00:00
Marc Mutz
1bfc7f680f QString, QJson, QHash: Fix UBs involving unaligned loads
Found by UBSan:

  src/corelib/tools/qstring.cpp:587:42: runtime error: load of misaligned address 0x2acbf4b7551b for type 'const long long int', which requires 8 byte alignment
  src/corelib/json/qjson_p.h:405:30: runtime error: store to misaligned address 0x0000019b1e52 for type 'quint64', which requires 8 byte alignment
  src/corelib/tools/qhash.cpp:116:27: runtime error: load of misaligned address 0x2b8f9ce80e85 for type 'const qlonglong', which requires 8 byte alignment
  src/corelib/tools/qhash.cpp:133:26: runtime error: load of misaligned address 0x2b8f9ce80e8d for type 'const ushort', which requires 2 byte alignment

Fix by memcpy()ing into a local variable. Wrap this trick in
template functions in qsimd_p.h. These are marked as always-
inline and use __builtin_memcpy() where available in an
attempt to avoid the memcpy() function call overhead in debug
builds.

While this looks prohibitively expensive, from the pov of the
C++ abstract machine, it is 100% equivalent, except for the
absence of undefined behavior. In one case, the cast produces
a local temporary which is then copied into the function, and
in the other case, that local variable comes from return value
of qUnalignedLoad().

Consequently, GCC compiles these two versions into identical
assembler code (only verfied for ucstrncmp, but there's no
reason to believe that it wouldn't hold for the other cases,
too).

Task-number: QTBUG-51651
Change-Id: Ia50d4a1d7580b6f803e0895c9f3d89c7da37840c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2016-03-09 13:16:19 +00:00
Anton Kudryavtsev
9dcbffabbd CoreLib: replace Java-style iterators
... with STL-style iterators or with algorithms.
Java-style iterators have overhead.

Change-Id: Ibeace7357c205a39dff3ca3fc0c835a026a15cac
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-03-09 09:57:28 +00:00
Marc Mutz
1b441c3941 Q*Application: fix UB caused by accessing QGuiApplication from QCoreApplication ctor
As reported by ubsan:

  src/gui/kernel/qplatformintegration.cpp:463:10: runtime error: downcast of address 0x7ffdc2942490 which does not point to an object of type 'QGuiApplication'
  0x7ffdc2942490: note: object is of type 'QCoreApplication'

  src/gui/kernel/qplatformintegration.cpp:466:14: runtime error: downcast of address 0x7ffdc2942490 which does not point to an object of type 'QGuiApplication'
  0x7ffdc2942490: note: object is of type 'QCoreApplication'

  src/gui/kernel/qplatformintegration.cpp:466:43: runtime error: member call on address 0x7ffdc2942490 which does not point to an object of type 'QGuiApplication'
  0x7ffdc2942490: note: object is of type 'QCoreApplication'

to name just a few which are reported when running gui and widget
auto-tests; there're definitely more where these came from.

This is caused by QCoreApplication::init() being called from the
QCoreApplication ctor, calling virtual functions on Q*AppPrivate,
which happen to attempt, in this case, to emit QGuiApp signals.
At that point in time, the QGuiApplication ctor has not entered
the constructor body, ergo the object is still a QCoreApplication,
and calling the signal, as a member function on the derived class,
invokes UB.

Fix by cleaning up the wild mix of initialization functions used in
this hierarchy. The cleanup restores the

  1. Q*ApplicationPrivate::Q*ApplicationPrivate()
  2. Q*ApplicationPrivate::init(), calling each base class'
     init() as the first thing

two-stage construction pattern commonly used elsewhere in Qt to make
sure that the public class' object is fully constructed by the time
each level's Private::init() is called.

Change-Id: I290402b3232315d7ed687c97e740bfbdbd3ecd1a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-09 07:42:50 +00:00
Marc Mutz
fb7ef2b9f5 QCosmeticStroker: fix out-of-bounds access in drawPixel()
Found by UBSan:

  src/gui/painting/qcosmeticstroker.cpp:150:55: runtime error: index -1 out of bounds for type 'QT_FT_Span_ [255]'
  src/gui/painting/qcosmeticstroker.cpp:150:99: runtime error: index -1 out of bounds for type 'QT_FT_Span_ [255]'
  src/gui/painting/qcosmeticstroker.cpp:151:55: runtime error: index -1 out of bounds for type 'QT_FT_Span_ [255]'

That code path makes no sense if no span has been populated
yet, so skip the whole block if current_span == 0.

Change-Id: I832b989e89c118dc48ab5add3a28bb44c1936a76
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2016-03-09 05:41:41 +00:00
Peter Seiderer
e69e695196 Disable c++ standard compiler flags for the host build
There is no test for c++ standard support for the host build
(only for the target compiler/build) which leads to trouble
in some cross compiling environments (old host compiler, new
cross compiler):

  g++: error: unrecognized command line option ‘-std=c++1z’

So disable c++ standard compiler flags unconditionally for host builds.

Task-number: QTBUG-51644
Change-Id: Ifb3042e125fe199a7e081740d1171d26ccacf0c5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-08 19:30:04 +00:00
Erik Verbruggen
27a2a02559 iOS: Disable usage of crc32 intrinsics.
To quote http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160222/151168.html :

> AArch64: fix Cyclone CPU features list.
> It turns out we don't have CRC after all. Who knew?

So clang did define __ARM_FEATURE_CRC32, while the CPU didn't support
the crc32 instructions, resulting in EXC_BAD_INSTRUCTION.

Change-Id: I4b0123ac5e7fd04696c05bfe7dacce205cffac8f
Task-number: QTBUG-51168
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-03-08 17:55:14 +00:00
Erik Verbruggen
15ddb7f841 ARMv8: fix crc intrinsic usage.
ARMv8 defines the crc32 instructions as optional features. Even though
the target might be ARMv8, the compiler might have been told that the
target CPU doesn't support it, in which case __ARM_FEATURE_CRC32 is not
defined. Subsequently, the arm_acle.h header might only define the
intrinsics when __ARM_FEATURE_CRC32 is defined.

Change-Id: I85efcf9efdd2e152e3f3e72310122eebf543ca3b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-03-08 17:55:13 +00:00
Friedemann Kleint
4ef990ce4a tst_QKeyEvent: Fix MSVC warning about 64bit shift.
tst_qkeyevent.cpp(140): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)

Change-Id: Id3e0eea125f7f7ec13f9b9428e034b922d2ce204
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-03-08 14:57:14 +00:00
Friedemann Kleint
37cfcfb2b5 configure: Remove Windows CE.
The platform has been removed in Qt 5.7.

Task-number: QTBUG-51673
Change-Id: Id0b26e94bd8a673a35bfa5e02a5ba1c30891764a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-03-08 14:41:14 +00:00
Edward Welbourne
2d276b3ada Use booleans as booleans; don't compare == true to do so !
Change-Id: Ic900bf000cec52b3ebf0fd0fc61f42252f3200e6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-03-08 13:37:27 +00:00
Edward Welbourne
5834f5a509 Purge a verbose no-op.
An if with no side-effects in its test and an empty body is a no-op.
An else block with nothing but a no-op in it is a no-op.
A no-op without even pedagogic value is just a distraction.

Change-Id: I224831a325e6b770d0a99d726d96f73da4b8c11f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-03-08 13:34:03 +00:00
Edward Welbourne
b366530f58 Simplified repeated #if-ery and entangled conditionals.
Three checks of the same #if managed to save repetition of (if I felt
charitable) three shared lines, compared to combining the three into
one, which leaves the code easier to read (and obviates the need for
one of the "shared" lines).  Split a long line while moving it.

Change-Id: I762d10ae1df1224c749206b8eb490bafd7ea4900
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-03-08 15:50:07 +00:00
Edward Welbourne
2027c0b926 Duplicate trivial code for clarity on early return.
Having a variable in which to store a function's return in two
branches of a switch in order to return if either was true saved
little relative to just testing the function in each case and
returning in situ, which reads more clearly.

Change-Id: Ibd95a95721eaa6fc4861b10e723038b96caf269a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-03-08 13:25:54 +00:00
BogDan Vatra
99aca2c0a9 Make API-16 the default one
Change-Id: I5874117b897c6a1c144b8e2c5d40312a47fe2713
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-08 10:35:46 +00:00
Lars Knoll
d0b54cede8 Ensure QTextStream doesn't modify the Text flag on the underlying iodevice
An empty read or a failed write on the underlying QIODevice of the text
stream would lead to an early return where we wouldn't correctly restore
the QIODevice::Text flag of the io device.

Change-Id: I5b632f45dea6ede3f408113556c3dad1b96574e2
Task-number: QTBUG-47176
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-03-08 08:59:19 +00:00
Friedemann Kleint
f2bd0d1192 Clean up WINVER, _WIN32_WINNT macros for MinGW.
Define WINVER, _WIN32_WINNT as 0x501 (Windows XP) in qt_windows.h.
Remove definitions of the same/lower versions and unneeded
definitions in other places. Remove definition for Borland compiler.

Task-number: QTBUG-51673
Change-Id: I2a344a7f7cf78b2afbf45dcdf8bf2a19b93f0a07
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-07 18:56:09 +00:00
Marc Mutz
bc087db590 QtTest: fix UB in QSpontaneKeyEvent::setSpontaneous()
Found by UBSan:

  src/testlib/qtestspontaneevent.h:95:38: runtime error: member call on address 0x7ffc33019650 which does not point to an object of type 'QSpontaneKeyEvent' 0x7ffc33019650: note: object is of type 'QMouseEvent'
  83 2b 00 00  98 e8 fa 8e 83 2b 00 00  00 00 00 00 00 00 00 00  02 00 04 00 00 00 00 00  00 00 00 00
               ^~~~~~~~~~~~~~~~~~~~~~~
               vptr for 'QMouseEvent'

  src/testlib/qtestspontaneevent.h:95:38: runtime error: member call on address 0x7ffc330196e0 which does not point to an object of type 'QSpontaneKeyEvent' 0x7ffc330196e0: note: object is of type 'QKeyEvent'
  00 00 00 00  f8 e8 fa 8e 83 2b 00 00  00 00 00 00 00 00 00 00  07 00 04 00 00 00 00 00  00 00 00 00
               ^~~~~~~~~~~~~~~~~~~~~~~
               vptr for 'QKeyEvent'

Fix by providing setSpontaneous() on QEvent as a private function and
befriending QSpontaneKeyEvent. Make setSpontaneous() always-inline to
avoid BiC between 5.6.0 and 5.6.1.

Change-Id: Ic60d82ed6a858f4f13f41fa3d2d1db6e808896b7
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-07 16:13:33 +00:00
Oswald Buddenhagen
f93032848e Merge remote-tracking branch 'origin/5.6.0' into 5.7
Change-Id: Idcda6d52266f557ce4a819b6669f6797473a48a2
2016-03-07 17:08:56 +01:00
Dmitry Shachnev
b8f98d9565 alsatest: Fix the check to treat alsalib 1.1.x as correct version
Task-number: QTBUG-51681
Change-Id: I63266c33342f02f4d1a5ea5786f5fbc5a1b421b3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-07 14:37:29 +00:00
Kai Koehne
bceb1b260c Remove WebEngine examples metadata
This is now maintained in qtwebengine module.

Change-Id: Id468be297dfd0a28920fb92d4ba793ff3d3ceab2
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-03-07 14:24:57 +00:00
Kai Koehne
5e800fb414 QNX: Fix logging of QtDebugMsg in slog2 backend
With the introduction of QtInfoMsg in commit ef6279fd we also changed
the mapping of Qt to slog2 levels: QtInfoMsg now ends up as SLOG2_DEBUG1,
instead of SLOG2_INFO. Anyhow, we didn't change the default buffer
verbosity level accordingly.

Task-number: QTBUG-51378
Change-Id: Ia464f9e5a31e19413902e877d4f2be0ba6d340db
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Janne Koskinen <janne.p.koskinen@theqtcompany.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2016-03-07 14:24:02 +00:00
Oswald Buddenhagen
7c200b6dab standardize statement order in project file a bit
Change-Id: I9fa42d9afa726f52390a2b01637e6f4e9b2fb537
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-03-07 14:09:58 +00:00
Oswald Buddenhagen
cadfae0f9d fix mir platform plugin name
all platform plugins are supposed to start with a q.

Change-Id: I4871cc553995aa68a09f8f045bdd378f5022cd87
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
2016-03-07 14:09:55 +00:00
Oswald Buddenhagen
fab4ac60c9 remove redundant TEMPLATE assignment
qt_plugin.prf does that already.

Change-Id: Ia0329c3b508c86c2b71782a4e9744cfda528559a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-03-07 14:09:52 +00:00
Oswald Buddenhagen
a28364bc1c consistently put {qt,qml}_{module,plugin} at the end of project files
this fixes static builds by ensuring that all dependencies are exported.

Task-number: QTBUG-51071
Change-Id: Icbce502dcbcb4d4b4d922c42679f44e2cc930bf3
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-03-07 14:09:49 +00:00
Oswald Buddenhagen
27c87e31dd Revert "Don't add qmutex_xxx.cpp to SOURCES, as qmutex.cpp #include's them"
This reverts commit 40cbf1927b -
the qmake parser bug this worked around has been fixed.

As a side effect, the platform conditionals were simplified.

Change-Id: Ibfc1253e3c2252ab954c725a9effd6e719cb691c
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-03-07 14:09:45 +00:00
Oswald Buddenhagen
a51085fc68 export private module's deps as run deps of the public module
this is necessary for:
- generating -rpath-link arguments when link_prl is not used. link_prl
  is enabled by default, so this has no effect on most projects.
- deployment purposes, which is hypothetical as of now.

Change-Id: I9e629f3eef93c4edf12efc016ecc27dbe2186d61
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-03-07 14:09:41 +00:00
Konstantin Ritt
248488c894 QCoreTextFontDatabase: Get rid of local fallbacksForFamily cache
The centralized one (in QFontDatabase) does the job.

Change-Id: I33def7a7bcddeaa62b904d8812321a7f4648a9d0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-07 14:05:12 +00:00
Konstantin Ritt
229c519785 Increase chances of finding the ellipsis glyph in elided text
The glyph for the ellipsis could be absent in the main font, so we should
try to find it in a fallback font; otherwise fall back to "...".

Change-Id: Ic53060ed42f3c800aba055d2be2a1c7c3cfeec64
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-07 14:05:04 +00:00