Commit Graph

31473 Commits

Author SHA1 Message Date
Paul Olav Tvete
1327526d8e Remove duplicated feature definition
The "spinbox" feature was defined twice, and in two different ways.

Change-Id: Iabc8939036e2166c5c5a417181ae8fb244829123
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-26 13:52:16 +00:00
Paul Olav Tvete
0d3b3534ee Fix build with -no-feature-lineedit
Change-Id: I171aed5d134db88f211da0e1a6ce236e32f3c35c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-26 13:52:00 +00:00
Paul Olav Tvete
798ed169d8 Fix printsupport dependencies
This makes -no-feature-printer and -no-feature-combobox work.

Change-Id: I1097ab0a81f1c92b808c3e36ced0db9117db559a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-26 13:51:54 +00:00
Eskil Abrahamsen Blomfeldt
8d752b5151 Accept all formatting characters as valid input
Amends 7896ae052a. The previous change
focused only on ZWJ and ZWNJ, but there are many other formatting characters
that we need to support and that may be rejected by the German keyboard-hack.
This opens up for all characters in the Other_Format category.

Task-number: QTBUG-58364
Change-Id: Idd967a9ae5b12060c851f6030b7e019508561696
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-26 10:59:49 +00:00
Topi Reinio
a85ed40004 Doc: Documentation template: Bump copyright year
Change-Id: Ic2dfce35f9bfabc94b170f3dfaa3172630918330
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-01-26 10:56:34 +00:00
Friedemann Kleint
b6967d0c11 XCB QPA: Fix QScreen::grabWindow(0) to return the current screen
Previously, the code queried the window to be grabbed for the geometry
and thus returned the entire virtual desktop for multi screen setups.

Use the QPlatformScreen's geometry in case of WID = 0.

Task-number: QTBUG-58110
Change-Id: I3a9c0b0b3ea057f5e58f272f5c3fd40fafc073ba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-01-26 10:36:38 +00:00
Marc Mutz
9ba16336c5 QGuiApplication: fix misleading code
The comment says "don't send event if nothing changed", but the
condition it is attached to reads if (velocityOnly), which is
totally opaque.

Change the variable name to stationaryTouchPointChangedVelocity
and drop the then-branch of the if, because it is duplicated in
the following default case of the switch.

The comment makes sense again, and GCC 7 is happy, too, because
this whole issue was pointed out by its -Wimplicit-fallthrough,
which is why I added the fall-through attribute, too.

Change-Id: I0631a381095f8897c55d9440304f6aefbc021a9a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2017-01-26 10:33:51 +00:00
Marc Mutz
940d667eb4 Plug leaks in tests/auto/dbus
In tst_QDBusMetaObject::types(), hold a QMetaObject obtained from
QDBusMetaObject::createMetaObject() in a QScopedPointer instead of
leaking it. Use correct return value type.

This fixes the remaining errors in GCC 6.1 Linux ASan runs of
tests/auto/dbus.

Change-Id: I1df7f8e42d45f40ecf381fe7b684a8ab5ebee675
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-26 10:33:28 +00:00
Marc Mutz
e15cb86b3b Plug remaining memleaks in tests/auto/widgets/itemviews
... on Linux AMD64 builds.

Pass QObject parents to QObjects otherwise leaked.

Change-Id: Ia4f0ad2fdc4ef62a3d35a2cfca74965f79692da3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-01-26 10:32:51 +00:00
Marc Mutz
e4b19bfb94 Plug memleaks in tst_QHeaderView
The char* returned from QTest::toString() calls must be manually
delete[]ed.

Change-Id: Iad078e8741e3e97693b1a417693f414b3fb3ec09
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-01-26 10:32:45 +00:00
Marc Mutz
7e6e920633 Plug memleaks in tst_QTreeView
Forgot to delete QAIMs without parent.

Change-Id: I9c914e841123ee250fb977c45a84870463288d9b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-01-26 10:32:35 +00:00
Marc Mutz
9064d0b8a8 tst_QTreeWidget: plug memleaks
Taken QTreeWidgetItems need to be deleted, as do items
created without a parent, and widgets without parent.

