summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* wasm: fix handling on int dead keys on macLorn Potter2020-06-291-12/+15
| | | | | | | | | Q_OS_MAC is not defined when building wasm on mac, so we need to use a runtime check. Pick-to: 5.15 Change-Id: I1e9c5ec4e11aae94c9d8e918b5f1f1526723c782 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: do not close QIODevice on errorLorn Potter2020-06-291-3/+0
| | | | | | | | | | | Closing it early means the user may get this message when reading data without checking for error: 'QIODevice::read (QNetworkReplyWasmImpl): device not open' Change-Id: I377fc3da68e9d9f14f8504ace5addbb4f8e3c539 Fixes: QTBUG-85176 Pick-to: 5.15 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: search emscripten key firstLorn Potter2020-06-291-8/+9
| | | | | | | | | This fixes key lookups with different keyboard layouts Pick-to: 5.15 Fixes: QTBUG-84494 Change-Id: I18f1643331961d9bfc1ac6977181f8959e76449d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Remove pthread storage for thread local dataMike Achtelik2020-06-281-59/+21
| | | | | | | | | | | | | | | | | The thread specific QThreadData is currently referenced as a thread_local variable and using a thread specific value via pthread_setspecific. Having both is not necessary, as the pthread value is never directly accessed and only used in the pthread destructor. Using a holder, we can achieve the same and get rid of the pthread handling altogether. This also fixes a bug, where the thread_local currentThreadData is already null, when entering the pthread destructor. In this case it would lead to a new QThreadData being created, when finishing an adopted thread. Pick-to: 5.15 Change-Id: Ib23b840f804637e6b7cebd89016672a34a575380 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Adjust conversion scripts to iconv changes in qt5compatJoerg Bornemann2020-06-282-23/+2
| | | | | Change-Id: I8e06a09768bd3554500d666273060d2e130965b8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Let qt_copy_or_install set the executable bit for PROGRAMSJoerg Bornemann2020-06-281-1/+20
| | | | | | | | | | | | In a prefix build, this function uses install(PROGRAMS) which correctly sets the executable bit. In a non-prefix build, we did file(COPY) without explicitly setting executable permissions. Now, we're also setting the executable bit for qt_copy_or_install(PROGRAMS) calls in non-prefix builds. Change-Id: I283e9aeed2a23016ee196d83d584a7eaaa5edd66 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Make the path variables in Qt6CoreConfigExtras.cmake relativeJoerg Bornemann2020-06-281-13/+13
| | | | | | | | | | | | | To be consistent with the Qt6HostInfo package, we're providing paths without prefix in the variables like QT6_INSTALL_BINDIR. The full path can be easily obtained by combining the relative path with the QT6_INSTALL_PREFIX variable. Also, the value of QT6_INSTALL_SYSCONFDIR was wrong. It usually is located outside of the prefix. Change-Id: I0035633a8c1c865d86d5ffc8b36565ceb2e7ea25 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Create Qt6HostInfo packageJoerg Bornemann2020-06-282-0/+34
| | | | | | | | | | | | This package is supposed to be loaded when cross-building Qt from the host Qt installation prefix. It provides information about the host Qt by setting various variables. The information reflects what "qmake -query" of the host Qt would return. All provided variable names begin with "QT6_HOST_INFO_". Change-Id: Id568923a318d6e3b48c450663519a3727f615a8f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* macOS: Clean up modal sessions after each pass of processEvents()Richard Moe Gustavsen2020-06-271-0/+5
| | | | | | | | | | | The Qt macOS event dispatcher defers modal session cleanup until the next runloop pass. But as it stood, we never did do so for stand-alone qApp->processEvents() calls. The result was that a NSModalSession would be kept alive longer than necessary, which would impact the activation state of other QWindows. Change-Id: I054f3084132c9d20a29a3f5823c19b7123ef40bf Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Adjust configure -cmake to accept both single and double dash argumentsDimitrios Apostolou2020-06-271-14/+9
| | | | | | | | This uses sed -E (extended regular expressions) to improve readability of regular expressions. Shouldn't be a problem on most modern systems. Change-Id: I12c9834c1ef83bf5f8547bccff655a6b8525cc3d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix configure -cmake -nomake examples -nomake testsDimitrios Apostolou2020-06-271-1/+9
| | | | | Change-Id: I4cea33ec5a231dc84805cb3e5052e662cc601749 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix -system-library and -qt-library arguments for configure -cmakeDimitrios Apostolou2020-06-271-0/+10
| | | | | Change-Id: Ief19f2e8cb2996b7d09e2354328d30a67ad801fd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QFileDialog: remove deprecated mode QFileDialog::DirectoryOnlyChristian Ehrlicher2020-06-265-66/+9
| | | | | Change-Id: Ia06e80c1bbed3e5bb80793aebd0a4780eb81a36b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Display found information in some of the Find modulesAlexandru Croitor2020-06-2611-0/+31
| | | | | Change-Id: I5d92f2f1a552888361a2939577c2b0177c62b596 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix some incorrectly included FindPkgConfig modulesAlexandru Croitor2020-06-264-4/+4
| | | | | | | | This gets rid of a few warnings during configuration. Task-number: QTBUG-85276 Change-Id: I07d2fdfd8d3f81f1d780528ee6350e1a3ded9523 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Make more inner find_package calls quietAlexandru Croitor2020-06-264-6/+6
| | | | | | | Task-number: QTBUG-85276 Change-Id: I8ed84e2f2cdaf90224452a5e5a549791574edc15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Add meta-target host_tools to easily build just the toolsAlexandru Croitor2020-06-262-0/+14
| | | | | | | | | | | A developer could write 'ninja host_tools' to build the qtbase tools and their dependencies, and then configure another cross-compiling build dir pointing to the previous host build. This shortens the workflow for cross-building when working in qtbase. Change-Id: I69e70d23ce9df8669bcadf326d0586f097e5cb21 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix framework handling for .pri filesAlexandru Croitor2020-06-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | | Rather than embedding the full absolute path to the framework, we should instead write a -framework Foo flag. qmake seems to do this by specifying QMAKE_LIBS_FOO in the mkspec. We'll try to get away with just deriving the name of the framework from the path, to avoid having to introduce a mkspec equivalent mapping for CMake. This doesn't currently handle framework include paths, which qmake also handled by harcoding QMAKE_INCDIR_FOO in the mkspec, and then sysrootifying it via mkspecs/common/mac/sdk.prf. Hopefully that's not really needed, given that -framework flag should imply include paths as well. Somewhat partially amends c254254c55b24dd0653331e025cdfdbbdcca2a56 Task-number: QTBUG-85240 Task-number: QTBUG-84781 Change-Id: I70ea5021422d7b1f5afa9c4a595d1a9b8a8217d3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix tst_qmake not to hang and re-enable itAlexandru Croitor2020-06-262-6/+2
| | | | | | | | | | | | | We don't really know why, but using the ctest --force-new-ctest-process flag stops the test from hanging. Also re-enable the test. Task-number: QTBUG-78449 Task-number: QTBUG-81365 Change-Id: I33094696dfe3f610dc257089074b1c2a9926f651 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Use build environment prefix.bat when running testsAlexandru Croitor2020-06-263-1/+35
| | | | | | | | | | | | | | Tests like tst_qmake need the build environment to be able to build apps / libraries. This is mostly needed for MSVC. Set the TESTS_ENV_PREFIX env var to point to the proper prefix.bat (host or target) and use that when running ctest. Task-number: QTBUG-85240 Task-number: QTBUG-78449 Task-number: QTBUG-81365 Change-Id: I6fa68714202ac7fc703973fc772e03b84790a043 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Remove superfluous define from tst_qmakeJoerg Bornemann2020-06-263-23/+0
| | | | | | | The QMAKE_CROSS_COMPILED define isn't used since 2011. Change-Id: I9f03791e9f7c0ef439db5e65d930c0b7cb928974 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix tst_qmake::resources() on WindowsJoerg Bornemann2020-06-264-30/+4
| | | | | | | | | | | | | | | | | | | | | | | | This test calls qmake on a project that generates a .qrc file. On Windows, where debug_and_release is on by default, the generated qrc file ends up in a "debug" or "release" subdirectory. On other platforms the file is generated directly in the build dir. To guess the right location, the preprocessor defines RELEASE_BUILD and DEBUG_BUILD were passed to tst_qmake.cpp by the test's .pro file. While the mapping from debug_and_release was fine for the .pro file, it was commented out in the automatically converted CMakeLists.txt. Instead of trying to fix the condition, we're going the easier route that's used in all other .pro files of tst_qmake: make sure that debug_and_release doesn't get in the way. In other tests this is done by setting DESTDIR = ./ which doesn't work for the generated qrc file. That's why we simply do CONFIG -= debug_and_release to make sure that everything is generated directly in the build dir. Change-Id: I557ac4e21d7b385004d369fae8a3f727d76d4d88 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QList: use =default for its default constructorGiuseppe D'Angelo2020-06-261-1/+1
| | | | | Change-Id: Id5270eac2464bf2d3810de18579d4dc295e98b38 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve deprecation message for QLine::angle(QLine)Eirik Aavitsland2020-06-261-1/+1
| | | | | | | | | | | | | | angleTo() always gives an answer measured ccw, so between 0 and 360 degrees. The deprecated angle() would give either cw or ccw, depending on which is smaller, so between 0 and 180 degrees. Help users porting by showing a simple way to achieve the angle() behavior in the deprecation message. Change-Id: I66f77d2b4e688562e443428209737aa3332a448f Pick-to: 5.15 Fixes: QTBUG-85087 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QImageIO: use the new allocation checker in the format handlersEirik Aavitsland2020-06-268-88/+45
| | | | | | Change-Id: I604d99ce476d4758a1e20b78257082911f1f1546 Task-number: QTBUG-85037 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Introduce a settable allocation limit on image loadingEirik Aavitsland2020-06-264-1/+80
| | | | | | | | | | [ChangeLog][QtGui][QImageReader] Introduced a settable allocation limit on image loading to limit resource usage from corrupt image files. Change-Id: Ibed7b0cac32798125a060e6db80b17ebc5e70759 Task-number: QTBUG-85037 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* macOS: Remove examples for deprecated QMac(NativeWidget|CocoaViewContainer)Tor Arne Vestbø2020-06-2610-337/+0
| | | | | Change-Id: I60d694f868623ed9761baf0cf532a87ab3412208 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Use QList instead of QVector in openglJarek Kobus2020-06-2613-74/+62
| | | | | | Task-number: QTBUG-84469 Change-Id: I26c1cfab7f2d9aa5c71847ae02bfe0cf15c04a1b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* macOS: Close popups on mouse down using synchronous QPA deliveryTor Arne Vestbø2020-06-261-2/+1
| | | | | Change-Id: I5ccb5ca4f9b9f7a480c575c5a2710ec20361cf88 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* cmake: Pick up custom Info.plist in user projectsTor Arne Vestbø2020-06-261-2/+2
| | | | | | | | We can't rely on the MACOS define as that's set by our private QtPlatformSupport.cmake that's not shipped. Change-Id: I86c578a282a0833408a06d923954510a3579bdaa Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Skip building tst_qprocess test when cross compilingAlexandru Croitor2020-06-261-1/+6
| | | | | | | | tst_qprocess hangs on the qemu armv7 configuration. Task-number: QTBUG-85287 Change-Id: I5a77a81a24bb1bd315edfcf14f3bcbfd5b925e4d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* SSL configure test: Fix confusing warningFriedemann Kleint2020-06-262-3/+3
| | | | | | | | | | | | | | | Remove quote character, fixing: Performing C++ SOURCE FILE Test HAVE_openssl_headers succeeded with the following output: Run Build Command(s) src.cxx 8 88: warning: missing terminating ' character 8 | # error OpenSSL was reported as >= 1.1.1 but is missing required features, possibly it's libressl which is unsupported which makes one think the test failed. Change-Id: I0ac02deee4282ef7c953186b820a31309e82b5e1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix up QVulkanWindow docsLaszlo Agocs2020-06-261-0/+14
| | | | | | Pick-to: 5.15 Change-Id: I5a37a57245b8d859adf02810d3954e7532e4a475 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Use QList instead of QVector in networkJarek Kobus2020-06-2632-134/+126
| | | | | | Task-number: QTBUG-84469 Change-Id: I7827da68e73ca8ff1e599c836f2157894c452b63 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* rhi: Enable specifying just an adapter or phys devLaszlo Agocs2020-06-269-71/+284
| | | | | | | | | Required by OpenXR. A VkPhysicalDevice or an adapter LUID + feature level pair should be adoptable while leaving the rest (device, queue, etc. setup) to QRhi as normal. Change-Id: Iada0972671b037b4efb03e7831b7c9b8c5f2393d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix qsizetype fallout in rhi manual testsLaszlo Agocs2020-06-261-2/+2
| | | | | Change-Id: I574a2930b5eeb4b3e1f3c6fca6d70dbda64ec324 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Android: fix QDesktopServices::openUrl() error for file scheme pathAssam Boudjelthia2020-06-261-3/+5
| | | | | | | | | | | If the url is a "file:" scheme url don't check for permissions which the file won't have, and then disable StrictMode for API >= 24 to be able to pass the "file:" path to the openUrl intent. Pick-to: 5.15 Fixes: QTBUG-67877 Change-Id: Ia3fecc24a67069dc76f866455277bf8b929e7697 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* cmake: Match tense of other log outputTor Arne Vestbø2020-06-261-1/+1
| | | | | Change-Id: Ied164c97bd54f6b37450d7a2cf8225ee5190ce17 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add explicit encode()/decode() methods to QStringConverterLars Knoll2020-06-263-4/+40
| | | | | | | | | The functional style interface is nice, but does feel alien in some contexts, so better also have explicit encode and decode methods. Change-Id: Ic07ced15f65cdb3a7f1cf044041e341d2ef87f79 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fuzzing: Add fuzz target for QCryptographicHash::resultRobert Loehning2020-06-262-0/+50
| | | | | | | Pick-to: 5.15 Change-Id: Ifc12358dd8cb932fe62c13975554d753a4f1afd9 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Unexport QModelIndexGiuseppe D'Angelo2020-06-261-1/+1
| | | | | | | It is entirely inline. Change-Id: I626d6e4f6338dabfcc1e34127c898ed13c5a513b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* macOS: Check that platform window is valid after delivering close eventTor Arne Vestbø2020-06-261-0/+2
| | | | | | | | Fixes: QTBUG-78814 Pick-to: 5.15 Change-Id: I551024c5d777999f7c79d21fd7b7de061c18f971 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QThread: Fix unnecessary stricter accesses to QThreadData::threadThiago Macieira2020-06-251-6/+6
| | | | | | | | | Commit ec6556a2b99df373eb43ca009340a7f0f19bacbd changed the member from a plain pointer to a QAtomicPointer. Not all accesses were caught. Pick-to: 5.15 Change-Id: I3d4f433ff6e94fd390a9fffd161b4ff25508c48d Reviewed-by: David Faure <david.faure@kdab.com>
* Use QList instead of QVector in dbusJarek Kobus2020-06-2514-67/+63
| | | | | | | | Omitted type replacement in qDBusParametersForMethod() for now. Task-number: QTBUG-84469 Change-Id: Ieb9fbb30b431c5e4183ad57acd35640e9556bf6c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QList instead of QVector in corelibJarek Kobus2020-06-2550-199/+167
| | | | | | | | | | Applied to headers only. Source file to be changed separately. Omitted statemachine for now to avoid conflicts. Omitted qmetatype.h for now - to be handled later. Task-number: QTBUG-84469 Change-Id: I317376037a62467c313467d92955ad0b7473aa97 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Use QList instead of QVector in other toolsJarek Kobus2020-06-2511-41/+42
| | | | | | Task-number: QTBUG-84469 Change-Id: I90d0e2e723bb4d205d7bf333b21cdf583fdf4ea0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QList instead of QVector in testlibJarek Kobus2020-06-253-6/+6
| | | | | | Task-number: QTBUG-84469 Change-Id: Icbc3c3130399296f6b5a7e9a313ad4737669de00 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Add instructions for building and testing qemu configsAlexandru Croitor2020-06-258-13/+101
| | | | | | | | | | | | | | | | | | | | | | | Before this change, tests were never built for cross-compiling configurations. Add instructions that build and run tests for qemu configurations. This required a bit of abstraction / indirection to find out what's the path to the correct qt-cmake call, as well as prepending the correct env prefix to each call (either the host one or the target one). Also, the QEMU configuration requires a few environment variables to pick up the correct runtime linker and which qpa plugin to use for running tests. Finally, make sure the tests are not built and run if the DisableTests feature is set in the configuration. Task-number: QTBUG-84423 Change-Id: I0cec28c801a657e67cfa48f3c61cfe487109946b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* moc: Fix QProperty code generationFabian Kosmale2020-06-254-8/+15
| | | | | | | | | | | | | | | | This addresses two issues: 1. The generated code for QNotifiedProperty<T, ...> was broken when T is a pointer. Notably, const S* & is not a constant reference to S*. This is addressed by consistently using T const& instead of const T&. 2. The Q_PRIVATE_QPROPERTY approach assumed that the property name and the getter are equal. This does break when they are not, and we are unable to change either of them due to API compatibility concerns. An example of this would be QQuickItem's parent property with a parentItem getter. Therefore, we now allow the usage of NAME to override the name of the property. Change-Id: Idf2e85576c74371b5b0f6db15dbe6f2d17c5e33d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove QPropertyMemberChangeHandler againSimon Hausmann2020-06-252-43/+0
| | | | | | | | | | | | Adding support for a static notifier within QProperty itself - through a QProperty "sister" class - is more efficient in terms of memory consumption and run-time performance. The MemberChangeHandler permanently takes up at least three pointers, while the notified properties only cost one pointer in the binding. Change-Id: Ia1a8c2b66f1f3c2fe13ae0ad9f12cdb6bdcc35ef Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>