Commit Graph

38994 Commits

Author SHA1 Message Date
Paul Olav Tvete
ef0a77d872 Update qopenglext.h to the latest Khronos version
Source: https://www.khronos.org/registry/OpenGL/api/GL/glext.h

This change keeps the type definitions from the previous version,
to avoid having to include KHR/khrplatform.h

Change-Id: Idc1bee7b1e37b15a3dfd90a92381cd87392d22f7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-03-05 14:11:19 +00:00
Paul Olav Tvete
6d46bc8aa2 Update qopengles2ext to the latest Khronos version
Source: https://www.khronos.org/registry/OpenGL/api/GLES2/gl2ext.h

Change-Id: If96c0c13784e9d3a254326971ef46527604fd46f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-03-05 14:11:09 +00:00
Giuseppe D'Angelo
40e4ab673a Simplify toStdWString
In C++17: just use std::basic_string::data().

In C++11: dereferencing begin() on an empty string is undefined
behavior on all compilers, not just MSVC, so remove
that workaround. Instead of the reference-dereference
combo, use std::basic_string::front().

Change-Id: I3229597e000311ce71e4083dca6667bb56d8f8e3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-03-05 13:24:33 +00:00
Friedemann Kleint
d41a46bc39 rcc test: Avoid repetitive invocation of QFINDTESTDATA()
Store the test data path in a member variable.

Task-number: PYSIDE-855
Change-Id: Ibb81e4024c870e67e209c79ec95264e747632bc6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-03-05 09:50:23 +00:00
Christian Ehrlicher
d8ac4b40b5 Examples: replace deprecated QComboBox functions
Replace the deprecated currentIndexChanged(QString) and
activated(QString) with the new currentTextChanged() and textActivated()
functions

Change-Id: I8616354fa06cc63dce6f5cfef0902f4b55981043
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-03-04 16:54:52 +00:00
Christian Ehrlicher
332f295743 QtBase: replace deprecated QString functions
Replace deprecated QString functions in examples and tests:
 - QString::sprintf()
 - QString::null
 - QString::fromAscii

Change-Id: I4404d17c1a65496c9079e8a7300e72a5b3740fe5
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-03-04 16:54:12 +00:00
Christian Ehrlicher
f8f592d5c2 QString: mark obsolete functions as deprecated
Mark obsolete functions in QString as deprecated so they can be removed
with Qt6:
 - QString::sprintf()
 - QString::vsprintf()

Change-Id: I9b7748db95291c34b95ff3ad3e3aabc8215aeaae
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-03-04 16:54:04 +00:00
Alexander Akulich
7a7ec94d6c Add Q_ENUM for QValidator::State
Besides to the usual value for debug output, this is wanted for
some declarative API.

Change-Id: I6c35cad96b6a6f33a7c90e8a254bfe0075e391ee
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-03-04 13:35:56 +00:00
Paul Wicking
48405219fb Doc: Minor QDialog clarification
Minor rewrite of a bit that caused some confusion.

Fixes: QTBUG-73335
Change-Id: Ic1df44e62a29035c7b93052204fbe9ef72db5f40
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-03-04 12:48:37 +00:00
Edward Welbourne
ab53f0f24e QtTestLib: unify handling of float and double using suitable templates
The QTest::qCompare() implementations were almost duplicates; pull the
common code out into a templated version.  Tweaked the
QTest::toString() specialization for float and double (a macro) and
fixed a bous modifier in double's format.

The doubleComparisons and floatComparisons tests in the tst_float.cpp
selftest shared a large block of tests in common, aside from the
difference of type.  Break this out into a templated static function
to save duplication.

This prepares the way for using the same templated code for qfloat16.

Change-Id: I2823fd006910c5ff88335d625d1fa05cb7753513
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-03-04 10:01:35 +00:00
Jędrzej Nowacki
fa1b8442b8 Fix warnings when compiling with QT_NO_XMLSTREAM
Some of function arguments were unused.

Change-Id: I29e8e4acbed87836044cac4f0b7ac59168181f5a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-03-04 09:26:02 +00:00
Nils Jeisecke
eea3947842 sqlite: Remove SQLITE_OMIT_LOAD_EXTENSION define
This define prevents the usage of some customization possibilities, e.g.
injecting data by using virtual tables that are implemented as an
extension.

