Commit Graph

30746 Commits

Author SHA1 Message Date
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
Alexandru Croitor
91e5c7e1da Inform user that a non-prefix build can't be used on other machines
This implies that using tools like windeployqt and macdeployqt will not
generate a working standalone application.

Change-Id: I002cf6e527e479ccbee2f18df8766648196d6232
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-24 13:11:05 +00:00
Alexandru Croitor
1b1686d194 Fix mouse extra button mapping on macOS
Previously extra mouse buttons apart from left, right and middle
buttons, were mapped incorrectly with an offset of -1. This resulted in
the first extra button being recognized as the middle button, the
second extra button as the first extra button, etc.

Fix consists in using a binary shift with proper offset to create
the corresponding Qt::MouseButton value.

[ChangeLog][macOS] Fixed extra mouse buttons to be mapped to
correct Qt::MouseButton values.

Change-Id: I9e6084586cd4737a172b7706a805211f0edff749
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-01-24 13:10:52 +00:00
Friedemann Kleint
fc893d949c model-view-programming.qdoc: Add missing list/endlist
Fixes qdoc-warnings:
qtbase/src/widgets/doc/src/model-view-programming.qdoc:2076: warning: Command '\li' outside of '\list' and '\table'
qtbase/src/widgets/doc/src/model-view-programming.qdoc:2077: warning: Command '\li' outside of '\list' and '\table'
qtbase/src/widgets/doc/src/model-view-programming.qdoc:2078: warning: Command '\li' outside of '\list' and '\table'
qtbase/src/widgets/doc/src/model-view-programming.qdoc:2079: warning: Command '\li' outside of '\list' and '\table'

Amends change 7adfe7494b.

Change-Id: Ifa1121ba743c17d7223058e780ad03211565e3ff
Reviewed-by: David Faure <david.faure@kdab.com>
2017-01-24 12:33:09 +00:00
Allan Sandfeld Jensen
b0649df7d6 Fix MIPS32 processor detection
Gcc defines neither _MIPS_ARCH_MIPS32 nor __mips32 on MIPS32
architectures, instead __mips is defined to 32.

This fix exposed bit-rot in qdrawhelper where qt_memfill32 was set as
a function pointer despite not being one since Qt4.

Change-Id: I87461823e54fa3166223ebf97175fd05d2f2fd16
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-24 11:34:30 +00:00
Samuel Gaist
74819c4ed9 Tutorial: migrate addressbook tutorial to use QRegularExpression
Update the addressbook tutorial to use the new QRegularExpression class
in place of the deprecated QRegExp.

Change-Id: Ibea9252ab8fe1d12e6fc862fa70229ca6efe0804
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-01-24 07:24:13 +00:00
Oleg Yadrov
59780d132a Cocoa: fix crash regression in qt_mac_create_nsimage()
The regression was introduced in d8857f21ac. The original change was
meant to fix support for SVG icons, but failed to take into account
a valid QIcon with no sizes, but which is also unable to create
a pixmap for the requested size.

Task-number: QTBUG-58344
Change-Id: I7ac1dbfaf6e3dab8581fe4b33c814e2517fcdba8
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-01-23 23:34:44 +00:00
Samuel Gaist
cbd7dea83e Doc: updated QString::fromRawData documentation to QRegularExpression
QString::fromRawData code sample still shows the use of QRegExp. This
patch updates it for QRegularExpression and cleans the code.

Change-Id: Iff0f736cdbdd7d35c65fde1496ce9f838a8f5c6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-23 23:05:56 +00:00
Samuel Gaist
00bbb4d273 Example: migrate network-chat to use QRegularExpression
Update the network-chat example to use the new QRegularExpression class
in place of the deprecated QRegExp.

Change-Id: Idcd3dc5b3e9b520b2eeef9565d50195cc8dffd06
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-01-23 22:53:03 +00:00
Samuel Gaist
acacca859c Doc: update QStringList doc with missing QRegularExpression reference
The documentation of QStringList is missing some mention of
QRegularExpression as well as still using QRegExp in some sample code.
This patch fixes that.

Change-Id: I4a7c9fe8e5ae7c73497192bb71d1fa66ee864bd2
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-01-23 22:52:50 +00:00
Jocelyn Turcotte
dd52fd0024 Ensure a pixel density of at least 1 for Qt::AA_EnableHighDpiScaling
Very large 1080p TVs or any display which is running at an abnormally
low resolution can have a DPI lower than 48, which means that
qRound(dpi/96) will result in a 0 pixel density, causing critical
issues for applications using Qt::AA_EnableHighDpiScaling.

Make sure that we always have a pixel density of at least 1 to allow
applications not having to worry about such displays.

Task-number: QTBUG-56140
Change-Id: I1dafbf7794a99ae6f872984c0337d8ff0d1fc1c0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-01-23 18:42:26 +00:00
Gabriel de Dietrich
aa8fb36089 QMacNativeWidget: Remove Carbon reference from documentation
Change-Id: Ie1f1064a98f202194cad98aa3fa106e87eba7f39
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-01-23 18:30:03 +00:00
Gabriel de Dietrich
40827457a7 QMacCocoaViewContainer: Fix typos, wording in documentation
Also removes reference to Carbon and the old dual backend.

Change-Id: I01292caa7efcbe85526cd7602ec8ac678fd78eab
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-01-23 18:29:57 +00:00
Eskil Abrahamsen Blomfeldt
df7a65afda Fix license header of QInputControl
The license headers here were accidentally copied from Qt 5.6, since
the files were targeted for that branch originally. This updates them
to the proper LGPLv3 + GPLv2 + commercial.

Change-Id: I0623bdbf8fd4475405500b2687ef8dce2f1dbb6b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-23 16:03:31 +00:00