Change-Id: I7ffa69903af9a1b92ba308f9f9416aec1d6d975f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-01-26 10:32:30 +00:00
Marc Mutz
1f814caca3 Plug memleaks in tst_QAbstractItemView
Styles need to be deleted manually...

Change-Id: Ic4193d22a57801127e994062cade7cb9ef6f34d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-01-26 10:31:46 +00:00
Marc Mutz
a9603a4088 tst_qgraphicsview: use new QTest::addRow() more
... for calculated test data names.

That involved removing the leading ", " from test name literals
(folding it into the format string) and porting from some QString code
to QByteArray to make the result usable with addRow(), which does not
support %ls...

Change-Id: Icb2344778203f10939ae46b9e46872101f3878a9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-01-26 10:31:36 +00:00
Timur Pocheptsov
e0b55e8b1c Make our redirect policies STS-aware
This patch changes the way we ensure NoLessSafeRedirectsPolicy and
also the way we create actual redirect requests: https->http redirect
is now reported as InsecureRedirectError (under NoLessSafeRedirectsPolicy)
only if STS is disabled or we were redirected to a host whithout Strict
Transport Security policy.

Otherwise, we replace 'http' scheme with 'https' and explicitly set port
80 with port 443 as defined by HTTP Strict Transport Security policy.
This scheme/port replacement will affect both NoLessSafeRedirectsPolicy
and UserVerifiedRedirectsPolicy (SameOriginRedirectsPolicy does not allow
any scheme change and we continue to report such redirects as
InsecureRedirectError).

Change-Id: Ib370b830e5fb6a0fec503d6fa3a0dec771c4b741
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-01-26 10:24:39 +00:00
Erik Verbruggen
fa15162700 Fix QString comparison on Aarch64
There was an off-by-one error in the while loop for aarch64: we start
counting at 0 for the first position, so the last valid input position
is "a+7", not 8.

This wasn't covered by the tests, nor was the SSE2 version, so now there
are also tests for both versions.

Change-Id: I7eb8c5708e6179f45ea56885b0e66e1a37969c1d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-26 09:34:46 +00:00
Allan Sandfeld Jensen
17e672a67e Use QImage::reinterpretAsFormat in QPixmap
Use the new QImage method instead of operating on private API.

At the same time the code is improved to ensure the QImage is detached.

Change-Id: Ia015c0bb18d7bc62da38397594730254843e5a0d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-01-26 09:14:27 +00:00
Laszlo Agocs
ffecbfc980 Re-enable shader disk cache for Integrity
Task-number: QTBUG-58183
Change-Id: Ic1be5db6922259cbef867720e95261d46a5ccaef
Reviewed-by: Kimmo Ollila <kimmo.ollila@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-01-26 08:51:18 +00:00
Alex Trotsenko
3b8f3fb327 QEventDispatcherWin32: remove tailings of Windows CE code
It was automatically merged from 5.6 branch. Qt 5.8 does not support
Windows CE.

Change-Id: I6968f50ef568035c224851d595d6c057128491a7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-01-26 07:47:28 +00:00
Thiago Macieira
dfd7a0e411 Doc: add a note that UniqueConnection does not work for lambdas
Task-number: QTBUG-52438
Change-Id: I3e4e5051937c40319d6efffd1491bef6feb6776e
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-01-26 07:45:11 +00:00
Thiago Macieira
dcfeeef91e Remove the -no-rtti option from configure
It only applied to Windows (not MSVC, like the help said) and the build
was broken with this option. So remove it, as we clearly never test
this.

[ChangeLog][Windows] The -no-rtti configure option was removed, as Qt
5.8 fails to build under that condition. To disable RTTI on user code,
add to your .pro file: CONFIG += rtti_off.

Change-Id: I2bc52f3c7a574209b213fffd149aae1b8d0cf9df
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-26 07:44:39 +00:00
Thiago Macieira
deef2d4e70 Fix warning about not calling the base class copy constructor
error: base class ‘class QBasicAtomicPointer<void>’ should be explicitly initialized in the copy constructor [-Werror=extra]

Change-Id: I2bc52f3c7a574209b213fffd149b4b71f3006be5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-01-26 07:44:33 +00:00
Thiago Macieira
51dafeda8c linux-icc: always compile applications as position-independent execs
The problem isn't the compiler, but the linker, so we ought to turn this
flag on for all ELF-based systems where we compile Qt with -Bsymbolic,
but so far only the Intel compiler has been affected. We can turn it on
as needed for other systems.

