summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix detection of F16C for the Intel compiler (again) and Visual StudioThiago Macieira2017-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Neither the Intel compiler nor Visual C++ have a dedicated switch to enable F16C support, like GCC and Clang do. So we used the AVX switch for that in commit 8241d51f7049d48912ce25fbd49ef4d22c58e340, as it was the closest, lowest denominator. That was incorrect and insufficient. The Intel compiler silently miscompiles the intrinsics with -xAVX, making calls to out-of-line functions like _mm_cvtps_ph, which don't exist. So we actually have to use AVX2 support to generate correct code. That might be a problem later, since Ivy Bridge supports F16C but not AVX2. Visual C++ is able to generate F16C code with just -arch:AVX. Either way, since there's no dedicated command-line switch, there's also no dedicated preprocessor macro. We're using __AVX2__ for both compilers, as that's a sufficient condition to indicate a processor that supports F16C. Change-Id: I27b55fdf514247549455fffd14b205b8d8b86da7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* f16c: Use the packed intrinsics instead of scalar onesThiago Macieira2017-04-061-2/+6
| | | | | | | | | MSVC, Apple's Clang and Clang prior to 3.9 do not recognize _cvtss_sh and _cvtsh_ss. So expand the operation to use directly the packed intrinsics. Change-Id: I27b55fdf514247549455fffd14b2046fd638593d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix GCC warning about dereferencing type-punned pointersThiago Macieira2017-04-061-1/+2
| | | | | | | | | | | | | | GCC is wrong. Type-punning is when you read something of a given type as something else. We're not doing that, as it's only read as integer. qnativesocketengine_unix.cpp:1011:79: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] Too bad my plan for a good C++ solution was foiled by glibc developers. Change-Id: I27b55fdf514247549455fffd14b1a27667745e94 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QSysInfo: update the ICC warning that needs to be suppressedThiago Macieira2017-04-061-14/+9
| | | | | | | | | 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>
* Fix build when SCTP is enabledThiago Macieira2017-04-061-0/+4
| | | | | | | | c0157a9f035a27a3ba20cab0ca3ca1c6e78f0b14 was incomplete. Change-Id: I27b55fdf514247549455fffd14b158f54403663d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Consider ENXIO (No such device or address) reason to check isatty()Tor Arne Vestbø2017-04-051-1/+1
| | | | | | | | | | | 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>
* QNetworkRequest - do not set ManualRedirectPolicyTimur Pocheptsov2017-04-041-4/+2
| | | | | | | | | | | 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>
* macOS: Remove un-needed fontDef assignment in QCoreTextFontDatabaseTor Arne Vestbø2017-04-041-1/+0
| | | | | | | The QCoreTextFontEngine constructor already sets the member (like it should). Change-Id: I6e59ff36c439857418a636de4056c20d2f65e8d4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* macOS: Use NSURL to resolve FreeType font names instead of CoreFoundationTor Arne Vestbø2017-04-041-28/+9
| | | | | Change-Id: I4b397361c483fa07e4e95288f66d7f7ea2df8d9f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* macOS: Use shared code path for creating FreeType font engine for QRawFontTor Arne Vestbø2017-04-041-21/+1
| | | | | | | | | | | | | | 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>
* Move FreeType font engine creation for QRawFont into factory functionTor Arne Vestbø2017-04-043-48/+52
| | | | | | | So that the logic can be used without subclassing the FreeType font database. Change-Id: Ib1ac0e1948ce18003b8eda0c1e8fbb3c7e6c8360 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* macOS: Split out font engine creation from QCoreTextFontDatabaseTor Arne Vestbø2017-04-045-72/+101
| | | | | | | | | | 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>
* Fix warning for -no-feature-draganddrop -no-feature-clipboardStephan Binner2017-04-041-0/+2
| | | | | Change-Id: I974ac692f59622fbb5cf7c6bd60954cf306dabe7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix several unused warnings for misc disabled featuresStephan Binner2017-04-045-0/+41
| | | | | Change-Id: Id42daf684abeeb888155d65eca143150d9c5f5a7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix warning for -no-feature-temporaryfileStephan Binner2017-04-041-0/+1
| | | | | | Change-Id: Ibb022a1fd043001f628a343dc8ae509083eb4471 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix warnings for -no-feature-settingsStephan Binner2017-04-042-0/+4
| | | | | | Change-Id: I79ce0b9c5eb931e238394519ba80bf35e4ff3bf7 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix warning for -no-feature-textcodecStephan Binner2017-04-041-0/+2
| | | | | | Change-Id: I7775c8611a532db96f9843c311463a69c2e9ef82 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix warning for -no-feature-texthtmlparserStephan Binner2017-04-041-2/+2
| | | | | | Change-Id: I6dd6e80a546a76ce3717855ebacb188254fe70d6 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix warning for -no-feature-graphicsviewStephan Binner2017-04-041-1/+1
| | | | | Change-Id: I11ab0c664b860014376c725ea162e62740234ea4 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix warning for -no-feature-wheeleventStephan Binner2017-04-041-0/+2
| | | | | | Change-Id: Ibf240228100bbc7cd8a85e49abc9dbff026e5433 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix warning for -no-feature-menubarStephan Binner2017-04-041-1/+1
| | | | | | Change-Id: I58573d769897c956144604d51d38cad1c121f751 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Allow Secure Transport backend to use a temporary keychainTimur Pocheptsov2017-04-042-6/+125
| | | | | | | | | | | | | | | | | | | | | | | | 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 17927392cf1cecb20cef7cb9cd77131391de087c) Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Delete QRasterWindow backingstore while window is still aliveTor Arne Vestbø2017-04-042-0/+9
| | | | | | | | | | | | | | | | 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>
* Share FreeType font engine creation code between platformsTor Arne Vestbø2017-04-048-68/+51
| | | | | | | | | | 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>
* Rename QBasicFontDatabase to QFreeTypeFontDatabase which is what it isTor Arne Vestbø2017-04-0418-46/+46
| | | | | Change-Id: I8def2f7ae1e4c8d8a3e1f8e60549da5d691e4fb3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* No divide by zero if all imageformat features are disabledStephan Binner2017-04-041-1/+2
| | | | | | Change-Id: Ib3e8a4b62ae627bc3dc8541767dafff4e493d2f8 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QFusionStyle::drawPrimitive(): Use color in cache key of PE_PanelButtonCommandFriedemann Kleint2017-04-041-2/+3
| | | | | | | | | 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>
* xcb: Get rid of qCInfo in the GLX backendLaszlo Agocs2017-04-041-3/+3
| | | | | | | | | | | 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 3e0355014edda23d94605c77dd8c1582b91f9c18 Change-Id: I428e620f12afa324cf6af8dbe3912a55189a38a9 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* CMAKE: Fix EGL link extensionsAndreas Holzammer2017-04-041-4/+4
| | | | | | | | | | | | | 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>
* Fix build without features.qeventtransitionTasuku Suzuki2017-04-041-0/+2
| | | | | | Change-Id: I498d482b01d9dcaf794d35ecc26110c9a2d45ce0 Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix build without features.networkinterfaceTasuku Suzuki2017-04-042-0/+6
| | | | | Change-Id: I9fd2a7ec402a1d2d99e30f08554d86f18c6424ff Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* macOS: Replace deprecated NSOpenSavePanelDelegate methodPavol Markovic2017-04-041-24/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* QMenu: Do not unnecessarily call QPlatformMenu::menuItemForTag()Friedemann Kleint2017-04-031-1/+3
| | | | | | | | | | | 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>
* qfloat16: suppress warning caused by Clang macro we usedThiago Macieira2017-04-021-0/+3
| | | | | | | | | | | | | 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>
* Fix warnings for -no-feature-dockwidgetv5.9.0-beta1Nikita Krupenko2017-03-311-1/+1
| | | | | | | | This amends commit c20cd4d98ea43275bd8859581e273d69a90c3413 Change-Id: I2fa903209694cd05e0dcf31e6f92d96ed934c91d Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Rewrite FreeType-ifdef'ed function call in QCoreTextFontDatabaseTor Arne Vestbø2017-03-312-7/+4
| | | | | | | | 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>
* winrt: Fix dnd with non mouse input deviceMaurice Kalinowski2017-03-312-0/+25
| | | | | | | | | 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>
* QStringBuilder: simplify QConcatenable<char[N]>Marc Mutz2017-03-311-18/+4
| | | | | | | | | | ... 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>
* Prefer rvalue versions of toLatin() and toUtf8()Anton Kudryavtsev2017-03-3016-28/+23
| | | | | | | ... to re-use existing buffers. Change-Id: I7c42529b8cd4400520a59e658ab76f4f8e965cd4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Prefer rvalue version of toLocal8Bit()Anton Kudryavtsev2017-03-304-4/+4
| | | | | | | | ... to re-use existing buffers. Change-Id: I5907a2e29d7f7dac04df5bf50769b47131e175d8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Convert QStrings with qUtf8Printable for GTK API callsMichael Brüning2017-03-301-25/+20
| | | | | | | | | | | 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>
* Use QStringBuilder moreAnton Kudryavtsev2017-03-303-14/+10
| | | | | Change-Id: If5283e364e921d99ffa7a8fa1abb07356a4a2682 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix warnings for -no-feature-mimetypeNikita Krupenko2017-03-291-0/+2
| | | | | | Change-Id: I6b1239941f8fd13eec72b0874d15d821d717ddf3 Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix warnings for -no-feature-itemviewsNikita Krupenko2017-03-291-0/+2
| | | | | | Change-Id: Ia384c2b48a6eaccb424cdde00240ebcfa6fd24c6 Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix warnings for -no-feature-dockwidgetNikita Krupenko2017-03-291-0/+3
| | | | | | | 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>
* Fix warnings for -no-feature-comboboxNikita Krupenko2017-03-291-0/+2
| | | | | | Change-Id: I352c011b21624ae9fb9db5a608e8c2b2491a05cd Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix warnings for -no-feature-cssparserNikita Krupenko2017-03-292-1/+3
| | | | | | Change-Id: Ib0eae1858880e3fe2b6c6abd94c7ea0bbc2649a2 Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Use HTTP2WasUsedAttribute for HTTP2Timur Pocheptsov2017-03-293-2/+14
| | | | | | | | | | | 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>
* Windows QPA: don't resize fixed sized windows when changing screenOlivier Goffart2017-03-291-0/+3
| | | | | | | | | | 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>
* Set the mode for the GTK3 file chooser also in selectFileMichael Brüning2017-03-292-3/+18
| | | | | | | | | | | | | | | | 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>