summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* testlib: Set AA_UseHighDpiPixmaps false for low-DPI testsTor Arne Vestbø2020-07-242-0/+10
| | | | | Change-Id: I129118c303527e4aff25c4d5326eefa43c231d44 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Clarify that QCocoaKeyMapper only computes 8 modifier statesTor Arne Vestbø2020-07-242-24/+8
| | | | | Change-Id: Ie4a53bbc16cde7b4aa68172015bbfeaa9e316bcc Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add -Wsuggest-override for gcc >= 9.2Alexander Volkov2020-07-242-0/+6
| | | | | | | | | gcc doesn't report warnings for final methods since version 9.2: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78010 Change-Id: I7152351aac0e3bad86d777e119f25137ef97ec6f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix race in QFseventsFileSystemWatcher destructorErik Verbruggen2020-07-241-6/+8
| | | | | | | | | | | | | | | | | | | | | | The race goes like this: 1) We destruct QFseventsFileSystemWatcher, which calls FSEventStreamStop and FSEventStreamInvalidate/FSEventStreamRelease 2) The FSEvent* calls will happen on the same thread as the destructor is being called on, which will be different to the thread that the FSEvent* events are popping out on. 3) So, there could be a case where we are in the middle of processing an event, but the QFseventsFileSystemWatcher has already died. The fix is to dispatch the stop/invalidate/release on the queue associated with the stream. Patch by Matt Galloway! Fixes: QTBUG-85594 Pick-to: 5.15 5.12 Change-Id: Ie168bbe91e55c5559632b37bc008e11597e4fdaf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix buffer overflow in XBM parserAllan Sandfeld Jensen2020-07-242-1/+41
| | | | | | | | | | | | | Avoid parsing over the buffer limit, or interpreting non-hex as hex. This still leaves parsing of lines longer than 300 chars unreliable Change-Id: I1c57a7e530c4380f6f9040b2ec729ccd7dc7a5fb Pick-to: 5.15 5.12 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix a number of qdoc warnings related to deprecationFriedemann Kleint2020-07-2418-923/+6
| | | | | | | Remove obsolete documentation. Change-Id: Iaf4b6f9852a883dea0f256c5c89e74f6ebbe85f3 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QMetaType: force properties to have a complete type againFabian Kosmale2020-07-242-6/+27
| | | | | | | | | | | | | | When the compile time metatype support for methods was introduced, we needed to allow incomplete types to avoid breaking a large amount of code. However, this mistakenly enabled using incomplete types for properties, too. In contrast to methods, properties lack the fallback code to retrieve the metatype at runtime. Thus, this commit restores the completeness requirement for properties again. This is done by always calling QMetaTypeForType for properties in qTryMetaTypeForType. Amends fa987d44417528856d5e80ed7b48ba99e19fa307 Change-Id: I5f66ff289631c056eecebe40926bf321d283eea7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* testlib: Add start time and test duration to JUnit XMLTor Arne Vestbø2020-07-2455-363/+386
| | | | | | | As defined by https://llg.cubic.org/docs/junit/ Change-Id: Ic7683f3d49c529674f8467d591528d4a65d3add8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testlib: Output JUnitXML attributes in right orderTor Arne Vestbø2020-07-2453-3242/+3247
| | | | | | | | | | | | | | | | | | The attributes are, like the elements, maintained in reverse order in the underlying QTestCoreList, so we need to iterate them backwards when printing out the resulting XML to reflect the order they were added. This results in e.g.: <testcase name="passingBenchmark" result="pass"> Instead of: <testcase result="pass" name="passingBenchmark"> Change-Id: Ic2eeab8de05ffedd0c41977358d5b40ff77878b1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* SecureTransport: Set requested ciphers specified in the configurationAndy Shaw2020-07-242-0/+95
| | | | | | Fixes: QTBUG-83491 Change-Id: I783a355be5405d4c44e703874bdf2e14afe629e1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QLineEdit: Fix cursor drawing issuesLu YaNing2020-07-232-1/+3
| | | | | | | | | | | | | | | | Entering Chinese in some fonts in an English environment causes the cursor drawing coordinates to exceed the updated coordinates, leaving behind stale pixels at the top. Keep the refresh and draw area calculation methods the same when rendering the contents in QLineEdit::paintEvent, and when calculating the update area in QLineEditPrivate::adjustedControlRect. Fixes: QTBUG-85569 Pick-to: 5.15 Change-Id: I978cb56f24f961086b1271e56d07ad1ced16f8ff Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QWindowsFontDatabaseBase: Fix unused parameter errorKai Koehne2020-07-231-0/+2
| | | | | Change-Id: Ifa2cc45c1bf4326a1273a713e3db950846d2ca14 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Avoid enabling of "warnings_are_errors" flags for testsAlexander Volkov2020-07-231-1/+1
| | | | | | | | Change added dep in qt_add_cmake_library(): PlarformModuleInternal -> PlatformCommonInternal. Change-Id: I303a6a520f0dda7260b12cb21673b8f1a23d536b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* testlib selftest: Actually report failures as non-zero exit codeTor Arne Vestbø2020-07-231-0/+2
| | | | | | | Palm, meet face. Change-Id: I01cd4088c8f43f7fe66398c27f5d8333468620ad Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QSslSocket::flush - purge the function marked for removal in Qt6Timur Pocheptsov2020-07-232-20/+0
| | | | | | | | | QAbstractSocket::flush stopped being virtual and, instead, QAbstractSocketPrivate::flush is now virtual. So the code in QSslSocket is essentially a duplicate. Change-Id: Iebb33c8490268270b90a662ab64b1ae47c4cbac7 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* testlib selftest: Don't pass TESTARGS to Catch2Tor Arne Vestbø2020-07-234-4/+9
| | | | | | | It doesn't understand the arguments we usually pass to testlib. Change-Id: Iea83d1d8c31a510b2bc442cbfc810eac631322e7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QLogging: purge deprecated qInstallMsgHandler(QtMsgHandler)Edward Welbourne2020-07-235-95/+3
| | | | | | | | Deprecated since 5.0. Renamed a function in a manual test that no longer needs to say it's Qt5-specific. Change-Id: I6f2159c702f389d378a0e4d86bd4fe633298b100 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* QLocale: purge deprecated APIEdward Welbourne2020-07-232-43/+0
| | | | | | | | Since 5.15 - toTime() with a calendar in the argument list The calendar was never used. Change-Id: I37897d47b42e69d1a8312e6389d6349febb889ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove reference to removed moduleEirik Aavitsland2020-07-231-3/+0
| | | | | | | The openglextensions module is dicontinued and removed in Qt 6. Change-Id: I0b98f9b6575026828c188786aeb5c1a62de1f8a3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Multiply instead of shiftingRobert Loehning2020-07-231-1/+1
| | | | | | | | | The shift operator is undefined for negative values. Fixes: oss-fuzz-23735 Pick-to: 5.15 5.12 Change-Id: Ib4bad0bf2135f9ddc95f6d7de64d935a02b4791e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* tst_QGraphicsSceneIndex::clear: Don't assume only one repaintTor Arne Vestbø2020-07-231-1/+1
| | | | | | Change-Id: I037b51ebad525ced536945b2c39b0f59280e6bad Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* testlib: Track current test suite in JUnit test loggerTor Arne Vestbø2020-07-222-27/+32
| | | | | | | | | Instead of deferring the creation of the test suite until logging stops, we create it up front, matching the logic of adding test elements on test function enter. Change-Id: I78b1ccdfde5493d78ef478d4b3c45d5a49358979 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* testlib selftest: include 'keyboard' test in generate_expected_output.pyTor Arne Vestbø2020-07-221-1/+1
| | | | | Change-Id: Ia1d759454b2931ca838942cf9b08f8b62dfd61ce Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testlib selftest: Only warn about missing test expectation if none was foundTor Arne Vestbø2020-07-221-1/+4
| | | | | Change-Id: I55e19d0a7b9b58ceeee4f25612f4a1d9ec66eb76 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testlib: Explicitly name watchdog timer threadTor Arne Vestbø2020-07-221-0/+1
| | | | | | | Simplifies debugging of issues where the watchdog thread is involved. Change-Id: I4862167bca4a942c7d4319a9374f1f83f292d831 Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* testlib: Defer signal dumper start until tests are ready to runTor Arne Vestbø2020-07-229-29/+21
| | | | | | | | | | | | | | | We don't want the signal dumper to pick up signals that our own test machinery produces, such as the ones emitted from the watchdog thread startup and shutdown. This would otherwise produce: tst_Signaldumper::initTestCase() Signal: QThread(7fc969e0d870) started () At startup, and at shutdown even more confusingly: tst_Signaldumper::UnknownTestFunc() Signal: QThread(7fc969e0d870) finished () Change-Id: I9e81fa168eaa92551d38d5576973bbf95ac23364 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* testlib selftest: rebaseline benchlibcallgrind resultsTor Arne Vestbø2020-07-225-32/+0
| | | | | | | | | | | | The logic was changed in eb52d78e90ad8870a to only produce a single result for all the benchmark iterations, but only the plain text output was rebaselined. This was not caught by the test since we only run this test with the plain test logger. Regenerating the results with the python script however runs it with all loggers, so let's fix the baseline. Change-Id: I9ebe8a59ac3ab36694a739f98dbfffbae9a08552 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* testlib selftest: check blacklisted test for test failuresTor Arne Vestbø2020-07-223-8/+7
| | | | | Change-Id: Ifcd1155f7627f6a9f8b379fb9e87425f9d9f2877 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testlib selftest: unify xml quoted asserts that include line numbersTor Arne Vestbø2020-07-223-3/+3
| | | | | Change-Id: If66303bab10c23dd212a6abcdff3f145630e2401 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* testlib selftest: rebaseline tap results to not include line numbersTor Arne Vestbø2020-07-2225-462/+464
| | | | | Change-Id: I6271ac1984a3829ba1c8dcc9d6419940cb89c62b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Manual touch test: Add a settings dialog for windowsFriedemann Kleint2020-07-222-1/+86
| | | | | | | | | | Exercise the touch settings of the native interface. Task-number: QTBUG-41433 Task-number: QTBUG-48849 Task-number: QTBUG-83252 Change-Id: I5ae95a79c00b55236dbbed9d8549f4fdf5b10b8e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add QPlatformInterface::Private::QWindowsWindowFriedemann Kleint2020-07-2212-207/+39
| | | | | | | | Remove QWindowsWindowFunctions Task-number: QTBUG-83252 Change-Id: Iacfdf2e0f430208901c182e461c4617e1ef526ce Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows QPA: Move the touch types API from platformheaders into QtGuiFriedemann Kleint2020-07-2210-75/+87
| | | | | | | | | | | | | | | | | | | | Change TouchWindowTouchType(s) to be (global) property of QGuiApplication's native Windows interface since it does not make sense to set it per window. It appears the previous code setting the types per Window has never worked since registerTouchWindow() bailed out due to the checks for the flags TouchRegistered and IsTouchWindow() (setting in HCBT_CREATEWND). In addition, registering windows for touch after plugging in a device would not observe the setting. Move the checks around to make this work. Task-number: QTBUG-41433 Task-number: QTBUG-48849 Task-number: QTBUG-83252 Change-Id: I4306fdf13208f6eef22655875f3bd1769270e617 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Deal with macOS not enabling AVX512 state in XCR0Thiago Macieira2020-07-221-18/+50
| | | | | | | | | | | | | | | | | | | | | | | All Mac Pros launched since 2019 have AVX512 support (CLX processor) but the Darwin kernel does not enable the state bits in the XCR0 register for all processes by default. Instead, it traps the #UD exception and decodes the instruction to find out if it was an AVX512 instruction. If so, it adds memory to the thread's context switch space. See [1]. Good solution, but forces us to have OS-specific code to determine if the OS really supports AVX512. No other OS appears to require this. For future features (namely, Intel Advanced Matrix Extensions), there's an official way of implementing this, via the eXtended Feature Disable register. Qt has no AVX512 code yet, so this is just being future-proof. Apple has yet to announce when or if their Mac Pros will switch from Intel Xeon to ARM. [1] https://github.com/apple/darwin-xnu/blob/xnu-4903.221.2/osfmk/i386/fpu.c#L174 Change-Id: Ieffc3453b88c4517a1dbfffd162175ead343e622 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Remove workaround for zero-size GL viewsTor Arne Vestbø2020-07-221-8/+1
| | | | | | | | This is no longer a problem, and this condition should be handled by QCocoaGLContext in any case. Change-Id: Iaac9d1a8962b27bf6f0394b8c1ea3e46dc28e29e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Ensure initial geometry is always setTor Arne Vestbø2020-07-221-2/+10
| | | | | | | | | | | | | | | | | | | | | | QPlatformWindow initializes its view of the geometry based on the QWindow geometry during construction. If the initial geometry we then compute is the same, we would end up exiting early from QCocoaWindow::setGeometry(), because we compared the new geometry against the QPlatformWindow::geometry(), and the geometry would never be reflected in the NSView. Due to other setGeometry calls this was in most cases masked, but could in theory happen, and is preventing us from cleaning up other parts of the code. The call to QWindow::setGeometry() after setting the initial geometry is also broken, as the initial geometry is available through the platform window and QWindow::geometry() already, so setting it again serves nothing except disabling d->positionAutomatic, which is not correct. Change-Id: I0db3cfe7d7c3d14070beee6ae3ea3dfd49da9e05 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Temporarily add a private QESDPv2Giuseppe D'Angelo2020-07-223-0/+169
| | | | | | | | | To unlock work while waiting for QISP. QESDP is lacking a few crucial APIs (isDetached() / isShared() / reset(ptr) / deep const), so we can't go there right away. Change-Id: I647eb0db4ea800488a323f3b64661e848998168d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macOS: Remove stale code for handling view hiding during reparentingTor Arne Vestbø2020-07-221-4/+2
| | | | | | | | | | | | Commit a2bdda8e3ba added an unconditional hide of child NSViews, which was found to be too strict, and worked around in a199a87ad by undoing the hide during setParent(). The unconditional hide was then changed in 89842b97d7 to use the visibility state of the window, which means the workaround in a199a87ad is no longer needed. Change-Id: If0df2de65693e03c5fb53a906b1399accab3fcc4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix the touch manual test to compileFriedemann Kleint2020-07-221-3/+2
| | | | | | Task-number: QTBUG-72167 Change-Id: I9074fc21ae8fccf66140fb38bfbd35e526506c36 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QSysInfo: remove deprecated windowsVersion() and macVersion()Edward Welbourne2020-07-223-378/+0
| | | | | | | | | Remove their associated enums, too. All deprecated since 5.9. Change-Id: Ieefba1a08c221ea7b62500f219baea8a3ccfb7db Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Clean-up some Qt 5 leftovers from JSON serialization classesSona Kurazyan2020-07-224-109/+18
| | | | | Change-Id: I2ddf6901d627677395b39bec34c2c47d27e88d0b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qnsview: don't active QWindows inside NSWindows that are not keyRichard Moe Gustavsen2020-07-224-4/+62
| | | | | | | | | | | | A QWindow should only become Active when it's inside an NSWindow that is Key. If the NSWindow is not key, we need to wait for it to be so, and handle window activation from QCocoaWindow::windowDidBecomeKey() instead. Otherwise Qt will report a QWindow as Active when, in reality, it is not. Change-Id: Ib7e63b374f26af527a668c7f7d863c4168a4446d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove an outdated and nonsensical comment in the docsGiuseppe D'Angelo2020-07-221-4/+0
| | | | | | | After the QVector->QList rename it made no sense. Change-Id: I4a422f48b1f5d42c1c4d402ea947a0f4098172b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QPluginLoader: Fix MachO stub testsTor Arne Vestbø2020-07-222-5/+12
| | | | | | | | | The -arch_blank argument to lipo is no longer supported. Pick-to: 5.15 Pick-to: 5.12 Change-Id: I47efcb3633f23b7a18d66211bc16d5c9dbc067c8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* iOS: Add a variable to customize where the launch image is taken fromAndy Shaw2020-07-225-7/+33
| | | | | | | | | | | | | For those who are providing their own launch images for their iOS projects then QMAKE_IOS_LAUNCH_SCREEN can be set to point to the location where the launch image to be used over the default. [ChangeLog][Platform Specific Changes][iOS] Added support for specifying a launch image to be used for an iOS project. This can be achieved by using QMAKE_IOS_LAUNCH_SCREEN. Change-Id: Ibb236655b282132ab5eee747986a93abb9802200 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QTestlib: Enable comparing QList against initializer lists/arraysFriedemann Kleint2020-07-2114-210/+533
| | | | | | | | | | | | | | | | | | | | | It is unnecessary to create a QList container just for comparison. Split out helpers for comparing sequence sizes and sequences from qCompare(QList) and add a template for an array with a non-type template parameter for the size. One can then write something like: const int expected[] = {10, 12,...}; QCOMPARE(QFontDatabase.pointSizes(...), expected) Unfortunately, any commas in such an array will be misread by macro expansion as macro argument separators, so any expected array with more than one entry needs an extra macro expanding __VA_ARGS__. Change-Id: Ie7c8dc20bf669bbb25f6d7f8562455f8d03968c8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Discard extra mouse move event generated by touchpadAndre de la Rocha2020-07-211-0/+7
| | | | | | | | | | | | | | | | | On Windows, and possibly other platforms, a touchpad can send a mouse button press followed by an unexpected mouse move event to the same coordinates, before sending a mouse button release, which may confuse applications. Before the enhanced mouse event processing was added, the code in QGuiApplication was responsible for deducing the mouse event type and other info, and in the process performed a checking that discarded events that did not change state. The enhanced mouse processing code lacked this checking. This change adds an equivalent checking to the enhanced mouse event processing. Fixes: QTBUG-85431 Pick-to: 5.15 Change-Id: Ie3e2ae8cbf9870d465dfd2c8808942dd6fc647d2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tst_QLine: use qmath.h's constants instead of local versionsEdward Welbourne2020-07-211-15/+9
| | | | | Change-Id: I41313f7e7caf3c364ae900a0b100c661aafb290d Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QAssociativeIterableImpl::advanceImpl(): remove deprecation protectionEdward Welbourne2020-07-211-3/+0
| | | | | | | | The comment claims it is needed for "the deprecated QHash::iterator::operator--()", which has been removed already. Change-Id: I90f5abdcd14e6cac4ed7144e96eb26bf34477391 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Start the native interface QWindowsApplicationFriedemann Kleint2020-07-2118-210/+200
| | | | | | | | | | | | Implement the static parts of QWindowsWindowFunctions. Move some things around and make them static in tablet support to make this easier. Task-number: QTBUG-83252 Change-Id: I24c3b0b3c6548eb96c4f3285a4e46385a1e79ef5 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>