[ChangeLog][Third-Party Code] Build sqlite without SQLITE_OMIT_LOAD_EXTENSION

Fixes: QTBUG-70972
Change-Id: Idaf1c2c7bccbaec6f7bbf3d79334ffb4a0bad3fc
Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-03-03 11:51:36 +00:00
Qt Forward Merge Bot
84e15d6f48 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ic0037eac1d85a0e60e7b1a590d49b5ee6205bfc8
2019-03-03 01:00:25 +01:00
Lars Schmertmann
c6153660e4 Extend the test for QSslKey
Check if QSslKey::handle() returns data representing the
same key information as that passed to the constructor.

Task-number: QTBUG-64495
Change-Id: I1a91264e6f6d92d259b51fca9de00fcbfd5cc845
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-03-02 14:26:59 +00:00
David Edmundson
785d2b9d07 Add QStyle::standardPixmap support to all entries in QDialogButtonBox
QDialogButtonBox fetches icons from the qstyle for most of the buttons
it creates, with the exception of 7.

This patch adds support for the remaining buttons, so that all buttons
can have icons added by the theme.

Behavior is unchanged until a style implements these new enumerations.

Change-Id: I2eba488a11e1b9979fff3b32dafbda11332a3d92
Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-03-02 06:27:05 +00:00
Qt Forward Merge Bot
607338f98f Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I83f6ed9480bf21020ce7a9431010d87a88df84a1
2019-03-02 01:00:08 +01:00
Friedemann Kleint
f58e47c2f3 QtWidgets: Fix deprecation warnings
Fix deprecation warnings where possible or add warnings scopes, fixing:

dialogs/qdialog.cpp:783:41: warning: ‘void QDialog::showExtension(bool)’ is deprecated [-Wdeprecated-declarations]                        ^~~~~~~~~~~~~
widgets/qcombobox.cpp:1386:37: warning: ‘void
QComboBox::currentIndexChanged(const QString&)’ is deprecated: Use currentTextChanged() instead [-Wdeprecated-declarations]=
dialogs/qfiledialog_p.h:168:38: warning: ‘DirectoryOnly’ is deprecated: Use setOption(ShowDirsOnly, true) instead [-Wdeprecated-declarations]
dialogs/qfiledialog.cpp:590:38: warning: ‘DirectoryOnly’ is deprecated: Use setOption(ShowDirsOnly, true) instead [-Wdeprecated-declarations]
dialogs/qfiledialog.cpp:617:27: warning: ‘DirectoryOnly’ is deprecated: Use setOption(ShowDirsOnly, true) instead [-Wdeprecated-declarations]
dialogs/qfiledialog.cpp:617:27: warning: ‘DirectoryOnly’ is deprecated: Use setOption(ShowDirsOnly, true) instead [-Wdeprecated-declarations]
dialogs/qfiledialog.cpp:645:27: warning: ‘DirectoryOnly’ is deprecated: Use setOption(ShowDirsOnly, true) instead [-Wdeprecated-declarations]
dialogs/qfiledialog.cpp:1730:17: warning: ‘DirectoryOnly’ is deprecated: Use setOption(ShowDirsOnly, true) instead [-Wdeprecated-declarations]
dialogs/qfiledialog.cpp:2637:43: warning: ‘DirectoryOnly’ is deprecated: Use setOption(ShowDirsOnly, true) instead [-Wdeprecated-declarations]
dialogs/qfiledialog.cpp:2750:10: warning: ‘DirectoryOnly’ is deprecated: Use setOption(ShowDirsOnly, true) instead [-Wdeprecated-declarations]
dialogs/qfiledialog.cpp:2786:49: warning: ‘bool QFileDialog::confirmOverwrite() const’ is deprecated: Use !testOption(DontConfirmOverwrite) instead [-Wdeprecated-declarations]
dialogs/qfiledialog.cpp:3654:27: warning: ‘DirectoryOnly’ is deprecated: Use setOption(ShowDirsOnly, true) instead [-Wdeprecated-declarations]
dialogs/qfiledialog.cpp:3843:48: warning: ‘DirectoryOnly’ is deprecated: Use setOption(ShowDirsOnly, true) instead [-Wdeprecated-declarations]
dialogs/qfiledialog.cpp:3895:72: warning: ‘DirectoryOnly’ is deprecated: Use setOption(ShowDirsOnly, true) instead [-Wdeprecated-declarations]
styles/qwindowsstyle.cpp:836:19: warning: ‘PE_IndicatorViewItemCheck’ is deprecated [-Wdeprecated-declarations]
graphicsview/qgraphicswidget.cpp:2309:51: warning: ‘PM_MDIFrameWidth’ is deprecated [-Wdeprecated-declarations]
styles/qstylesheetstyle.cpp:4302:10: warning: ‘PE_FrameStatusBar’ is deprecated [-Wdeprecated-declarations]
styles/qfusionstyle.cpp:3676:10: warning: ‘SH_ScrollBar_StopMouseOverSlider’ is deprecated [-Wdeprecated-declarations]

