summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QSharedPointer: clean up #ifdefsMarc Mutz2016-08-151-6/+0
| | | | | | | | | | | We require Q_COMPILER_RVALUE_REFS and _VARIADIC_TEMPLATES since Qt 5.7, so remove the non-variadic version which anyway has zero test coverage. Also drop #include <utility>, as that is included from qglobal.h already, and drop QSKIP from test. Change-Id: I1fc7f7068eac80ad6fd85e1d8f6d33c5c7bb67db Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Avoid synthesizing stretch on condensed font familiesAllan Sandfeld Jensen2016-08-152-2/+20
| | | | | | | | | | | | | | | | | | If an entire font family is condensed or stretched and we match by family name, the default stretch factor of 100 will make the font engine try to synthesize it back to medium stretched font. The existing code is already made to deal with a stretch of 0 that is no longer used. This patch reintroduces 0 stretch to indicate no specific stretch has been requested. Specifically setting stretch to 100 on a QFont will introduce the old behavior. [ChangeLog][QtGui][QFont] The default value of QFont::stretch() is now 0 to indicate any default stretch is acceptable. Task-number: QTBUG-48043 Change-Id: I574747f980fd4f9893df828818aae99a07b41623 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* tests/auto/corelib/codecs: clean upMarc Mutz2016-08-061-7/+8
| | | | | | | | | | - port Q_FOREACH to C++11 range-for - port uses of inefficient QLists to QVector Fixes errors pointed out by my tree's static checks. Change-Id: Ica50f44d862f635df06cb8f09ce506b9d30fdfc5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tst_utf8: use QScopedPointer, not QSharedPointerMarc Mutz2016-08-061-6/+6
| | | | | | | | | | | | There's no sharing, and the use of QSharedPointer(T*) triggers my tree's static analyzer. Easiest fix is to port to QScopedPointer, which is the correct smart pointer to begin with. Change-Id: I105c1a334c3d6712a475600c8394b0bebc420677 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tests/auto/corelib/global: clean upMarc Mutz2016-08-062-10/+10
| | | | | | | | | | | | - port Q_FOREACH to C++11 range-for (except in the Q_FOREACH tests :) - port uses of inefficient QLists to QVector - include QTest, not QtTest Fixes some errors pointed out by my tree's static checks. Change-Id: Ibb21a280537af74dda5679ec7c75d59477b6de55 Reviewed-by: David Faure <david.faure@kdab.com>
* tst_QPainterPath: clean upMarc Mutz2016-08-051-10/+11
| | | | | | | | | | - port uses of dynamic containers with static content to constexpr C arrays Fixes errors pointed out by my tree's static checks. Change-Id: I5e1cafa6e428500afae0d653ce48a7fb465c19ed Reviewed-by: David Faure <david.faure@kdab.com>
* QString: fix regression comparing null QString with null const char *Marc Mutz2016-08-051-0/+14
| | | | | | | | | | | | | | | | Commit 4a40c717f3cf1ae181df49c91261a12d5e33e5a4 optimized QString::compare_helper(QChar*, int, char*, int), but got the case wrong where the rhs is null, but the lhs is empty, not null (which is the case even with a null QString, as QString().constData() != nullptr). The correct result in this case is 0, since in Qt empty and null strings compare equal. Fix by checking the length of lhs, not its pointer. Task-number: QTBUG-55154 Change-Id: I3ec2cd25d9bdca90cf3f5568a875b1e52c779979 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QJsonValue::toVariant(): Differentiate between null and invalidChristian Kandeler2016-08-051-6/+6
| | | | | | | | | | | | Both were mapped to QVariant() before. Instead, use a null pointer QVariant for a null JSON value. [ChangeLog][QtCore][QJsonValue] QJsonValue(Null).toVariant() now returns a QVariant of type QMetaType::Nullptr instead of an invalid QVariant. Task-number: QTBUG-43077 Change-Id: Ife611f418583dbff542210bc8c5cd65201212a6e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QPolygon: add a smoke-test for boundingRect()Marc Mutz2016-08-041-0/+77
| | | | | | | Nothing fancy, just a safety-net for a following refactoring. Change-Id: I5be87c86cd61e24bf96881d2485dd7560ea6184a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix grayscale painting regression in 64-bit raster engineAllan Sandfeld Jensen2016-08-032-1/+38
| | | | | | | | | | | A new define for better vectorized compositioning had a mistake that caused some sources to be converted to grayscale when composited. Added two 10 bit per channel formats to the lancelot test to catch regressions in the future. Change-Id: I1c468e6b93d68185e517fc0d44c6c927f9f7135f Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Add std::nullptr_t as builtin type in QMetaTypeJędrzej Nowacki2016-08-031-0/+4
| | | | | | Change-Id: If6c484bc89a2610c6a9e3e7bd54ef85ef40a783f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Save QFont's style name if presentKonstantin Shegunov2016-08-031-0/+21
| | | | | | | | | | | | | | | | | | | Font style names are quite irregular and the simplistic matching implemented in QFontDatabase::styleString(const QFont &) is unable to properly resolve the style name when font is recreated from a string. This causes the fonts before and after serialization to be considered different, even though they are not. The from/toString methods were made to write and respect the exact font style. [ChangeLog][QtGui][Important Behavior Changes] QFont::toString() and QFont::key() were modified to save the font's style name if one is set, invalidating any stored font identifiers. QFont::fromString() was also adjusted to accommodate the change. Task-number: QTBUG-54936 Change-Id: Ibc7c54119acdd8f0950d6049cc89f859bf981504 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix some syntax issues in SCTP implementationAlex Trotsenko2016-08-031-13/+12
| | | | | | Change-Id: I718fd060e313d544a5470fa20183db04ef89b1ca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QObject::connect: allow to disable narrowing of the connection argumentsGiuseppe D'Angelo2016-08-021-0/+510
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the good features of the new connection style is that implicit conversion is performed for the connection arguments. However, this is also a bad feature when it comes to the old C remnants in the C++ language: for instance, doubles implicitly convert to ints, possibly losing precision (and GCC/Clang do not even warn about those under -Wall, only MSVC does) or even triggering undefined behavior. For this reason, when using braced initialization, C++11 disables narrowing conversions or floating/integral conversions. Use this feature when checking the arguments of a PMF-style signal/slot connection. Technically this makes the program ill-formed, however GCC still accepts it (but at least warns under -Wall). Hence, add a way to disable these implicit conversions. This is a opt-in and guarded by a macro, as it's a source incompatible change. [ChangeLog][QtCore][QObject] The QT_NO_NARROWING_CONVERSIONS_IN_CONNECT macro has been added. When using the new connection syntax (PMF-based) this macro makes it illegal to narrow the arguments carried by the signal, and/or to perform floating point to integral implicit conversions on them. When the macro is defined, depending on your compiler a QObject::connect() statement triggering such conversions will now fail to compile. Change-Id: Ie17eb3e66ce0cd780138e60d8bb7da815a4ada83 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-0116-57/+1036
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure 5.7 now supports clang on android; but dev re-worked configure src/gui/kernel/qevent.h One side renamed a parameter of a constructor; the other added an alternate constructor on the next line. Applied the rename to both for consistency. tests/auto/tools/moc/tst_moc.cpp Each side added a new test at the end. .qmake.conf Ignored 5.7's change to MODULE_VERSION. configure.json No conflict noticed by git; but changes in 5.7 were needed for the re-worked configure to accommodate 5.7's stricter handling of C++11. Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-015-3/+296
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/itemviews/qabstractitemview.cpp src/widgets/itemviews/qabstractitemview_p.h Change-Id: I54589b1365103cb1749186af92aab03a49c94b64
| | * Fix for race condition in signal activationDenis Kormalev2016-07-291-0/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a race condition between QObject::disconnect() and QMetaObject::activate() which can occur if there are multiple BlockingQueued connections to one signal from different threads and they connect/disconnect their connections often. What can happen in this case is: T1 is in activate() method and T2 is in disconnect() method T1 T2 locks sender mutex selects next connection unlocks sender mutex locks sender mutex sets isSlotObject to false creates QMetaCallEvent derefs connection posts event Two things can happen here: 1. Connection can still be valid, but it will have isSlotObject==false and callFunction will be used instead of slotObj 2. Connection can already be invalid To fix it mutex unlock should be moved after QMetaCallEvent creation. Also there is another case, when we don't disconnect but delete the receiver object. In this case it can already be invalid during postEvent, so we need to move mutex unlock after postEvent. Change-Id: I8103798324140ee11de5b4e10906562ba878ff8b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * Item delegates: show localized detailed tooltips and "What's this?" textsAlexander Volkov2016-07-282-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract the common part from QItemDelegate and QStyledItemDelegate which uses QLocale to convert a value for Qt::DisplayRole to a string. Use this code to get the text for tooltips and "What's this?". [ChangeLog][QtWidgets][QAbstractItemDelegate] Show localized detailed tooltips and "What's this?" texts. Task-number: QTBUG-16469 Change-Id: I8618763d45b8cfddafc2f263d658ba256be60a15 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | * QVector: fix crash on reserve(0)David Faure2016-07-281-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It crashed when d was equal to Data::unsharableEmpty(). Task-number: QTBUG-51758 Change-Id: If9f2a7d11892507135f4dc0aeef909f59b7478fc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
| | * Backwards compatibility fix: No default colormap for Mono QImagesEirik Aavitsland2016-07-271-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of a4e2f2e687ca7aec88ecf82f72d42ac61e17a5b9. That fix tried to avoid the risk of a crash in pixel() by ensuring Mono QImages created with external data also got a default color table. However, that broke usable behavior in existing code that was painting in Mono QImages using color0/color1. This commit reverts to the old behavior, and instead expands on the checking in pixel() so that lacking color table is handled gracefully for all indexed formats. Task-number: QTBUG-54827 Change-Id: I9164198bed9d20c4b12cdba40a31c141bef3128d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Edward Welbourne2016-07-285-0/+149
| |\ \
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-265-0/+149
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qtemporarydir.cpp One side encapsulated a repeated piece of #if-ery in a local define; the other added to the #if-ery. Made its addition to the other's. src/corelib/kernel/qeventdispatcher_unix_p.h One side moved some members into a struct; this collided with a #undef check that neither side now has. Discarded the #undef part. src/gui/opengl/qopengltexturehelper_p.h 5.7 deleted a bunch of methods; not clear why merge got confused. src/tools/moc/moc.cpp One added a name to the copyright header; another changed its URL. Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
| | | * Fix QTemporaryDir to handle Unicode characters on WindowsFriedemann Kleint2016-07-202-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For platforms not providing mkdtemp(), QTemporaryDir relied on an implementation of q_mkdtemp() operating on char *, converting back and forth using QFile::encodeName()/decodeName() when passing the name to QFileSystemEngine. This caused failures on Windows (which uses "System"/Latin1 encoding) for names containing characters outside the Latin1 space. Reimplement q_mkdtemp() to operate on QString, which avoids the conversions altogether and also enables the use of larger character spaces for the pattern. Add tests. Task-number: QTBUG-54810 Change-Id: Ie4323ad73b5beb8a1b8ab81425f73d03c626d58a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * moc: fix infinite loop over malformed inputOlivier Goffart2016-07-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should not call prev() if we had already reched the end. Task-number: QTBUG-54815 Change-Id: I56bc86880a0dbfdce57fc4a08e5950f2ff3a5958 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
| | | * tests/manual: add highdpi subdir to the test listThiago Macieira2016-07-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib57b52598e2f452985e9fffd1458f2bf00ddc84f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * QtCore: Fix QXmlStreamReader for invalid characters in XML 1.0Luca Bellonda2016-07-171-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XML parser uses fastScanLiteralContent() to read a block of text. The routine was not checking the range of valid characters as defined in the XML standard: https://www.w3.org/TR/2008/REC-xml-20081126/#NT-Char A check has been added to stop reading the bad character. Note that the characters are legal in XML 1.1, but QXmlStreamReader is a well-formed XML 1.0 parser [ChangeLog][QtCore][QXmlStreamReader] Fixed a bug in the XML parser that prevented to load XML that contained invalid characters for XML 1.0. Change-Id: I10aaf84fbf95ccdaf9f6d683ea7c31925efff36d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Add manual test embeddedintoforeignwindowFriedemann Kleint2016-07-265-1/+494
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a test for embedding Qt windows into foreign windows. Complements the existing "foreignwindows" test (which embeds foreign windows into Qt). The test has a simple UI based on QRasterWindow allowing for checking events and geometries. Task-number: QTBUG-41186 Change-Id: Ie62a3e250ca666e2fa5c2e3ef37ef0654829397c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | QAbstractSocket: ensure bind()+connect() works on delayed closeAlex Trotsenko2016-07-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While connecting, the socket goes through the HostLookupState. In this state, the socket engine is not yet created, unless the socket had previously been bound. When it has been bound, we should keep the socket engine even if the user initiates a delayed close by using the write()+close() sequence. Change-Id: Iefebcb33cd72cb49617acbac8e02af9d8209c869 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | QDataStream: adjust containers' deserialization in transaction modeAlex Trotsenko2016-07-201-53/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an error occurs during the transaction, we should prevent the containers from being successfully read. So, check the status of the stream before reading the container, because the deserialization procedure temporarily resets it on entry. Task-number: QTBUG-54022 Change-Id: Ie955c2fa3e449374f0f8403f00e487efa2bfdaf3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Add helper function to reset QMouseEvent localPosFrederik Gladhorn2016-08-011-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt Quick there are many places which copy mouse events repeatedly, with the only goal of adjusting the local position. Instead it's much more sensible to re-use the same event. Change-Id: I2c6f2b73ee3a7a6df489f813cf2f60b48a6e48df Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | moc: Add warnings when resolving and opening includes failsFriedemann Kleint2016-07-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, only cryptic warnings: QFSFileEngine::open: No file name specified occurred. Task-number: QTBUG-55014 Change-Id: Ic99614eb58c605ed6e1b86d3d4b8f527c5b9244c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Make QOpenGLTextureBlitter publicLaszlo Agocs2016-07-294-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change QOpenGLTextureBlitter to be a public API, as it was originally intended. There are now significant external uses outside qtbase (C++ compositor examples in QtWayland), and the API is considered proven enough. [ChangeLog][QtGui] QOpenGLTextureBlitter, a utility class to draw textured quads, has been made public. Change-Id: If7a2c94e1494195e2aa375d214932fa7b4c78321 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Store QSslKey in specific key format to provide more details for keyLars Schmertmann2016-07-281-5/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a TLS handshake the ephemeral server key is saved in the ssl configuration. Clients who want to get the length or algorithm of the key only get "Opaque" and "-1" as a result because the key is always stored as "Opaque". This change converts the key to specific type so more details are available and the client don't need to convert the handle by hand. Change-Id: I60f90fc2c1805e528640d391b20c676b6eeeb49e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | | Handle indirect sibling selectorAllan Sandfeld Jensen2016-07-271-8/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds parsing and handling of the indirect sibling selector, this should mean we can at least parse all CSS3 selectors even if we do not yet support all of them. Also adds tests for previously added CSS3 selectors. Change-Id: I1ce9afb9466044a38bdec167affc21a87837e4a4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix regression in rotated bilinear samplingAllan Sandfeld Jensen2016-07-271-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | Fix a mistake introduced recently and revealed by lancelot. Adds an auto-test for rotations to catch similar errors faster in the future. Change-Id: I028a160107d98899e723481b6201ef776f20c721 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Revert "Emit updateBlock signal in QTextDocumentLayout"Eskil Abrahamsen Blomfeldt2016-07-275-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 13040043b2f2274de74c296ede7dd3e6ffb67dcb. It introduced a bad regression, noticeable for longer documents, as it would cause the documentChanged(0, length) to trigger a layout of the entire document. The bug report for the commit (or the commit itself) does not contain a test case, but it is regardless the wrong approach. Note that QQuickTextEdit already listens to the contentsChange signal and invalidates the changed parts of the document as a reaction to this, so it should already work as expected. [ChangeLog][Qt Gui][Text] Fixed performance hit from showing large QTextDocuments in a QTextEdit or QTextBrowser. (Regression introduced in Qt 5.3.0) Task-number: QTBUG-51411 Change-Id: I6e7fbf8f62a1d68779eef5da3781de14d9fdcad8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Introduce SCTP sockets supportAlex Trotsenko2016-07-274-2/+501
| | | | | | | | | | | | | | | | | | | | | Add protocol-specific code and the QSctpServer, QSctpSocket classes. Change-Id: Ie9a1d87bd1fda866a2405043d1c15c12ded5a96e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add QMetaEnum::isScoped to be able to destinguish C++11 enum classOlivier Goffart2016-07-261-8/+11
| | | | | | | | | | | | | | | | | | Change-Id: I67b1dbd069fa57bd60e50690abb5d876edc0d1d2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Update qcssscanner so it can parse our normal offline documentation CSSAllan Sandfeld Jensen2016-07-261-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the three CSS3 attribute selectors. During this the internal naming of the existing attribute-selectors have been changed to be more clear, and the dash-matching has been fixed to not just be beginsWith. A non-breaking space have also been removed from the CSS. Change-Id: Ia4db4a5a19e3ceee8c3c8a4b744149edd1d32bdc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Q(Basic)Mutex: add try_lock{,_for,_until} for STL compatibilityGiuseppe D'Angelo2016-07-251-241/+762
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now QBasicMutex is Lockable and QMutex is TimedLockable, which means they can be used in std::lock_guard, std::unique_lock, std::lock, etc. [ChangeLog][QtCore][QMutex] QMutex now fully models the TimedLockable concept by providing the try_lock, try_lock_for and try_lock_until functions, therefore making it usable in Standard Library lock management classes and functions. Change-Id: I7c691481a5781a696701e1ab78186b5cefbd6a87 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QRingBuffer: add packet modeAlex Trotsenko2016-07-231-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a special case, setting the value of chunk size to zero forces QRingBuffer to produce a separate QByteArray on each call which appends the data. So, this enables a packet mode where portions of data are stored independently from each other. Change-Id: I2d0b331211901a289da7d4533e974f06830b5590 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QRingBuffer: allow to change the chunk size of the buffer dynamicallyAlex Trotsenko2016-07-231-0/+6
| | | | | | | | | | | | | | | | | | Change-Id: I0ac55713c7bb8c48d2c9c774376543caef781980 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Improve accuracy in fast path bilinear samplingAllan Sandfeld Jensen2016-07-231-28/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adds rounding before using the optimized low accuracy interpolation, this reduces the magnitude of error in the scaled result from ~4 bits to just 2 bits. Change-Id: Ie4e618bf5b1f4a74367aa419ebbd534cc6a846b3 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Use QElapsedTimer in tst_qmutexGiuseppe D'Angelo2016-07-222-14/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires fixing the test on Windows: QMutex internally uses WaitForSingleObjectEx which can wake up early, according to the system timer resolution: https://msdn.microsoft.com/en-us/library/windows/desktop/ms687069(v=vs.85).aspx#waitfunctionsandtime-outintervals QTime must be so slow that it hides the early wakes, but QElapsedTimer is accurate enough to make the test fail unless we add back some tolerance to compensate for the early wakeups. Change-Id: I20b38af9c87a0b0e38a19b9bff1c3c24975c78f5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QMetaType: Add a benchmark covering creation of QVariant from an enumRobin Burchell2016-07-221-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This proved to be quite slow in the past due to QReadWriteLock's implementation being suboptimal (prior to its improvement in 343e5d066a6b5583688e16baec20f20e6d9a24e0). This codepath is exercised quite extensively by QML with enum registrations. Change-Id: I94d1e13933bf005604dc4494e2cb5bc25ef3d387 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/devEdward Welbourne2016-07-2221-199/+680
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-07-1921-199/+680
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp qmake/library/qmakeevaluator.cpp qmake/library/qmakeevaluator.h qmake/project.h QMakeEvaluator: * evaluateConditional(): one side changed return type, the other changed a parameter type. * split_value_list(): one side changed a parameter adjacent to where ... * expandVariableReferences(): ... the other killed one overload and changed the survivor src/corelib/io/qlockfile_unix.cpp One side changed a #if condition, the other moved NETBSD's part of what it controlled. src/corelib/tools/qdatetime.cpp One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the other moved it from the private class to the public one, in the midst of the "short date-time" optimization, which confused diff entirely. One side changed a QStringLiteral to QLatin1String, the other rewrote adjoining code. src/network/kernel/qauthenticator.cpp Both rewrote a line, equivalently; kept the dev version. src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h One side changed #if-ery that the other removed. tools/configure/configureapp.cpp One side added a check to -target parsing; the other killed -target. tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml tests/auto/testlib/selftests/expected_cmptest.xunitxml Regenerated using generate_expected_output.py I note that quite a few other expected_* come out changed, now. There was no git-conflict in src/widgets/kernel/qformlayout.cpp but it didn't compile; one side removed some unused methods; the other found uses for one of them. Put FixedColumnMatrix<>::removeRow(int) back for its new user. Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-1510-9/+286
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakeevaluator.cpp One side changed the iterator to use ranged-for, the other changed its body; they only conflicted because the latter had to add braces around the body, intruding on the for-line. Trivial resolution. Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
| | | * moc: Fix a crash with malformed inputOlivier Goffart2016-07-151-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not increment 'data' past the buffer in case of invalid token. Remove the left over qDebug so we can make a test. Task-number: QTBUG-54609 Change-Id: I8f0dd3381fbdea3f07d3c05c9a44a16d92538117 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
| | | * fix raw data leak in $$absolute_path()Oswald Buddenhagen2016-07-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when the file name is empty, the path will be returned verbatim. this must be considered when constructing the return value. Task-number: QTBUG-54550 Change-Id: Ie108ed52275e66a154ef63bd6f7193f55b3e0454 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>