Commit Graph

30094 Commits

Author SHA1 Message Date
Thiago Macieira
8796c69480 QNetworkSession: make sure that "interface" isn't #defined
Depending on #include order isn't a good idea.

Change-Id: Ief935e1fcc5d40ecb510fffd147c08dffe6cba2d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-10-13 11:25:41 +00:00
Thiago Macieira
b9a32351c8 findclasslist.pl: namespaces can be exported too
You can place the export macros in the namespace declarations on ELF
systems and that will apply to all declarations inside that scope. If a
namespace is exported like that, then we should mark it for versioning
too.

Note that the exporting doesn't happen for declarations in other scopes
of the same namespace, even though the findclasslist.pl script will mark
everything in that namespace. This should not be a problem.

Task-number: QTBUG-55897
Change-Id: I371f5b01e24a4d56b304fffd147274778b980ad2
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-10-13 08:29:02 +00:00
Alexander Volkov
ef416e0faa QIconLoaderEngine: add missing Q_DECL_OVERRIDEs
Change-Id: I7671b05f2e3c218870dca04f3ed52c231dbe4a9d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-10-12 20:54:16 +00:00
Allan Sandfeld Jensen
f3ce959de6 Fix illegal memory access on simple image rotates
Clip the transformed and rounded sourceClip to the source rectangle,
so we don't try to rotate pixels outside the source.

Task-number: QTBUG-56252
Change-Id: Ib9cb80f9856724118867aea37ead0b02a6c71495
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-10-12 18:02:30 +00:00
Alexander Volkov
e732e432ab Remove unused static member QIconLoaderEngineEntry::count
It was introduced in Qt 4 by the commit
13a31fe82845f8b1f4d86919080d3b2a87c4d061 and was unused
even there.

Change-Id: I5f3861918ea1f443f7e13439fafa067f2b28a91a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-10-12 18:00:16 +00:00
BogDan Vatra
1d6eb70dce Android: Allow the user to hook into the onCreate methods
onCreate methods are very important when you want to add some java code
before the Qt application is loaded. Because onCreate must call
"super.onCreate(..)" it is impossible for the user to do anything before
Qt is loaded. By using the onCreateHooks to load Qt, the user can
decided, by overriding the onCreateHook method, when or if Qt is loaded.

Change-Id: I15a3dd60b8ae7d314c53ace99faedfbd47d25502
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
2016-10-12 11:47:32 +00:00
BogDan Vatra
cc62c30022 Android: Ministro updates
- bump minimum required Qt version
 - use market://details instead which opens Ministro's page directly

Change-Id: I3d879503625fe29e7b23149402217337fee6a863
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-10-12 11:19:45 +00:00
Christian Strømme
dde86ebb9b Android: Don't update offscreen windows
Offscreen windows should not be handle by the platform plugin.

Task-number: QTBUG-50973
Change-Id: I719a24b9bbcaad460d78fdc4095e86d615357cd2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-10-12 10:19:25 +00:00
Christian Strømme
f12006e644 Don't resize windows that aren't attached to a platform window
QWindows that aren't created, and therefore don't have a platform window
attached, should not be treated as "normal" windows. The expectation,
in our code, is that these windows won't get their geometry updated by
the platform plugin, and that the geometry is only changed by the owner.
In QQuickWidget's case this was causing the scene to be rendered
incorrectly.

Task-number: QTBUG-50973
Change-Id: Iea62dfb7fa90cbe450a662c5792c7c4f49c991fd
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-10-12 10:19:21 +00:00
Edward Welbourne
f4fff02cbb QXcbShmImage: don't use shmget()'s return unless it succeeds
When shmget() failed, we didn't set m_shm_info.shmid (not even to the
-1 failure id) but did pass it (i.e. uninitialized noise) to shmat(),
among other related functions.  Guard against this; handle failure
gracefully.