Change-Id: I9e15f4a0996476ec88d8823b72f0c537dce97b9c
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-03-01 20:25:09 +00:00
Christian Ehrlicher
9eb50751b8 QSpinBox: add new signal textChanged(QString)
Add a new signal textChanged(QString) as a replacement for
valueChanged(QString) so valueChanged(QString) can be removed with Qt6.
This removes the ambiguous valueChanged() signal and also matches the
'text' property naming.

Change-Id: I0676a7112f70add20a3a7ef9381268cd9b8a5851
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-03-01 20:21:06 +00:00
Jędrzej Nowacki
b33eb93891 Disable DTLS is UDP socket is disabled
The implementation of DTLS uses UDP socket.

Change-Id: I8be5c286a47abe9fa80a5a0e139dedc2f297992d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-03-01 20:14:05 +00:00
Jędrzej Nowacki
62f6fb3017 Fix compilation without DTLS
Change-Id: I6062c4454c547b943d7ef26b22eeccf566888767
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-03-01 20:12:44 +00:00
Mårten Nordheim
381f79a53c Blacklist tst_qsocks5socketengine::passwordAuth2
It's flaky and has been for a while. However it is somewhat more flaky
when using the docker setup.

Task-number: QTBUG-74162
Change-Id: I49f346a39271b48395e0e17fa6821d73a24f81d4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-03-01 20:12:24 +00:00
Gatis Paeglis
2065bc070d platforminputcontexts: use libxkbcommon compose key API
Our implementation of compose table parser was added on Mar, 2013.
libxkbcommon added APIs for the same thing in Oct, 2014 (ver: 0.5.0).
After removing RHEL 6.6 from the list of supported platforms we were
able to move the minimal required libxkbcommon version to 0.5.0. Now
we can use the xkbcommon-compose APIs on all supported platforms.

With this patch we can drop nearly 1000 lines of maintenance burden.
This patch fixes user reported issues with our implementation.

Known issues:

- Testing revealed that xkbcommon-compose does not support non-utf8 locales,
and that is by design - https://github.com/xkbcommon/libxkbcommon/issues/76
Our implementation did work for those locales too, but it is unclear
if anyone actually uses non-utf8 locales. It is a corner case (work-arounds
existing) and likely a configuration error on the users' system.

- Looking at the release notes for versions above 0.6.1, only one issue
that stands out. Compose input does not work on system with tr_TR.UTF-8
locale, fixed in 0.7.1. Compose input works fine when using e.g. en_US.UTF-8
locale with Turkish keyboard layout.

Note:

With Qt 5.13 we have removed Ubuntu 16.04 and openSUSE 42.3 from CI:

Ubuntu 16.04  - 0.5.0
openSUSE 42.3 - 0.6.1

CI for Qt 5.13 has:

Ubuntu 18.04  - 0.8.0
RHEL-7.4      - 0.7.1
openSUSE 15.0 - 0.8.1

Currently the minimal required libxkbcommon version in src/gui/configure.json
is set to 0.5.0, but we could bump it to 0.7.1 to avoid known issues from above,
but that is a decision for a separate patch.

[ChangeLog][plugins][platforminputcontexts] Now using libxkbcommon-compose
APIs for compose key input, instead of Qt's own implementation.

Fixes: QTBUG-42181
Fixes: QTBUG-53663
Fixes: QTBUG-48657
Change-Id: I79aafe2bc601293844066e7e5f5eddd3719c6bba
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-03-01 14:31:37 +00:00
Gatis Paeglis
a34e81ab8b platformsupport/input: add xkbcommon utilities lib
xcb/eglfs/wayland - all use XKB keyboard configs and APIs. There
is a lot of duplicated and naturally a diverging code. This patch
adds a helper library to avoid all the mentioned problems and unify
feature set between these platforms.

