Commit Graph

31862 Commits

Author SHA1 Message Date
Thiago Macieira
b3f474d620 QSysInfo: update the ICC warning that needs to be suppressed
qsysinfo.h(235): error #1786: enum "QSysInfo::MacVersion" (declared at line 156) was declared deprecated ("Use QOperatingSystemVersion")

Take this opportunity to merge the two groups.

Change-Id: I27b55fdf514247549455fffd14b1c2a1d8eab869
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-06 04:14:55 +00:00
Thiago Macieira
71649e2168 Fix build when SCTP is enabled
c0157a9f03 was incomplete.

Change-Id: I27b55fdf514247549455fffd14b158f54403663d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-06 04:14:41 +00:00
Tor Arne Vestbø
fb38db29e1 Consider ENXIO (No such device or address) reason to check isatty()
Aligns with EPERM (Operation not permitted) and ENOENT (No such file
or directory), and is what errno is set to on macOS when opening the
/dev/tty device when running inside e.g. Xcode, where isatty() will
return true.

Change-Id: I09b88eaa3ff611d95ab37f0ff4df9aaaca52747d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-05 11:51:15 +00:00
Tony Sarajärvi
63ef26d583 Extend blacklisting of a tst_QMenuBar's test to cover Ubuntu 16.04
tst_QMenuBar::taskQTBUG4965_escapeEaten() already failed on
Ubuntu 14.04 and reproduces in 16.04.

Task-number: QTBUG-24326
Change-Id: I46170c9ce397f4042b308ca485b19364e6ee0663
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-04-05 10:31:00 +00:00
Samuli Piippo
3096e0fbd9 qnx: make alloca config test pass on QNX 7
Test failed on QNX 7, even though alloca is available. On QNX7,
it's a macro that expands to a line with NULL, but without define
for it.

alloca.cpp:44:5: error: 'NULL' was not declared in this scope

Task-number: QTBUG-59700
Change-Id: I3631d139990020a3adbab8b72e49929b6e721e80
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-05 05:02:42 +00:00
Timur Pocheptsov
ce2771c71c QNetworkRequest - do not set ManualRedirectPolicy
If QNAM's general policy is 'Manual' and QNetworkRequest has neither
policy set not FollowRedirectAttribute - do NOT set this 'Manual' policy -
its implicitly implied. This fixes previously unnoticed auto test failure
(was blacklisted) and also makes QNetworkRequest::operator == work correctly.

Change-Id: If17c9af4baf8a470659f82d1a40488078ea8ede0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-04-04 16:42:10 +00:00
Tor Arne Vestbø
1b2234c4e7 macOS: Remove un-needed fontDef assignment in QCoreTextFontDatabase
The QCoreTextFontEngine constructor already sets the member (like it should).

Change-Id: I6e59ff36c439857418a636de4056c20d2f65e8d4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-04 15:14:35 +00:00
Tor Arne Vestbø
5b41b34958 macOS: Use NSURL to resolve FreeType font names instead of CoreFoundation
Change-Id: I4b397361c483fa07e4e95288f66d7f7ea2df8d9f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-04 15:14:22 +00:00
Tor Arne Vestbø
a7fe6ab891 macOS: Use shared code path for creating FreeType font engine for QRawFont
The round trip via a CGFontRef to a CTFontRef so that we could pull out
the kCTFontURLAttribute of the font makes no sense, as the input is just
raw font data. None of the tst_QRawFont tests are able to pull out a
URL, and none of the other platforms where FreeType is available resolve
a filename from raw fonts.

Without this change the tst_QRawFont test has 13 failed test cases and
spits out 1250 QWARNs. With the patch all tests pass without warnings.

Change-Id: I17965e7405d7161958ff0870825ce8190598288f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-04 15:02:13 +00:00
Tor Arne Vestbø
6c547142d5 Move FreeType font engine creation for QRawFont into factory function
So that the logic can be used without subclassing the FreeType font database.

Change-Id: Ib1ac0e1948ce18003b8eda0c1e8fbb3c7e6c8360
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-04 15:01:43 +00:00
Tor Arne Vestbø
2b9ecfe69c macOS: Split out font engine creation from QCoreTextFontDatabase
The Core Text font database can produce both Core Text and FreeType font
engines. Refactor the code a bit so that the actual factory methods that
differ between the two stand out, and do not require a granular runtime
check in each method.

Change-Id: Ib70f76f4a9001a8108d87c1101a50699a6ea8f55
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-04 15:01:38 +00:00
Sami Nurmenniemi
cd8d2c1743 Skip testing of QOpenGLWidget on platforms that don't support it
QOpenGLWidget is not supported on all platforms. Skip tests on those.