Task-number: QTBUG-56419
Change-Id: Ie823c36c2ede03af6cb5d94ce7b4b5cd543c1008
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-10-12 09:33:05 +00:00
Oswald Buddenhagen
14a5086bd3 de-duplicate freetype configure entry
note that the feature is kept private (unlike in the introduced
duplicate), as there shouldn't be a need to query this internal variable
(that's actually debatable, but this discussion applies to several other
features as well).

Change-Id: I05c52a8becd5151f7e9e378f0c49499223916053
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-12 09:29:04 +00:00
Oswald Buddenhagen
65d5bfc63d fix referencing libs fields dispatched to the selected source
the field was "over-expanded", which led to always querying the
non-existing source with an empty name. this broke the handcrafted
openssl library export which uses the feature.

amends c0cc50520.

Task-number: QTBUG-55530
Change-Id: Id019fcb3e7adcecaf47d7a65820179da1617c0f7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-10-12 09:28:47 +00:00
Marc Mutz
de48fd192b QToolBarAreaLayoutInfo: add missing break statements in switch in distance()
A fall-through here is logically non-sensical, because of symmetry (or
lack thereof). Thus, a break must have been intended.

Add it.

While we're at it, also replace the default case label with the
non-functional enum value QInternal::DockCount, so that -Wswitch can
warn us if ever there should be a new DockPosition.

Found independently by both GCC 7 and Coverity.

Coverity-Id: 11145
Coverity-Id: 11146
Coverity-Id: 11147
Change-Id: I6bb31c1517e40f0cb06ceaee5aeb6fa78b84a523
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-10-12 09:08:38 +00:00
Harald Meyer
05fd7f8d90 winrt: tcpsocket: Update bytesAvailable when new data is read
Instead of calculating the bytesAvailable in place, the value should
be stored and only retrieved in the function itself. Otherwise it is
possible that bytesAvailable is called between the data having been
read and readyRead is emitted. In this case it's possible, that the
client reads all the data before the signal is emitted. Triggering
readyRead without any data being available will stop the socket.