qlibinputkeyboard:

Added a fixup for 2803cdf758. From
spec: "keysyms, when bound to modifiers, affect the rules [..]",
meaning we can't look at keys in isolation, but have to check if
bounding exists in the keymap. This is done by using
xkb_state_mod_name_is_active() API, but that API has its limitations -
https://github.com/xkbcommon/libxkbcommon/issues/88
I will fix this separately in the LTS (5.12) branch.

We need to read the modifier state before the key action. This
patch fixes a regression introduced by aforementioned patch, which
caused modifiers being reported wrongly in QKeyEvent::modifiers().

qtwayland:

Moved toKeysym(QKeyEvent) from qtwayland repository into this library.
For this and other key mapping functionality wayland was duplicating
the key table. All of that will be removed from qtwayland, and calls
will be replaced to use this lib. Adjusted toKeysym() to fix QTBUG-71301.
Qt keys don't map to ASCII codes, so first we need search in our key
table, instead of mapping from unicode.

lookupStringNoKeysymTransformations():

fixed off-by-one error, where we were including terminating NUL in
QString.

Fixes: QTBUG-71301
Task-number: QTBUG-65503
Change-Id: Idfddea5b34ad620235dc08c0b9e5a0669111821a
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-03-01 14:31:28 +00:00
Jean-Michaël Celerier
f5850cb0da CMake: fix generation of config files for external Qt modules
When such modules aren't following the libQt5Foo.so naming convention,
the generated CMake files would be incorrect.

Change-Id: I57908f7466bff7a05f19271ccd495849476bdf38
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2019-03-01 14:15:12 +00:00
Edward Welbourne
f9421f0968 Adjust chunk-size in TLD-suffix list to placate MSVC 2015
MSVC 2015 has a size limit on strings; sizeof (including the
terminating '\0') must not exceed 0xffff.  The generator for the
suffix-list data worked round this by breaking its data into chunks of
at most 0xffff bytes; however, it was limiting on the strlen, not the
sizeof, so was off by one.  It checked for this before adding each
suffix, so has (until now) always happened to break early enough; but
the latest update gave an exactly 0xffff chunk, whose terminating '\0'
took it over MSVC's limit.  So adjust the cutoff to effectively
include the terminating '\0'.

Task-number: QTBUG-72623
Change-Id: I76ea40060d9fc13c0f7002c5ba22e71b8d0af787
Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
2019-03-01 13:26:46 +00:00
Joerg Bornemann
20063cf999 Actively discard return value of qtConfGetNextCommandlineArg
Calling a qmake replace function without assignment is undefined
behavior.

This amends 11ae0e77.

Change-Id: Ie716f295275d1ba79a217745b332a8eca04b355d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-03-01 10:35:46 +00:00
Timur Pocheptsov
7f1ae3f99d Convert tst_qhttpsocketengine to work with the Docker-server
Change-Id: I6590f9cc5159083cba58cfdbacfaee1f9482bd0b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-03-01 10:20:19 +00:00
Timur Pocheptsov
703ca2606f Convert tst_qsslsocket_*_static/member auto-tests
To work with docker test server.

Change-Id: I50a1c7b632748d7648dafd70356aa849614e4e12
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-03-01 10:20:07 +00:00
Qt Forward Merge Bot
7aa204d5b3 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Icec0aa703d8a13efa9f1634a1a353eb9d63685c8
2019-03-01 01:00:54 +01:00
Mårten Nordheim
c47ec42f02 Convert tst_qtcpserver to use docker
Change-Id: Id456fa8ea6ab4f23b6b83c5f6388e96443ccf9e0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-02-28 15:48:38 +00:00
Mårten Nordheim
a247d08fae Port tst_qtcpsocket to the docker server
The iptables container launches with extra capabilities to actually be
able to make changes to the tables.

