summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Allow for private properties to be implemented using QPropertySimon Hausmann2020-04-303-5/+32
| | | | | | | | | | | | | | | | | | | | | | Recently the moc learned that Q_PROPERTY(int x ...) can mean that "x" is implemented as QProperty and then allows installing bindings, etc. - this works by scanning the same class' members. For our own use of QProperty, we need to place the QProperty member itself into the d-pointer to be able to maintain the ability to add new properties without breaking binary compatibility. That however means that moc can't know that a certain property is backed by QProperty - we don't scan the members of the private class. As a workaround, this change enables the syntax where the property type used in Q_PRIVATE_PROPERTY may be wrapped with QProperty<T>. In addition this patch fixes the compilation of such declared properties by ensuring the accessor prefix (t->$accessor) is applied also for the QProperty related meta call variants. Change-Id: I8fbdc49319048b57f4eb0b65b56daba0459e9598 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QNAM/QNetConMon: Update handling of QNetworkConnectionMonitor::startMårten Nordheim2020-04-302-5/+14
| | | | | | | | | | | | | | | | QNetworkConnectionMonitor::start was previously called after checking d->networkAccessible, unfortunately that means if the network was unavailable when QNetworkConnectionMonitor was created we don't subscribe to updates or recheck the status (unless QNetworkAccessManager::networkAccessible() is called). Move the call to start to before the offline check. Also update the Windows backend so that it updates networkAccessible on the call to start() Pick-to: 5.15 Change-Id: I37647f19f703947143e7cbdafe09619ce0d98cc1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* pro2cmake: Translate (QT|QMAKE_USE)_FOR_PRIVATE into PRIVATE_MODULE_INTERFACETor Arne Vestbø2020-04-301-0/+4
| | | | | | Fixes: QTBUG-83063 Change-Id: I5b02cd236ef0fd3a9ed389294c05f8e3024463cd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix pro2cmake help textTor Arne Vestbø2020-04-301-1/+1
| | | | | Change-Id: I84980dda981c50da159e4bb81b08190b882d6978 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* macOS: Remove copy of QT_IGNORE_DEPRECATIONSTor Arne Vestbø2020-04-301-8/+0
| | | | | | | It lives in qcompilerdetection.h now. Change-Id: I7eb227b2a66997a7fd9e439a6dd21f398820f012 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Don't reference build directory in helper lib priTor Arne Vestbø2020-04-301-9/+9
| | | | | | | Otherwise the helper-lib pri file will be unusable when installed. Change-Id: Id79a61e6ca9bb1b32c82ee158fd18f51319c484e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix the setup for html_docs and qch_docsVenugopal Shivashankar2020-04-301-2/+2
| | | | | | | | | | | Traditionally, these make targets generated HTMLs and QCH only. This change fixes the dependency for these targets to ensure that behavior. Fixes: QTBUG-83877 Change-Id: Ic7c8afe5853d33fc4cc4cfd996f87e5f65df31ed Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Initialize data members of QJsonParseErrorVolker Hilsheimer2020-04-301-2/+2
| | | | | | | | | | | Instantiated objects are typically passed as an out-parameter to QJsonDocument::fromJson, but that might only happen conditionally (as in the jsonconverter example). Change-Id: I8d4719958b79b656070f085c58559bd97ac4bda2 Fixes: QTBUG-83880 Coverity-Id: 263796 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* pro2cmake: convert QMLTYPES_FILENAME to QT_QMLTYPES_FILENAMEFabian Kosmale2020-04-301-0/+4
| | | | | Change-Id: I9afc6d4c0c9b3fd87ef28f15da0a984d778b83ac Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* rhi: Warn better in D3D/Vulkan for incompatible multisample resolve formatsLaszlo Agocs2020-04-302-3/+17
| | | | | | | | | | | | | | | Attempting to resolve a multisample image into a non-multisample one is only valid when the formats are the same, as per Vulkan spec and D3D docs. With Vulkan, this is sometimes not fatal, some implementations can apparently deal with some format combinations, so the problem may not be trivial to catch, although with validation layer enabled a warning is shown at least. To make it easier to discover, have our own warning. Task-number: QTBUG-83707 Change-Id: I8fc87471de91cd65a445fbe8cedbf31a8295db53 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Revert "CMake: qt_find_package() enable debug behavior by default"Alexandru Croitor2020-04-301-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | It broke configuration of qtwayland standalone tests, due to qtwayland doing 3 separate qt_find_package(Wayland) calls with the same package but different arguments in 3 different directory scopes. The top scope didn't have PROVIDED_TARGETS argument. The rest of the scopes did have the arguments with either Server or Client, but because of the debug behavior above being enabled by default the dependencies weren't registered in the Qt6WaylandClientDependencies.cmake file (and the server equivalent). The registration didn't happen due to the skipping logic, when a package is found and the targets already exist. This led to standalone tests failing to configure because they tried linking against non-existent Wayland::Client and Wayland::Server targets. This reverts commit dd7e40b1086020f6a054957f4972720cd6849280. Change-Id: I60e358a4891b84ecec0e127d9de8ab9747a6ab24 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* CMake: Fix build of qlogging test on MinGWAlexandru Croitor2020-04-301-1/+1
| | | | | | | | | | The linker doesn't have a -rdynamic option. Otherwise the build fails with g++.exe error unrecognized command line option '-rdynamic' Task-number: QTBUG-75578 Change-Id: Ie89a19fd25e90bef14e64d1d98fd973fa0315997 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix usage of correct install prefix for standalone testsAlexandru Croitor2020-04-301-2/+15
| | | | | | | | | | | Previously configuration of standalone tests might have failed due to CMake trying to create files in the /usr/local default prefix. Make sure to use a fake prefix in the binary dir instead, unless another prefix is explicitly specified. Change-Id: Icfcb32285aa5596abf1a918396b26673880a8d27 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Extend qbswap to charNN_tMarc Mutz2020-04-301-0/+11
| | | | | Change-Id: Iea35d27961060d7a4be0410de35e974b4deb4fdf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QtCore: fix a few more char/int/uint -> QChar conversionsMarc Mutz2020-04-304-10/+13
| | | | | | | | They were masked by all QChar ctors being made explicit, except the char16_t one, which was left as the only viable choice. Change-Id: I5632795f3c7dd1de3830285d5446d9b994613466 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTextCodecs: fix a few more ushort/uint -> QChar conversionsMarc Mutz2020-04-302-2/+2
| | | | | | | | | They leaked through since QChar(char) was explicit and therefore QChar(char16_t) was the only viable constructor left once we made all non-character-type QChar ctors explicit, too. Change-Id: I6d774fc4b0d3b7eb480bdb93afd17c2ee9260b1c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNetworkProxy: don't allocate when parsing [1/2]: loop bodyMarc Mutz2020-04-291-13/+17
| | | | | | | | | | | | Instead of manipulating a QByteArray, do it with a QLatin1String, which is free. Also, don't prepend a dot to force matches at label boundaries, check that there's a dot where the match occurred. Saves two allocations per iteration. Finally, pull the query's peerHostName() initialization out of the loop - it doesn't depend on the loop variable. Change-Id: I6dfdae711f0bd8941af69bfbcfda7873a40e4b80 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QWidgetLineControl: replace raw memory handling with std::unique_ptrMarc Mutz2020-04-302-7/+4
| | | | | | Change-Id: I131175a9f7147783c4f4c0a1c4929e28677c159a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QXmlInputSource: change EndOf{Data,Document} ushort -> char16_tMarc Mutz2020-04-302-11/+11
| | | | | | | | | Allows continuing seamless conversion to QChar, unlike ushort, which is being made explicit or deprecated, or removed. Change-Id: I95480b013b5fbc95a2b45f860a01f24e6a97e5c8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtWidgets: fix a few more int/char -> QChar conversionsMarc Mutz2020-04-306-19/+17
| | | | | | | | | | They were masked by all QChar ctors being made explicit, except the char16_t one, which was left as the only viable choice. Change-Id: I210d50dc243391ad2c7dd353ba9ae40147585d04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: fix a few more char -> QChar conversionsMarc Mutz2020-04-301-2/+2
| | | | | | | | They were masked by all QChar ctors being made explicit, except the char16_t one, which was left as the only viable choice. Change-Id: I7288e6ae32b2771859a61c0b99783209d47616bc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtGui: fix a few more char/int/uint -> QChar conversionsMarc Mutz2020-04-305-7/+7
| | | | | | | | They were masked by all QChar ctors being made explicit, except the char16_t one, which was left as the only viable choice. Change-Id: I343269b61d555c259b5780011e99f85f5375ef78 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* macOS/iOS: set focus reason when handling window deactivationVolker Hilsheimer2020-04-293-5/+7
| | | | | | | | | Otherwise, the focusOutEvent to e.g. a QQuickItem losting focus will be OtherFocusReason when the window it's becomes inactive. Task-number: QTBUG-70319 Change-Id: Ic3762e68d92a88becd2b35612b14f6af64ee934e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Namespace all our IMPORTED targetsJoerg Bornemann2020-04-296-21/+19
| | | | | | | | | | | CMake IMPORTED targets should be namespaced so that CMake knows that the name refers to a target and not a file. Use the existing WrapXXX naming scheme where applicable. Fixes: QTBUG-83773 Change-Id: I5b0b722c811200c56c260c69e76940a625228769 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix CMP0100 warning for bundled harfbuzzJoerg Bornemann2020-04-292-2/+5
| | | | | | | | Add a SKIP_AUTOMOC argument to qt_add_3rdparty_library and use it in BundledHarfbuzz. Change-Id: Ie4aa61639a5ab64f286ac539989572a9ae6bc3d5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Get rid of virtual inheritance from ThreadEngineBaseJarek Kobus2020-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | The virtual inheritance causes the issue, when adding new, non-default constructor to the base ThreadEngineBase class. It looks like classes derived from it can't use the non-default constructor, even when it's called explicilty from the subclass. Instead, the default constructor of the ThreadEngineBase class is always required during compilation and called on runtime. In addition, the only sensible use of the virtual inheritance is the multiple inheritance, but apparently it looks like there is no single class in Qt which would multi inherit from the ThreadEngineBase class, so this change shouldn't have any bad side effects. This justifies the current lack of info on why it was introduced originally ages ago. Change-Id: I08266e6f6865d938d1b1e4243ef94d2c02c3a886 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up in QTransformJarek Kobus2020-04-292-117/+28
| | | | | | | | | Remove some deprecated stuff. Inline some methods. Remove unneeded constructors. Change-Id: Id646be021d2de02005ebc8e43328e77a36a6250b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Port more tests from tests/auto/corelib/tools to CMakeSona Kurazyan2020-04-2912-15/+179
| | | | | | | | Also removed add_subdirectory calls for subdirs which no longer exist. Change-Id: I759f408ca812e1721dde495b0e23feffdeeb9c60 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Regenerate examples/widgets/ projectsSona Kurazyan2020-04-2916-29/+163
| | | | | | | | Also add the missing examples/widgets/gallery project. Change-Id: Iec3d61881065cf93d90f9fd3da928ffcd4f0c0aa Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* uic tests: Update version in baselineFriedemann Kleint2020-04-29104-104/+104
| | | | | Change-Id: I74334587727097a59fdeccd2fc58d18096cfed0a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Enable Qt 5 connection syntax for QAbstractButton::animateClick()Friedemann Kleint2020-04-292-4/+4
| | | | | | | | | | | | | | | | | | Slot QAbstractButton::animateClick() is commonly connected to signal QLineEdit::returnPressed() in dialogs. The function had a parameter with a default for specifying the delay which requires a lambda when using Qt 5 connection syntax. Since the default value is used practically everywhere, remove the parameter. [ChangeLog][QtWidgets][QAbstractButton] The interval parameter has been removed from QAbstractButton::animateClick(). Task-number: QTBUG-81845 Change-Id: I4e399138b6aa3a9f0b31c1f10de97ffcbab6a337 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Mark widget gallery example as "gallery"Friedemann Kleint2020-04-291-0/+1
| | | | | | | | | Add a metatag. Amends 4e93e3b574390829c4c3c87716e0a9bb5ed579e4. Pick-to: 5.15 Task-number: PYSIDE-1112 Change-Id: I5003f958559438cc83eb98e5eedfcefb21a243b7 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* rhi: Add backing format hint to QRhiRenderBufferLaszlo Agocs2020-04-2913-250/+332
| | | | | | Task-number: QTBUG-83707 Change-Id: I63548f4ace70af614a2aa082663bb3ae9fbedc25 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Always open a text control's context menu on the same screenShawn Rutledge2020-04-291-0/+5
| | | | | | | | | | | | | | | | | It's very disorienting when a context menu pops up on a different screen from where the right mouse button was clicked. QWidgetPrivate::setScreenForPoint() can give incorrect results in multi-screen desktop configurations; but we can give the menu a hint by setting initialScreenIndex, which was originally used only when QDesktopScreen or QDesktopScreenWidget is the parent (see b3fc5e1ea3eb4fe838ac716aaca4efaa5de5a814 ). Task-number: QTBUG-76162 Pick-to: 5.15 Pick-to: 5.12 Change-Id: Icd4abdc32564430147e6c63a8ea70d483d25cddd Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add support for building building against yoctoSimon Hausmann2020-04-294-9/+36
| | | | | | | | Using an environment prefix wrapper shell script that sources the SDK's env setup. The script also ensure that we don't loose cmake on the way. Change-Id: I9d08bc58f0efaf688512ab26a7ddb800309a5015 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Instruction selection fix for qemu cross-buildsSimon Hausmann2020-04-292-12/+32
| | | | | | | | When building for qemu, the target "os" is still set to Linux, so try to detect qemu by looking at the version field. Change-Id: I7c66cdb29a47a44d5b8a394977136139fc646155 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* tst_QDialogButtonBox: Port away from QAbstractButton::animateClick()Friedemann Kleint2020-04-291-40/+38
| | | | | | | | | | Use QAbstractButton::click(). Refactor and polish the tests to use QTRY_VERIFY() instead of qWait(), speeding them up. Pick-to: 5.15 Task-number: QTBUG-81845 Change-Id: I119bede8143ec1db5f5250517dee38b576d5a8d2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tst_Gestures: fix -Wdangling-else GCC warningMarc Mutz2020-04-291-4/+4
| | | | | | | | | | | | | | ... and do a local code cleanup: - add override - port from foreach to C++11 ranged for loop - remove dead code (`gestureEvent` (née event) was already dereferenced when we check it for null'ness, so it cannot be nullptr, so the condition is always true). Pick-to: 5.15 Change-Id: Ica5e34fbe65c95f6573630f188582b90be15c8f7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* examples: avoid int -> QChar conversionsMarc Mutz2020-04-293-3/+3
| | | | | | | They're being made explicit/deprecated/removed. Change-Id: I61d8c40dc86035813b85724beb21a65b6f8dffef Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove deprecated members from QtGui/image classesVolker Hilsheimer2020-04-2917-543/+10
| | | | | | | | Cleaning up those that are trivial to remove because they have direct replacements. Change-Id: I4f5c25884a01474fa2db8b369f0d883bd21edd5b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Android: Rename rs locale to seKai Koehne2020-04-281-0/+0
| | | | | | | | | | | | | | | | | rs is the country code for Republic of Serbia, but se is the Serbian Language. According to the IANA subtag registry that is referenced in the error message, the language subtag for Serbian is se. https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry This fixes an error when uploading some apps to the Google Play Store. Fixes: QTBUG-83780 Pick-to: 5.15 Change-Id: I532a3082ca954a78343c873246b09a14d7a80a0e Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* CMake: Honor INSTALL_MKSPECSDIR when generating qmodule.priJoerg Bornemann2020-04-271-2/+2
| | | | | Change-Id: I3e0cdee30590d6979658ef81978513dd20455516 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Port qtbase/tests/auto/gui/painting to CMakeSona Kurazyan2020-04-2712-16/+449
| | | | | | Task-number: QTBUG-78225 Change-Id: Idc1333b119939e65da8f47d8de5333a38701bcb4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Port qtbase/tests/auto/corelib/text tests to CMakeSona Kurazyan2020-04-2715-11/+290
| | | | | | Task-number: QTBUG-78220 Change-Id: I497da6ed489854bdee5a1ead9a3f34118c78d001 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-04-278-13/+36
|\
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-278-13/+36
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/text/qstringliteral.h Change-Id: I1665af3ce537471b249def5e080b39bd4105189e
| | * Make t specifier for time-zone only apply to date-timeEdward Welbourne2020-04-232-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | It previously applied to dates and date-times, but was documented as applying to times (and date-times then included it by reference). It's only meaningful for a date-time. Change-Id: Id9e8e8cb987b03e5ddc77b05c581b9b6944065fc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QImage: optimize convertWithPalette()Marc Mutz2020-04-233-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code got a QMap serialized as a QString and parsed it to re-create the same map. Just copy the map. Change-Id: Ic71b9fa9d822eab53fe37dfb4d76223cd69ac057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * QStringLiteral: Remove const temporary that may prevent optimizationAlbert Astals Cid2020-04-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | clang-tidy 10 was complaining about http://clang.llvm.org/extra/clang-tidy/checks/performance-no-automatic-move.html Change-Id: Iea5276e401a10f3ead8599e135dec1f0fa63a0dc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * macOS: Don't optimize out aggressive backingstore flushes when single-bufferedTor Arne Vestbø2020-04-221-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comparing the layer contents to the backingstore surface doesn't make sense when we're single buffered since we're always using the same surface. And once Core Animation has picked up on the surface it's not enough to just keep drawing to it, we also need to tell Core Animation that the contents has changed. Change-Id: I517a0b7a3ba7e9d96033465c9bd5a192985643ac Fixes: QTBUG-81071 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>