Commit Graph

31831 Commits

Author SHA1 Message Date
Andreas Holzammer
229fd2cece CMAKE: Fix EGL link extensions
Targets were always exported as .lib, for all windows compilers
which is correct for msvc, but not for mingw. Hence use
QMAKE_EXTENSION_STATICLIB to switch between .lib and .a

Task-number: QTBUG-59906
Change-Id: I948f5dd96e0fb46d679c474b7beececc379ad436
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-04 08:11:58 +00:00
Tasuku Suzuki
a7b32ff63c Fix build without features.qeventtransition
Change-Id: I498d482b01d9dcaf794d35ecc26110c9a2d45ce0
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-04 04:24:02 +00:00
Tasuku Suzuki
b53c229a4b Fix build without features.networkinterface
Change-Id: I9fd2a7ec402a1d2d99e30f08554d86f18c6424ff
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 01:24:07 +00:00
Pavol Markovic
116ade88ea macOS: Replace deprecated NSOpenSavePanelDelegate method
shouldShowFilename method has been deprecated since macOS 10.6.
In 10.11 the behavior of this method has been broken, causing
files containing metadata (e.g. audio) to be incorrectly filtered out,
displayed them as disabled in file dialog even though they shouldn’t be.
This erratic behavior applies also to NSOpenPanel setAllowedFileTypes
if set to anything but nil. This has been confirmed to be a known bug
in Cocoa.

Using shouldEnableURL solves this problem and also removes risk
of breaking compatibility with future SDKs.

Renamed and simplified private method isHiddenFile to
isHiddenFileAtURL.
Renamed to be consistent with other Cocoa file query methods.
Simplified to return true only if the file is hidden as the name of the method
implies. Previously it might have returned true also if the file has
not existed which was in fact very metaphysical answer.
Check for presence of the file is done by other method before calling
this one and the scope of the method is limited to one source file.

Task-number: QTBUG-57527
Change-Id: I2fded712d4e7098eb444331d92e38cee71655100
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-04-04 01:16:01 +00:00
Kimmo Ollila
4e2f0fe4d6 Add -bigswitch on INTEGRITY
Needed to increase switch case limit on armv7

Change-Id: I30104407f49f07cfe367de820827d120498c5fff
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-03 08:08:46 +00:00
Kai Koehne
b2efaeba79 tests: Unify license to GPL-EXCEPT
Change-Id: Ic718650a8a7bddd4ee28c5650a3f5baf70886e51
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-04-03 07:18:46 +00:00
Tony Sarajärvi
801f89a9e8 Extend blacklisting of tst_QWidget to cover Ubuntu 16.04
Task-number: QTBUG-46116
Change-Id: I64465758deb360dd5445a80398617c0297ba561a
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-04-03 06:54:04 +00:00
Friedemann Kleint
e94e4d002e QMenu: Do not unnecessarily call QPlatformMenu::menuItemForTag()
When handling QActionEvent / ActionAdded, QActionEvent::before()
is 0 for the common 'append' case. Do not try to find a
QPlatformMenuItem for this.

Change-Id: I535b675fda6a2812b61eb8d7eec01da378ece413
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-04-03 06:49:42 +00:00
Thiago Macieira
392294936e qfloat16: suppress warning caused by Clang macro we used
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>
2017-04-02 17:40:29 +00:00
Thiago Macieira
8241d51f70 x86: Detect F16C with the Intel compiler too
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>
2017-04-02 17:40:27 +00:00
Nikita Krupenko
8675e1c5ee Fix warnings for -no-feature-dockwidget
This amends commit c20cd4d98e

Change-Id: I2fa903209694cd05e0dcf31e6f92d96ed934c91d
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-03-31 09:45:53 +00:00
Tor Arne Vestbø
e9af32fcd4 Ensure that tst_QFontDatabase::addAppFont() tests the whole path to an engine
Change-Id: Ie22cd9d7d362de86e02b841d40d75eac46395952
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-03-31 09:45:39 +00:00
Tor Arne Vestbø
5090fd5018 Rewrite FreeType-ifdef'ed function call in QCoreTextFontDatabase
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>
2017-03-31 09:35:43 +00:00
Maurice Kalinowski
995719cebd winrt: Fix dnd with non mouse input device
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>
2017-03-31 07:45:37 +00:00
Marc Mutz
df43ef7b6d QStringBuilder: simplify QConcatenable<char[N]>
... 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>
2017-03-31 07:11:13 +00:00
Sami Nurmenniemi
a262837505 Fix tst_Selftest on QEMU
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>
2017-03-31 07:09:46 +00:00
Tony Sarajärvi
d33b9774ac Extend blacklisting of parts of tst_QWidget to cover Ubuntu 16.04
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>
2017-03-31 06:22:28 +00:00
Anton Kudryavtsev
5ec57560c0 Prefer rvalue versions of toLatin() and toUtf8()
... to re-use existing buffers.

Change-Id: I7c42529b8cd4400520a59e658ab76f4f8e965cd4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-30 20:31:59 +00:00
Anton Kudryavtsev
ce124d5119 Prefer rvalue version of toLocal8Bit()
... to re-use existing buffers.