Change-Id: I892fd18853ce882709e21791e6c88217e5029d53
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-02-28 15:48:31 +00:00
Mårten Nordheim
1844f011f6 Convert the QSocks5SocketEngine test to use Docker
Change-Id: I5d223758471a72c93ad57d250001c1de51a208cd
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-02-28 15:48:19 +00:00
Andy Shaw
11c728713f Android: Show correct keyboard when using Gboard and Japanese layout
In 71a63836ed a workaround for Samsung
devices using ImhNoPredictiveText was included as there is a bug on
those devices. However this causes a problem with other keyboards such
as Gboard when using languages such as Japanese, as it would not show
the right keyboard at all and only showed a qwerty one in those cases.

Therefore we default to not working around the issue as it is more of a
problem to not allow certain keyboard layouts as opposed to having
predictive text even if it is turned off. For those who want to disable
predictive text and as such have the consequences of not showing some
keyboard layouts, they can set the
QT_ANDROID_ENABLE_WORKAROUND_TO_DISABLE_PREDICTIVE_TEXT environment
variable.

[ChangeLog][Platform Specific Changes][Android] Text fields with
ImhNoPredictiveText set are no longer working around keyboards that
disregard this setting. To enforce the workaround then the environment
variable - QT_ANDROID_ENABLE_WORKAROUND_TO_DISABLE_PREDICTIVE_TEXT
should be set.

Change-Id: I9ace7ba96ebad68987b53783e25067b66c002f25
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-02-28 13:52:55 +00:00
BogDan Vatra
8880ef7931 Terminate Qt gracefully
When the application is closed via the task manager on Android
then we need to ensure that that the application can close down
any running event loops. So we wake up all the event loops and
then call quit() directly on the application object to start a
graceful termination of the application.

In order to aid the graceful termination of Qt then a check is
added to ensure that it does not try to create a new surface when
the application is suspended. This prevents it from locking
while trying to create a new surface when this is not possible.

Fixes: QTBUG-70772
Change-Id: I6795b3d280e178d7f1207004a1b965a31a0cc9e9
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-02-28 13:43:21 +00:00
Joerg Bornemann
077e499304 Handle QMAKE_SUBSTITUTES input files as Latin 1
QMake's strategy is generally "pretend everything is Latin 1", which
basically equals "do 8-bit pass-through". Change the handling of
QMAKE_SUBSTITUTES input accordingly to avoid conversion losses when
converting from and to UTF-8.

Fixes: QTBUG-72130
Change-Id: Id903bbd2afa99708c92fd09fab3db944aa819a94
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-02-28 09:00:32 +00:00
Qt Forward Merge Bot
55b4641962 Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into refs/staging/5.13 2019-02-28 01:47:50 +00:00
Qt Forward Merge Bot
043f99954f Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Icc9b061c56e969756f0351c936cdeb8063c86079
2019-02-28 01:00:15 +01:00
Lorn Potter
15adc79bbc wasm: fix clipboard use
Change 5242126a inadvertantly removed clipboard functionality

Change-Id: Ie15e08470dd51d1c166063bbd443fd04416b2786
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-02-27 23:37:43 +00:00
Lorn Potter
f6ce77f3e4 wasm: activateWindow when needed
Task-number: QTBUG-74066
Change-Id: I6babab888de118c8c881fd8a18a90049563d7a23
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-02-27 18:20:49 +00:00
Alexander Volkov
f657c74263 QListView: Fix Shift+click selection for non-default itemAlignment
QListView::setSelection() algorithm is designed for items to
occupy their cells completely, which is not the case when
itemAlignment is used. The middle part of the selection rect
goes beyond the column borders and extra items are selected.

Use the introduced cellRectForIndex() instead of rectForIndex()
to calculate the middle part correctly.

Fixes: QTBUG-73684
Change-Id: I4a1e42a056d56e85a16d8ae0ffe18b78d1d6deb7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-02-27 15:58:56 +00:00
Elena Zaretskaya
ca991ee22d Segfault when the exiting the application under platform eglfs
If you run an application under eglfs, it falls with segfault on the
exit. For example, examples/gui/analogclock,
examples/widgets/widgets/analogclock, examples/opengl/cube,
examples/opengl/qopenglwidget, etc. (I have added the function
keyPressEvent to exit  by qApp->quit(), if needed).
It isn't appear in applications using QQuickView or QGLWindow.
This is because QCoreApplication destructor, where the variable self = 0
(therefore, qGuiApp = 0), is called before than
QOpenGLVertexArrayObject::destroy(), where qGuiApp is accessed
(qGuiApp->thread()).

