summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* qtlite: Fix build with -no-feature-commandlineparserMikhail Svetkin2019-07-034-0/+10
| | | | | | | Change-Id: Ie7b7b119073691c0d3b6358f876298fc86cfe9e9 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qbc.io> Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io> Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
* Add QT_NO_JAVA_STYLE_ITERATORS and mark QtBase free of itMarc Mutz2019-07-034-0/+16
| | | | | | | | | | ... except for tests, which manually undefine the macro. Like QT_NO_FOREACH, this is a technical way to keep JSI-free modules JSI-free going forward. Change-Id: Icf1342da00a700f42f9e32a253d1cdb94c38dd7e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QFseventsFileSystemWatcherEngine: port some Java-style iterators to ranged-forMarc Mutz2019-07-031-15/+15
| | | | | | | | | | | | | | | | | | | | | | Amends b03385f9cff7acc2b37933f493e3eff2d8bbef59. Java-style iterators are scheduled to be deprecated. The general pattern used in the patch is that instead of copying an input list, then iterating over the copy with some calls to it.remove() (which leads to quadratic-complexity loops), we simply copy conditionally (a la remove_copy_if instead of remove_if). To make clearer what's going on, rename the outgoing list to 'unhandled'. To avoid having to touch too much of the loops' structure, which sometimes is quite convoluted, use qScopeGuard to do the append to 'unhandled', unless the original code removed the element. Change-Id: I808a939b9c816b329ee87620e0a3461fee6e3e40 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix a warning treated as error - 'importDevice not used'Timur Pocheptsov2019-07-031-0/+1
| | | | | Change-Id: Id48ff52d6532cf3585648addd498cdddccbcb994 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Optimize QSet set operationsMarc Mutz2019-07-031-16/+9
| | | | | | | | | | | Replace the identity check with a check for the underlying QHash objects being shared and replace backwards iteration, which is really forwards iteration with wrapping at bucket boundaries, with forward iteration. QSet cannot contain duplicates, so the order in which the RHS elements are presented to the algorithms does not matter. Change-Id: Iad8528e3a9501b14cb85601b221a848aad91480c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QtWidgets: Fix wrong screen returned by newly added ↵Friedemann Kleint2019-07-031-2/+4
| | | | | | | | | | | | | | | QWidgetPrivate::associatedScreen() QWidgetPrivate::windowHandle() should not return nullptr from the WindowHandleMode::Direct branch in case WindowHandleMode::Closest was passed. Ameds eed9a8fbd300dafb2802b6c09c018fbda4e13ef1. Task-number: QTBUG-62094 Task-number: QTBUG-73231 Change-Id: Ia55fff15f0a499cef9525e53111ddd55b2e012d0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix 'make check' for android-mingw32Jan Arve Sæther2019-07-031-1/+1
| | | | | | | | | | | | | | | | | | | g_options.buildPath did not have native separators. This caused INSTALL_ROOT to not have native path separators, which again made 'mingw32-make check' fail to deploy the .apk. (The actual failure was that mkdir failed because it did not accept paths with forward-slashes, so the install_target rule failed. For the record, the command of that rule had the following call to mkdir: mkdir $(INSTALL_ROOT:@msyshack@%=%)\libs\x86 Change-Id: Id792c36986b52a527546d48aa9f7d9587e7a18d9 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* QPainter: mark obsolete RenderHints as deprecatedChristian Ehrlicher2019-07-035-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RenderHint::HighQualityAntialiasing and NonCosmeticDefaultPen are obsolete since Qt5 but not marked as such. Therefore add Q_DECL_ENUMERATOR_DEPRECATED_X now so those two enumerations can be removed with Qt6. [ChangeLog][QtGui][QPainter] HighQualityAntialiasing and NonCosmeticDefaultPen are marked as deprecated and don't have an effect anymore Change-Id: Ib0c966a078a1d23d492d0255288e2066c50e87b6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QShortcut: Brush up the code, preparing the extraction of a base class to QtGuiFriedemann Kleint2019-07-021-37/+31
| | | | | | | | | | | - Use member initialization - Introduce nullptr - Use auto where applicable - Use range-based for Task-number: QTBUG-76493 Change-Id: Ic4dbee2d76a65be1f8a4c25f4ca7e4f032443579 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* RHI/D3D11: Remove hard dependency on D3DCompiler libraryFriedemann Kleint2019-07-022-2/+21
| | | | | | | | | | Varying versions of the library may be available depending on build tool chain or Windows version. Try to dynamically resolve the D3DCompile function. Fixes: QTBUG-76845 Change-Id: Ib7eb3b8c454e9c25731eb2ba9ba45e54fe3f1283 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* qlalr: replace QLinkedList with std::listMarc Mutz2019-07-025-37/+27
| | | | | | | | | | | | | | | | | | | This is in preparation of deprecating QLinkedList. Most is straight-forward, except where operator+ was used on linked-list iterators. In one case, replaced this with std::next, in the other, with prefix increments, since the advancement was always equal to the loop control variable. Since advancing a linked-list iterator is a linear operation, this removes a source of quadratic complexity. Another obstacle was the overloaded op< set, which was in the Qt namespace while the iterator is from std and the payload, as before, was global. This breaks ADL, so move these operators to namespace std. This violates the standard, but the functions are tagged with our distinct types, so it shouldn't cause any trouble. Change-Id: Ifec0a927bfdabb002838cdf86fb8d23b32a38ff7 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Remove QWindowsDirect2DEventDispatcherJoerg Bornemann2019-07-022-16/+0
| | | | | | | | | | | | This class was introduced to modify the hook handling of QWindowsGuiEventDispatcher. As the hook handling code is removed now, we can remove QWindowsDirect2DEventDispatcher entirely. Change-Id: I56491a67f163784f43b1025225e536d386cead1d Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QCoreWlanEngine: port away from Java-style iterators (and other fixes)Marc Mutz2019-07-022-49/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | The main goal of this patch was to port away from Java-style iterators, to make QtBase QT_NO_JAVA_STYLE_ITERATORS-clean. And this the patch achieves. But I couldn't resist a few drive-by fixes, too, to wit: - Use qDeleteAll() instead of while(!isEmpty()) delete takeFirst() - Use QMap::last() instead of iterating to the end, remembering the last-seen value - Use QMap::contains() instead of QMap::keys().contains() - Use qExchange() instead of copy+clear - Make some functions const (requires the mutex member to be marked as mutable, which is common for mutex members) I am almost certain that getSsidFromNetworkName() cannot work correctly. But this patch does not attempt to change the algorithm. Change-Id: Ifa04d7837bdc0837036c3a7a73f8c51f4e681f42 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove hook handling code from QEventDispatcherWin32Joerg Bornemann2019-07-023-47/+1
| | | | | | | | | | | Since commit 6a7cea64 qt_GetMessageHook is effectively a no-op, and we can remove the complete hook handling code. Change-Id: I90383c0c09c2b0f1d715872de5f9519a879d9bae Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Remove usages of deprecated APIs from QDateTimeSona Kurazyan2019-07-022-2/+2
| | | | | | | | | | | | | | | | | | - Replaced the usages of: * QDateTime::toTime_t() -> QDateTime::toSecsSinceEpoch(). * QDateTime::fromTime_t() -> QDateTime::fromSecsSinceEpoch(). * QDate::shortDayName() -> QLocale::system().dayName(). * QTime by QElapsedTimer, where the deprecated methods of QTime were used. - Modified the tests for the deprecated methods to be enabled only when the corresponding methods are enabled: when the deprecated APIs are disabled, the tests will be also disabled, and the compilation won't be broken. Task-number: QTBUG-76491 Change-Id: I4d565db2329e580c567aae511696eb1efe120843 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make the default ctor of QVarLengthArray implicitUlf Hermann2019-07-021-1/+3
| | | | | | | | | Otherwise "QVarLengthArray<Foo> x = {};" gives a warning. Also, some compilers get confused about "QVarLengthArray()" this way. Task-number: QTBUG-76199 Change-Id: I4296586c0181d3e6e82ca8b7b79aeb9a21645d1f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* uic: Implement form window setting to disable QObject::connectSlotsByName()Friedemann Kleint2019-07-024-1/+20
| | | | | | Task-number: QTBUG-76375 Change-Id: I16ad147366aa7d52b7a0e17ae240127d8ac34b3c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Fix build without feature.tabbarTasuku Suzuki2019-07-028-35/+61
| | | | | Change-Id: I0891f8f6054382407f5ce2fdb3ead0203d255945 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix build without feature.dockwidget and tabwidgetTasuku Suzuki2019-07-022-4/+11
| | | | | Change-Id: I621664f646475c1b5cfde47b7087c0c9f5ad8e4d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.13' into dev"Liang Qi2019-07-0124-80/+237
|\
| * Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-0125-81/+238
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl.cpp src/platformsupport/vkconvenience/qvkconvenience.cpp Change-Id: I97ce6ed185f7fdad8102cc58d3cfec0119fd7bb4
| | * QTranslator: simplify QString byte-swapping codeThiago Macieira2019-06-281-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | No need to check QSysInfo, just use qFromBigEndian. On big-endian systems, it does the memcpy for us. Change-Id: I1004b4b819774c4c9296fffd158fe3aa5ff0a287 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Move the Item typedef to public in the associative Java iteratorsThiago Macieira2019-06-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The documentation talks about them. They're just iterators. Fixes: QTBUG-75123 Change-Id: I194d3f37471a49788a7bfffd15956064b42383b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Document OOM conditions in the QArrayData-based containersThiago Macieira2019-06-283-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The other containers probably don't handle as well, so I just documented the ones that I know how they work. Fixes: QTBUG-75470 Change-Id: I95ecabe2f50e450c991afffd159a0483aac35a79 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Albert Astals Cid <aacid@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Work around Apple Clang's -Wshadow warningThiago Macieira2019-06-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Well, yeah, it technically does... qcborstream.h:245:15: warning: declaration shadows a typedef in the global namespace [-Wshadow] /usr/include/libkern/OSTypes.h:36:26: note: previous declaration is here Fixes: QTBUG-75825 Change-Id: Idce141629dd34287808bfffd159ee2a75428bf12 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * QTransposeProxyModel: include the moc in the .cppThiago Macieira2019-06-281-0/+2
| | | | | | | | | | | | | | | | | | | | | All the other QtCore files do. Change-Id: Ie7ae7616eadf4035bec6fffd15ac3b5479716ff3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * Fix Clang warning about applying operator|| to non-booleanThiago Macieira2019-06-281-2/+2
| | | | | | | | | | | | | | | | | | | | | qmetatype_p.h:111:412: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand] Change-Id: Iac6ae11e29bd4169bae9fffd15a117d576a95adb Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-294-11/+41
| | |\ | | | | | | | | | | | | Change-Id: I4cb91777e7ae9f462fa219d5b9ebeb277fde49c3
| | | * QAndroidInputContext: Generate a QInputMethodEvent in reset()Vova Mshanetskiy2019-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although QPlatformInputContext::reset() documentation says that reset() should not send any QInputMethodEvents, implementations on Windows, macOS and iOS do send a QInputMethodEvent which clears preedit text in their reimplementations of reset(). Text editing controls depend on that and may not clear preedit text if such event is not sent. Change-Id: I75ab73946cb06e93e5fc5e98e0cc503a7de5c2e0 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | | * QAndroidInputContext: Do not stop composing when user taps the cursorVova Mshanetskiy2019-06-281-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to tell the editor to stop composing if user taps so close to the cursor position that the cursor will not move anyway. If we do stop composing in such case, then since there will be no cursor position change notification, we will never start composing again (before the cursor is actually moved), and the current composing region will remain being displayed as normal text instead of being displayed as composing text. Change-Id: I4ebe6442e1ba8c365d6754c1a8487235d177c732 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | | * QAndroidInputContext: Consider preedit text in getCursorCapsMode()Vova Mshanetskiy2019-06-281-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes auto-capitalization in AnySoftKeyboard. It was typing the whole first word in a sentence in upper case. Change-Id: I605a1aee39d432a3474c0bf706445d354562285f Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | | * QSocks5SocketEngine: avoid dereferencing null-pointerMårten Nordheim2019-06-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The header argument is optional Change-Id: I035e11db5ee70183274afb48ba67c4d3ed2f615d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * Fix crash with drag cursor handlingJoni Poikelin2019-06-281-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7a7c722782a435f7c01b94f48df7a5f4ff4d599e caused a regresssion in some cases. Change-Id: I1089a79534d811b195de663ff664d9ba5a6ac6c5 Fixes: QTBUG-74110 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * Android: Stick with buildToolsVersion 28.0.3BogDan Vatra2019-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows buildToolsVersion 29.0.0 have problems, therefore, it's better to use a version that we know it works on all platofrms. Change-Id: I25cdea4b8101bfe5f022025fcd7cc4cbf358fa03 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * | qsslsocket_openssl.cpp - restructure the codeTimur Pocheptsov2019-06-281-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | not to resolve merge conflicts on every 5.13->dev merge. Change-Id: Id41a7efff52148fe46bedcde828646694fd1764d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-2815-59/+419
| | |\| | | | | | | | | | | | | Change-Id: I912bd8851c390302414d3dfb3c8220df5a0d5630
| | | * macOS: lower the splash screen when a modal dialog blocks itVolker Hilsheimer2019-06-261-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the usability issue of a modal dialog showing up behind a splash screen, not visible to the user, but blocking user input and the application startup sequence until discarded. [ChangeLog][QtWidgets][QSlashScreen] On macOS, lower the splash screen when a modal dialog is shown to make sure the user sees the dialog. Change-Id: Ibae768f76909d930cb25dcf5cee31edc5f15c29a Fixes: QTBUG-49576 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * Do not downscale png when the size is exactly rightAleix Pol2019-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't go through the doScaledRead path (i.e. calling read_image_scaled) when reading an image that the target size is the image of the file we are opening. This makes the loading of the file much faster while keeping the output correct. [ChangeLog][QtGui][QImage] Improve loading time when loading png files that have the same size as the target. Change-Id: I2a33c49fe1ce52ec296c2175ee542b5bcdec2c4b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | | * QHttpNetworkConnection: Change assert to early return and handle Http2Mårten Nordheim2019-06-252-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a http proxy (and presumably other proxies) we might have failed/aborted (aka "finished") the request and _then_ receive a "proxy authentication required" message from the proxy. In this case there is no spdy/http2 reply in the queue, so asserting is wrong. Change-Id: Id9b76b580299f6a6cd6efad62d6aaf63183816fb Fixes: QTBUG-76426 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * QHttpNetworkConnectionChannel: don't close if we're already closingMårten Nordheim2019-06-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some scenarios with QNAM we call socket->close, leading to a flush, leading to an error, leading to another error emission... To work around this scenario we stop trying to close the socket if the network channel is already closing. Change-Id: Id15504f476484ce61f11ba83a5755ceb5f581f9b Fixes: QTBUG-76567 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * Fix crash when setting QGuiApplication palette before app is availableTor Arne Vestbø2019-06-251-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia154f66a27cba970d179f100e66aa2daab01c9fa Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * ANGLE: Invalidate client window area when resizing swap chainVal Doroshchuk2019-06-212-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inspired by: https://codereview.appspot.com/6812076/ Resizing a window larger results in the newly exposed region being invalidated but the old region is treated as valid. This can result in the old region no longer updating. Was added to D3D9. Improving a fix from Filippo Cucchetto: https://codereview.qt-project.org/c/qt/qtbase/+/195336 and pushing to D3D11. ifndef protects against compilation error for WinRT. Invalidate() should be used only for desktop apps. Task-number: QTBUG-46074 Change-Id: Ie24b8dffe130b970f2362337ac4f9bee666f82b2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | * Add a QVkConvenience class with vkFormatFromGlFormatJohan Klokkhammer Helsing2019-06-213-0/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Converts from OpenGL formats to Vulkan formats. There are commented out lines for the formats in QOpenGLTexture::TextureFormat for which it was hard to find an unambiguous mapping to vkFormat. Task-number: QTBUG-75108 Change-Id: I06a7fd8df7d98cef314410ffd79ca9cff6599357 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit b21b07877a96c175ee51e83e1b41425c2e67beb3) Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| | | * Avoid undefined behavior in qjsonwriter.cppUlf Hermann2019-06-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See comment in qnumeric_p.h:convertDoubleTo for details. Change-Id: Ifcd13f7f67995af6a60e50ccabe843a855be04ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * QHighDpi::fromNativePixels: use correct screenMorten Johan Sørvig2019-06-192-45/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calls like QHighDpi::fromNativePixels(point, window) would return device independent coordinates outside any screen in cases where the window is spanning multiple screens and the native point was not on the main screen. Correct this by looking up the correct screen and use its scale factor and origin when scaling coordinates. Task-number: QTBUG-73231 Change-Id: I01a3a42f42121b8d9f4ced2bb0fb023d6ae6bfe7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | * Android: Use Android button layout for the DialogButtonBoxLayout hintAndy Shaw2019-06-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-70045 Change-Id: I9c51e9a769f510a6f14f6e9d78583caf3df15031 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | | * Fix window shortcuts when a completer popup has focusVolker Hilsheimer2019-06-251-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The completer popup has focus, making QShortcut direct to it's window rather than to the window the completer belongs to. As QShortcut handles the case for Tool windows that have a parent, but doens't do the same for popups. And they shouldn't be treated the same way, as a context menu popup for a e.g. text edit should in fact block the text edit's shortcuts while open. However, the completer popup is special, in that it explicitly makes the widget completes for its focusProxy, which is what we can use to fix this issue. Change-Id: Ie7177d39668b3af14a1d9e0ee5d93eca9c67c8af Fixes: QTBUG-4485 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | QStringList: utilize QStringMatcher's support for QStringViewMat Sutcliffe2019-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This opportunity was missed when adding the QStringView overload of QStringList::filter() in 2a99f60cfbe8a10c8b64b2178573dc8da3d27abe. Change-Id: I8d679b92de6cc76c4d59fd54f01a25579ab3488f Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | Move YearRange to QDateTime from its PrivateEdward Welbourne2019-07-014-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As planned when adding YearRange: now that it's merged up to dev, move it to QDateTime, since we can add to the API at 5.14.0. This follows up on commit 82ad4be4a2e0c2bccb6cd8ea2440aefee4ec48ec. Change-Id: I81b6c2331121a71e2592514781c02c5756e70c52 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | QAccessibleWidget: fix UB (invalid cast)Marc Mutz2019-07-012-18/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Casting an object to a subclass that is not the dynamic type of the object constitutes undefined behavior. Fix by befriending QObject. Change-Id: Ib70dbef9095df31a6d89449d82a02cef9fccd348 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>