Change-Id: I5907a2e29d7f7dac04df5bf50769b47131e175d8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-30 20:30:19 +00:00
Timur Pocheptsov
8bd67f61a6 tst_qsslsocket::protocolServeSide - fix for macOS 10.11
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>
2017-03-30 17:01:35 +00:00
Tony Sarajärvi
c031ba30d5 Blacklist a QSequentialAnimationGroup autotest
Task-number: QTBUG-59806
Change-Id: Ib63614dbd9d57283a6394bfc4079308a3f4ddc93
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-03-30 12:10:31 +00:00
Tony Sarajärvi
96c27f0dfa Blacklist tst_QSslSocket::protocolServerSide on OS X 10.11
Task-number: QTBUG-48860
Change-Id: Ia352378f48b9ab404d06ac5ef9bf53afa8f192fd
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-03-30 12:10:16 +00:00
Michael Brüning
805a850f04 Convert QStrings with qUtf8Printable for GTK API calls
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>
2017-03-30 08:33:10 +00:00
Anton Kudryavtsev
f901afaf49 Use QStringBuilder more
Change-Id: If5283e364e921d99ffa7a8fa1abb07356a4a2682
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-03-30 04:28:09 +00:00
Nikita Krupenko
cc4f610c21 Fix warnings for -no-feature-mimetype
Change-Id: I6b1239941f8fd13eec72b0874d15d821d717ddf3
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-03-29 20:06:18 +00:00
Nikita Krupenko
d8426aa18e Fix warnings for -no-feature-itemviews
Change-Id: Ia384c2b48a6eaccb424cdde00240ebcfa6fd24c6
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-03-29 20:06:15 +00:00
Nikita Krupenko
c20cd4d98e Fix warnings for -no-feature-dockwidget
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>
2017-03-29 20:06:12 +00:00
Nikita Krupenko
b7febc35da Fix warnings for -no-feature-combobox
Change-Id: I352c011b21624ae9fb9db5a608e8c2b2491a05cd
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-03-29 20:06:10 +00:00
Nikita Krupenko
d9fe00e8e2 Fix warnings for -no-feature-cssparser
Change-Id: Ib0eae1858880e3fe2b6c6abd94c7ea0bbc2649a2
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-03-29 20:06:03 +00:00
Sami Nurmenniemi
80f1762a59 Fix tst_QUdpSocket for QEMU
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>
2017-03-29 14:29:43 +00:00
Timur Pocheptsov
baf7180776 Use HTTP2WasUsedAttribute for HTTP2
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>
2017-03-29 13:54:49 +00:00
Olivier Goffart
886ce572d6 Windows QPA: don't resize fixed sized windows when changing screen
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>
2017-03-29 13:36:03 +00:00
Friedemann Kleint
50ab231582 tst_QGuiApplication: Split the quitOnLastWindowClosed() tests
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>
2017-03-29 13:06:21 +00:00
Nico Vertriest
4d3b9171fe Doc: Add Creating C++ Classes to externalsites/qtcreator.qdoc
qtquickcontrols2-customize.qdoc:28: warning: Can't link to 'Creating C++ Classes'

Change-Id: I7e8e84d7a0d03a84f32d860bc646640e5cf6258f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-03-29 12:31:13 +00:00
Simon Hausmann
b263384589 Fix building of qopengl test on boot2qt
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>
2017-03-29 12:29:50 +00:00
Michael Brüning
78f761318a Set the mode for the GTK3 file chooser also in selectFile
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>
2017-03-29 12:25:00 +00:00
Anton Kudryavtsev
ff259bffe6 Use case-insensitive compare more
... to avoid allocations.

Change-Id: I5993633d1509495ff6ce3a11274a53504aac7c5e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-29 03:54:57 +00:00
Kimmo Ollila
cea75a2a65 Add GHS internal id TOOLS-26637 to bug workaround comments
Change-Id: I653e0b16e08e6167891603f47298554a87352765
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-28 13:10:20 +00:00
Kai Koehne
3c66df6400 Core: Replace LGPL21 with LGPL license header
Also use canonical contact url.

Change-Id: I43f8c6a2c4949ee0e054045bccc17d82575b072c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-03-28 12:47:55 +00:00
Nico Vertriest
710da40ac0 Doc: link error in qmake manual
qmake-manual.qdoc:3226: warning: Can't link to 'system(command[, mode])'

Change-Id: I22f7a9a79594d204b67796219bb84a60e76e92b1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-03-28 12:30:33 +00:00
Tor Arne Vestbø
22a414ab3d macOS: Remove workaround for default-sized NSViews
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>
2017-03-28 12:30:24 +00:00
Laszlo Agocs
dd38574160 Switch to RGB(A|X)8888[_Premultiplied] for QOpenGLFBO readbacks on GLES
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>
2017-03-28 11:17:52 +00:00
Anton Kudryavtsev
bae0c4c11a Avoid expensive QHash::values() calls
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>
2017-03-28 11:15:33 +00:00
Timur Pocheptsov
81b5aa792f QCocoaWindow - fix a compilation error
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>
2017-03-28 11:14:37 +00:00
Liang Qi
5d3b27f521 Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9 2017-03-28 11:13:44 +00:00
Liang Qi
e52eb747b1 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: I4788bc037c55c48563ffd4ba9633a22aa1d12f22
2017-03-28 12:18:11 +02:00
Vikas Pachdha
95b3ea08f8 Doc: Add documentation for new iOS variables in qmake manual
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>
2017-03-28 08:11:07 +00:00
Anton Kudryavtsev
18d6c82299 Prefer rvalue versions of toLower() and toUpper()
... to re-use existing buffers.

Change-Id: Ib2bc938f1cf0451c1dbc012b3db022b878e987cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-28 07:18:26 +00:00
Giuseppe D'Angelo
e8cf0bf5f8 PCRE2: fix the configure test
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>
2017-03-28 07:09:01 +00:00
Tobias Koenig
781b5a6198 Fix generation of gradient shader function in PDF
Add the missing endobj tag for the shader function object.

Change-Id: Ieb3cfa5a5d0e27d04164a80b028d41371507fb94
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-28 07:01:30 +00:00