Task-number: QTBUG-44357
Change-Id: I81d6ab094c5fdd71f30b9ceba9d790153cc92439
Reviewed-by: Harald Meyer <dev@meh.at>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-10-12 09:03:02 +00:00
Oliver Wolff
19cbe171c2 winrt: Added 2013 scheme to Windows Phone 8.1 AppxManifest template
This scheme is needed to define Bluetooth (LE) capabilities on Windows
Phone 8.1. Setting these capabilities is a bit more involved than what
we currently support from qmake (see
https://msdn.microsoft.com/library/windows/apps/dn263090.aspx) but this
way we at least prepare the template for these steps.

On Windows 10 the bluetooth capabilities are set automatically similar
to the way it happens for other modules.

Change-Id: Ib3aa88802c3b421c9c3d02ec4db647cde2191f16
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-10-12 09:03:01 +00:00
Oliver Wolff
fc35f94964 winrt: Rework handling of udp datagrams
We may only emit the readReady signal once for every event loop
iteration. The previous implementation lead to the situation that the
socket engine stopped reading socket data when bursts of data was
received. In this case several readReady signals were fired. The socket
engine obtained the pending datagrams (not only the first one) and for
the following readReady signal no datagram was present. In this case the
socket engine stops reading and the engine stalls.

The new approach emits the readyRead signal at the most once every event
loop iteration. The list of new pending datagrams is queued to be added
to the "real" pending datagram list at the same time as the readyRead
signal. Thereby we avoid the situation that a client can read all the
datagrams before readyRead is emitted.

One more advantage of having the worker handle the pending datagrams
is that we no longer have to access the socket engine's members inside
the callback. Thus we avoid the situation, where a late callback can
make the application crash when the socket engine has already been
deleted.

Task-number: QTBUG-53472
Task-number: QTBUG-53471
Task-number: QTBUG-55895
Change-Id: Ia6d21cb635a40e7bd9e0213bb3a5c54ebc1220eb
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-10-12 09:02:59 +00:00
Allan Sandfeld Jensen
00304a3d57 Blacklist tst_MacNativeEvents::testMouseEnter
It is already blacklisted for 10.8 and 10.9, and is now failing on 10.11
blocking integration.

Change-Id: I71b8119ab32ec64096bfc53d5e521714ad4ae11b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-12 08:17:16 +00:00
Marc Mutz
77372e0b66 harfbuzz: compile with GCC 7
GCC 7 warns about implicit fall-throughs now.

Fix by adding the missing comment.

Didn't send a patch to upstream, because upstream harfbuzz-old hasn't
seen a commit in four years, and this code is no longer in harfbuzz-ng.

Change-Id: Ic97efbe01edd37738dcdf43528e82511197d7fb2
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-10-12 08:16:56 +00:00
Marc Mutz
0c8b5b9a04 QtOpenGl: compile with GCC 7
GCC 7 warns about implicit fall-throughs now.

Fix by adding the missing comments.

Change-Id: I081d4db07c7f2b30ee6344a166aaec34ac639ee5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2016-10-12 08:16:52 +00:00
Marc Mutz
eade394e99 QtDBus: compile with GCC 7
GCC 7 warns about implicit fall-throughs now.

Fix by adding the missing comments.

Change-Id: I629fb3aced9296c81496f19f6ff78c7a5a12e991
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-12 08:16:49 +00:00
Marc Mutz
afe5bcdbd1 tst_QWidget: Fix UB (invalid member access) in EnterTestMainDialog::eventFilter()
Found by UBSan:

  tst_qwidget.cpp:10207:29: runtime error: member access within address 0x6060000e8880 which does not point to an object of type 'EnterTestModalDialog'
  0x6060000e8880: note: object is of type 'QWidget'
   eb 00 80 45  10 4b 32 ab 11 2b 00 00  80 df 08 00 60 61 00 00  c0 4c 32 ab 11 2b 00 00  00 00 be be
                ^~~~~~~~~~~~~~~~~~~~~~~
                vptr for 'QWidget'
     0x6ca13f in EnterTestMainDialog::eventFilter(QObject*, QEvent*) tst_qwidget.cpp:10207
     0x2b11b8bc90c3 in QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*) qcoreapplication.cpp:1081
     0x2b11a3c49b4a in QApplicationPrivate::notify_helper(QObject*, QEvent*) qapplication.cpp:3716
     0x2b11a3c8ec72 in QApplication::notify(QObject*, QEvent*) qapplication.cpp:3704
     0x2b11b8bccd0f in QCoreApplication::notifyInternal2(QObject*, QEvent*) qcoreapplication.cpp:988
     0x2b11aea5c34d in QCoreApplication::sendEvent(QObject*, QEvent*) qcoreapplication.h:231
     0x2b11aea5c34d in QGuiApplicationPrivate::_q_updateFocusObject(QObject*) qguiapplication.cpp:3690
     0x2b11aea61360 in QGuiApplication::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) .moc/moc_qguiapplication.cpp:177
     0x2b11b8d1dc86 in QMetaObject::activate(QObject*, int, int, void**) qobject.cpp:3787
     0x2b11aea784a3 in QWindow::focusObjectChanged(QObject*) .moc/moc_qwindow.cpp:760
     0x2b11a3fb24f2 in QWidget::clearFocus() qwidget.cpp:6705
     0x2b11a3fc87b1 in QWidget::~QWidget() qwidget.cpp:1608
     0x2b11a526688c in QDialog::~QDialog() qdialog.cpp:352
     0x6c43e2 in EnterTestModalDialog::~EnterTestModalDialog() tst_qwidget.cpp:10160
     0x6c43e2 in EnterTestModalDialog::~EnterTestModalDialog() tst_qwidget.cpp:10160
     0x492be3 in EnterTestMainDialog::buttonPressed() tst_qwidget.cpp:10188
     0x492be3 in EnterTestMainDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) .moc/tst_qwidget.moc:2056
     0x2b11b8d1dc86 in QMetaObject::activate(QObject*, int, int, void**) qobject.cpp:3787
     0x2b11a45cb833 in QAbstractButton::clicked(bool) .moc/moc_qabstractbutton.cpp:307
     0x2b11a45cd54b in QAbstractButtonPrivate::emitClicked() qabstractbutton.cpp:411
     0x2b11a45df73a in QAbstractButtonPrivate::click() qabstractbutton.cpp:404
    [...]
     0x6bb2cf in tst_QWidget::taskQTBUG_27643_enterEvents() tst_qwidget.cpp:10249
    [...]

