summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QDate/Time: add toString(QStringView) overloadsMarc Mutz2017-04-125-11/+61
| | | | | | | | [ChangeLog][QtCore][QDate/QTime/QDateTime] Added toString() overloads taking the format as a QStringView. Change-Id: I322fa22e6b13fe8ba4badf0a3133425bd067ef32 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QLocale: add toString(Q(Date|QTime)+, QStringView format) overloadsMarc Mutz2017-04-126-22/+88
| | | | | | | | | | | | | While at it, change the interface of qt_repeatCount() to just take a single QStringView, since QStringView::mid() is so cheap. Add some \internal docs. [ChangeLog][QtCore][QLocale] Added toString(QDate/QTime/QDateTime) overloads taking the format string as a QStringView. Change-Id: Ic078796677a6db06227c8a3e276dbdb1039ceead Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QByteArray: add missing inline keywordsMarc Mutz2017-04-111-38/+38
| | | | | | | | | | | | | | Inline member functions that are not defined in the class body must be marked with the inline keyword. Otherwise, MinGW complains about any use of such functions before they are defined with its infamous error message: 'char QByteArray::at(int) const' redeclared without dllimport attribute after being referenced with dll linkage Fix it for all such functions. Change-Id: Iae76a7ed18e7b2d5cb5e217e154f647be4a2d9c1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QRegularExpression: streamline some wording in the documentationGiuseppe D'Angelo2017-04-111-19/+30
| | | | | | Change-Id: Ic1adbf9358ef6fbdaaee52471cd8ed9ca895a9d0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Add button layout for dialogs on AndroidNikita Krupenko2017-04-116-14/+36
| | | | | | | | | | | | | | | It used macOS layout before, but it differs from the actual layout in Android/Material Design: affirmative actions are on the right side, dismissive actions are directly to the left of the affirmative actions and neutral actions are on the left side. [ChangeLog][Platform-specific Changes][Android] Android dialogs now have more appropriate button layout, with affirmative actions on the right. Task-number: QTBUG-58060 Change-Id: I0755f80261410c64cf4f854b7f2a72e2d959db28 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QAndroidPlatformScreen: Use an event rather than a QTimerRobin Burchell2017-04-112-7/+19
| | | | | | | | | | | | | | | | It looks like the origins of this timer may come from QFbScreen. QFbScreen, however, changed away from a timer in d7068cbe1b37eb065c1902c8e944f3bc19db0ba4. There are other reasons to avoid a timer in this case, though: a timer may be pre-empted by application events (like other timers), which may mean a significant amount of time could pass between starting the timer and pushing the contents out to the actual screen (in doRedraw). This has the effect that flush becomes synchronous, which matches the behavior of the other platforms as far as I can tell. Change-Id: Ic67ae6c82945a247dceac44ee1bf7d2940f79d07 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* QSslSocket/macOS: optimize QUuid usageMarc Mutz2017-04-101-10/+8
| | | | | | | | | | - don't create a QString, a QByteArray suffices - perform the mid() operation on a view type (QLatin1String), not on a container - use QStringBuilder Change-Id: Ifd74f2bc98606425f9f6cb4da8618e8066a8b12e Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Make QStringView::storage_type publicMarc Mutz2017-04-101-1/+1
| | | | | | | | ... so users of QStringView::utf16() can use it, without having to revert to decltype()/auto. Change-Id: Ie09696b9354d3917914f8e2692769cfd35b01ae1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* winrt: Use hostnames for socket connectionsOliver Wolff2017-04-101-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using IP addresses does not work for every use case on WinRT. The workaround that is in place for VPN connections uses the host name directly but has the disadvantage that it: 1) does a host lookup nevertheless and ends up using the host name afterwards. 2) needs a set environment variable to be activated. Instead of doing a host lookup we now use the same approach that is used if a proxy with the HostNameLookupCapability is present. In this case the lookup is skipped and the direction is made using the hostname. The big advantage of hostname over ip addresses on WinRt is, that Windows handles everything related to lookup and proxies (it uses the system proxy in this case), so we do not have to take care of that. As the WinRT backend falls back to the "connectToHostByName" in any case no further adaptions are needed. QT_WINRT_USE_THREAD_NETWORK_CONTEXT cannot be completely removed though as the creation of the network context should not be done unconditionally. This change partially reverts e9fa435652ef064515bd5c04c0b5e5c4a30ebca4 Task-number: QTBUG-59989 Change-Id: I5dc7481b7499192641470b4b5a6642509a4b4f38 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Mark qCompareStrings() functions pureMarc Mutz2017-04-091-4/+4
| | | | | Change-Id: I73945aceeb1e3e2794c285ca6379bee3d94013a6 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* cleanup: remove references to unknown classesGatis Paeglis2017-04-081-8/+0
| | | | | | | | Google did not find anything. I guess it is just some development side product. Change-Id: Idc44870e71bad1c13858210c7830e08573442cca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QVersionNumber: add fromString(QStringView/QLatin1String) overloadsMarc Mutz2017-04-083-8/+57
| | | | | | | | | | | | | | | The parsing code anyway operated on a QByteArray created from toLatin1(), so expose this to the user by providing a QLatin1String overload. Also provide a QStringView overload, since we can. Port one user (in qmake) to the new overload. [ChangeLog][QtCore][QVersionNumber] Added QStringView and QLatin1String overloads of fromString(). Change-Id: Idbff44c3997f5cfa86ea1bce8b3da4b700a3d9cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* doc: Correct include guardMartin Smith2017-04-071-3/+3
| | | | | | | | | It should be QCOCOAWINDOWFUNCTIONS_H, not QXCBWINDOWFUNCTIONS_H. Change-Id: I296e1db28f3727c6aba6de4f02cf26808f72a8a1 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: remove x11FilterEvent() code pathGatis Paeglis2017-04-071-34/+2
| | | | | | | | | | | | | | | This is a legacy code that was there to support IM plugins using the Qt4's QInputContext::x11FilterEvent. Updating IM plugins to the new API is a trivial task, external plugins have had enough time to switch to the new API QInputContext::filterEvent(). The 'fcitx' plugin did the required changes in Oct 2014. AFAIK this was the only remaining plugin that still used x11FilterEvent. Change-Id: I7702bcd7017d2d24a1ed07fdebac8b61ca178161 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add front()/back() to QString, QStringRef, QByteArray and QLatin1StringMarc Mutz2017-04-074-0/+198
| | | | | | | | | | | These STL-compatibility functions are present on our generic containers, but not on the string classes. [ChangeLog][QtCore][QString/QStringRef/QByteArray/QLatin1String] Added front() and back() for STL compatibility. Change-Id: I536019396b319abd1e2daf9c64ebab4e7a35b334 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add qConvertTo{Utf8,Latin1,Local8Bit,Ucs4}() and corresponding QStringView ↵Marc Mutz2017-04-075-39/+185
| | | | | | | | | | | | | | | | | methods Like the qt_compare_strings()/qCompareStrings() split, distinguish between the internal and exported functions. Because of the circular dependency between qstring.h and qvector.h, the inline toUcs4() function has to be in qvector.h. At some point, we need to refactor the headers so qvector.h is lower in the dependency chain than qstring.h. It's not the first time this bites. Change-Id: Ief9f3bd92c83cdd1f31c51c700f42e146916eefd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace Q_DECL_OVERRIDE with override in imageformatsJesus Fernandez2017-04-076-33/+33
| | | | | | Change-Id: I7280cdf674b2a202f9ef7ff2bb9b6732e09a5a76 Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devLiang Qi2017-04-0790-542/+696
|\
| * Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-0790-542/+696
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/linux-icc/qmake.conf mkspecs/macx-icc/qmake.conf mkspecs/win32-icc/qmake.conf src/gui/painting/qgrayraster.c Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
| | * Don't set margin on offscreen window if it has a parentSami Nurmenniemi2017-04-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Offscreen platform had window frame margins set to 2 by default unless Qt::FramelessWindowHint had been set. Margins must not be set to 2 if the window has a parent. This change fixes two tests in tst_QWindowContainer for offscreen platform. Change-Id: Ib1577c301ea3a3b240bfa7c46ff12510dd2bcef0 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Liang Qi2017-04-0636-175/+246
| | |\
| | | * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-0636-175/+246
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/widgets/widgets/qtabbar.cpp Change-Id: Iaa9daee5f7a6490d56257a3824730a35751ceb05
| | | | * Copy stretch to multifont fontDefAllan Sandfeld Jensen2017-04-052-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we do not the fontDef of the multifont will be the default 0. Task-number: QTBUG-59443 Change-Id: Ib223517975b2a57b2371e309d12cd8f918d30825 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | | | * Fix stretch of QRawFontsAllan Sandfeld Jensen2017-04-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set stretch to always have no transform on raw fonts. Task-number: QTBUG-59799 Change-Id: Ibfacc5c247e0b4a8410572e207f09f6e67b74f9d Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | | | * Environment variable enabling the workaround FBO readback bugMarco Martin2017-04-053-32/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some ARM devices the font glyph generation is broken Add an environment variable to enable workaround_brokenFBOReadBack in QOpenGLContext, to fix font rendering on such devices as Mali and Adreno Change-Id: I9cc99ecb8b71a35bc369ec9dd11b877016b1179e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | | | * qbmphandler fix: use qint64 for caching QIODevice file positionHendrick Melo2017-04-042-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed the file position and offset types so they can properly handle files larger than the 32bit limit Task-number: QTBUG-59493 Change-Id: I00e1741c7682c4c79f35fef808fe1ea26e67c8b5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Hendrick Melo
| | | | * Adds a note to QSqlDatabase::~QSqlDatabase documentationJesus Fernandez2017-04-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the last QSqlDatabase object is destroyed the destructor implicitly calls close() to release the database connection. Task-number: QTBUG-59919 Change-Id: I04c15c4999cdaaa8800a44a1a1006f977a90d8a6 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | | * GCC 7: fix -Werror=implicit-fallthroughGiuseppe D'Angelo2017-04-0414-38/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More fallthrough-are-errors fixed. Change-Id: I9a6cb6efe988400ed3f9cb95d1e426dac317e6c4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | | | * QRasterBackingStore: Correct high-dpi image sizeMorten Johan Sørvig2017-04-041-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix QT_SCALE_FACTOR usage on macOS. Follow-up to 2d2d9078 QRasterBackingStore should account for native scaling only. Any Qt scaling will have already been factored into the size argument. Change-Id: I26a67addfcbec3d45f4ed87f03b8dd79fd99cb62 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | | * Fix qReallocAligned for reallocation when alignment > 2*sizeof(void*)Thiago Macieira2017-04-041-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we call realloc, the alignment of the new block may be different from the old one. When that happens, we need to memmove the data to the new position, before we start overwriting things. Task-number: QTBUG-59804 Change-Id: I27b55fdf514247549455fffd14b07ea78918a3d0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | | | * Use fallthrough attributes only in C++ modeGiuseppe D'Angelo2017-04-031-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 7 defines __has_cpp_attribute even when invoked as "gcc" (possibly, Clang does the same, according to a comment in the code, did not test myself). Hence, define the fallthrough declaration (as C++11 attributes) only when compiling as C++, otherwise we pick them up even in C mode, and they cause build failures. Change-Id: I3f13205e014bb1dea59ee3664b29111521a7eae3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | | | * qtconcurrent: correct whitespacesEric Lemanissier2017-04-031-50/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Idaec09b75767a072bd817416c3cc2b19e3a0e03b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | | | * xcb: fix build when xlib is not presentGatis Paeglis2017-04-031-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove Xutil.h include from qxcbmime.cpp as it does not use any Xlib APIs. Using API from Xutil.h requires Xlib as noted in Xutil.h: /* You must include <X11/Xlib.h> before including this file */ Everywhere else we do check for presence of Xlib, before including Xutil.h And remove some useless #undef(s) Task-number: QTBUG-39665 Change-Id: Ibfd2341338fe7e902b47eae2df6b9dafe4ab962d Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | | | * xcb: prevent dangling pointer when window focus changesGatis Paeglis2017-04-033-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the current implementation, the QXcbConnection::m_focusWindow was holding a dangling pointer during the focus transition from a dying modal window to other modal window. 1) QXcbConnection::m_focusWindow holds a pointer to A; 2) A is closed; 3) relayFocusToModalWindow B; => m_focusWindow now points to a dead window. 4) We get a reply back from WM in a respone to relayFocusToModalWindow (_NET_ACTIVE_WINDOW) => m_focusWindow now points to a valid window. The fix is to update m_focusWindow to nullptr, when the current focus window was destroyed and the new focus window has not been set yet by WM. This patch actually solves a more general case - whenever we get a focus-out event, we should set m_focusWindow to nullptr. It is ok for none of the windows to be in-focus while focus transition is happening. The focusInPeeker will make sure to "optimize out" (when possible) this no-window-in-focus state, and GUI won't be bothered by this extra event. This is how things were working before relayFocusToModalWindow was introduced. Having a focus-relay mechanism in-between is ok, but it should not have changed the original behavior. Task-number: QTBUG-48391 Task-number: QTBUG-55197 Change-Id: I6fdda9de73f999dad84000059ce4b89c0d1a964c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | | | * Mark to remove const from function parameters in QtCore public headersThiago Macieira2017-03-313-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | | * Don't use non-POD type as variadic argumentTobias Sung2017-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | | * QCryptographicHash: make SHA3 calculate SHA3, not KeccakGiuseppe D'Angelo2017-03-311-12/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | | * QCryptographicHash: fix documentation of the supported algorithmsGiuseppe D'Angelo2017-03-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Idfa7843ef8a8e3410ae0a8cf5311b8b598299730 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * QtWidgets: Fix white text color on tabs on macOS for non-macOS stylesBłażej Szczygieł2017-03-301-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply white text only for macOS style. Amends 2c0033983bc53e906eab3f4b2fae836ff8472713 Task-number: QTBUG-59784 Change-Id: I9e66e929699efd715ed4565394f1aba763aeb32a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | * | | eglfs: Show error details when JSON parsing failedRainer Keller2017-04-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1a92da5b2ed0b8064efa37c43d7894c212073b60 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | * | | Replace last occurrences of LGPL3, LGPL3-COMM headersKai Koehne2017-04-064-43/+63
| | |/ / | | | | | | | | | | | | | | | | Change-Id: I0e967120d7bdfa00f110b49e6c65d8c6f9b329aa Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| | * | 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>