Commit Graph

30759 Commits

Author SHA1 Message Date
Kai Koehne
52d9fd74b1 Make custom colors in QColorDialog permanent
[ChangeLog][QtWidgets][QColorDialog] Fixed long standing bug that prevented
custom colors in QColorDialog to be stored in the settings.

Task-number: QTBUG-58424
Change-Id: If3ee5eef75358d811f08e7ce52fb60622972ddd4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-01-26 15:20:47 +00:00
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
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
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
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
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
Paul Olav Tvete
447ca99191 Fix printsupport compilation with -no-feature...
Change-Id: I881e736aefd4068965edb2a57f4436ee43d2bb93
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:33:23 +00:00
Tasuku Suzuki
64e977cfac Fix build without features.temporaryfile
Change-Id: I3f26f122a20aa8e59baaf3f33b89cc776865ff8b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-25 04:54:58 +00:00
Samuel Gaist
0a96d8fb38 Example: migrate the classwizard example to use QRegularExpression
Update the classwizard example to use the new QRegularExpression class
in place of the deprecated QRegExp.

Change-Id: I125664549e249c4156f8c664fac7648f1c41f9d5
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-01-24 20:28:41 +00:00
Samuel Gaist
bb42a6741f Example: migrate licensewizard example to use QRegularExpression
Update the licensewizard example to use the new QRegularExpression class
in place of the deprecated QRegExp.

Change-Id: Ib6e0ee9ec802e83540b1c37846b99378395fe0ec
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-01-24 20:28:37 +00:00
Samuel Gaist
992bffdba5 Doc: Fixed old text still mentioning QRegExp
The example has already been ported to QRegularExpression however part
of the documentation still referred to the QRegExp class. This patch
updates the documentation to match the new version of the code.

Change-Id: Id433d0b28deae0c4f702c0c54d2704174f8c7689
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-01-24 20:28:22 +00:00
Samuel Gaist
9170cf9f1d Remove use of deprecated QRegExp from QLibraryInfo
This patch replaces QRegExp by QString search and replace.

Change-Id: I11165afa45f8f9a856e6fb9b64929e4bdacb913d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-24 20:27:58 +00:00
Laszlo Agocs
e0f0850cd4 Use context as glyph cache key in GL paint engine
Switch from ctx->shareGroup() to ctx. The original intention to use the
same cache instance for sharing GL contexts is reasonable, but can only
work when there are only shareable resources involved. The FBO used by
QOpenGLTextureGlyphCache is not one of these.

Text rendering in Qt Quick already uses the same approach and uses
per-context glyph caches.

Change-Id: Ie7e521769f28b4902ca714eb029acfbf52814309
Task-number: QTBUG-58276
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-01-24 15:14:38 +00:00
Jesus Fernandez
6a3e728e9b Fix possible loss of data warning
warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
while compiling class template member function 'QVarLengthArray<T,Prealloc>::QVarLengthArray(std::initializer_list<T>)'

Change-Id: I36f5ef65ec1f511eac7f3ad1a4717d18f7dc9ce4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-01-24 15:10:21 +00:00