Fix by checking the event type first, and accessing
modal->button only if it's QEvent::Enter.

Change-Id: I2c7df3a1f43ecbfe14741b5861729078a91a32d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-10-12 08:16:45 +00:00
Marc Mutz
c34c8a564e QComboBox: add missing break in switch in keyPressEvent()
If the Key_Space case falls through, it does because !d->lineEdit,
which makes the following case dead code, because it is guarded by the
same condition.

Fix by adding the break, which ensures that if those two cases ever
diverge, the code stays working by intention, not chance.

Independently discovered by GCC 7 and Coverity.

Coverity-Id: 11157
Change-Id: Id14114b4157549d0f6fa036e8aa2bf0fa5a863cf
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-10-12 08:16:41 +00:00
Marc Mutz
1ab521e7f4 QFusionStyle: add missing break in switch in drawControl()
The old code fell through into from the CE_RubberBand case into the
CE_SizeGrip case if the cast of the the QStyleOption to a
QStyleOptionRubberBand failed.

Quite obviously, the drawing of a rubber band was requested by the
caller, drawing a size grip instead must be considered a bug,
regardless of any additional guards employed by the size grip case.

So, fix by removing the conditional return in the success case and
adding an unconditional break.  The function ends after the switch,
and all other cases also break instead of return, so consider the
switch from return to break a contribution to the internal consistency
of the function.

Discovered independently by GCC 7 and Coverity.

Coverity-Id: 11182
Change-Id: I2158f03b9eb018b952716ffa5e615c7b3cc49132
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-10-12 08:16:38 +00:00
Marc Mutz
2ecd95bbe9 QCalendarWidget: fix misleading if-else cascade in QCalendarDayValidator::text()
By the time we hit the last else, its if condition is trivially
true, so don't check it (but leave it as a comment).

Consequently, remove the trailing (dead) return of a default-
constructed QString.

Coverity-Id: 62766
Change-Id: I47e1a49f40e6ec95d29c5052c78bfadb63af3b84
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-10-12 08:16:34 +00:00
Marc Mutz
eec2d5e68a QCalendarWidget: fix a missing break statement
GCC 7 warns about implicit fall-throughs, and here it looks
like a break was indeed missing. It surely isn't catastrophic
that the other update code is executed, too, but it's also
useless.

Turns out Coverity knew it all along...

Coverity-Id: 11162
Change-Id: I88fc0174a66ec337b2d93c006e70be8d5f3bbc33
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-10-12 08:16:31 +00:00
Marc Mutz
dafa7cc7b5 QFileDialog: add missing break statements in switch in labelText()
It is of course wrong to potentially return the text of the Cancel
button if the text of the Accept role button was asked for.

Found independently by GCC 7 and Coverity.

Coverity-Id: 11150
Change-Id: Ie30f7875daee16a78eeff4b314ce17cbd7cd3aa8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-10-12 08:16:28 +00:00
Allan Sandfeld Jensen
9ad4157530 Fix gradient race condition / read-after-free
A gradient table may be deallocated while in use because we don't keep
track of references. To fix it we now reference count the cache entries.

