summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix static linking when using bearer pluginsAlexandru Croitor2019-11-082-2/+0
| | | | | | | | | | | | | | Now that 5f160a3699d80d1736f691ad9ef774eb6aa28079 is merged to wip/cmake, we should be able to remove the previous workaround of not linking in the bearer plugins. Reverts 78b89547ad00153a8e02553a2e87d45415bd2314. Fixes: QTBUG-79211 Change-Id: Iaa6633bd74d51ceeed9fa1ffb536445ef817764b Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix Android x86 buildsLeander Beernaert2019-11-082-2/+2
| | | | | | | | | | | | Replace condition x86 to i386 to match other platforms. Regenerate src/gui/CMakeLists.txt Disable SSE4 on android x86 to match qmake. Change-Id: Ic0d330206f2d70a79d72553aa3ff0f91ff58119c Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix declarative testsAlexandru Croitor2019-10-251-1/+0
| | | | | | | | | | | | | | | | | | | e1fd6074935cd0be0df14d89eb0244fcbd1677cf in qtbase removed the qml1 imports enum from qlibraryinfo.cpp, qconfig.cpp, etc. With the recent merge from dev, this was not adjusted in qt_generate_qconfig_cpp, and thus we generated one too many strings in qconfig.cpp, which resulted in QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath) returning "imports" instead of "qml" subfolder, thus causing all qml modules not being found. Fix this by removing the extra qconfig.cpp entry, and all other references to the location. Change-Id: I128f667281138e2e0ef0fe1ced4af0405c532fef Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add --skip-install-root option to androidtestrunnerLeander Beernaert2019-10-241-4/+15
| | | | | | | | | Add the above option to android test runner since its not required when building with Cmake. Change-Id: Ie5c9b0af29cfa76802723960071b3bd2a37a56a5 Reviewed-by: Qt CMake Build Bot Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Add Android test runner toolLeander Beernaert2019-10-232-0/+29
| | | | | Change-Id: I235bc07be0e0f7a3b0ce6297c187950a57fb31ed Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add custom targets to generate Android APKLeander Beernaert2019-10-232-3/+4
| | | | | | | | | | This patch adds two custom targets to generate android apks. The targets are named ${TARGET}_prepare_apk_dir and ${TARGET}_make_apk. The first one insures the binary is copied to the right location and the latter invokes androiddeployqt on the apk directory. Change-Id: I8152cef387b50ec03ee2bfd92b56910a6f22754c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Mimic qmake by building our own xinputLeander Beernaert2019-10-211-1/+16
| | | | | | | | When we don't find the xinput library on the system, build it ourselves. Change-Id: I399e847513cdd1c2dcdc1d862265284002f8808a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Regenerate all configure.json filesLeander Beernaert2019-10-213-37/+116
| | | | | Change-Id: Iabd2430adc4877859dc73f4092927a69decf0311 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Temporarily disable automatic static linking of bearer pluginsAlexandru Croitor2019-10-182-0/+2
| | | | | | | | | | | The bearer plugins cause duplicate symbol errors when linking executables in a static build. Re-apply commit b2662b05dd078c46b82f5f041f51b0b83554113d Task-number: QTBUG-79211 Change-Id: Ie4c1359f1f4d649a22570a31634c94fd22102730 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add conversion code for Java codeLeander Beernaert2019-10-184-43/+72
| | | | | | | | | | Add support to pro2cmake to convert java code for android. Add support to override API_LEVEL for the Android sdk jar file. If the sdk is not found, we'll default to the one located by QT_ANDROID_JAR. Change-Id: If0b746dc7f9148ac43e6592a4a4dd23d46bbd4cd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Re-generate affected cmake files and configure.json after the mergeSimon Hausmann2019-10-1719-119/+182
| | | | | | | | | This also removes the workarounds of commit b2662b05dd078c46b82f5f041f51b0b83554113d now that it's fixed "upstream" in the .pro files. Change-Id: Idd5e6273873a700fcda5a6cad2039c4e88b61f6f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeSimon Hausmann2019-10-1793-464/+750
|\ | | | | | | Change-Id: Ia1da879a7bd8f71a649661a1844144dd67d60b3a
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-1758-381/+589
| |\ | | | | | | | | | Change-Id: Ica69de99be9c8af4d28a52e4b69e6af748ed983c
| | * QAbstractItemModel: implement QRegularExpression support for matchSamuel Gaist2019-10-163-17/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of the migration of qtbase from QRexExp to QRegularExpression. [ChangeLog][QtCore][QAbstractItemModel] The match() method now supports the new Qt::RegularExpression match flag value. This will allow users to use either a string or a fully configured QRegularExpression when doing searches. In the second case, the case sensitivity flag will be ignored if passed. Task-number: QTBUG-72587 Change-Id: I07c8d72a661c48b7f4fcf13ef8e95980bcdcb998 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | * Provide a feature for CBOR stream I/OUlf Hermann2019-10-166-2/+32
| | | | | | | | | | | | | | | | | | | | | We need to turn it off in bootstrap code. Change-Id: I826e49fbc5f6128e56f84b58d29358dd7b0b9dc5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-1649-362/+505
| | |\ | | | | | | | | | | | | Change-Id: Ifd83db69416230175ddc3161f640b612755018fc
| | | * Prepare for deprecating the QDesktopWidgetSona Kurazyan2019-10-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDesktopWidget is marked as obsolete in docs, but it is not yet completely deprecated, some of its methods are still in use. Replace uses of the following methods marked as obsolete: - QDesktopWidget::screenNumber(QWidget*) -> QWidget::screen() - QDesktopWidget::screenGeometry(QWidget*) -> QWidget::screen()->geometry() - QDesktopWidget::availableGeometry(QWidget*) -> QWidget::screen()->availableGeometry() Task-number: QTBUG-76491 Change-Id: I2cca30f2b4caa6e6848e8190e09f959d2c272f33 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * rhi: gl: Do not let external rendering trash our vaoLaszlo Agocs2019-10-152-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-79221 Change-Id: Ie8e6376f79c816071c12962dc054838aeaabcaa5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | | * macOS: Simplify Objective-C namespacingTor Arne Vestbø2019-10-1528-117/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only need to use the QT_MANGLE_NAMESPACE macro when declaring the interface of the class. As long as we couple that with an alias declaration using QT_NAMESPACE_ALIAS_OBJC_CLASS, any further uses of the class name can be un-namespaced, including declaring categories on the class. The only snag with QT_NAMESPACE_ALIAS_OBJC_CLASS is that it can only be used once per class and translation unit, so forward declarations get hairy, but we can avoid that by just including the headers instead. Change-Id: I333bcd18fe1e18d81fbd560b0941c98b1c32460e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * Win32: Consolidate registry codeFriedemann Kleint2019-10-1412-166/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a RAII class for registry keys and use it throughout the code base. Change-Id: I666b2fbb790f83436443101d6bc1e3c0525e78df Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | | * QtWidgets: Suppress QEvent::WindowActivate when minimizedFriedemann Kleint2019-10-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent call to activateWindow() for minimized windows in QWidget::setWindowState() by clearing the flag. Fixes: QTBUG-46763 Change-Id: I40389d0906438ffe251fc79f18a523ecb53edb1b Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * Fix the size calculation of QHeaderView when stylesheet is usedSona Kurazyan2019-10-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calculating the header section size based on its contents when a stylesheet is used, the size hints from the stylesheet are used. In case if the stylesheet specifies only one of the sizes, the other is set to -1. Because of this the actual content size is ignored. The solution is to calculate the size based on the application style, in case if it's not specified in the stylesheet. Fixes: QTBUG-75615 Change-Id: I3453fa623d75b6b32832edf753de6e3e4e7f5a22 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | | * CoreText: Preserve font descriptors when resolving fallback familiesTor Arne Vestbø2019-10-142-75/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From macOS 10.15 and iOS 13 forward it's not possible to create font descriptors for system fonts such as .AppleSystemUIFont based on the family name. This means we have to preserve the font descriptors we get from CoreText for fallback fonts, so that we can populate them along with the family name. Task-number: QTBUG-78821 Task-number: QTBUG-77467 Change-Id: Ifce01da65f90afb7dc2bc3005c3c5870b9c116de Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | | * CoreText: Use StyleHint as fallback when family is not foundTor Arne Vestbø2019-10-141-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I11fb6cafe9d41c38eac6ca0695c89f30f998f257 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | | * Remove usages of deprecated APIs of QDesktopWidgetSona Kurazyan2019-10-132-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced the usages of the following deprecated APIs: * QDesktopWidget::screenCount() -> QGuiApplication::screens().size() * QDesktopWidget::screenGeometry(int) -> QGuiApplication::screens().at() * QDesktopWidget::screenNumber(QPoint) -> QGuiApplication::screenAt(QPoint) - Added notes for the QWidget *QDesktopWidget::screen(int), which currently has no replacement. - Fixed the tests to build conditionally, only when these APIs are enabled. Task-number: QTBUG-76491 Change-Id: I2fdec96d0a6a4fc782c53549b05a5556412b8305 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | | Fix duplicate platform plugin definitionsSimon Hausmann2019-10-163-65/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | androidplatformplugin.cpp and main.cpp both tried to define the platform plugin entry point. That happens to work with the android toolchain by chance, but it's certainly not intentional. Change-Id: Ie92281abfb2335aa3ee83bc0ba660700d3485b2d Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-165-0/+148
| |\| | | | | | | | | | | | | | Change-Id: I8348c823117dd3d594d365fc3583f7e44d44a81c
| | * | Cbor: Avoid QUrl in bootstrap codeUlf Hermann2019-10-152-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QUrl is not available when building qmake. Hopefully we can get rid of this mess in Qt 6. Change-Id: Ia234996dd4f27d7f843db227e4cf2db869c92dc1 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | QTest: fall back to qWaitForWindowExposed in qWaitForWindowActivatedJohan Klokkhammer Helsing2019-10-141-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...if window activation isn't supported. Task-number: QTBUG-62188 Change-Id: Ia83de59d9a755d95b7150eb5261bc43dd7b60588 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * | Make QJsonObject::iterator a true random access iteratorLars Knoll2019-10-132-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends and fixes 7236721bf8bacc0978fc872d7e4805c7be7824f0 where the iterator category was changed from bidirectional to random access without adding all the required functions. Fixes: QTBUG-57353 Change-Id: I2c96448facb222c8b8f9ad4423cb0dbd1ed098f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Fix static linking when bearer management plugins are builtSimon Hausmann2019-10-1525-52/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bearer plugins include copies of moc generated code that results in duplicate symbols when static linking pulls in multiple bearer plugins. Instead of relying on toolchain defined behavior, this patch moves the code that is shared into the shared library as private API. This way it will exist only once in memory and once at link time, resulting no linking errors about duplicate symbols. Fixes: QTBUG-79211 Change-Id: Iafa45c234e7fdd998971fc9cb7116334d08907bc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | | pass QSqlDatabase by const &Albert Astals Cid2019-10-156-13/+13
| | | | | | | | | | | | | | | | | | | | Change-Id: I326c09ab9313098470cb657571f67755fd7810c7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | Fix developer build with -WerrorSimon Hausmann2019-10-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The group parameter is only used when cross-compiling, mark it as unused otherwise. This is noticeable in the cmake branch because there we build qmake with cmake and apply the same warning flags, as opposed to the bootstrapped qmake build when using ... qmake. The cache file parameter in qmake is unused and the mustEnsureWritability is only used on Windows. Change-Id: I08655d5150f5a967c2340ee7678bad3a4d69914f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | | Regenerate files after dev -> wip/cmake mergeAlexandru Croitor2019-10-1417-72/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note the following bigger things that had to be done: Handle GSS library / feature with a new custom find module. Implement rudimentary support for relocatability (does not currently handle extprefix). Change-Id: Ic6cd27dda7ebca9829f51cb42ea76fff6d1767ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-14411-13107/+15394
|\| | | | | | | | | | | | | | | Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-1435-241/+229
| |\| | | | | | | | | | | | | | Change-Id: I129dd579f92cb2592a38ca043472b45cb926ae12
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-1333-109/+201
| | |\| | | | | | | | | | | | | Change-Id: I9953c1ca16862184c2373027e946c482ce8e6f0e
| | | * evdevtouch: Fix touch device count not being updatedJohan Klokkhammer Helsing2019-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When this was refactored in 3bc10fb9bb9 to use unique pointers, a move was added before the connection, so it would essentially always try to connect a nullptr. Change-Id: Iab7fce88bc73afd78e6b63ffaef7358f3f4ce7e3 Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
| | | * QGroupBox: always disable children in a checkable, unchecked groupboxVolker Hilsheimer2019-10-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The childEvent handler sets the enabled property of children as they are added to the groupbox, but applications might later enable children and check/uncheck the groupbox's checkbox in undefined order. In that case, we would end up with enabled children inside a conceptually disabled groupbox (the groupbox's checkbox represents the logical "disabled" state), which breaks documented QWidget::enabled rules. To make sure that all children are disabled as per the state of the groupbox, we need to run that logic once the UI has been set up, and before it becomes visible. This is what polishing is for, so listen for that event in addition and handle it the same way as adding (which duplicates things, but keeps existing code that might depend on things being updated as they are added working). Adds the case to the existing enabledChildPropagation test case. [ChangeLog][QWidget][QGroupBox] Always disable children of a checkable, unchecked group box before showing. Change-Id: I978bd27b6f1a3f54ec745faeea529a98d0d93619 Fixes: QTBUG-25938 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * Fusion Style: Use high-dpi pixmapsMorten Johan Sørvig2019-10-111-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the QWindow as context to QIcon::pixmap(), which enables it to return high-dpi pixmaps when needed. Fixes: QTBUG-74100 Change-Id: I4556f0a98df8b6ba65376778379a03eb8c470d00 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | * Protect global variable g_pointIdMap with mutexesRainer Keller2019-10-112-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The evdev touch handler is thread based and calls QWindowSystemInterface::handleTouchEvent. The global variable in qwindowsysteminterface.cpp is used without being protected by mutexes which causes data loss and crashes when multiple touch screens are used. Fixes: QTBUG-63584 Change-Id: I8b5bb04cc517fab96ac428b2bd2bc128b2ca1a54 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * Fix QEasingCurve possible imprecision at endpointsEirik Aavitsland2019-10-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both the spline curves and (most of) the predefines curves are defined as having start value 0.0 and end value 1.0. The spline and In/OutBack functions would sometimes not produce that result precisely, so code could not reliably depend on expressions like (easedValue < 1.0) becoming false. Fix by explicitly handling endpoints. Fixes: QTBUG-76781 Fixes: QTBUG-72630 Change-Id: I21be43af469a76c090154bffef8406a9baf2d0b1 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
| | | * macOS: Optionally flush sub-layers via sub-image copies of the backingstoreTor Arne Vestbø2019-10-111-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we're flushing the backingstore to sub-views with their own layers we don't want to pay the cost of uploading the whole backingstore to the GPU in the case where we're dealing with a discrete GPU. To work around this we make a copy of the appropriate part of the surfcace. This results in additional copies of the data, and will need further investigation to limit these. Task-number: QTBUG-77447 Change-Id: I318ae80e433dd7b0a55fd5a598b19f114d8bd28e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | * macOS: Don't override event handler for kAEQuitApplicationTor Arne Vestbø2019-10-111-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of the default handler, [NSApp _handleAEQuit], does a lot more than just terminating the application, including sending NSWorkspaceWillPowerOffNotification if appropriate, and deals appropriately with state restoration. Change-Id: If725838fc0f40d09a0b8885eb3e7239499d8fea0 Fixes: QTBUG-18624 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | * macOS: Simplify reflection delegate handling in QCocoaApplicationDelegateTor Arne Vestbø2019-10-111-25/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sending a message to a nil object returns nil, so there's no reason to check the delegate before calling respondsToSelector, and we can use the implicit _cmd argument to pass along the selector for the method we're in. For applicationShouldTerminate, if there's a reflection delegate but it doesn't answer to applicationShouldTerminate it makes no sense to skip our own logic. Change-Id: Iafcd883a5c8cec1b35d2f95238de55eff060d71f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | | * QMacStyle - fix the background color for tool buttonTimur Pocheptsov2019-10-111-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when it's in 'ON' state ("inverted" color in 'Dark' appearance). Number are rather arbitrary and extracted with 'Digital Color Meter' app to make it look similar to the native panel (to be honest, this tool button on a toolbar not to be found in many native apps, they use different buttons anyway). Fixes: QTBUG-71526 Change-Id: Ie61e60b77f097f04550006612e4aab6f11bb954b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * Distinguish invalid datetimes from othersEdward Welbourne2019-10-111-11/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A default-constructed QDateTime is invalid, but compared equal to a valid one referencing the start of 1970. This lead to date properties in QML being initialized invalid but not getting an onChange if the first value they're set to is the start of 1970. Fixing that then lead to some tests failing. Indeed, the original equality check involved using toMSecsSinceEpoch(), whose value is undefined unless the datetime is valid, without a prior check on its validity: so ensure all uses of toMSecsSinceEpoch() are guarded with isValid() checks. Reworked tst_QDateTime::toSecsSinceEpoch() to use its bool column (previously unused, after separating from toTime_t(), which uses this column for "out of time_t's range") for validity of the datetime. [ChangeLog][QtCore][QDateTime] Invalid datetimes are now treated as equal and less than all valid ones. They could previously be found equal to valid datetimes. Fixes: QTBUG-79006 Change-Id: Ie72deb8af4350a5e808144d0f6e42dc8eb3ff5ef Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * QAbstractScrollArea: when used as a popup, apply regular popup behaviorVolker Hilsheimer2019-10-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidget::mousePressEvent is documented to implement the closing of popups if the widget is a popup. QAbstractScrollArea is one of the QWidget subclasses that might be used as a popup as well, so instead of just ignoring mousePressEvents, pass the event on to the QWidget implementation for regular popup handling. Change-Id: I05f77a334945f3c167f729f30bc022599230379b Fixes: QTBUG-60885 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | | * Make QTextBlockFormat::MarkerType an enum classShawn Rutledge2019-10-108-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This came up during API review. Change-Id: I9198e1eb96db0c21e46a226a032919bb62d3ca66 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | | * Fix relocatable prefix for hardware-specific Linux buildsJoerg Bornemann2019-10-101-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Qt 5.3.0 we recommend that Linux distributions place a SSE2-enabled copy of QtCore in a $PREFIX/lib/sse2 subdirectory (see Qt 5.3.0 changelog for details). Same for other hardware capabilities like AVX2 and AVX512. This use case was broken with the introduction of the 'relocatable' feature, because the prefix is determined from the location of libQt5Core.so and the relative path from libdir to prefix, which is baked in at configure time. We now try to locate the libdir below the prefix, and if that fails try again in the upper directories. Fixes: QTBUG-78948 Change-Id: Ieec6e1484974e19335cf08ae0df3ee5c0e316d28 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>