Task-number: QTBUG-73824
Change-Id: I1dc55d5e811bfe8a8ea2178752e8771f8644d356
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-02-27 15:30:40 +00:00
Mårten Nordheim
2ec47d6cb5 Fix crash in QTest's signal dumper
It Q_ASSERTs that argv is not a nullptr, so it would fail when an
unconnected signal with 0 arguments was emitted.

Change-Id: I5dd810fbeea5b6b511eff4705efdaa6a55739604
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-27 14:27:04 +00:00
Paul Lemire
d15b02ff29 QOpenGLTexture::setData add overloads to allow specifying sub images
All current setData implementation only allow to specify a full size
sub image for a given mip level. In some cases, we might only want
to update a small region on an image, in which cases being able to
specify the x, y, z offsets as well as the dimensions is required.

Change-Id: I880cfcc67a814733e8ab880aa8766c87b7bc7e45
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-02-27 13:41:05 +00:00
Eirik Aavitsland
42b42602c4 QTextureFileReader: add support for astc format files
The standard astc encoder has its own file format.

Change-Id: I9a2f7b1fa20ba344b79637bafb50ff2bd0596747
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-02-27 13:00:56 +00:00
Eirik Aavitsland
97e78b0e1f Update bundled libjpeg-turbo to version 2.0.2
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.0.2

Task-number: QTBUG-73883
Change-Id: Ib4ed145f1ed9c51933aae565dcb4064ffd60ec24
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-02-27 13:00:43 +00:00
Edward Welbourne
116a661791 Properly deprecate assorted enum members
This adds the first uses of Q_DECL_ENUMERATOR_DEPRECATED.
Prompted by API change review for 5.13, comment by Christian Ehrlicher.

Task-number: QTBUG-73484
Change-Id: Ic106048cec18960a91f88eb12650abab6abf0e97
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-02-27 12:49:53 +00:00
Edward Welbourne
d8cf721d60 Update the DNS public suffix list from publicsuffix.org
Regular update in preparation for 5.13, adding tests for additions
since 5.9.4/5.10.1/5.11.0's update 7e946030 (the last to record its
upstream version sha1).  Corrected the license header: it's now
published under MPL 2.0 (not 1.1); and our secondary licensing of it
is as LGPL3.  Deferred full header over-haul until we've worked one
out in detail.

[ChangeLog][Third-Party Code] Updated DNS public suffix list

Task-number: QTBUG-72623
Change-Id: Iabdbbbfd79624830396c2a6fe0a73389bd6ce5b7
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2019-02-27 12:49:30 +00:00
Joerg Bornemann
49ef377349 Fix determination of OpenGL include paths on macOS, take 2
The sysrootification of OpenGL include paths must be done only once: at
configure time. The resolved paths are stored since 521a8539 and must not be
resolved again.

Turn the makeSpec-type opengl library into a custom-type one, and do
the sysrootification in the handler function.

Fixes: QTBUG-73736
Change-Id: I2933144057d6f01d8bfc7bda2c2df56c57303459
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-02-27 09:53:52 +00:00
Friedemann Kleint
2c31516a1e Windows QPA: Fix override cursor when modal window is present
Handle WM_SETCURSOR to apply override cursors to window that do not have
mouse capture (as is done in Qt 4).

Fixes: QTBUG-58590
Change-Id: I7ff6f799da1b8d4b4396c0a6137778a11a192617
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
2019-02-27 08:10:49 +00:00
Dominik Haumann
16cb578a8d QSyntaxHighlighter: Fix crash when parent is a nullptr
QSyntaxHighlighter has the follwoing constructor taking a QObject

  QSyntaxHighlighter::QSyntaxHighlighter(QObject *parent)
    : QObject(*new QSyntaxHighlighterPrivate, parent)
  {
      if (parent->inherits("QTextEdit")) {
          // ...
      }
  }

Typically, a 'parent' refers to the parent/child hierarchy in Qt
and is allowed to be a nullptr. However, in this case, passing a
nullptr will lead to a crash, as reported in
https://bugs.kde.org/show_bug.cgi?id=404820

This patch makes the QSyntaxHighlighter constructor nullptr safe
by checking if parent is a valid pointer.

Change-Id: Ia4e9b46b94fd37e6ceb2cd0538594353fdc1e349
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Christoph Cullmann <cullmann@kde.org>
2019-02-27 06:36:59 +00:00