summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-07-1183-798/+1027
|\ | | | | | | Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
| * Fix build without features.textmarkdownwriterTasuku Suzuki2019-07-081-1/+1
| | | | | | | | | | Change-Id: I30b39bb6ac4c24281c7fc87573936f62512ce015 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * QTextBrowser: assume Markdown is UTF-8Shawn Rutledge2019-07-081-4/+8
| | | | | | | | | | | | | | | | | | That's how CommonMark specifies it. The HTML codec-guessing algorithm was making it fall back to Latin1 in practice, which was screwing up any Unicode characters found in the markdown source. Change-Id: I4021adc4a68591ecfd56ef24971af53ce3e9c96d Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * Fix build without features.mimetypeTasuku Suzuki2019-07-061-1/+0
| | | | | | | | | | Change-Id: I8c5521c5cfbc6c13c78d2bc8805fa5a021675b6c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Merge "Merge remote-tracking branch 'origin/5.13' into dev"Liang Qi2019-07-051-3/+2
| |\
| | * Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-051-3/+2
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf qmake/generators/makefile.cpp Change-Id: Ifb2633a69d0bf8cdf12d799c6259beefc279c49e
| | | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-031-3/+2
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I936be3c0df2b9845ff6a85eb3d4442cdabe63d37
| | | | * Update visible window's alpha when toggling WA_TranslucentBackgroundVolker Hilsheimer2019-07-021-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidgetPrivate::updateIsTranslucent sets the surface format of the window with the alpha based on the translucency attribute, so we need to call this function when the attribute value changes. The test can confirm that the window's requested surface format has changed, we can't rely on what is actually set, and don't have to rely on hard-coded values like 8bit alpha. While WA_NoSystemBackground needs to be set for WA_TranslucentBackground to have an effect, we can't clear the attribute when clearing translucency (as it might have been set explicitly). Change-Id: I238d6930b7e0488397467a4e035b5f530566a1ff Fixes: QTBUG-60822 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | | | Fix build without features.actionTasuku Suzuki2019-07-062-1/+2
| |/ / / | | | | | | | | | | | | | | | | Change-Id: Ia776cdcb36d07bb89f39c631029458adf2187d90 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | | QApplication::topLevelWidgets(): Avoid allocation of listFriedemann Kleint2019-07-041-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the QSet QWidgetPrivate::allWidgets directly instead of calling QApplication::allWidgets(), which allocates a QList. Change-Id: I16d289030cecefae7811d4b2c94f865f46f700d5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | | Fix build without features.cursorTasuku Suzuki2019-07-042-0/+6
| | | | | | | | | | | | | | | | | | | | Change-Id: Id7617e03f86a4dd7d1ada37c91cf792bca7f1d6d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@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>
| * | | 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>
| * | | Fix build without feature.tabbarTasuku Suzuki2019-07-027-34/+52
| | | | | | | | | | | | | | | | | | | | Change-Id: I0891f8f6054382407f5ce2fdb3ead0203d255945 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | | Fix build without feature.dockwidget and tabwidgetTasuku Suzuki2019-07-021-3/+5
| | | | | | | | | | | | | | | | | | | | 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-011-4/+9
| |\ \ \
| | * | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-011-4/+9
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl.cpp src/platformsupport/vkconvenience/qvkconvenience.cpp Change-Id: I97ce6ed185f7fdad8102cc58d3cfec0119fd7bb4
| | | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-281-4/+9
| | | |\| | | | | | | | | | | | | | | | Change-Id: I912bd8851c390302414d3dfb3c8220df5a0d5630
| | | | * 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>
| * | | | QAccessibleWidget: fix UB (invalid cast)Marc Mutz2019-07-011-18/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | Fix build without feature.stringlistmodelTasuku Suzuki2019-06-301-0/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: Ia7a24ef1b0beea7519403000ba20dc78a3c20a21 Reviewed-by: Mikhail Svetkin <mikhail.svetkin@gmail.com>
| * | | Remove usages of deprecated APIs from QtAlgorithmsSona Kurazyan2019-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-76491 Change-Id: I9dab736a0cbd2e86588919640c26e8ce6b3674d0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * | | Port from implicit to explicit atomic pointer operationsMarc Mutz2019-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code used the implicit conversions from QAtomicPointer<T> to T* and vice versa. The semantics of these differ from the ones std::atomic uses, so we're going to deprecate these, like we did for load() and store(), too. This patch fixex some users of these APIs before we deprecate them. Change-Id: I0a88bb1c359392538bb64b511bfc62381a56a468 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | QtWidgets: Preparatory change for moving out QAction (or parts of it)Friedemann Kleint2019-06-284-45/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix some spelling - Use QT_CONFIG for shortcuts - Quick C++ brush up, use member initialization Preemptively fix sanity bot warnings about missing space after flow control keyword, introducing range-based for on this occasion - Remove unused member variable Task-number: QTBUG-69478 Change-Id: I6af21886d5a0b48f4b2d11082991a877bd8d817d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | | QtWidgets: Fix static method invocationsFriedemann Kleint2019-06-2858-374/+376
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply fixits by Creator and results of manual search focusing on QCore/Gui/Applicaton(Private) methods and variables to prepare for splitting out some classes. Task-number: QTBUG-69478 Task-number: QTBUG-76497 Task-number: QTBUG-76493 Change-Id: Iaf468166793e0cabb514b51c827b30317bf45a2d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-272-2/+21
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/network/ssl/qsslsocket_openssl.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ibb57a0548b4977797b400637487a56245ac1c024
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-257-89/+98
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstorageinfo_unix.cpp src/network/ssl/qsslsocket_openssl.cpp Change-Id: Ibc9ce799bef62d60d616beaa9fbde8ebeadfbc20
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-201-34/+20
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/network/ssl/qsslsocket_openssl.cpp src/widgets/styles/qstylesheetstyle.cpp Change-Id: Ibe1cd40f46a823c9e5edbe0a3cd16be1e1686b17
| | * | | Doc: Replace example file lists with links to code.qt.ioTopi Reinio2019-05-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of generating .html page for each file in an example project, generate links to code.qt.io, under the correct path and branch, where the user can browse the example source. Store all URLs under QT_INSTALL_DOCS/config where other qt5 submodules can access them. The repository name appears in the URL, so we cannot define a single URL for all modules. Task-number: QTBUG-74391 Change-Id: I63d4d6d2c352877797b1ee8e057d48c0cd789bff Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * | | Fix editing of QDateTimeEdit in 12-hour locales that don't use AM/PMVolker Hilsheimer2019-05-281-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code made two incorrect assumptions: that the strings used are "AM" or "PM", or would be translated. Instead, the locale provides the correct strings, and there is no need to translate. However, in order not to break existing translations, we give those preference. And that the AM/PM string is not longer than 4 characters, while in e.g Spanish/Columbia locale the strings are "A. M." and "P. M.", ie 5 characters long. Also, the use of qMin in a function that is asked to provide the maximum section length is wrong. [ChangeLog][QWidgets][QDateTimeEdit] Use the information provided by the locale to determine the AM/PM strings, unless they are already translated. Change-Id: I6d1b05376e5ac62fc58da2cdea2e6cb732ec6747 Fixes: QTBUG-72833 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-06-258-123/+118
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/gui/text/qdistancefield.cpp src/gui/text/qdistancefield_p.h src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/android/qandroidinputcontext.cpp src/widgets/styles/qstylesheetstyle.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ia7daad21f077ea889898f17734ec46303e71fe6b
| | * | | QWidget: fix setTabOrder for compound widgetsChristian Ehrlicher2019-06-101-28/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 81e298a51d08c510457b4a26b37c0d4aac5eba65 fixed a case where the focus chain was screwed up when the order was already correct. This worked correctly in most cases but not when the next focus widget of the first one had Qt::NoFocus. The optimization check if lastFocusChildOfFirst is the same as second is thrown away since it now does not longer screw up the focus chain and the save would only be four pointer assignments. Fixes: QTBUG-75388 Task-number: QTBUG-10907 Task-number: QTBUG-68393 Task-number: QTBUG-69619 Change-Id: I581ed532156c34ea970123afd063194aab016304 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | | QApplication: clarify and unify global static usageTor Arne Vestbø2019-06-211-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explain why there are two accessor functions for the global statics, and use the global statics directly inside qapplication.cpp for consistency. Change-Id: Ibf3952052c1d0e780a8aab220a72f05af0c070a5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | | Remove duplicate call to QApplicationPrivate::setPalette_helperTor Arne Vestbø2019-06-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initSystemPalette() already takes care of this. Change-Id: I6521763a74ec3ec629d9fcf05aa2a7cd71a7f26d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | | Remove duplicate call to QApplicationPrivate::initializeWidgetPaletteHash()Tor Arne Vestbø2019-06-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initSystemPalette() already calls this when there's a platform theme, which is the only case where initializeWidgetPaletteHash will have an effect. Change-Id: I814ea2bb17ef40aee769f2c36f8ef4296cfca020 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | | Squash un-needed qt_init function into callsiteTor Arne Vestbø2019-06-211-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only uses a single place and avoids following the init logic through multiple layers when trying to debug it. Change-Id: I8fc119385edf407f69fb5431dc6584288022a7fe Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | | Remove dead code from QApplicationPrivate::setSystemPaletteTor Arne Vestbø2019-06-211-20/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code was added in 2005, ifdefed out already, and never used. Change-Id: Ic5d070dd031665a4429739278851b50646694bf9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | | Always fill the background of a tabbed QMdiSubWindowVolker Hilsheimer2019-06-211-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMacStyle polishes QMdiSubWindows to have autoFillBackground set to false. If the QMdiSubWindow's widget also doesn't fill the background (like QLabel), then nobody fills the window in a tabbed QMdiArea, and the other subwindows show through. This change makes sure that all pixels are painted in that situations, using the styled frame. Fixes: QTBUG-76214 Change-Id: Iae025d15d36a8bc0d0c5838ac43c9d54944bcc83 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * | | Deal with multi-display scenarios when positioning menu popupsShawn Rutledge2019-06-215-8/+44
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to support rare setups involving an X11 server with multiple independent displays ("zaphod heads" on which the DISPLAY env var is different), possibly with multiple outputs forming a virtual desktop on each display. QMenu::popup() has been assuming that it should show on the screen where the mouse cursor is. That's good most of the time; but with multiple independent screens, QGuiApplication::screenAt(pos) cannot tell us which screen to use (it's ambiguous), but rather will choose the first screen that _could_ contain that position (as documented). In the example in QTBUG-76162, the QMenu has been constructed with a QDesktopScreenWidget as its parent specifically for the purpose of telling it which screen to pop up on; so we need to respect that. But QWidgetPrivate::init() sets the QObject::parent() to null (because the widget isn't actually shown as a child of the QDesktopScreenWidget), and QWidgetPrivate::create_sys() sets initialScreenIndex back to -1 to provide freedom to change the screen later; so QMenu has to remember the screen index for itself. QMenuBarPrivate::popupAction() searches the siblings of the screen on which the menubar is claiming to be (rather than all screens on all displays), to find the screen containing the point at the middle of the bottom edge of the clicked menubar item. It then sets initialScreenIndex so that QMenu::popup() will respect it rather than trying to decide for itself. Fixes: QTBUG-76162 Change-Id: I7a8f8e7aa2e9cf5340d446dc12726369ebe2589a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * | QSS/MenuItem: only draw checkbox if no item is availableChristian Ehrlicher2019-06-171-37/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTBUG-66380 introduced a behavior change drawing a checkable menu item with an icon. After this path the checkmark and icon was drawn. Revert this regression so the stylesheet style matches the behavior of all other styles. A checkable item should have two different icons (QIcon::On and QIcon::Off). Fixes: QTBUG-74655 Task-number: QTBUG-66380 Change-Id: I32ac2f397087a1c3d5d07400372109703c00c1ba Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | | Overload QTextBrowser::setSource() to add optional type argumentShawn Rutledge2019-06-202-11/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that it's trying to guess whether the type is markdown based on the file extension, there needs to be a way to override it. For example it might be arranged that directory listings will be generated in markdown format instead of HTML; then when loading a source URL that is a directory, the application may override the type. The type for the single-argument setSource(url) is UnknownResource to preserve the existing behavior, but the user can override the guessing by setting a specific type. Change-Id: Id111efd24de7d8fd18c47b16a2d58f5b09d77891 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * | | Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-201-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | | QAction: add exclusionPolicy propertySimone Gaiarin2019-03-193-20/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When set to ExclusiveOptional, the new exclusionPolicy property let the user uncheck the active checkable action in an exclusive group. [ChangeLog][QtWidgets][QActionGroup] Added new exclusionPolicy property. Set it to ExclusiveOptional to allow unchecking the active checkable action in an exclusive group. Change-Id: I61a9885cfd076d631cddf8c08313e4b488e5dc38 Fixes: QTBUG-71160 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | | Add accessors for QWindow and QScreen to QWidgetPrivateFriedemann Kleint2019-06-1813-92/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the existing accessor QWidgetPrivate::windowHandle() to accept a mode enumeration that has an "Any" convenience. Based on that, add QWidgetPrivate::associatedScreen(), which is seful in many places where scaling is performed. Prototypically simplify the code. Task-number: QTBUG-62094 Task-number: QTBUG-73231 Change-Id: I516288363d329bce9bc94e4951106f9357bc6cde Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | | QObject/QWidget::setParent: add assertions to prevent loopsGiuseppe D'Angelo2019-06-071-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is perfectly possible to accidentally create a parent/child loop. This can happens by direct means (a->setParent(b); b->setParent(a);), or some more subtle means, e.g. class MyClass : public QObject { MyClass() : QObject(this) {} }; Since this is UB, add a few robustness checks to make sure the code above crashes right away (at least in debug builds). Change-Id: I6583c8514b4c1f8a90677b04c77b8e8f0c15dba3 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
| * | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-148-6/+65
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/unix/unixmake2.cpp src/corelib/thread/qthread_unix.cpp tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-141-2/+4
| | |\| | | | | | | | | | | | | Change-Id: I53a50669face6f68ddc046fd2102de8c1f888b4b
| | | * Add neglected connect()s to Q{Date,Time}Edit constructorsEdward Welbourne2019-06-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pointed out by Daniel Teske. This amends commit c3e1abad4e141e6e9d876e5cff194c473a2654eb. Change-Id: Ia6c6f41bf28e846152f9f86322f20a1b99e57201 Reviewed-by: David Faure <david.faure@kdab.com>
| | * | Merge remote-tracking branch 'origin/5.13.0' into 5.13Liang Qi2019-06-112-2/+5
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/wasm/qwasmintegration.h Change-Id: Idf4c7936513fb1f21daa8f6105b8545f13447bb8
| | | * | QComboBox: add QT_DEPRECATED_X() for deprecated functionsChristian Ehrlicher2019-05-092-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QT_DEPRECATED_X() was not added with d6d33f0b80dd85043c71f71a3ed5485d6014e6c4 for the deprecated QComboBox functions - Add them now. Change-Id: I8d4ea08766ae6ff052dfccac6c3f35ecf34affb7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>