Change-Id: I0f9500553427903f20d248acaa20803276e3ab00
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-04 14:13:03 +00:00
Stephan Binner
08fc4c4e95 Fix warning for -no-feature-draganddrop -no-feature-clipboard
Change-Id: I974ac692f59622fbb5cf7c6bd60954cf306dabe7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:17:34 +00:00
Stephan Binner
8146fd5f8c Fix several unused warnings for misc disabled features
Change-Id: Id42daf684abeeb888155d65eca143150d9c5f5a7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:21 +00:00
Stephan Binner
0db0441bb7 Fix warning for -no-feature-temporaryfile
Change-Id: Ibb022a1fd043001f628a343dc8ae509083eb4471
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:20 +00:00
Stephan Binner
dfe0bfff39 Fix warnings for -no-feature-settings
Change-Id: I79ce0b9c5eb931e238394519ba80bf35e4ff3bf7
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:19 +00:00
Stephan Binner
5678e62141 Fix warning for -no-feature-textcodec
Change-Id: I7775c8611a532db96f9843c311463a69c2e9ef82
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:18 +00:00
Stephan Binner
acc0ad7883 Fix warning for -no-feature-texthtmlparser
Change-Id: I6dd6e80a546a76ce3717855ebacb188254fe70d6
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:17 +00:00
Stephan Binner
d285409674 Fix warning for -no-feature-graphicsview
Change-Id: I11ab0c664b860014376c725ea162e62740234ea4
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:16 +00:00
Stephan Binner
21abfc8101 Fix warning for -no-feature-wheelevent
Change-Id: Ibf240228100bbc7cd8a85e49abc9dbff026e5433
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:15 +00:00
Stephan Binner
4fda233ad7 Fix warning for -no-feature-menubar
Change-Id: I58573d769897c956144604d51d38cad1c121f751
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:13 +00:00
Joerg Bornemann
7e15df0333 Doc: Move $$files() documentation to "Built-in Replace Functions"
files is not a test function.

Change-Id: I6d23dac5d1c87bd35961406dd62cc3cf37d652e3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-04 11:53:05 +00:00
Sami Nurmenniemi
6d6a826038 Skip OpenGL tests on platforms that don't support OpenGL
Change-Id: Iff38950a940d602fbfcc35595624e56399aab53a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-04 11:06:38 +00:00
Timur Pocheptsov
5377f4ec0e Allow Secure Transport backend to use a temporary keychain
Cherry picked:

this change was first merged into dev, but now we also need it in 5.9
to enable SSL socket tests on the new CI VMs (macOS 10.11, 10.12).
As we do not merge dev->5.9, we need this cherry-pick.

Since day one Secure Transport socket has two annoying problems on macOS:
when we call SecPKCS12Import, we indeed import certs and keys into the default keychain
and also (which is more serious) later a dialog can pop up, asking for permission
to use a private key (this is especially annoying if you're running SSL autotests or
have a server application). Apparently, it's possible to work around those problems
if we create our own (temporary) keychain and pass it in the 'options' parameter
to SecPKCS12Import.

[ChangeLog][QtNetwork] Allow QSslSocket to use a temporary keychain on macOS.

Task-number: QTBUG-56102
Change-Id: Ic3a56c905100dc80d907a25fe6ebfa232dcf5b9e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 17927392cf)
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-04-04 10:44:29 +00:00
Tor Arne Vestbø
de4aeade5e Delete QRasterWindow backingstore while window is still alive
The platform backingstore might need access to the window that the
backingstore was created for, e.g. for makingCurrent to release OpenGL
resources. In that case leaving it to the QRasterWindowPrivate destructor
would be too late, as the QWindow was gone.

This was seen on iOS, where the backingstore inherits QRasterBackingStore,
and uses composeAndFlush to composit via GL. The raster backingstore
cleans up these GL resources in its destructor, so the QIOSBackingStore
destructor makes sure that the GL context is current for the window,
resulting in a crash since the window is long gone by then.

Change-Id: I5a22597842819f0fe3b580856b9e75e4fab32ae5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-04-04 09:36:12 +00:00
Tor Arne Vestbø
0d12ebd7e7 Share FreeType font engine creation code between platforms
The FreeType font engine setup is spread out between factory functions,
constructors, and init() functions, so let's at least try to share as
much as possible of it to make it easier to reason about and possibly
refactor in the future.

Change-Id: Ic39353d2b3111024e0589a70211bac80feb8498e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-04 09:23:59 +00:00
Tor Arne Vestbø
e33b0118b4 Rename QBasicFontDatabase to QFreeTypeFontDatabase which is what it is
Change-Id: I8def2f7ae1e4c8d8a3e1f8e60549da5d691e4fb3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-04 09:23:52 +00:00
Tony Sarajärvi
05a943497b Extend blacklisting of tst_QMenuBar::check_menuPosition to Ubuntu 16.04
Task-number: QTBUG-46115
Change-Id: I1ed994e07e78d7e7c59967e86e9cc4160c6a55b1
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-04-04 09:15:53 +00:00
Stephan Binner
876563ced0 No divide by zero if all imageformat features are disabled
Change-Id: Ib3e8a4b62ae627bc3dc8541767dafff4e493d2f8
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-04-04 09:01:37 +00:00
Friedemann Kleint
267c2c2a93 QFusionStyle::drawPrimitive(): Use color in cache key of PE_PanelButtonCommand
Previously, only bool isDefault was used, which did not discriminate
changes in ButtonColor. Use the color name instead.

Task-number: QTBUG-59850
Change-Id: I1e006f98371a5f2039dcca1207addc0396e7c1e5
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-04-04 08:42:01 +00:00
Laszlo Agocs
22d43c9e51 xcb: Get rid of qCInfo in the GLX backend
qCInfo must never be used. For qt.* logging categories Debug is disabled
while everything else is enabled by default. This means that doing qCInfo
is equivalent to putting a qDebug which is not acceptable.

Amends 3e0355014e

Change-Id: I428e620f12afa324cf6af8dbe3912a55189a38a9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-04-04 08:17:48 +00:00
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