summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-0770-1390/+808
|\ | | | | | | | | | | | | | | | | | | 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>
| * Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Liang Qi2017-04-065-79/+166
| |\
| | * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-065-79/+166
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-051-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * QCryptographicHash: make SHA3 calculate SHA3, not KeccakGiuseppe D'Angelo2017-03-311-64/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * 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>
| | | * 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>
| * | Extend blacklisting of a tst_QMenuBar's test to cover Ubuntu 16.04Tony Sarajärvi2017-04-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | tst_QMenuBar::taskQTBUG4965_escapeEaten() already failed on Ubuntu 14.04 and reproduces in 16.04. Task-number: QTBUG-24326 Change-Id: I46170c9ce397f4042b308ca485b19364e6ee0663 Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | Skip testing of QOpenGLWidget on platforms that don't support itSami Nurmenniemi2017-04-041-0/+10
| | | | | | | | | | | | | | | | | | | | | QOpenGLWidget is not supported on all platforms. Skip tests on those. Change-Id: I0f9500553427903f20d248acaa20803276e3ab00 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Skip OpenGL tests on platforms that don't support OpenGLSami Nurmenniemi2017-04-043-0/+21
| | | | | | | | | | | | | | | Change-Id: Iff38950a940d602fbfcc35595624e56399aab53a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Extend blacklisting of tst_QMenuBar::check_menuPosition to Ubuntu 16.04Tony Sarajärvi2017-04-041-0/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-46115 Change-Id: I1ed994e07e78d7e7c59967e86e9cc4160c6a55b1 Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | tests: Unify license to GPL-EXCEPTKai Koehne2017-04-0352-1296/+561
| | | | | | | | | | | | | | | | | | Change-Id: Ic718650a8a7bddd4ee28c5650a3f5baf70886e51 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| * | Extend blacklisting of tst_QWidget to cover Ubuntu 16.04Tony Sarajärvi2017-04-031-0/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-46116 Change-Id: I64465758deb360dd5445a80398617c0297ba561a Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | Extend the check for null and empty QString hashing to QString{Ref,View}Marc Mutz2017-04-061-0/+8
| | | | | | | | | | | | | | | Change-Id: I5c41287991f6dd2eeb3d54699da0f653bfac59be Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Improve pair-like class handling in testsSamuel Gaist2017-04-0610-0/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when doing comparison with pair-like classes the fallback toString method is called which returns a Q_NULLPTR thus not allowing proper diagnostic of the values that triggered an error. This patch adds support for QPair and std::pair to improve the tests output readability. [ChangeLog][QtTest][QCOMPARE] Now outputs contents of QPair and std::pair on failure. Change-Id: Ib0b4aad7640590d56275b6f1306fb9fb39fa81bc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QString: add QStringView/QLatin1String overload of (non-multi) arg()Marc Mutz2017-04-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new overload directly in QXmlStream*. Saves 129B in QtCore text size on optimized GCC 6.1 Linux AMD64 builds, even though we added two more functions. [ChangeLog][QtCore][QString] Added arg(QStringView), arg(QLatin1String) overloads. Change-Id: Idf7236dcab763824593f34182e4e0b16b5ed4321 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QTextCodec: add QStringView overloadsMarc Mutz2017-04-061-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QTextCodec] Added fromUnicode() and canEncode() overloads taking QStringView. [ChangeLog][QtCore][QTextEncoder] Added fromUnicode() overload taking QStringView. Change-Id: I2599f25570480d967921ccd4414e092bfc90d821 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QStringView: use qssize_t as size_typeMarc Mutz2017-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing changes, we've just given 'QIntegerForSizeof<size_t>::Signed' a better name in qglobal.h and now use it in QStringView API and users. Change-Id: Ibea1ae26e95b3a96708400fd4b0cd120459d57b6 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devLiang Qi2017-04-0415-82/+347
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-0415-82/+347
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h src/plugins/platforms/xcb/qxcbwindow.cpp Change-Id: Ic747c3c50e68c005b425e7a1ec2a90965527c8bd
| | * | Ensure that tst_QFontDatabase::addAppFont() tests the whole path to an engineTor Arne Vestbø2017-03-311-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie22cd9d7d362de86e02b841d40d75eac46395952 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | Fix tst_Selftest on QEMUSami Nurmenniemi2017-03-312-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two changes are needed to pass tst_Selftest on QEMU 1. Pass QEMU specific env variables to the subtests 2. Ignore output on stderr on some tests when running on QEMU Change-Id: Ie1f722fd183aac5973e87d408005e06cbafcde17 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | Extend blacklisting of parts of tst_QWidget to cover Ubuntu 16.04Tony Sarajärvi2017-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_QWidget::updateWhileMinimized has been failing on Ubuntu 14.04 and was already blacklisted there. Now we extend it to cover Ubuntu 16.04. Task-number: QTBUG-46116 Change-Id: I6758657cca46bb4c76cddb0298f9b87b8a43655b Reviewed-by: Liang Qi <liang.qi@qt.io>
| | * | tst_qsslsocket::protocolServeSide - fix for macOS 10.11Timur Pocheptsov2017-03-301-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mixing different protocols on client-server sockets works differently on 10.11, making previously successful handshakes failing now. Failure is specific to 10.11 with SecureTransport. Change-Id: I35374b40fa3d167802775b526cf6465ae78749cf Task-number: QTBUG-48860 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | Blacklist a QSequentialAnimationGroup autotestTony Sarajärvi2017-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-59806 Change-Id: Ib63614dbd9d57283a6394bfc4079308a3f4ddc93 Reviewed-by: Liang Qi <liang.qi@qt.io>
| | * | Blacklist tst_QSslSocket::protocolServerSide on OS X 10.11Tony Sarajärvi2017-03-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-48860 Change-Id: Ia352378f48b9ab404d06ac5ef9bf53afa8f192fd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | Fix tst_QUdpSocket for QEMUSami Nurmenniemi2017-03-291-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QEMU does not support all syscalls needed for udp socket testing. Skipped tests that can't pass on QEMU. Change-Id: I40882207a47cfafbc3becb3dff8e7cead9676255 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | Use HTTP2WasUsedAttribute for HTTP2Timur Pocheptsov2017-03-291-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | tst_QGuiApplication: Split the quitOnLastWindowClosed() testsFriedemann Kleint2017-03-291-75/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to blacklist the (newly created) quitOnLastWindowClosedMulti() if all else fails. Task-number: QTBUG-59088 Change-Id: I8c143a2017e7aefaf6cad6ada9c1464d40c952e7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * | Fix building of qopengl test on boot2qtSimon Hausmann2017-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only test for xcb specific sub-features if xcb is available in the first place - not the case with Boot2Qt builds. Change-Id: Iad49648ce1c8781d0c7bb2b2dcd4b7834434d51d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * | Switch to RGB(A|X)8888[_Premultiplied] for QOpenGLFBO readbacks on GLESLaszlo Agocs2017-03-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of the never-ending blacklisting of "broken" drivers, simply switch to always choosing a byte ordered QImage format with OpenGL ES, and keep on using the (one and only) spec-mandated GL_RGBA/GL_UNSIGNED_BYTE combo. There is nothing broken with not supporting BGRA for glReadPixels even when GL_EXT_read_format_bgra (an out of date, pre-2.0 extension that got folded into the spec to begin with) is present. We do not have a good way to tell if BGRA_EXT is supported for glReadPixels or not, so just skip the whole problem altogether. Task-number: QTBUG-59283 Task-number: QTBUG-59303 Change-Id: I9f0605380923bd3b3ffdeb80f5c172d3e4cc7927 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | Fix largefile tests on ARM and QEMU targetsSami Nurmenniemi2017-03-283-0/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Test tst_LargeFile::mapFile fails on Qemu for files over 4Gb. Fixed by limiting maxSizeBits to 28 (must be n*4 and < 32). - Bug QTBUG-21175 is also effective on ARM targets. Fixed by expecting failure also on ARM. Change-Id: I9103727e618a17259b4785ec8c284f3bb60ebea7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | QRegularExpressionMatch: add QStringView-related functionsGiuseppe D'Angelo2017-04-041-0/+3
|/ / / | | | | | | | | | | | | Change-Id: Ia81ba131cc2c7f56acb3312fbc7d62ffe5e18da4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | QStringView: add an array ctorMarc Mutz2017-04-041-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | With sufficient enable_if magic, the array ctor can overload the pointer ctor and statically determine the size of the array passed. Consequently, remove the sizeof in QStringViewLiteral again. Change-Id: I486baa3cafefde60ccc5f2b47eb94ee53cefe63c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QStringIterator: port to QStringViewMarc Mutz2017-04-031-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Pretty straightforward, as the implementation already used only an iterator range internally. Change-Id: I6e6b809329e2e2548bba6db414a3d107d09637d1 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Add QMetaObject::invokeMethod() overloads for function pointersBenjamin Terrier2017-04-021-3/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new overloads do not accept parameters for the invoked function, this use case is handled by using lambda. Overloads for non member function pointers and functors are separated as the return type is not retrieved in the same way. Move QSlotObjectBase, QSlotObject and QFunctorSlotObject from qobject_impl.h to qobjectdefs_impl.h in order to make them available in qobjectdefs.h. Update autotests of previous overloads because of a soft break in source compatibility: passing null literals (0, NULL, nullptr, etc.) for the second parameter of invokeMethod() is not supported anymore. [ChangeLog][QtCore] Added QMetaObject::invokeMethod() overloads for function pointers. Task-number: QTBUG-37253 Change-Id: I6fb67e086d315ae393ce32743c4eb1abd6cc9139 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QProcess::startDetached: support custom process environmentJoerg Bornemann2017-03-312-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting a detached process with a custom process environment can now be achieved by: QProcess p; p.setProgram("foo"); p.setProcessEnvironment(myEnv); p.startDetached(); [ChangeLog][QtCore][QProcess] Added the ability to set a custom process environment for detached processes. Task-number: QTBUG-2284 Change-Id: I49406dffb64fa2aed41ea05cb271bd42eeabb729 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QStringView: add mid(), left(), right()Marc Mutz2017-03-311-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If1d2cf175d51b3c02881e21937b0a2d33b78aadd Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QStringView: add tests for relational operatorsMarc Mutz2017-03-312-53/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove most of the std::equal() tests that were used to determine equality in pre-relational-operator-times again. Amends a1421e47871448718fd54e83f0106a38722bdfe4. Change-Id: Iff64808f5ac60861caee899d594b512b58046636 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | QColor: port to QStringViewMarc Mutz2017-03-291-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... leveraging the existing support for QLatin1String, which is the char equivalent of QStringView. The only noteworthy changes here are the port of the low-level functions to size_t and that the internal template function, setColorFromString(), can now take its argument by value, since only views are ever passed to it anymore. In the test, used new QTest::addRow() to format test names, and introduced temporaries to avoid re-calculating the same input values for every check. Change-Id: Ia3c59e5c435ff753f34993a8d85c0c0b4e8e2b22 Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QStringView: improve manual overload managementMarc Mutz2017-03-291-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to prevent QStringView(QChar|QLatin1String|QByteArray|const char*) from compiling as QStringView(QString(...)), so I added = delete'ed ctors for these types to QStringView. However, that makes QStringView participate in overload resolution for these types. Even if the QStringView ctor will always fail to compile, the presence of these ctors alone makes calls to functions overloaded on QString and QStringView ambiguous: f(QStringView); f(QString); f(foo); // ambiguous f(QChar('f')) // ambiguous f(QLatin1String(foo)); // ambiguous f(QByteArray(foo)); // ambiguous Fix by making the QString and QStringRef constructors templates constrained to accept only these two types. This should also help to move the QStringView definition to before the QString one (as soon as we get rid of or start to ignore QString::Null), simplifying a lot of code in qstring.h down the line. This should also fix MSVC's accepting of two user-defined conversions which caused static non-compile-tests to fail in the initial QStringView patch, and which were therefore removed. This patch brings them back. Change-Id: I95ac38c0d31cd8c726f7e952017569d32e484413 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-2832-93/+561
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro tests/auto/corelib/tools/qchar/tst_qchar.cpp tests/auto/other/qaccessibility/accessiblewidgets.h Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-2716-69/+173
| |\| | | | | | | | | | Change-Id: Icdd71e9713725bda9c305e338f5c8b41a92ed8e8
| | * json encoder: Harmonize number serialization with ES6Marius Kittler2017-03-251-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensures that numbers representable as 64-bit integer are not printed using exponent notation. Some JSON implementations such as the one of the Go standard library expect this in the default conversion to int. Change-Id: Ic3ac718b7fd36462b4fcabbfb100a528a87798c8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Fix propagation of locale from widget to its childrenEdward Welbourne2017-03-241-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the condition in QWidgetPrivate::resolveLocale() to decide whether to propagate locale: make it match setLocale_helper()'s condition when deciding whether to propagate to descendants. This lead to a QDateTimeEdit's calendar popup not getting told what locale to use correctly, unless we setLocale() on it overtly, which then blocked propagation of locale changes to it unless QDateTimeEdit manually propagated the changes. Fix the documentation of WA_WindowPropagation to mention locale as also being propagated (which it was in several places, only neglecting this one in resolveLocale). [ChangeLog][QWidget][Qt::WA_WindowPropagation] Propagate locale consistently, along with font and palette, within the widget hierarchy. Previously, locale was propagated on ancestral setLocale(), but not on creation of the descendant. Task-number: QTBUG-59106 Change-Id: I92270f7789c8eda66a458274a658c84c7b0df754 Reviewed-by: David Faure <david.faure@kdab.com>
| | * QSslSocket: fix connection to a international domain nameOlivier Goffart2017-03-232-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC6125 section 6.4.2 specify we need to convert the IDN to ascii before comparison. Note that we don't need to toLower anymore because toAce takes care of it. Section 7.2 recommands that we dod not attempt to check for wildcard character embedded within the A-labels or U-labels of an internationalized domain name. So we reject names that contiains a '*' but starts with 'xn--'. Change-Id: Ib0830520a1f82bbf9fd11818718277a479527ee3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>