Task-number: QTBUG-14614
Change-Id: I772ebf565ccf41d476811ca9a51b721f10de8aeb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-10-12 08:16:24 +00:00
Marc Mutz
f6498fd677 Plug more than 4k leaks in tst_QGraphicsView
The vast majority is due to leaking styles in a data-driven
test with almost 100 rows (scrollBarRanges()).

Fix by creating the style into a QScopedPointer.

The remaining ~500 leaks were due to leaked QGraphicsScenes.
They had no parent, and QGraphicsView::addScene() does not
adopt them.

Fix those by passing the resp. view as their (QObject) parent.

Change-Id: I4316798019114ea3d7504d72cd83d534a21149c0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2016-10-11 20:52:42 +00:00
Lars Knoll
93b78e7c61 Fix build with various features disabled
Change-Id: I95cb3cf3434306344af3f4c7556f45dbfa0b08d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 14:20:34 +00:00
Lars Knoll
369857d294 Add configure feature for QUrl::topLevelDomain
Change-Id: I237af8c60a9572c707e7004c9a284dd6cd3306ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 14:20:27 +00:00
Lars Knoll
5574a814ff Add configure feature for QCommandLineParser
Change-Id: I78c1159d29e12ad03b9a3c076a40ee533958af8a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 14:20:24 +00:00
Lars Knoll
93178d26f8 Add configure feature for time zone support
Change-Id: I6ea02dab33e67e7f312a62d94d82eaf1fbe9d9bc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 14:20:19 +00:00
Liang Qi
e166d7d135 Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-10-11 14:14:31 +00:00
Laszlo Agocs
182f4877bf eglfs: Add Virtual and DSI connector types for DRM
For example, VMWare's vmgfx exposes a Virtual connector. Recognize this
properly instead of falling back to UNKNOWN.

Change-Id: Iee4f980ca0dfbbf3433fea1515fab27392250093
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-10-11 11:16:47 +00:00
Maurice Kalinowski
c01d989a0c winrt: Enable usage of static manifest files
Previously, manifest files always got processed to perform, e.g., variable
expansion.
This change introduces the 'verbatim' flag for WINRT_MANIFEST.CONFIG to
disable those steps and perform a simple copy of the source manifest.

Task-number: QTBUG-43468
Change-Id: Ie7d4d27376efb3bcf5bc38163496f0a1f1319742
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 11:14:57 +00:00
Friedemann Kleint
dd7bf4b4c1 Direct2D platform plugin: Fix developer build with MSVC2015
Fix error:
qwindowsdirect2dbitmap.cpp(84): error C2220: warning treated as error - no 'object' file generated
qwindowsdirect2dbitmap.cpp(84): warning C4838: conversion from 'int' to 'UINT32' requires a narrowing conversion

Change-Id: I191f3300cd22715001eebc113b672ceac49c825d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-10-11 11:13:39 +00:00
Kai Koehne
4e13abb9eb Doc: Mention context menu related API in QWidget overview
Change-Id: I357e3468694cc7e2af2f5e8d6dd28c16d2772192
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-10-11 08:01:15 +00:00
Allan Sandfeld Jensen
5d691922d8 Fix crash in QPainter benchmark test
Adds missing image-formats so it doesn't segfault.

Also changes the exclusion of rare formats to lists of included ones

Change-Id: I1d00562cf8e96baa03121a0b996764224911e06a
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-10-11 07:38:43 +00:00
Allan Sandfeld Jensen
a6dc284869 Avoid auto-vectorization of epilogues of manual vectorization
Defines a structure that tells the compiler in no uncertain terms the
maximum number of times a loop can be run.

The reduces the size of qdrawhelper_avx2.o from 22kbytes to 11kbytes.

Change-Id: Ie3d6281b04b4be3332497c15f3dfe9f185e20507
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-11 07:38:29 +00:00
Marc Mutz
17ac3b2c14 QColor: unbreak mingw build
The usual: inline functions not declared inline, but defined as such
give mingw errors:

  qcolor.h:280:8: error: 'QColor::QColor(QLatin1String)' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]

