Clang implements the _cvtss_sh intrinsic by way of a macro, which
uses a C99 extension and that's not allowed in C++ mode:
float16.h:119:11: error: compound literals are a C99-specific feature [-Werror,-Wc99-extensions]
/usr/bin/../lib64/clang/3.9.1/include/f16cintrin.h:76:55: note: expanded from macro '_cvtss_sh'
Reported at https://bugs.llvm.org/show_bug.cgi?id=32491.
Change-Id: I27b55fdf514247549455fffd14b170df75dd4e1f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The .pro file requires the QMAKE_CFLAGS_F16C to be set to something. So
set it to AVX, as the instructions require the VEX prefix anyway (ICC
has no dedicated option for just F16C).
Change-Id: I27b55fdf514247549455fffd14b171940afd35a2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The configure-time detection (cxx11default) isn't enough if the compiler
can be changed. This is especially necessary if Qt is compiled with a
compiler that defaults to >= C++11 (e.g., GCC 6) and then the user
selects a compiler another compiler (e.g., Clang) via -spec option. In
that case, we'd miss adding the -std=c++11 or -std=gnu++11 option to the
command-line, causing the compilation to fail.
As a nice side-effect, even moc without moc_predefs.h will now get the
__cplusplus setting.
Task-number: QTBUG-58321
Change-Id: I74966ed02f674a7295f8fffd14a8be35da9640e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Some compilers are known to complain about this with a warning. GCC
complains about const on return values on -Wignored-qualifiers (enabled
at -Wextra), so it's not too much of a jump to assume that others do
too. Besides, this is not Qt Library API policy. As maintainer for
QtCore, I'm exercising my prerrogative in specifying certain unspecified
parts of the coding style, like I've done for constructor initializer
lists.
Since all the classes involved are exported (including QVector, through
derived classes), we can't remove the qualifier until Qt 6, since there
are compilers known to encode the qualifier in the mangled name
(suncc). I'm not introducing #ifdef to silence unknown compilers unless
we get an actual complaint.
Change-Id: I33850dcdb2ce4a47878efffd14a876edef843c46
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Implicit conversion from QByteArray to const char* works for most gtk
functions. But gtk_file_chooser_dialog_new() uses varargs and passing
the non-POD QByteArray through varargs does not work (it's UB).
Task-number: QTBUG-59763
Change-Id: I85f9323d99342896e6921cdeb85f5a1af7377b4f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This amends commit c20cd4d98e
Change-Id: I2fa903209694cd05e0dcf31e6f92d96ed934c91d
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Makes the code slightly less awkward to deal with.
Change-Id: Ie98a04d812beecfbf0d19e77b8e784db783a19d6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The SHA3 family is a modified version of Keccak. We were
incorrectly calculating Keccak (and even *testing* Keccak!),
but claiming it was SHA3.
To actually calculate SHA3, we need invoke Keccak on the original
message followed by the two bits sequence 0b01, cf. §6.1 [1].
[1] http://dx.doi.org/10.6028/NIST.FIPS.202
[ChangeLog][QtCore][QCryptographicHash] QCryptographicHash now
properly calculates SHA3 message digests. Before, when asked
to calculate a SHA3 digest, it calculated a Keccak digest instead.
Task-number: QTBUG-59770
Change-Id: Iae694d1a1668aa676922e3e00a292cddc30d3e0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When using anything but the mouse, there is no release event sent.
Instead one needs to subscribe to the ICorePointerRedirector.
Task-number: QTBUG-58781
Change-Id: I664ba24bd89ea9f513f8f11b385e2f06ece42fd0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
... by delegating to QConcatenable<const char[N]>.
The only thing that varied was the nested type alias 'type', which
therefore got retained.
Change-Id: I202f899034e1ddd23c6d1978a31be5eb7c195697
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Two changes are needed to pass tst_Selftest on QEMU
1. Pass QEMU specific env variables to the subtests
2. Ignore output on stderr on some tests when running on QEMU
Change-Id: Ie1f722fd183aac5973e87d408005e06cbafcde17
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Unix mmap(2) system calls do allow for mapping beyond the end of the
file, though what happens after you try to dereference the pointers it
gives is unspecified. POSIX[1] says that implementations shouldn't allow
it:
The system shall always zero-fill any partial page at the end of an
object. Further, the system shall never write out any modified portions
of the last page of an object which are beyond its end. References
within the address range starting at pa and continuing for len bytes to
whole pages following the end of an object shall result in delivery of
a SIGBUS signal.
However, Linux allows this in read-write mode and extends the file
(depending on the filesystem).
Windows MapViewOfFile never allows mapping beyond the end.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/mmap.html
Change-Id: Ie67d35dff21147e99ad9fffd14acc8d9a1a0c38d
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
tst_QWidget::updateWhileMinimized has been failing on Ubuntu 14.04
and was already blacklisted there. Now we extend it to cover Ubuntu
16.04.
Task-number: QTBUG-46116
Change-Id: I6758657cca46bb4c76cddb0298f9b87b8a43655b
Reviewed-by: Liang Qi <liang.qi@qt.io>
Mixing different protocols on client-server sockets works differently
on 10.11, making previously successful handshakes failing now.
Failure is specific to 10.11 with SecureTransport.
Change-Id: I35374b40fa3d167802775b526cf6465ae78749cf
Task-number: QTBUG-48860
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The fix for dangling pointers in 524f39 caused some problems when the
QByteArray was implicitly converted to const gchar*. This is fixed
by wrapping the QString in question in qUtf8Printable where possible
and removing the former convenience method.
Task-number: QTBUG-59692
Change-Id: I5abcf42e1c23b12c7a5c4c195d801f377fe9d138
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Apply white text only for macOS style.
Amends 2c0033983b
Task-number: QTBUG-59784
Change-Id: I9e66e929699efd715ed4565394f1aba763aeb32a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
GCC bug 68949 causes tst_QGraphicsGridLayout and tst_QGraphicsLinearLayout
to fail on 5.2.x/5.3.x: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68949.
This change adds aggregate initialization to QSizeF arrays to work around
the bug. The bug was discovered when compiling and running tests on ARM
with GCC 5.3.0.
Change-Id: I9ecf7b032b6ca1477c29dca3bd7d0ec8d69a0454
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I6b1239941f8fd13eec72b0874d15d821d717ddf3
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Change-Id: Ia384c2b48a6eaccb424cdde00240ebcfa6fd24c6
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Change-Id: Id1f04f9ff6da9bec07068d4ebed15f8bd29105af
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Change-Id: I352c011b21624ae9fb9db5a608e8c2b2491a05cd
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Change-Id: Ib0eae1858880e3fe2b6c6abd94c7ea0bbc2649a2
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
QEMU does not support all syscalls needed for udp socket testing.
Skipped tests that can't pass on QEMU.
Change-Id: I40882207a47cfafbc3becb3dff8e7cead9676255
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Previously we were always setting SpdyWasUsedAttribute for SPDY/HTTP/2/HTTP/1.1
(true/false) which is confusing. Now if HTTP2AllowedAttribute was set to true on
a request, we set HTTP2WasUsedAttribute. Otherwise, as we did before, we're setting
SpdyWasUsedAttribute.
Change-Id: I0c44cfb5469fef0c12719baa951197ee2accee4a
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This seems to give pretty good result when EnableHighDPIScaling is NOT set.
But this seems to be worse when it's set.
Task-number: QTBUG-58959
Change-Id: I8de5a6c3c8b6146b1cb8f89676463206af404083
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Make it possible to blacklist the (newly created)
quitOnLastWindowClosedMulti() if all else fails.
Task-number: QTBUG-59088
Change-Id: I8c143a2017e7aefaf6cad6ada9c1464d40c952e7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
qtquickcontrols2-customize.qdoc:28: warning: Can't link to 'Creating C++ Classes'
Change-Id: I7e8e84d7a0d03a84f32d860bc646640e5cf6258f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Only test for xcb specific sub-features if xcb is available in
the first place - not the case with Boot2Qt builds.
Change-Id: Iad49648ce1c8781d0c7bb2b2dcd4b7834434d51d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
If the mode is not GTK_FILE_CHOOSER_ACTION_SAVE or
GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER , a GTK warning will
be generated which makes Qt WebEngine's Glib error handler
assert. Doing so only when showing the dialog is too late.
This patch moves the actual file selection to a private method
that can be called from both selectFile and applyOptions in
order to prevent overwriting the file chooser action potentially
multiple times.
Task-number: QTBUG-59692
Change-Id: Ied939248cdc3a0b4c9e8239ab61ba617a46b8496
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Also use canonical contact url.
Change-Id: I43f8c6a2c4949ee0e054045bccc17d82575b072c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
The workaround introduced in 38a55c7 to explicitly call viewDidChangeFrame()
was not ideal for a multitude of reasons. Instead we can just initialize the
NSView with a NSZeroRect frame, which will ensure that whatever geometry
we set from the Qt side will result in geometry change and expose events.
The only case where we will not receive an expose event is if the QWindow
is requested to be 0x0 sized, but that wouldn't warrant an expose event
anyways. Also, it's not possible to initialize a QWindow to 0x0 from the
Qt side, as that will trigger QPlatformWindow::initialGeometry() to pick
the default size (160x160 in the case of macOS).
Task-number: QTBUG-58963
Change-Id: Ia84de7edcfdf26b90e4e93186fabe8b5c7382caa
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Instead of the never-ending blacklisting of "broken" drivers, simply switch
to always choosing a byte ordered QImage format with OpenGL ES, and keep
on using the (one and only) spec-mandated GL_RGBA/GL_UNSIGNED_BYTE combo.
There is nothing broken with not supporting BGRA for glReadPixels even when
GL_EXT_read_format_bgra (an out of date, pre-2.0 extension that got folded
into the spec to begin with) is present. We do not have a good way to tell
if BGRA_EXT is supported for glReadPixels or not, so just skip the whole
problem altogether.
Task-number: QTBUG-59283
Task-number: QTBUG-59303
Change-Id: I9f0605380923bd3b3ffdeb80f5c172d3e4cc7927
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
qcocoawindow.mm: we can replace QHash::values() with std::vector
since CoW is needless here and std::vector is more cache-friendly.
Also replace foreach with range-based for.
qitemeditorfactory.cpp: QHash::values() is used as auxiliary container
to create QSet. Replace it with std::vector since CoW is needless here
and apply sort-unique idiom to remove duplicates.
Also avoid needless allocations.
Change-Id: If34c7016977ceb7fab68e9298bf2e1944af79139
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Clang does not like Q_FALLTHROUGH in 'default' label, the diagnostics is:
'fallthrough annotation does not directly precede switch label'.
Accodring to their docs: "The fallthrough (or clang::fallthrough) attribute
is used to annotate intentional fall-through between switch labels. It can
only be applied to a null statement placed at a point of execution between
any statement and the next switch label." - obviously, there is no 'next
switch label' in our case.
Change-Id: Ia7dba4cb965a85d229d44b04b69633a8f07d4a0c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
documentation of QMAKE_DEVELOPMENT_TEAM and
QMAKE_PROVISIONING_PROFILE
Change-Id: Id5854862e44387e31db40f574d85f88512c27f0c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
A typo caused the test to never detect the system wide PCRE.
Task-number: QTBUG-59226
Change-Id: I42ada99aac240455d11b53d2ab59d712d8f811ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>