summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QDate/Time: add toString(QStringView) overloadsMarc Mutz2017-04-121-1/+1
| | | | | | | | [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-121-0/+6
| | | | | | | | | | | | | 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>
* QVersionNumber: add fromString(QStringView/QLatin1String) overloadsMarc Mutz2017-04-081-0/+8
| | | | | | | | | | | | | | | 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>
* Add front()/back() to QString, QStringRef, QByteArray and QLatin1StringMarc Mutz2017-04-071-0/+16
| | | | | | | | | | | 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-071-0/+9
| | | | | | | | | | | | | | | | | 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>
* Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devLiang Qi2017-04-0770-1390/+808
|\
| * 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>
* | | | tst_QStringApiSymmetry: Add tests for truncate() and chop()Marc Mutz2017-04-071-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All good. Change-Id: Id791a04fd5e2c9bc7f54660eaaa95d6db61a5674 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | Add a test for container API symmetryMarc Mutz2017-04-074-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Akin to the successful tst_QStringApiSymmetry, add such a test for generic containers, too. Yes, we have tst_collections, but it's a cut'n'paste mess that makes it hard to systematically perform cross-class checks for consistency. This new test, still in its infancy, uses templates and thus ensures that exactly the same checks are run on all containers. Starting out with front()/back(), which the string classes were found to lack, we will build this test up, as we did and continue to do with the string API one. Change-Id: I07323340b5612ecc658232b2776d788018010d0d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | Add a test for consistency of hash values between QString{,Ref,View}Marc Mutz2017-04-071-0/+12
|/ / / | | | | | | | | | | | | | | | Change-Id: I64a169fd6c8e2444bfe67e3ecd5375ea7b6a81ee Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@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>