The cause of the problem is the way that ICC materializes the pointer-
to-member-function: it stores the full 2*sizeof(void*) data in an
anonymous variable, so that it can load it in one go, such as one 16-
byte SSE aligned load on 64-bit systems. That relocation in a data
variable gets turned into a fixed-position copy relocation by the
linker, which breaks the signal-identification mechanism.

GCC and Clang are likely to be affected if anyone did:

    static const auto destroyed = &QObject::destroyed;
    QObject::connect(obj, destroyed, [](){});

Task-number: QTBUG-52439
Change-Id: I0d69eaf61af149db9574fffd149d0cfb08459c33
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-01-26 07:42:45 +00:00
Liang Qi
398a7e736c Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/dev 2017-01-26 00:37:14 +00:00
Liang Qi
a23d705e18 Merge remote-tracking branch 'origin/5.8.0' into 5.8
Conflicts:
	src/plugins/platforms/android/qandroidinputcontext.cpp

Change-Id: I80f35a3d722f1e218ff338b6652e551da45c38e7
2017-01-25 22:39:42 +01:00
Allan Sandfeld Jensen
4d3a35f637 Make wheelScrollLines a QStyleHint
The number of lines to scroll on a wheel click have previously been
a QPlatformTheme hint and QApplication setting, this patch moves it to
QStyleHint so it may be easier read by QGuiApplications.

Change-Id: I80673c7b99d78c6407b1202b3742e1cb5fef0583
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-01-25 19:10:29 +00:00
Liang Qi
318b58562a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	.qmake.conf
	mkspecs/common/msvc-desktop.conf
	mkspecs/common/msvc-version.conf
	mkspecs/common/winrt_winphone/qmake.conf
	mkspecs/features/mac/default_post.prf
	mkspecs/features/mac/sdk.prf
	mkspecs/features/qt.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/winrt/default_pre.prf
	mkspecs/winphone-arm-msvc2013/qmake.conf
	mkspecs/winphone-x86-msvc2013/qmake.conf
	mkspecs/winrt-arm-msvc2013/qmake.conf
	mkspecs/winrt-x64-msvc2013/qmake.conf
	mkspecs/winrt-x86-msvc2013/qmake.conf
	qmake/generators/win32/msvc_vcproj.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/network/kernel/qhostaddress.cpp
	src/plugins/platforms/mirclient/qmirclientplugin.cpp
	src/plugins/platforms/mirclient/qmirclientplugin.h
	src/widgets/util/qsystemtrayicon.cpp
	tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
	tools/configure/Makefile.mingw
	tools/configure/Makefile.win32

Done-with: Jake Petroules <jake.petroules@qt.io>
Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
2017-01-25 20:06:06 +01:00
Allan Sandfeld Jensen
f823af43f2 QVariant of nullptr should always be null
Implements isNull for QVariants of a nullptr so they always return
true to isNull(), instead of depending on how they were constructed.

Task-number: QTBUG-58296
Change-Id: Ibddec795cdadedef7e17d22c265c29e752d8f99f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-01-25 17:05:18 +00:00
Allan Sandfeld Jensen
374a173d14 Improve QTest::qWait() precision and switch to QDeadlineTimer
Do not wait up to the timeout ms after already having waited several
times. At the same time upgrade to using the QDeadlineTimer which
is designed for this purpose.

Change-Id: Iaf5e4f4655605d5143ce91040c6eb6706752e504
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-25 16:40:57 +00:00
Thiago Macieira
d3671555cc Rename "interface" to "iface:" there's a #define in windows.h
Change-Id: Ibe5b1b60c6ea47e19612fffd149cd2d07116584b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-01-25 16:39:03 +00:00
Paul Olav Tvete
195298326f Fix build with -no-feature-whatsthis
Change-Id: I2f31357e91b01f826ef44710f477b80fde1f3fbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 14:38:39 +00:00
Paul Olav Tvete
da21d20b85 Fix build with -no-feature-treewidget
Make sure the feature is defined before testing it.

