summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Prevent QWindow transient parent loopTor Arne Vestbø2017-04-121-0/+4
| | | | | | | | Clients may wrongly set the transient parent to the window itself, causing endless loop when e.g. looking for the top level parent. Change-Id: Ib23cae3a5576320435ae9b76dd618d1e5ae08b5d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QWindowsFontEngineDirectWrite: Fix build with MinGWFriedemann Kleint2017-04-121-1/+1
| | | | | | | | | | | | In member function 'void tn::QWindowsFontEngineDirectWrite::collectMetrics()': windows\qwindowsfontenginedirectwrite.cpp:361:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (table.size() >= advanceWidthMaxLocation + sizeof(quint16)) { ^ Amends 17fc188aec5806167d3c6165b0ad299a8d2a6bcf. Task-number: QTBUG-58954 Change-Id: Ice2ff135d411b55d32290069b3c85ca0b5ea09af Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QSysInfo: Bring back suppression of ICC warning #1478Thiago Macieira2017-04-121-0/+1
| | | | | | | | | Turns out that different versions of ICC use different warning numbers. The Linux and Windows compilers emit 1786, but the macOS one emits 1478. Don't ask me why. Change-Id: I523b0abacd5148b2bf08fffd14b475a4c4d89ba1 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QProcess: fix Unix buildJake Petroules2017-04-111-0/+4
| | | | | | | | This fixes a regression introduced in ff19ebcc Task-number: QTBUG-60046 Change-Id: I47c357433b25f07011a7a3a64d3150591785b206 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Make networkAccessibility() return the actual state of the networkAndy Shaw2017-04-111-2/+2
| | | | | | | | | | If networkAccessibility() was queried when the networkAccessibleChanged signal was emitted then it would report the wrong state and in some instances it would incorrectly report NotAccessible. This ensures that it is reflecting what the signal would have been emitted with. Change-Id: Ib0a7ef9e9ec42c9007340020fd535c8ad36caa49 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Prevent leaking font data when creating QRawFont from QByteArraysTor Arne Vestbø2017-04-113-27/+45
| | | | | | | | | | | | | CTFontCreateWithGraphicsFont has a bug causing it to never release the graphics font, which cascades down to the data provider never being released and releaseFontData never being called. Instead of relying on a callback to release the byte array font data, we attach the font data to the engine's lifetime. Note that we are still leaking the CoreFoundation types. Change-Id: I6eda4212638ccc9439b90e004222272d204c707a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* macOS: Don't marshal app font data via URL when using FreeType font engineTor Arne Vestbø2017-04-112-71/+33
| | | | | | | | | | | | | | | | | | | | | | | Font descriptors can have attached attributes of any kind, not just pre- defined constants like kCTFontURLAttribute. We take advantage of this and attach the font data that was passed into addApplicationFont() to the font descriptor, so we can read it out directly when later creating an engine for it. This removes the need to build up a URL to represent the font data, which also didn't work for the memory-font use-case. The FreeType font engine now passes the same tst_QFontDatabase tests on macOS as the native CoreText font engine. This also fixes the leak caused by CTFontCreateWithGraphicsFont never releasing the graphics font, resulting in releaseFontData never being called: http://stackoverflow.com/questions/40805382/ We're now cleaning up the font data in releaseHandle, based on the attribute set on the font descriptor. Change-Id: Iba15222ec919f989e29fd98b263d9fb182c4d710 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Qt5DBusMacros: remove intermediate variableRolf Eike Beer2017-04-111-2/+1
| | | | | | | | | | | This has been there probably forever, likely from the time when the code was derived from upstream CMake. Since this is just copying one variable to another and the latter has a wrong name (_qt4_*) just drop it. Change-Id: Ica74f3bc9a6b0a6669d80cfc0ebafc003f5b908e Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Populate application fonts via font descriptors on Apple platformsTor Arne Vestbø2017-04-112-56/+22
| | | | | | | | | | | | | Instead of registering the font via CTFontManagerRegister we just create a font descriptor for the data/URL and populate that like normal system fonts. This makes the code more similar to how we deal with other fonts, shaves off a ms during font registration due to not registering the font, and fixes an issue on iOS where CTFontManagerRegister would invalidate earlier populated system font descriptors. Task-number: QTBUG-56765 Change-Id: I002a65075b15837c9a2d22573020d4c834111837 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Implement maxCharWidth() for DirectWrite engineEskil Abrahamsen Blomfeldt2017-04-112-2/+11
| | | | | | | | | | | | | | | | | | This is used to create the bounding box in QFontEngine::properties(), which in turn is used for the FontBBox when generating PDFs. The result was that the bounding width in the output was 0 and Adobe Reader complained that the PDF was malformed. We could implement the proper bounding rect in properties() at some point, instead of assuming an origin at x = 0 for instance. The metrics for that are in the head table. But for silencing the warning in Reader, just implementing the maxCharWidth() function is sufficient. [ChangeLog][Windows][PDF] Fixed a bug in PDF output when using high-dpi scaling which was causing the display of warnings when opening the file in Adobe Reader. Task-number: QTBUG-58954 Change-Id: I2540571863d4dd0f85af533b591f75dad3f0d75b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QtTest: add toString(QUuid)Marc Mutz2017-04-111-0/+6
| | | | | | | [ChangeLog][QtTest] QUuids are now printed on failure. Change-Id: I39a7b9169aef8ab6ef5ce0790920547af23bd1b9 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Ask MS runtime to reload the timezone details if they've changedThiago Macieira2017-04-111-1/+2
| | | | | | | | | | | | | | | POSIX documents that localtime() ensures that tzset() has been called, but the wording could be understood to mean that it only needs to do so the first time. Anyway, we're sure that the MS runtime only gets the timezone information from the Control Panel once. That means Qt-based applications will not react to a change in the timezone. Attempt to do that by moving tzset() out of the #if, to apply to all operating systems. Task-number: QTBUG-60043 Change-Id: I6ab535fb61094af19fc1fffd14b413541fe5a64c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* gtk3: Mark the minimum version we supportThiago Macieira2017-04-112-2/+3
| | | | | | | | | | | | | | | | | | | | | | | This suppresses warnings for API that is deprecated. Gtk often marks API like: GDK_DEPRECATED_IN_3_22_FOR((gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect)) void gtk_menu_popup (GtkMenu *menu, Which generates this (found with ICC, accidentally an error): qgtk3menu.cpp(449): error #1786: function "gtk_menu_popup" (declared at line 138 of "/usr/include/gtk-3.0/gtk/gtkmenu.h") was declared deprecated ("Use '(gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect)' instead") The warning is generated by GDK_DEPRECATED_IN_xxxx_FOR when GDK_VERSION_MIN_REQUIRED is higher than xxxx. And by default, unlike the Qt equivalent macros, the minimum version required is equal to the current version. The minimum version our support requires is 3.6, as we depend on gtk_accel_label_set_accel, which was first introduced in that version. Change-Id: I27b55fdf514247549455fffd14b1c47e470510b2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Optimize QLoggingSettingsParserMarc Mutz2017-04-102-39/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor the line parsing into a separate function, parseNextLine(), taking a QStringRef. In setContent(QTextStream&), use the new readLineInto() function to re-use the capacity of a single QString for all lines. In setContent(QString), use splitRef() to split the lines. In either function, pass each line to parseNextLine(). In order to port all the parsing to QStringRef, I needed to make some semantic changes: the old code removed all whitespace right at the beginning. This is not possible with QStringRef. It also didn't feel right, since a line like [ r u l e s ] would successfully parse as the section named "rules". I added trimmed() calls at the beginning, and around the valueStr and pattern extraction, which should be good enough. Also, when a section is found, don't store it anymore. Instead, only store whether it was the [rules] section, because that's all we'll test for. That way, we don't have to convert QStringRefs to QString just to store them across parseNextLine() calls. Replace the setSection() function with setImplicitRulesSection(), because "rules" is all that was ever passed. This is private API, we can bring back some of the dropped flexibility later, as needed. [ChangeLog][Important Behavior Changes] Logging rules can no longer contain arbitrary whitespace such as within a category identifier. Change-Id: Ic26cd23c71f5c810b37ef4b972354ac31d3408fe Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* QQnxWindow: replace QUuid::toString().toLatin1() with QUuid::toByteArray()Marc Mutz2017-04-101-1/+1
| | | | | | | UUIDs are always US-ASCII. Change-Id: I335882a2df179204d8eca1cf9f02bc6473bac700 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QWindowsPrintDevice: Handle 0 from DocumentProperties correctlyDaniel Teske2017-04-101-1/+1
| | | | | | Task-number: QTBUG-55090 Change-Id: I5fadd0f007c826ab6747f319dbf3eaee5f208a44 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* QTextDocument: improve import of DIV tagsDavid Faure2017-04-101-3/+7
| | | | | | | | | | | | <div>1<br/></div>2 was inserting two newlines between 1 and 2, while all tested web browsers only insert one newline - as long as there is nothing between the <br/> and the </div>. This was the cause for extra newlines being inserted in KMail when replying to HTML emails, such as those generated by gmail. Change-Id: I5145d977701e68913264357bba22780e7cdd3f7d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* winrt: Fix build for Windows 10 Creators UpdateMaurice Kalinowski2017-04-102-0/+4
| | | | | | | | | | | Phone specific UI colors have been removed from the windows headers. Continue to use the enum values does not gain anything as the native calls return errors for those. Actually they did that already with 14393. Change-Id: I4b04d3af319766216ae7c550af704aab488c1d15 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Update attribution file for changed command line paramHeiko Becker2017-04-071-1/+1
| | | | | | | | | 47c4d1378cc1eaffbc19c753726b36d2ff0decc0 changed the configuration command line parameter back to pcre, omitting the "2" which has been added after porting to PCRE2. Change-Id: Iadbd57725ab706cb4bae89c2decf8259bcad46b5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix QDir::mkpath() when the path contains "symlink/../"Thiago Macieira2017-04-071-19/+2
| | | | | | | | | | | | | | It is incorrect to collapse a "symlink/.." segment because the parent directory of the symlink's target may not be the directory where the symlink itself is located. [ChangeLog][QtCore][QDir] Fixed a bug that caused QDir::mkpath() to create the wrong directory if the requested path contained a symbolic link and "../". Change-Id: Iaddbecfbba5441c8b2e4fffd14a3e367730a1e24 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* Android: fix Menu and Back key handlingJ-P Nurmi2017-04-071-3/+11
| | | | | | | | | | Don't quit on Back key release when Back shortcut was accepted and likewise for the Menu key, don't trigger the platform menubar if Menu shortcut was accepted. Change-Id: Ifde87cbc2d95be1beb90ca59f55889b83a90ff02 Task-number: QTBUG-59670 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* QDataStream: add operator<< and >> for std::nullptr_tThiago Macieira2017-04-073-0/+24
| | | | | | | | | | | | | | | | | std::nullptr_t is nullary: it accepts only one value, nullptr. So we don't need to read or write anything. This commit simply adds the two operators that allow generic code to operate on std::nullptr_t if required. This commit also adds the actual use to QMetaType::load/save, even though there's no change in behavior. [ChangeLog][QtCore][QDataStream] Added operator<< and operator>> overloads that take std::nullptr_t, to facilitate generic code. Change-Id: Iae839f6a131a4f0784bffffd14aa37e7f62d2740 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Clarify the porting notes from QRegExp to QRegularExpressionFriedemann Kleint2017-04-071-9/+26
| | | | | | | | | | Add a small table to illustrate the results exactMatch() and split out the part on partial matching to a separate section since it is less common. Change-Id: Ifbd5c3cbd1d8c0ee9e8b2d58ed13f40776b03762 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* 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>