Fix by declaring the functions inline, not only at the definition.

Task-number: QTBUG-56459
Change-Id: I3f05e5e3597f6aa0ed318c7e7a11afdefc4c1d2f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-10-11 06:20:49 +00:00
Oswald Buddenhagen
5c652cb6aa unbreak direct2d test
amends c0cc5052.

Change-Id: Icdf157d0711d9de85b108ab2ff1da0e1fc2e4a9d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-11 06:09:44 +00:00
Lars Knoll
dee8b4d6b1 Save 100k by not using bloated sha3 code
Probably makes sha3 calculations somewhat slower.

Change-Id: Ie082c163b91d4e2282ad68b810e56b2437a1eb8a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-11 06:05:13 +00:00
Lars Knoll
8d330f55ba Fix build with statemachine feature disabled
The sources of the state machine are excluded completely at the build
system level instead of littering them with #ifs.

All remaining usages of QT_NO_STATEMACHINE are converted to
QT_CONFIG(statemachine) or a QT_REQUIRE_CONFIG(statemachine).

Also make the qeventtransition feature dependent on statemachine.

Change-Id: Ib05c7ca263a02042523fff8f794fa87342df1069
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-11 06:05:09 +00:00
Lars Knoll
267dd9133d Clean up building of bootstrap lib and tools
Add a qconfig-bootstrap.h, which contains all the defines required
to build the bootstrapped tools. This will be required anyway when
moving more code over to use QT_CONFIG(foo) instead of QT_NO_FOO.

Change-Id: I783d0aa0100b9190fe2d422bee4a95b05720aebe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-11 06:04:54 +00:00
Liang Qi
905329200f Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/gui/image/qpixmap.cpp
	src/widgets/kernel/qformlayout.cpp

Change-Id: I8a8391a202adf7f18464a22ddf0a6c4974eab692
2016-10-11 07:40:32 +02:00
Jørn Bersvendsen
91cde06296 Extracted cleanup from QCoreApplication::exec() into separate function
Not all Qt integration points can call QCoreApplication::exec(), in
particular, ActiveQt. When an ActiveQt server is loaded, it tries to
mimic the behavior of calling QCoreApplication::exec() by setting
QCoreApplicationPrivate::in_exec = true. However, when unloading the
DLL it is necessary to call the same clean-up (e.g. deferred delete)
that QCoreApplication::exec() does. Extracting the cleanup in a separate
function means implementation does not have to be duplicated.

Task-number: QTBUG-56172
Change-Id: I061f1c06f38881032ad7044416c12c91e536478a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-10 17:44:56 +00:00
Marc Mutz
7eddca359d Q_FALLTHROUGH: use GCC extensions in non-C++17-code
GCC defines the [[gnu::fallthrough]] attribute for C++11 and C++14
code, as well as __attribute__((fallthrough)) for C++98 and C code.

Use them.

Change-Id: I66aa178c2a96e2ff9ac3f6f02821c978b4ec3696
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2016-10-10 17:17:54 +00:00
Marc Mutz
6d6074e04f Plug leaks in tst_QXmlSimpleReader
The QXmlInputSource objects were allocated on the heap,
but never deleted.

Fix by allocating them on the stack instead.

Change-Id: Ifd8bd41d778c0634b7a426bbd22a367dfce511c9
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-10-10 17:17:28 +00:00
Marc Mutz
940ea856f0 QtSql: compile with GCC 7
GCC 7 warns about implicit fall-throughs now.

Fix by adding the missing comments.

Change-Id: I7383f47e690b6334ef69c9df745c2205247ca7d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2016-10-10 17:17:22 +00:00
Allan Sandfeld Jensen
8356caea45 Fix QPixelFormat::typeInterpretation() for Format_RGB888
RGB888 is byte oriented like the RGBA8888 formats.

Task-number: QTBUG-56250
Change-Id: Idbd496e4913e5d168decdd41557e28a71574a85b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-10-10 17:17:10 +00:00