Change-Id: I4d4b555c9f2629c8a3ca58cf52efff279f6a78f5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 14:38:34 +00:00
Paul Olav Tvete
08e8a02e51 Compile with -no-feature-tooltip
Change-Id: I6093559dd7b8df578ebd050655fb9bd07e5f6809
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 14:38:28 +00:00
Paul Olav Tvete
033fa96b6c Fix build with -no-feature-toolbutton
Change-Id: I16495548fa3ed24409883fadab08ddb8545efd0d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 14:38:23 +00:00
Paul Olav Tvete
b0b726f8c7 Fix build with -no-feature-tabbar
Change-Id: I97c5345f2627743876aa05a94ffc03f2a6012b6c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 14:38:17 +00:00
Paul Olav Tvete
624b67c6fb Fix build with -no-feature-tabwidget
Change-Id: I0fbabdfec763f1647bf85582afe088a3e5b42e1f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 14:38:12 +00:00
Paul Olav Tvete
0f6cfd2217 Fix build with -no-feature-slider
Change-Id: I36e5c850068c2f9ac2ae078a3734ddb88d88c532
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 14:38:05 +00:00
Paul Olav Tvete
2bbeebf80c Fix build with -no-feature-textedit
Change-Id: I4a75c134803043180c57287ca352e26e3422204c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 14:38:00 +00:00
Paul Olav Tvete
2ac7fb78b9 Fix styles compilation with features removed, round 2
Change-Id: I8f09a8844e5edc1ad3e3dfd39eca9f3b42c5c828
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 14:37:54 +00:00
Paul Olav Tvete
cabf2950f7 Fix build with -no-feature-rubberband
Change-Id: Ida6698c4868507ccbf5b4c5e3eb1d2f5a7109f53
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 14:37:48 +00:00
Paul Olav Tvete
6bf9f49072 Fix build with -no-feature-menubar
Change-Id: I23b23fcaf6fcc655d38a06495127b108975f4a58
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 14:37:39 +00:00
Alexander Volkov
69e233d2ba Avoid detaching temporary objects
Found with clazy [detaching-temporary]:
- don't call QList::first() on temporary
- don't call QString::operator[]() on temporary
- don't call QByteArray::data() on temporary

Change-Id: I390962ef6020e4fcb0b0e447a63eed1e314d18a4
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2017-01-25 14:28:34 +00:00
Friedemann Kleint
a8a74fe81a Stabilize tst_QPropertyAnimation::noStartValue()
Remove the qWait() and introduce a QTRY_COMPARE()
checking for the end value first.

Task-number: QTBUG-58402
Change-Id: I2d3758178de5f67881008f28c406076ad27c4a90
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-01-25 11:36:41 +00:00
Paul Olav Tvete
056a35d02f Fix build with -no-feature-menu
Change-Id: I8f9d5ef6b7f7102e56816677f1d3a5b5144b7083
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:34:11 +00:00
Paul Olav Tvete
eae92384b0 Compile with -no-feature-itemviews
Change-Id: I23506f06df35f124f5eb9fcc8426c63b407a0872
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:33:51 +00:00
Paul Olav Tvete
6d06d4b07c Fix build with -no-feature-graphicsview
Change-Id: I9ae724ddf90efc9e951d475e3332083e6f8207d6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:33:46 +00:00
Paul Olav Tvete
fcab718666 Fix build with -no-feature-dockwidget
Change-Id: Id484b54fd7191715e61ba6708247357b83159f28
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:33:41 +00:00
Paul Olav Tvete
27792ea098 Fix style compilation with -no-feature-...
Change-Id: Ic7fadf0622f98d339322a4a1d4d5c36908f4f7f6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:33:36 +00:00
Paul Olav Tvete
7cafa85a49 Remove reimplementations of removed features
Avoid the "marked ‘override’, but does not override" compile error.

Change-Id: I4b125f1951614045781f3059fbc5cb65dd26775c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:33:32 +00:00
Paul Olav Tvete
d82e23e775 Make sure features are defined before testing them
Include the file defining the feature before testing whether
the feature exists. Also use the new feature macro to make
sure this bug doesn't happen again.

Change-Id: I204836fee59b143a7ce7d256a7aed223c4d0ceb1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:33:27 +00:00