With this setup clang cannot use c++1z yet.
Fixed with clang 5.0.
In file included from /data/sources/qt/qt5/qtbase/src/corelib/codecs/qtextcodec.cpp:53:
In file included from ../../../include/QtCore/5.9.1/QtCore/private/qcoreglobaldata_p.h:1:
In file included from ../../../include/QtCore/5.9.1/QtCore/private/../../../../../../../../../sources/qt/qt5/qtbase/src/corelib/kernel/qcoreglobaldata_p.h:55:
In file included from ../../../include/QtCore/qmap.h:1:
In file included from ../../../include/QtCore/../../../../../../sources/qt/qt5/qtbase/src/corelib/tools/qmap.h:52:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/map:60:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/bits/stl_tree.h:72:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/bits/node_handle.h:39:
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/optional:1032:27: error: use of class template 'optional' requires template arguments
Change-Id: Ib4cd8a9f5791a6e6cae4e6d61dfec3ad50dd63ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Clang's definition of the __EXCEPTIONS macro is inconsistent across
platforms. When compiling for Darwin, Clang 3.6 and newer will set the
token when exceptions are enabled in either C++ or ObjC. This change
adds the reliable check described in the Clang 3.6 release notes to
ensure that QT_NO_EXCEPTIONS is defined when required.
The check requires the use of the Clang-specific __has_feature()
syntax for which a new proxy macro QT_HAS_FEATURE(x) is added in
qcompilerdetection.h
Task-number: QTBUG-61034
Change-Id: Ie7b482dfa1a4a5b700a6b97562c26b626be1fc04
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
That's not the same as -Za.
Change-Id: Ica9894dc9b5e48278fd4fffd14bb316b687abffe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Analysis proves this is a false positive:
qarraydataops.h:69:17: error: ‘void* memset(void*, int, size_t)’: specified size between 18446744056529682436 and
18446744065119617024 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
Change-Id: I7814054a102a407d876ffffd14b6ab0be9e222fc
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On iOS QSslConfiguration always has an empty list of system CA certificates.
Calling SecTrustSetAnchorCertificatesOnly(.., TRUE) on iOS results in
SecTrustEvaluate failing to verify a valid certificate, since there
are no 'anchors' at all. We can use SecTrustSetAnchorCerificatesOnly(.. TRUE)
on macOS only, where we do extract/copy system certificates using
SecTrustSettingsCopyCertificates and save them in a QSslConfiguration's
list.
Task-number: QTBUG-61053
Change-Id: I70d4e46273d78414baaac8531273def707c3eebc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Instead of defering one more time by emitting the signal, we can add
the data to the list of available data/pending datagrams. For TCP
readNotification can be invoked directly so that emission of the
readyRead signal is tightly coupled to the availability of new data.
For UDP sockets calling readNotification directly stops handling of
more data and thus cannot be done.
With the old approach it was possible, that the last bit of TCP data
was lost, because the socket was closed while the data was still being
processed/transferred from the worker to the engine.
Task-number: QTBUG-61078
Change-Id: I9330b87876be853d310dc9e8e817ab344939d5dd
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The qt_gradient_argb32 routine optimizes linear gradients with the solid
blend routines that is ARGB32PM only. If the gradient is not solid, it
will not get unpremultipled on write like it should for ARGB32.
Covered by lancelot, but the change is less than 5%.
Change-Id: Id99f2fa125cc091f3b5b29ec2d06618785d628fa
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Various editorial fixes. Also, in 5.9 QStringLiteral does
not fall back to fromUtf8 any longer, but guarantees
a compile-time construction.
Change-Id: Ida4698cf8e32a6e3de97b2c16b997fc9630c9db9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
... from widget class descriptions.
Use one screenshot from Windows instead.
The styles change and the screenshots become outdated very fast, so
it is easier to update just one screenshot now and then. The styles
can still be seen in the style gallery topics.
The image files will be removed in a follow-up commit after all
references to them have been removed.
Change-Id: Id326c141f4884a2e4f67a4fe8681d8c65f8b24ba
Reviewed-by: Martin Smith <martin.smith@qt.io>
Similar on how it is done for Windows desktop we also use the given
style hint when building the list of fallbacks a font family.
Change-Id: I71378581d07f20ebe5bf0bc757bba919cc70e118
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The documentation says that it's equivalent to
qgetenv(varName).toInt()
But the implementation wasn't. QByteArray::toInt() verifies that the
entire string was consumed, so QByteArray("1a").toInt() == 0, but
qstrtoll alone doesn't. That is, qstrtoll("1a", ...) == 1.
The implementation also detected the base, a behavior I kept. Instead, I
updated the documentation.
Change-Id: I0031aa609e714ae983c3fffd14676ea6061a9268
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This method now returns -1 by default, due to commit 6255cb893d
which mistakenly replaced -1 with Qt::IgnoreAction (0x0).
As a result, dropping is forbidden in a number of applications
(I detected this in zanshin).
Change-Id: I4922451216e08d5d3fe36f8ba87364a361b691bf
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
A number of drawing paths were never tested by lancelot because we
always used argb32pm for subsurfaces. This patch switches the
subsurfaces to use the painter format or its alpha version. This means
changes to composition tests as it changes precision, especially of
alpha in the a2rgb30 formats.
Change-Id: I24d53bf6e1db8cca36bda69e2ddf07f20256b3c8
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The change has been found to break Ctrl+C/V shortcuts when
using a Russian keyboard layout.
This reverts commit c6ecbd4762.
Task-number: QTBUG-61086
Change-Id: I0dce708b1a65b08ea10317d723c38b0414cbac7f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
tryAcquireWithTimeout(0.2s) was already blacklisted and
now the same failed with "(2s)".
Task-number: QTBUG-58745
Change-Id: I82363238c08056d2969a7616e3a6e5af080d537d
Reviewed-by: Liang Qi <liang.qi@qt.io>
We have to use a temporary data path for winrt, as the applications
are sandboxed and cannot just put data anywhere.
Change-Id: I8f95de132e5b5ac77441cbbf26af873b8018c7cb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
$$QMAKE_HOST.arch isn't very well defined for ia32 - on windows it's
x86, on linux it may be anything from i386 to i686. test for != x86_64
instead.
Task-number: QTBUG-61044
Change-Id: I8f3267b404fffbf479d87bee2e8ee8c6cd404b50
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
it can be (and usually is) empty (if the option was not used), which
would make it disappear from the command line.
Change-Id: Ic682e92a0d20cf849fade8449ebd79a5aa424d21
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
this actually just makes the code more straight-forward.
amends f8607045c.
Task-number: QTBUG-60936
Change-Id: Iaa05b474206cf29352f9bba516936ff30b90a778
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
the entry's libs field is supposed to be a single pre-quoted string.
that implies that the libs and libpaths need to be joined first.
amends 7e298e2f.
Task-number: QTBUG-60925
Change-Id: Id85b2784e3c081b3ff8eb9ee2216976691f8580d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
make qtConfLibrary_psqlEnv() fall back to qtConfLibrary_inline() if
$PSQL_LIBS is not set.
Task-number: QTBUG-59521
Change-Id: Ie293e8bfaa3e113ede166243b345833973cc66f8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
adding shared install paths via QMAKE_LFLAGS in the spec has the tiny
side effect that they are searched _first_, which is generally a really
bad idea - they should be _last_.
for that purpose, introduce QMAKE_RPATHLINKDIR_POST, and migrate all
specs to use it.
QMAKE_RPATHDIR_POST is added for consistency, but not actually used.
Task-number: QTBUG-59457
Change-Id: Iac6cda5e9111ef8cca454a69861fe8408bb40589
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
adding shared install paths to QMAKE_{INCDIR,LIBDIR} in the spec has the
tiny side effect that they are searched _first_, which is generally a
really bad idea - they should be _last_.
for that purpose, make QMAKE_{INCDIR,LIBDIR}_POST live up to their names
(i.e., search them actually last) and migrate all affected specs to use
them.
Task-number: QTBUG-40825
Change-Id: Ie0de81c3cc49e193186d2fedd7d6c77590c8ef79
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This forces the API not to wait for synchronous I/O from the filesystems
and get the information, but instead just use the cached information
directly. It's a good idea if we have an unresponsive FS, like NFS with
an unreachable server.
Task-number: QTBUG-61096
Change-Id: Iddeeffb6f4ad4a2894a2fffd14c32f6e90664a63
Reviewed-by: Tobias C. Berner
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QSslCertificate used SSL without checking if SSL is available.
This patch adds such checks to the constructors.
Change-Id: Iea298aded5966641327e22e41ad4665a3d0ec5d3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Fixup of commit b4995eb749.
We can't call QWidgetPrivate::get(w) on a deleted QWidget, because of
the call to the member function QWidget::d_func. We can however call
QObjectPrivate::get since we still are in the QObject destructor.
tst_qstackedlayout now pass without ubsan Warnings.
Change-Id: I4e839a97ddbd1cf21435a8fca76523b98a1f7d9b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Because we obviously don't support Microsoft's extensions in C++. This
is required because some MS headers have code that isn't proper C++,
like iso646.h:
#if !defined(__cplusplus) || defined(_MSC_EXTENSIONS)
#define and &&
Do not pass /Za to MSVC to generate moc_predefs.h, because this option
is incompatible with compiler options like /fp:fast that may be
user-specified.
This reverts commit e1a70ce4 and re-fixes the issue similarly to commit
d72ac3f3.
Task-number: QTBUG-58391
Change-Id: I5c0143283afed09f98200806c87259c039c00ae1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
In the referenced bug report, dismissing a QFileDialog while the
Qt Virtual Keyboard was in use would result in a crash.
Dismissing a file dialog created with
e.g. QFileDialog::getOpenFileName() causes it to eventually be
destroyed. When this happens, it starts deleting its children. Each
child widget's destructor calls clearFocus(). In clearFocus(), there is
a block of code that emits QWindow::focusChanged(), passing the result
of focusObject() called on that widget's window.
QWidgetWindow::focusObject() could end up using itself as a fallback
focus object if it had no other focus objects (e.g. children) to use
instead, even though it was in the process of being destroyed; as were
all of its children. The Qt Virtual Keyboard plugin would then try to
use the focus object, even though it was in an invalid state.
To fix this problem, we return early from QWidgetWindow::focusObject()
if the window is in the process of being destroyed.
Task-number: QTBUG-57193
Change-Id: I137cf9415812ce2e0419c0afe8076ce150f248cb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This change adds USB mouse handling support for INTEGRITY
Change-Id: I8a2a51c8c3578898e90dd5bbb01f6aed6c64e2a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io>
Reviewed-by: Nikola Velinov <nvelinov@ghs.com>
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Tero Alamaki <tero.alamaki@qt.io>
This makes the test a lot faster and perhaps more reliable.
Change-Id: I055cfde627c75f71735eabbf01af2a196bd8b00a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Packets sent to to link-local addresses on it are never received. We
don't know why this happens, as the tooling provided by Apple for
development is close to useless. So we just ignore this interface.
Task-number: QTBUG-61041
Change-Id: Ia608df1fff6bdee5238e107d8a50292a1f9e5c03
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
In FreeType 2.8.0 FT_LOAD_TARGET_LCD is now a variant of
FT_LOAD_TARGET_LIGHT instead of of FT_LOAD_TARGET_NORMAL. This means
requesting it will get us light hinting.
See https://sourceforge.net/projects/freetype/files/freetype2/2.8
We should just avoid using it all together since we request the LCD
mode separately anyway with FT_RENDER_MODE later.
Change-Id: I9ea2e39a6e9ba25ba11604a194e552fe4240a127
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
QWindow uses device independent geometry while QXcb and QPlatform
classes do not.
When QXcbWindow::create is called we have no guarantee that the correct
screen has been set in QWindow so the code
attempts to check if "currentScreen" matches "actualscreen". To perform
that operation though we need to convert
the units from "Device independent" to "native pixels" that we do by
calling QPlatformWindow::windowGeometry which
calls QHighDpiScaling::toNativePixels which requires the correct screen
to be already set.
So basically we have a cyclic dependency, to get the correct screen we
require the correct screen to be already set.
To fix this we can:
1-Remove the dependency (Look for the actual screen using device
independent pixels)
This will imply adding code in QXcb to use
QPlatformScreen::deviceIndependentGeometry to lookup the screen up
2-Make sure the Screen is set before calling QXcbWindow::create
This patch implements the first approach that allows us to keep the
changes within the QXcb backend which seems to be the only one affected.
Task-number: QTBUG-53813
Change-Id: I6dc955d63e17c3b3421f3a1a9e0d841e508b2e5c
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
It was grabbing a QLabel without accounting for the size of
the window in the case where the DPI is larger than 1:
FAIL! : tst_QWidget::translucentWidget() Compared values are not the same
Actual (actual.size()) : QSize(32x32)
Expected (expected.size()): QSize(16x16)
Change-Id: I4873f3c6364ee2696f5612d91e6c97c60b2cd915
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>