summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate QCoreApplication::flush()Gatis Paeglis2017-04-225-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... as it has outlived its original purpose: Qt3 implementation on X11: void QApplication::flush() { flushX(); } void QApplication::flushX() { if (appDpy) XFlush( appDpy ); } Qt4 implementation on X11: Did nothing when QApplication::flush() was called (the flush() overrides in {unix,glib} event dispatchers with empty bodies). In Qt5 this function somehow has been repurposed (inconsistently) to do what QCoreApplication::sendPostedEvents already does: QAbstractEventDispatcher::flush() = 0; => QCocoaEventDispatcher::flush() {} => QEventDispatcherCoreFoundation::flush() {} => QIOSEventDispatcher (does not override ::flush()) => QEventDispatcherGlib::flush() {} => QPAEventDispatcherGlib (does not override ::flush()) => QEventDispatcherUNIX::flush() {} => QUnixEventDispatcherQPA (when QT_NO_GLIB=true) ::flush() { if (qApp) qApp->sendPostedEvents(); }) ==> QAndroidEventDispatcher (does not override ::flush()) => QEventDispatcherWin32::flush() {} => QOffscreenEventDispatcher::flush() { if (qApp) qApp->sendPostedEvents(); QEventDispatcherWin32::flush(); } => QWindowsGuiEventDispatcher (does not override ::flush()) => QWindowsDirect2DEventDispatcher (does not override ::flush()) => QEventDispatcherWinRT::flush() {} => QOffscreenEventDispatcher::flush() { if (qApp) qApp->sendPostedEvents(); QEventDispatcherWinRT::flush(); } => QWinRTEventDispatcher (qminimaleglintegration.cpp) (does not override ::flush()) => QWinRTEventDispatcher (qwinrteventdispatcher.h) (does not override ::flush()) Whatever this function was doing on macOS in Qt3 and Qt4 also has been dropped in Qt5. It appears that the other event dispatchers in Qt5 that have overrides for flush() have simply copy-pasted this logic. Clearly the documentation of QCoreApplication::flush() is outdated and has nothing to do with the actual implementation in Qt5. This function is rarely used in Qt5 sources. It should be safe to remove the calls to QCoreApplication::flush() from Qt source code, as this function has been doing nothing on most platforms anyways. Repurposing it even broke handling of posted events (see QTBUG-48717). [ChangeLog][QtCore][Event loop] QCoreApplication::flush() is now deprecated. Use QCoreApplication::processEvents() and QCoreApplication::sendPostedEvents() instead. Task-number: QTBUG-33489 Task-number: QTBUG-48717 Change-Id: Icc7347ff203024b7153ea74be6bf527dd07ce821 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* Fix QMetaMethod::invoke and automatic type registrationOlivier Goffart2017-04-221-0/+29
| | | | | | | | | | | | | | | | | This was simply not working for two reasons: - The index passed to QMetaObject::metacall was not right (there was an offset because of the return type) - If the registration succeeded, the arguments were not even initialized. The tests in tst_moc always called QMetaMethod::parameterType before calling invoke, which was properly registering the type. So this was not seen in the tests before. [ChangeLog][QtCore][QMetaMethod] Fixed crash in invoke() with QueuedConnection and types whose metatype gets automatically registered. Task-number: QTBUG-60185 Change-Id: I4247628484214fba0a8acc1813ed8f112f59c888 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLoggingRegistry: remove rules vectorMarc Mutz2017-04-211-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It only contained a concatenation of the individual rule sets, probably to fix their order in a central place, as well as simplifying iteration in defaultCategoryFilter(). Fix these two issues differently, but introducing a RuleSet enum that lists rule sets in the order in which they should be applied by defaultCategoryFilter(), and turn individual rule sets vectors into a C array of vectors. This enables two nested loops in defaultCategoryFilter to replace the one loop over 'rules'. Apart from building up 'rules' in updateRules(), this was the only access to that member. That leaves updateRules() with just the task of running defaultCategoryFilter() on the new rule sets. Consequently, a call to updateRules() can now replace the identical loop in installFilter(). Performance should not suffer. Iterating over a fixed-size array of vectors is hardly any slower than iterating over a single vector, and while the construction of 'rules' was probably a one-off task in most programs, this way of keeping the rules also saves memory because rules are not kept in two different vectors. It is also more maintainable, of course. Change-Id: Ibc132d096c8137dd02b034752646212e51208637 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Skip tst_QMdiArea::setViewport on macOS due to flakey failures in CITor Arne Vestbø2017-04-201-0/+4
| | | | | | Task-number: QTBUG-58520 Change-Id: I582c190de45e85e2dfb397289720c655ec8d781c Reviewed-by: Liang Qi <liang.qi@qt.io>
* Fix tst_QTcpServer for QEMUSami Nurmenniemi2017-04-201-0/+53
| | | | | | | | | QEMU does not support all syscalls needed for tcp socket testing. Skipped tests that can't pass on QEMU. Task-number: QTBUG-59966 Change-Id: Ib6d12d0fc4c913a0222e13db57f0864b7fdf21ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMetaType: fix the testGiuseppe D'Angelo2017-04-201-2/+2
| | | | | | | | | | | | | | 8a375341cf7a7cf38ef427bc0c9f1abde05a471d added swap() to QJson* classes and marked them shared-not-movable-until-qt6. This change made QMetaType start reporting that QJson* classes were movable; however, the test used QTypeInfo and not QTypeInfoQuery to double check that information. Port the test to QTypeInfoQuery. Change-Id: I3227a70a8f24c0013257e180e9cb9cfebe9947f9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Split Q_COMPILER_UNICODE_STRINGS: add Q_STDLIB_UNICODE_STRINGSMarc Mutz2017-04-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit bf2160e72cd8840a8e604438cbdc807483ac980a, we can rely on charNN_t support in all compilers except MSVC 2013, and since that commit, we use (in 5.10, not 5.9, yet) !defined(Q_OS_WIN) || defined(Q_COMPILER_UNICODE_STRINGS) when we only need charNN_t, the type, as opposed to its library support (u16string, char_traits<char16_t>, ...). This patch splits the Q_C_UNICODE_STRINGS macro into two, adding Q_STDLIB_UNICODE_STRINGS for when we need std::uNNstring, leaving Q_C_UNICODE_STRINGS for when we need just charNN_t support. In QDebug, when constructing a QChar out of a char16_t, cast to ushort first, since QChar(char16_t) was only officially introduced in Qt 5.10. [ChangeLog][Potentially Source-Incompatible Changes] The internal Q_COMPILER_UNICODE_STRINGS macro is now defined if the compiler supports charNN_t, even if the standard library does not. To check for availability of std::uNNstring, use the new Q_STDLIB_UNICODE_STRINGS macro. Change-Id: I8f210fd7f1799fe21faf54506475a759b1f76a59 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Revert "Initialize QLoggingRegistry rules on first use, not qApp construction"Tor Arne Vestbø2017-04-191-16/+2
| | | | | | | | | | | | | This reverts commit 47cc9e23a313d67a4a3107242f205d2473842021. We use QCoreApplication::applicationDirPath in the logging initialization to find a possible qtlogging.ini file. Because QCoreApplication::applicationDirPath requires a QCoreApplication instance this leads to a qWarning, which in turn leads to a recursive call to the logging initialization, and in turn to a recursive mutex deadlock. Task-number: QTCREATORBUG-18031 Change-Id: Ic75e1e8c062eb647991725378489bf87c9648cca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QLineEdit: fix broken testElvis Angelaccio2017-04-191-0/+4
| | | | | | | | | Commit 288bfb0bbd added a test that uses QLineEditIconButton, which requires QT_BUILD_INTERNAL to be defined in order for the findChild() call to work as expected. Change-Id: Ieda18f4e26a91322e8a83c14f8d1fbbe4313ecf0 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix PNGs saved from QImage transform of 8-bit imagesAllan Sandfeld Jensen2017-04-191-0/+14
| | | | | | | | | | | Fixes two separate errors. QImage::transform was incorrectly adding colors to the color-table of the returned image when the converted image would not be indexed, and qpnghandler was looking at non-empty color- table instead of color format. Task-number: QTBUG-43708 Change-Id: Ife14b6428ca65ac7d3a0b36a89a73e56d64586b4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QLineEdit: Make the clear button always the leftmost buttonElvis Angelaccio2017-04-191-0/+23
| | | | | | | | | | | | | | QLineEditIconButton currently draws a fully transparent pixmap in its paintEvent() function, when the line edit is empty. This does not work when there is another trailing QAction that is visible even when the line edit has no text, as reported in QTBUG-59957. To fix this issue, make sure the clear button is always the leftmost button. Task-number: QTBUG-59957 Change-Id: I8a4f96aae07856aa0e1053ebb338ba9bdf052a16 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Initialize QLoggingRegistry rules on first use, not qApp constructionTor Arne Vestbø2017-04-181-2/+16
| | | | | | | | | Allows categorized logging before QCoreApplication has been created, which otherwise would silently fail to output anything because the category would never be enabled, despite QT_LOGGING_RULES being set. Change-Id: Ia733105c5b6f28e22af511ced5271e45782da12b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QGraphicsBlurEffect: Fix for high DPI scalingFriedemann Kleint2017-04-181-0/+5
| | | | | | | | | Preserve the device pixel ratio in the various helper functions and when drawing. Task-number: QTBUG-60026 Change-Id: Ieac9360b00044b6aedd0d3e1ad6e3b16d436f20f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-1812-1/+71
|\ | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp Change-Id: I375fa4afa662fa411a15f212ebd5f2f0dffdba7f
| * Fix undefined behavior in QSharedPointer::create()5.8Ihor Dutchak2017-04-171-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize a deleter for a new object, created by QSharedPointer::create(), only after the object is actually constructed. [ChangeLog][QtCore][QSharedPointer] Fixed undefined behavior when creating an object with QSharedPointer::create() and its conscructor throws an exception. Task-number: QTBUG-49824 Change-Id: I07f77a78ff468d9b45b8ef133278e8cdd96a0647 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QMatrix4x4: fix aliasing problem in operator*=Marc Mutz2017-04-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | When multiplying a QMatrix4x4 by itself, we were clobbering the very matrix we read from. Employ read-caching to avoid this aliasing problem. [ChangeLog][QtGui][QMatrix4x4] operator*=() now calculates the correct result even if the RHS and LHS are the same object. Change-Id: I8534d56cfdd62c336577125127f05173fcec2873 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Restore compatibility with Qt 5.7.0 and 5.6.1Thiago Macieira2017-04-1210-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSysInfo::productType() returned "osx" for all versions of macOS, even 10.12. Change 3e2bde35786 was incorrect. [ChangeLog][Important Behavior Changes] QSysInfo::productType() and QFileSelector behavior on macOS was restored to match what Qt used to return in version 5.7.0 and earlier. The behavior found in Qt 5.6.2, 5.7.1 and 5.8.0 is removed. [ChangeLog][Future Compatibility Notice] The identifiers that QSysInfo::productType() and QFileSelector will use to identify macOS systems will change in Qt 6.0 to match the Apple naming guidelines which will be current then. Task-number: QTBUG-59849 Change-Id: Ib0e40a7a3ebc44329f23fffd14b2b39392210c4f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | QMenu: Fix torn-off menu display crash issueDongmei Wang2017-04-141-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When tearing off either a non-scrollable multi-colume menu or a scrollable menu, displaying the torn-off menu crashes. The root cause is when the torn-off menu is created, the tear-off menu's style, margins and other attributes are not set to it. The patch is to ensure the torn-off menu has the same attributes as the tear-off menu does and set the torn-off menu with a correct menu size. Task-number: QTBUG-24815 Change-Id: Icea45f149ea8792671af4a62e62cad6ee01a1f95 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | QMenu: Fix margins related display issuesDongmei Wang2017-04-141-1/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the contents margins and the menu paddings are not considered for calculating the menu size, the positions and the size of tear-off bar, scrollers and the positions of the menu items when scrolling the menu, which results in the following problems when valid contents margins and/or menu paddings are set: - The tear off area is displayed in a wrong position. The mouse events are not handled correctly in the tear off area. For example, when you click in the tear off area, the menu should be torn off but nothing happens - For a multi-column menu, the menu width is not calculated correctly - For a scrollable menu, - the menu width is not calculated correctly - the menu items are not displayed in correct positions - the scrollers are not displayed in correct positions - menu items are displayed on the area of borders and margins when scrolling the menu - the last menu item is not displayed above the bottom of the content area when scrolling the menu to the end. The changes are to fix the problems above. Change-Id: I7931e1088dff0029f2d4825e2aa34b4e32fdccd9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | QVariant: implement QByteArray ↔ QUuid conversionv5.9.0-beta2Marc Mutz2017-04-142-1/+17
| | | | | | | | | | | | | | | | | | | | Seems like an obvious omission. [ChangeLog][QtCore][QVariant] Can now convert QUuid to and from QByteArray, not just QString. Change-Id: Ib56ae86ca0c27adaf1e095b6b85e64fe64ea8d18 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-121-0/+1
|\| | | | | | | Change-Id: I3bd83a839b16822035ed56a5cffe77bd6bc3f08d
| * Fix hidpi support for opengl window grabbingFilipe Azevedo2017-04-091-0/+1
| | | | | | | | | | | | | | | | | | | | Now set the QImage devicePixelRatio so the content is correct on all screens. Task-number: QTBUG-53795 Change-Id: Ic92eee98f691ebb1e0212498c1ae13ede74bca93 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Preserve last modification timestamps of installed filesSimon Hausmann2017-04-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | On non-windows platforms, we use the "-p" parameter of install(1) to preserve the last modification timestamps of files. On Windows the use of copy does not preserve them. As a cross-platform solution, this patch introduces a simple built-in install command in qmake to copy files. Task-number: QTBUG-59004 Change-Id: I3064d29a2b8c7b009a1efbf8f00b84c079ea5417 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Skip testing of QOpenGlConfig on platforms that don't support itSami Nurmenniemi2017-04-121-0/+7
| | | | | | | | | | | | Task-number: QTBUG-59966 Change-Id: If74657d0a0133c67f57bf92ae96d2d868d523f0e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix tst_toolsupport on 32-bit arm platformSami Nurmenniemi2017-04-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | On 32-bit arm platform, qint64 gets aligned differently than on 32-bit x86. First difference between the platforms on QFilePrivate member offset happens in QFileDevicePrivate::cachedSize: - On 32-bit x86 it's offset is 148 (4-aligned) - On 32-bit arm it's offset is 152 (8-aligned) and offsets of all the remaining members are +4 compared to x86 - On 64-bit architectures the offsets are the same Change-Id: If110da27ea08504e78b167c0a21599420eaa9630 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | tst_qhashfunctions: Test non-zero seeds tooThiago Macieira2017-04-111-44/+70
| | | | | | | | | | Change-Id: Ib0e40a7a3ebc44329f23fffd14b2e927021a1a2e Reviewed-by: David Faure <david.faure@kdab.com>
* | QTextDocument: improve import of DIV tagsDavid Faure2017-04-101-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | <div>1<br/></div>2 was inserting two newlines between 1 and 2, while all tested web browsers only insert one newline - as long as there is nothing between the <br/> and the </div>. This was the cause for extra newlines being inserted in KMail when replying to HTML emails, such as those generated by gmail. Change-Id: I5145d977701e68913264357bba22780e7cdd3f7d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix QDir::mkpath() when the path contains "symlink/../"Thiago Macieira2017-04-071-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is incorrect to collapse a "symlink/.." segment because the parent directory of the symlink's target may not be the directory where the symlink itself is located. [ChangeLog][QtCore][QDir] Fixed a bug that caused QDir::mkpath() to create the wrong directory if the requested path contained a symbolic link and "../". Change-Id: Iaddbecfbba5441c8b2e4fffd14a3e367730a1e24 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* | QDataStream: add operator<< and >> for std::nullptr_tThiago Macieira2017-04-071-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::nullptr_t is nullary: it accepts only one value, nullptr. So we don't need to read or write anything. This commit simply adds the two operators that allow generic code to operate on std::nullptr_t if required. This commit also adds the actual use to QMetaType::load/save, even though there's no change in behavior. [ChangeLog][QtCore][QDataStream] Added operator<< and operator>> overloads that take std::nullptr_t, to facilitate generic code. Change-Id: Iae839f6a131a4f0784bffffd14aa37e7f62d2740 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | tst_qmessagehandler: fix qMessagePattern for armSami Nurmenniemi2017-04-071-2/+4
| | | | | | | | | | | | | | | | | | Backtrace logging tests were not passing for arm. Added compile option -funwind-tables to support backtrace on arm. Task-number: QTBUG-59966 Change-Id: I5e2443b1e3a644a239dab68db990e75ae8fade24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | tst_QFocusEvent: Fix checkReason_ActivateWindow for offscreen and minimal ↵Sami Nurmenniemi2017-04-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | platforms Widgets in platforms offscreen and minimal don't get focus back automatically after hiding focused window. Extra activateWindow is needed. Task-number: QTBUG-59966 Change-Id: Iaf3d4e60483c4b2600472af199f7a7cd51b3fa6e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | 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>
* | 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>