summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QDate/Time: add toString(QStringView) overloadsMarc Mutz2017-04-126-12/+62
| | | | | | | | [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-127-22/+94
| | | | | | | | | | | | | 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-085-9/+66
| | | | | | | | | | | | | | | 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>
* qmake: use new QString::arg(QStringView) overloadMarc Mutz2017-04-074-25/+26
| | | | | | | | | | | | Add ProString::toQStringView() to avoid creating QStrings just to pass them to QString::arg() (single-arg; multiArg() does not, yet, accept QStringViews). I could have used the existing toQStringRef() function, but QStringRef is a tad more complex to copy and quite a bit less future-proof. Change-Id: I344c46f301768e844c487d36ce3e6cb276de8843 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QMakeEvaluator: port a QString::split() to a QStringRef::split() loopMarc Mutz2017-04-071-4/+4
| | | | | Change-Id: I91a65776124f88a7e2e4778dbe9154b597f52212 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Adds a list of supported platforms in PI mkspecJesus Fernandez2017-04-071-2/+3
| | | | | Change-Id: I7e67ffc41c7a389750e1ab342a570a1dda8ff077 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* 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-075-0/+214
| | | | | | | | | | | 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-076-39/+194
| | | | | | | | | | | | | | | | | 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-07175-1964/+1557
|\
| * Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-07175-1964/+1557
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/linux-icc/qmake.conf mkspecs/macx-icc/qmake.conf mkspecs/win32-icc/qmake.conf src/gui/painting/qgrayraster.c Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
| | * Fix tst_Collections for gcc/armSami Nurmenniemi2017-04-071-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Alignment test was not compiling or passing on GCC / arm - Using C++11 alignas() enforces maximum limit for the alignment, which at least on GCC / arm is __BIGGEST_ALIGNMENT__ multiplied by 8 - On GCC 6.2.0 / x86_84, maximum alignment accepted by alignas is 128 - On GCC 5.3.0 / arm, maximum alignment accepted by alignas is 64 - This change calculates biggest tested alignment on ARM targets and compilers supporting alignas() to the value calculated from __BIGGEST_ALIGNMENT__ Task-number: QTBUG-55492 Change-Id: If2b70000ff9cdc5ae8c5a00e39f79efcc6ba1221 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Fix tst_QDirModel for qemuSami Nurmenniemi2017-04-072-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | QTBUG-43818 does not affect only Android, it can be reproduced also with qemu. Change-Id: I6364c09b3c7f860b34899e26056ad562b7c338f2 Reviewed-by: Simon Hausmann <simon.hausmann@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-0648-274/+446
| | |\
| | | * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-0648-274/+446
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-053-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | | * Detect the (stated) C++ standard edition at build timeThiago Macieira2017-03-316-57/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The configure-time detection (cxx11default) isn't enough if the compiler can be changed. This is especially necessary if Qt is compiled with a compiler that defaults to >= C++11 (e.g., GCC 6) and then the user selects a compiler another compiler (e.g., Clang) via -spec option. In that case, we'd miss adding the -std=c++11 or -std=gnu++11 option to the command-line, causing the compilation to fail. As a nice side-effect, even moc without moc_predefs.h will now get the __cplusplus setting. Task-number: QTBUG-58321 Change-Id: I74966ed02f674a7295f8fffd14a8be35da9640e1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | | | * 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-312-76/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | | * tst_largefile: fix the mapOffsetOverflow case to match actual behaviorThiago Macieira2017-03-311-11/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unix mmap(2) system calls do allow for mapping beyond the end of the file, though what happens after you try to dereference the pointers it gives is unspecified. POSIX[1] says that implementations shouldn't allow it: The system shall always zero-fill any partial page at the end of an object. Further, the system shall never write out any modified portions of the last page of an object which are beyond its end. References within the address range starting at pa and continuing for len bytes to whole pages following the end of an object shall result in delivery of a SIGBUS signal. However, Linux allows this in read-write mode and extends the file (depending on the filesystem). Windows MapViewOfFile never allows mapping beyond the end. [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/mmap.html Change-Id: Ie67d35dff21147e99ad9fffd14acc8d9a1a0c38d Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Teemu Holappa <teemu.holappa@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * Add new mkspec for cross-compiling Qt5 for AArch64Neils Nesse2017-03-312-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This mkspec provides default compiler settings for cross-compiling Qt5 for AArch64 Change-Id: I6318e150d7b48ad9c7364fce2a04ee49220a6b7e Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | | | * 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>
| | | | * Fix layout tests for GCC 5.2.x/5.3.xSami Nurmenniemi2017-03-302-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC bug 68949 causes tst_QGraphicsGridLayout and tst_QGraphicsLinearLayout to fail on 5.2.x/5.3.x: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68949. This change adds aggregate initialization to QSizeF arrays to work around the bug. The bug was discovered when compiling and running tests on ARM with GCC 5.3.0. Change-Id: I9ecf7b032b6ca1477c29dca3bd7d0ec8d69a0454 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | Fix tst_QFile for qemuSami Nurmenniemi2017-04-062-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qemu does not report /proc/self/maps size correctly. Added expected failure for it Change-Id: I4019884702b8f9a33717b02e79c9e0c042b2449f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | Fix network tests on qemu/armSami Nurmenniemi2017-04-062-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Function if_indextoname fails on qemu because SIOCGIFNAME is not supported. Expect failure if emulation is detected. Change-Id: I53b41286d82458661e7fa723af385f323582ce7e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>