summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Merge remote-tracking branch 'origin/5.14' into dev"Qt Forward Merge Bot2019-08-2926-268/+701
|\
| * Merge remote-tracking branch 'origin/5.14' into devQt Forward Merge Bot2019-08-2926-268/+701
|/| | | | | | | Change-Id: I63a9a4a77ff260d7fc5434d13a5932055a4fb640
| * Mark QNetworkAccessManager::autoDeleteReplies as constMårten Nordheim2019-08-292-2/+2
| | | | | | | | | | | | | | | | | | | | From the API review. Amends cd816d4b6ac4358a92dbda906288ba6d969fc1cd. Change-Id: I3d3e2ef331501fa498545c5eec0e321544165b0d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * QEventDispatcherWin32: avoid livelock in a foreign event loopAlex Trotsenko2019-08-293-33/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Windows docs, GetMessage() function retrieves the messages from the input queue in defined order, where posted messages are processed ahead of input messages, even if they were posted later. Therefore, if the application produces a posted event permanently, as a result of processing that event, user input messages may be blocked due to hard CPU usage by the application. It's not a problem, if an internal Qt event loop is running. By calling sendPostedEvents() on the beginning of processEvents(), we are sending posted events only once per iteration. However, during execution of the foreign loop, we should artificially lower the priority of the WM_QT_SENDPOSTEDEVENTS message in order to enable delivery of other input messages. To solve the problem, it is proposed to postpone the WM_QT_SENDPOSTEDEVENTS message until the message queue becomes empty, as it works for the internal loop. Task-number: QTBUG-77464 Change-Id: I8dedb6837c6fc41aa6f497e67ab2352c2b4f3772 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * rhi: vulkan: Introduce secondary command buffer usageLaszlo Agocs2019-08-2915-173/+491
| | | | | | | | | | | | | | | | | | | | | | As an option. Must opt in via setting ExternalContentsInPass in the flags for beginFrame(). It is somewhat unfortunate to require declaring this up front, but forcing using secondary command buffers always, even though beginExternal() may not be used in many applications, would be an overkill. Change-Id: I8d52bcab40c96f89f140c4c7877b6c459925e3c7 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * rhi: vulkan: Add missing VK_QUERY_RESULT_WAIT_BITLaszlo Agocs2019-08-291-1/+2
| | | | | | | | | | | | | | Mainly to get the validation layer from newer Vulkan SDKs to shut up. Change-Id: I3a00d2e7b5617eb1656625b1b2a919bb3c07feb9 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * rhi: Attempt to fix up the logic around beginExternal()Laszlo Agocs2019-08-296-67/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mainly for Vulkan where it lacked the recording of the still queued commands. Uncovered by Qt Quick examples that integrate custom Vulkan rendering. This still has an issue that needs to be tackled separately. (we probably will switch to using a dedicated secondary command buffer with RENDER_PASS_CONTINUE_BIT for the external commands, and then just have a vkCmdExecuteCommands in our own queue instead of recording everything in beginExternal). The possibility of losing glMemoryBarrier() calls due to begin/endExternal() with the OpenGL backend is fixed too. The logic here mirrors Vulkan to some extent except that we do not have a concept of (and so the trouble with) renderpass instances. Clean up around the implementations of finish() as well. Attempting to share code via a "flushCommandBuffer" function is admirable but is not worth it since some semantics are different. (finish() cannot be called within a begin/endPass, unlike begin/endExternal). Change-Id: I5137db598d6a40d484e53678f5c919abf750d9ed Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * rhi: vulkan: Expose the VkRenderPass via the usual mechanismsLaszlo Agocs2019-08-295-0/+38
| | | | | | | | | | | | | | | | | | Qt Quick in turn will expose it via QSGRendererInterface. Essential when adding custom Vulkan rendering into a Qt Quick application because the custom pipeline state objects will need to reference a VkRenderPass. Change-Id: Idf4092cfc3937830fb8123164081059b0d8d030e Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * QTree/TableView: Don't emit clicked when releasing after double clickVolker Hilsheimer2019-08-292-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an item is double clicked, then without this fix, the views emit the clicked() signal when the mousebutton is released after the double click event. This is unexpected and wrong. QAbstractItemView keeps track of the item the mouse was pressed on, to verify that the release occurred on the same item before emitting clicked, and to make sure we have a valid pressed item before initiating drag'n'drop. By resetting d->pressedItem when a double click has been handled, we can prevent the emission of a clicked signal in the next release event. [ChangeLog][QtWidgets][QTreeView] Don't emit clicked signal after a doubleClicked signal. Fixes: QTBUG-77771 Change-Id: I05988e9e2222157f4216cebc40c22507e8d83b82 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
| * Android: Use LLVM tools where possibleBogDan Vatra2019-08-292-9/+14
| | | | | | | | | | | | | | | | Properly set CROSS_COMPILE qmake variable Fixes: QTBUG-77890 Change-Id: I73e22d0f936d35c373c064d30ea8d92005d79b2c Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
| * Android: AUX template doesn't require a multi arch buildBogDan Vatra2019-08-291-1/+1
| | | | | | | | | | Change-Id: I7b7abe7f016b4b85546986354653fc4ddf320dcc Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | Close popups on windowWillMiniaturize notificationTimur Pocheptsov2019-08-294-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do this on windowDidMove/windowWillClose, but we don't on a 'will miniaturize' notification. This can leave an application with an orphan popup window, such as context menu which looks really weird. I err on a safe side though - I don't close all popups - the application's logic can be such that it has several windows and one of them gets minimized (we can do this via QWidget's interface, for example) - would be strange if all popups close. So I only close popups that have the miniaturized window as a transient parent. Task-number: QTBUG-77833 Change-Id: Ib655a27c0ce8661f9e7156e6035f7fffaff901b1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Remove nonsensical initialization from QMakeLocalFileNameJoerg Bornemann2019-08-291-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | The c'tor that takes a QString detects whether the string's first and *last but one* characters are double quotes. In that case it removes the first and *last* characters, resulting in a conversion from "\"C:\\foo\"\\" to "C:\\foo\"". It's highly unlikely that this code path was ever triggered, because its erroneous result would have been noticed. Remove it. Change-Id: I653e6a4667ae3620c35e509420eb22a71bb986a9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Add QObject allocation benchmarksJędrzej Nowacki2019-08-291-0/+47
| | | | | | | | | | | | | | | | The benchmark measures the performance of QObject allocation, including costs of memory allocations. Change-Id: I5d8ecfb97fe0be3375340b5ce84eb423e8a4ddaf Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.14' into dev"Qt Forward Merge Bot2019-08-2913-168/+205
|\ \
| * | Merge remote-tracking branch 'origin/5.14' into devQt Forward Merge Bot2019-08-2913-168/+205
|/| | | |/ | | | | Change-Id: I536ba1f13c5234487dc6827ad30548f5629fae2c
| * widgets: Mark widgets as needing flush during paintingTor Arne Vestbø2019-08-282-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Except for the case of syncing in response to an expose event, where the platform asked us to flush a specific region, we should strive to only flush parts that have been repainted. And we should flush those parts to their nearest native child, instead of unconditionally flushing the root/top level widget as well. By allowing drawWidget to schedule the flush we automatically flush the minimal region, to the right widgets. Change-Id: I73c143761d4a0da6991433b41dea0a0bc83a448a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * widgets: Add logging for widget paintingTor Arne Vestbø2019-08-284-1/+36
| | | | | | | | | | Change-Id: I551ec290812369e3848c1096fed7e813cd9e1cd6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * QGraphicsItem: mark GraphicsItemChange::ItemMatrixChange as deprecatedChristian Ehrlicher2019-08-282-2/+6
| | | | | | | | | | | | | | | | | | | | The enum GraphicsItemChange::ItemMatrixChange is deprecated since Qt4 times. The corresponding matrix functions were also marked as deprecated in 5.13 but the enum was forgotten. Therefore also mark it as deprecated so it can be removed with Qt6. Change-Id: I39bec89af14aaefe2e504f5a890ef314574766a1 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
| * Android: install qmlfiles only for first ABIBogDan Vatra2019-08-281-3/+14
| | | | | | | | | | | | | | qmlfiles are the same for all ABIs, and installing them for all leads to race condition Change-Id: I69fe062f59f1d7c028dff5212e2f2fac7e71398d Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
| * Say hello to -android-abis configure paramBogDan Vatra2019-08-284-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | This configure parameter is useful to compile Qt only for a selected ABIs. The old parameter, -android-arch, does the same thing, it's kept for compatibility. [ChangeLog][Android] -android-abis configure script parameter useful to compile Qt only for a selected Android ABIs. Change-Id: I1f418c7e0914dd83b98d763e8cd8c09841e20fdf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * widgets: Simplify QWidgetRepaintManager::flushTor Arne Vestbø2019-08-282-10/+5
| | | | | | | | | | Change-Id: Icba88fa068aac2ac5d8bb04e46a3e3f34e279a48 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Use QLatin1String where possibleBogDan Vatra2019-08-281-115/+114
| | | | | | | | | | Change-Id: I8f94ba4880bcac735e4445d71f0e22774d9f78eb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * QReadWriteLock QT_NO_THREAD shell: make API compatible with the regular oneMarc Mutz2019-08-281-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | - add missing explicit - drop static from member functions that aren't static in the regular version (ie. all functions) As a drive-by, remove redundant inline keyword where it doesn't cause wanton inconsistency with surrounding code. Change-Id: I5aed73c3afa85d98d97b57c2c1874b1a5e664960 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.14' into dev"Qt Forward Merge Bot2019-08-28193-6619/+11785
|\ \
| * | Merge remote-tracking branch 'origin/5.14' into devQt Forward Merge Bot2019-08-28193-6619/+11785
|/| | | |/ | | | | Change-Id: Icb486cf8f31ec85d940b2179e8d023fbbc7fd3fa
| * widgets: Simplify markNeedsFlush in QWidgetPrivate::drawWidgetTor Arne Vestbø2019-08-281-2/+2
| | | | | | | | | | | | | | | | QWidgetRepaintManager::markNeedsFlush already ignores paintOnScreen widgets. Change-Id: I8b5d6f79c8fd60115f77d65aef05cc4baf840bdd Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * widgets: Clarify QWidgetRepaintManager::sync of specific widgetTor Arne Vestbø2019-08-281-3/+6
| | | | | | | | | | Change-Id: Ifa2a8245decfcb2b36c1952a39ec60b7eeca6e43 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Mark all rhi docs as internalLaszlo Agocs2019-08-278-61/+122
| | | | | | | | | | | | | | | | This is private API for the time being. Without this the QRhi* classes show up in the class list in the docs. Change-Id: I662abb9cc8eaae13ffe9266bd6313faa8e138353 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| * Merge "Merge remote-tracking branch 'origin/dev' into 5.14"Liang Qi2019-08-27203-2855/+4675
| |\
| | * Merge remote-tracking branch 'origin/dev' into 5.14Liang Qi2019-08-27203-2855/+4675
| |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetrepaintmanager.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: Ifae457d0427be8e2465e474b055722e11b3b1e5c
| * | widgets: Rename QWidgetPrivate::repaint_sys to paintOnScreenTor Arne Vestbø2019-08-255-13/+13
| | | | | | | | | | | | | | | Change-Id: Ic853e42cbed9b770bef0e1d7c7376c861bceb891 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | widgets: Handle all flush tracking via markNeedsFlushTor Arne Vestbø2019-08-251-2/+5
| | | | | | | | | | | | | | | Change-Id: I3652c09012e36468ef90870637988b3fe8c5e735 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | widgets: Merge QWidgetRepaintManager::topLevelRect into callsiteTor Arne Vestbø2019-08-252-3/+1
| | | | | | | | | | | | | | | Change-Id: Ia9bb0c396b8175f644e337ca73086208c637ed2d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | widgets: Remove unused QWidgetRepaintManager::dirtyRegionTor Arne Vestbø2019-08-252-51/+0
| | | | | | | | | | | | | | | | | | | | | It is no longer needed after qt_dirtyRegion was removed in e2a1fb901. Change-Id: I120df76b08808842b304cb8de10de23ccd0e2845 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | widgets: Clarify how widgets needing flush is trackedTor Arne Vestbø2019-08-252-15/+16
| | | | | | | | | | | | | | | Change-Id: Ia2c2c4b830e4441e50c66dd3fef5bc060f76551e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | widgets: Clarify top level flush region in QWidgetRepaintManagerTor Arne Vestbø2019-08-252-9/+9
| | | | | | | | | | | | | | | Change-Id: I9a8d11569d33bf580bd50b710cf072952ea3626b Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | widgets: Use single return in QWidgetRepaintManager::markNeedsFlushTor Arne Vestbø2019-08-251-16/+11
| | | | | | | | | | | | | | | Change-Id: Ia21c5c57e4c642af2aa87b0539c4af51500a4827 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | widgets: Simplify QWidgetRepaintManager::syncTor Arne Vestbø2019-08-251-4/+2
| | | | | | | | | | | | | | | Change-Id: Ifd0cdcd7f4c03112fd93c24707e43273e211f688 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | widgets: Rename markDirtyOnScreen to markNeedsFlushTor Arne Vestbø2019-08-253-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | Including renaming the member touched by this function. This leaves the logic for appendDirtyOnScreenWidget, which still needs investigating. Change-Id: I405a5e3757f0a79992f88d9f70867aeb7b9764d8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | widgets: Share more code in appendDirtyOnScreenWidgetTor Arne Vestbø2019-08-252-17/+12
| | | | | | | | | | | | | | | Change-Id: I0ed936c7d8b004d498a8956b1ba246ade41ce43d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | widgets: Class initialize QWidgetRepaintManager membersTor Arne Vestbø2019-08-252-11/+12
| | | | | | | | | | | | | | | Change-Id: Icc06ae8f5f542810d651e4834055cbcd1c1a4e2e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | widgets: Rename a few missed uses of QWidgetRepaintManagerTor Arne Vestbø2019-08-251-10/+10
| | | | | | | | | | | | | | | Change-Id: Ie28d5dea6fdf1c8728a68d419b487bc5e3e3ee16 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | widgets: Remove unused member in QWidgetRepaintManagerTor Arne Vestbø2019-08-251-1/+0
| | | | | | | | | | | | | | | Change-Id: I2f7eac2916bdcd9101e96e78a3d7c3c6c395dde7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | widgets: Merge QPlatformTextureListWatcher into implementation fileTor Arne Vestbø2019-08-252-53/+39
| | | | | | | | | | | | | | | | | | Change-Id: Icf177a5b559bd1c108a66ee14a51fb23cd36e083 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | CMake: Fix usage of non debug and release static builds on WindowsAlexandru Croitor2019-08-251-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As was recently discovered, the debug_and_release CONFIG value is always true on Windows, even if the feaure is disabled when specifying -debug or -release when configuring Qt. In order for the generated CMake Config files to be correct, we need to use the true feature value. Amends 44602224bfae7bea08e5883768cfeef6629ac503. Change-Id: I42be684e8ad2a5ce72cb2e9d36f81de7589112c6 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
| * | CMake: Fix detection of debug_and_release for Windows buildsJoerg Bornemann2019-08-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If Qt is configured with -release or -debug we must set CMAKE_DEBUG_TYPE or CMAKE_RELEASE_TYPE, but not both. This was broken by 82a2c7df which fixed the issue for iOS simulator_and_device builds. We have the following situation for both relevant CONFIG values: debug_and_release build_all iOS simulator_and_device unset set Windows -release set unset Windows -debug-and-release set set Trivia: On Windows, when configuring with -release (or -debug) then the *feature* debug_and_release is not set. The *CONFIG* *value* however, is unconditionally set in msvc-desktop.conf. Fixes: QTBUG-77754 Change-Id: I326ecb024056bc189be5fa03ec6f59bc71226544 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | QtCore: port all QMutexLocker users to qt_{scoped,unique}_lockMarc Mutz2019-08-2513-66/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... except four instances in QCoreApplication that would conflict with another change. Replace a locally-defined MutexUnlocker with a call to unlock() + qScopedGuard'ed lock() to avoid having to spell out the locker type while we can't depend on C++17 CTAD, yet. In QSettings, move the new mutex locker into and out of initDefaultPaths(), such as is idiomatic for std::unique_lock, but wasn't possible with QMutexLocker (which is not movable). Change-Id: I23056e13ecaa76159db583c7dccc6e05715e0788 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | QNetworkConnectionMonitor(win): Fix memory leakMårten Nordheim2019-08-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Through some misconceptions about ComPtr I ended up thinking that it did not call AddRef internally on creation. But it does. This lead to always having > 1 ref-counter. Also stop the monitor on destruction if it hasn't already been stopped. As was already done for QNetworkStatusMonitorPrivate. Change-Id: Ic72a2f5cb3325f86c018f90b497caaec834cb214 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Port away from QMutexLocker in public headersMarc Mutz2019-08-254-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't use qt_scoped_lock/qt_unique_lock here, so port to std::unique_lock and std::lock_guard for now. This is in preparation of deprecating QMutexLocker in favor of std::unique_lock and std::scoped_lock. In QFutureInterface, change the return type of mutex() from QMutex* to QMutex&, so we don't need to deref when passing to std::lock_guard. We need to keep the old method around for BC reasons, so the new one needs an artificial function argument for disambiguation. This will vanish come Qt 6. Change-Id: I1a0f0205952a249512ec2dbd3f0f48dd209b1636 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>