summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Clean up some more mixed enum/int mathGiuseppe D'Angelo2020-05-072-3/+3
| | | | | | | | | Add casts when necessary, and replace a bitwise trick with the proper function call. Pick-To: 5.15 Change-Id: I8b3109781af1e7fdc5d1c4c3fafe43394c81d71d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Snippets: Fix dependency issuesKai Koehne2020-05-071-3/+0
| | | | | | | | | | | | | | | | The widget snippet was sometimes ignored, because the printsupport dependency was not explicit in the top-level src.pro file. This lead to a situation that, if printsupport by chance was already built, it was tested, otherwise silently ignored. This shows that having requires(qtHaveModule()) inside src/ is actually harmful, and they are therefore removed from snippets.pro. Also, the dependencies for the snippets projects are now moved to a central place so that the correctness is easier to check. Pick-to: 5.15 Change-Id: Ice051fa04848040e206c78361fbbcf680383c6b2 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix build of the widgets doc snippetsFriedemann Kleint2020-05-071-1/+1
| | | | | | | | | | | | | Rename main() of the graphicsview.cpp snippet to ensure it is not considered a real main() function and prevent future duplicate symbols. Amends 2e1ef96cf8316c9e04303c70ce5bef1c86223ef8. Pick-to: 5.15 Task-number: QTBUG-81497 Change-Id: Ibbb29e17f263ff02d3910852b195b1513b953f75 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix build of the widgets doc snippets after opengl splitFriedemann Kleint2020-05-061-1/+1
| | | | | | | | | | Add the Open GL modules. Amends a426326e99a76a92c8d0c870e19c67311a434483. Task-number: QTBUG-81497 Change-Id: I648c171a1a329bbc7710254b9e7498de221b318b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix build of the widgets doc snippets on WindowsFriedemann Kleint2020-05-062-2/+2
| | | | | | | | | | | | | - Fix warning about missing return from main() - Turn it into a library to prevent link errors from missing main() (used by winmain()). Amends a426326e99a76a92c8d0c870e19c67311a434483. Pick-to: 5.15 Task-number: QTBUG-81497 Change-Id: Idbcb5c26538ee474bc80387d0a1dae3af7b53744 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add a QRegularExpression::fromWildcard() convenience methodLars Knoll2020-05-061-4/+2
| | | | | | | | | Simplify constructing QRegularExpression objects from a glob pattern. Change-Id: I06f60b1dfea3da969e2474dedd44b6ca5d456d7d Reviewed-by: Simon Hausmann <hausmann@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QComboBox: Remove deprecated auto-completion propertiesVolker Hilsheimer2020-05-063-147/+26
| | | | | | | | | | | | The replacement is to set, and configure, a QCompleter directly via setCompleter. With the removal of the separate properties in QComboBox, the configuration of the completer is not maintained if the line edit is replaced. A QCompleter is created and set implicitly when the line edit is set, unless the line edit came with a completer. This is what the auto test verifies as well. Change-Id: I9a4c73db5e39a2558aad346c0904be6deb4f1cd2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* CMake: Document versionless commandsKai Koehne2020-05-063-9/+81
| | | | | | Pick-to: 5.15 Change-Id: I249c10bf3338b08477ce04f7c2d5098390a6f9a0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Don't move focus away from previous proxy in QWidget::setFocusProxyVolker Hilsheimer2020-05-051-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This amends 23b998fa454ca021aa595f66d2e1964da4a119a4, and the commits 3e7463411e549100eee7abe2a8fae16fd965f8f6 and 947883141d9d8b3079a8a21981ad8a5ce3c4798e. This change restores the pre-5.13.1 behavior of setFocusProxy to not move focus away from a previously set focus proxy. With the previous changes, focus would move away from a proxy when a new proxy is set, if the old proxy had focus. While there are arguments in favor of this behavior, it is a change of behavior that shouldn't be introduced to 20+ years old functionality in order to fix the real bugs addressed by the initial commits. Instead, move focus only to the new proxy when the focus widget was the widget that gets a focus proxy. [ChangeLog][QtWidgets][QWidget] setFocusProxy no longer moves focus away from a previously set focus proxy, restoring pre-Qt 5.13.1 behavior. Change-Id: Icf2ad7cba5b860014aeef91cb274c442a2ab9d42 Fixes: QTBUG-83720 Pick-to: 5.15 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix Clang 10 warning about misleading indentationThiago Macieira2020-05-051-2/+2
| | | | | | | | qcombobox.cpp:3282:13: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] Pick-To: 5.15 Change-Id: I99ab0f318b1c43b89888fffd160b5a7310c0a0d0 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Explicitly prevent out-of-bounds access to tabPositions arrayVolker Hilsheimer2020-05-052-2/+6
| | | | | | | | | | | Use DockCount enum value for the size of the array, and explicitly handle when toDockPos returns DockCount (which it might). Change-Id: Id52399607fb1ae74a24a050de7a8481264c03e47 Fixes: QTBUG-83983 Coverity-Id: 218539 Pick-to: 5.15 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Long live QHVContainer!Marc Mutz2020-05-051-1/+2
| | | | | | | | | | | | | | | | | | Various places in Qt use arrays indexed by some function of Qt::Orientation input. None document their dependence on the numerical values of the Qt::Orientation enum, some waste space, none is type-safe. QHVContainer is a private container of two values, one for Qt::Horizontal and one for Qt::Vertical. Its salient API is the indexing operator, taking Qt::Orientation, thus making the class type-safe. Use it to port QGridLayoutItem and QAbstractScrollAreaPrivate. Change-Id: I0d9f17431a5eb141bfb0763c83155710bb82a537 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QGraphicsGridLayout: simplify a loop over Qt::Orientation valuesMarc Mutz2020-05-051-3/+1
| | | | | | | | Instead of selecting a Qt::Orientation value based on the integer loop variable, just loop over the possible Qt::Orientation values directly. Change-Id: I25b6f0d49c9b5a7e16e974dcc37668f801e65224 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QAbstractScollArea: Cast an enumerator to int before doing math on itGiuseppe D'Angelo2020-05-051-1/+1
| | | | | Change-Id: I78288c7d104a33936b6f1f3f7bff9a076845cfc8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QFileDialog: fix enumeration mismatchGiuseppe D'Angelo2020-05-051-1/+1
| | | | | | | | | | To define a shortcut a Qt::ArrowType enum value was getting mixed with a keyboard modifier. An actual mistake spotted by blocking mixed-enum operations! Change-Id: I4df56ee411599937c243288e8518b5c1df446397 Pick-To: 5.15 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-05-0411-67/+155
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/text/qlocale.cpp src/network/access/qnetworkaccessmanager.cpp Regenerated tests/auto/testlib/selftests/float/CMakeLists.txt Change-Id: I5a8ae42511380ca49a38b13c6fa8a3c5df8bed01
| * Doc: Make snippets Qt Widgets compilableNico Vertriest2020-05-019-65/+138
| | | | | | | | | | | | | | | | | | | | | | Removed mainwindowsnippet.cpp and widgetdelegate.cpp from snippets.pro Task-number: QTBUG-81497 Change-Id: I40d1f34e64d958d2fb857dc8e468b9c40fff527c Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Merge remote-tracking branch 'origin/5.15.0' into 5.15Liang Qi2020-04-281-0/+6
| |\ | | | | | | | | | Change-Id: I42afd73badf41ac990ff9cf8c6bc650850d2dacf
| | * note QFileDialog::setNameFilters() is not supported on AndroidAssam Boudjelthia2020-04-231-0/+6
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-83089 Change-Id: I134917476548f9756a14975be6b1b20312a8ca40 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Always open a submenu on the same screen where the parent menu isShawn Rutledge2020-04-271-2/+11
| |/ | | | | | | | | | | | | | | | | | | | | We've seen submenus opening on different screens in different scenarios, but probably there's never a sensible reason to do that. QWidgetPrivate::setScreenForPoint() can often give incorrect results in multi-screen desktop configurations; this is a way of avoiding that. Task-number: QTBUG-76162 Change-Id: I895696c6858ad953258c84b21117beea4c4fc01d Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | QWidgetLineControl: replace raw memory handling with std::unique_ptrMarc Mutz2020-04-302-7/+4
| | | | | | | | | | | | Change-Id: I131175a9f7147783c4f4c0a1c4929e28677c159a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | QtWidgets: fix a few more int/char -> QChar conversionsMarc Mutz2020-04-306-19/+17
| | | | | | | | | | | | | | | | | | | | They were masked by all QChar ctors being made explicit, except the char16_t one, which was left as the only viable choice. Change-Id: I210d50dc243391ad2c7dd353ba9ae40147585d04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Enable Qt 5 connection syntax for QAbstractButton::animateClick()Friedemann Kleint2020-04-292-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Slot QAbstractButton::animateClick() is commonly connected to signal QLineEdit::returnPressed() in dialogs. The function had a parameter with a default for specifying the delay which requires a lambda when using Qt 5 connection syntax. Since the default value is used practically everywhere, remove the parameter. [ChangeLog][QtWidgets][QAbstractButton] The interval parameter has been removed from QAbstractButton::animateClick(). Task-number: QTBUG-81845 Change-Id: I4e399138b6aa3a9f0b31c1f10de97ffcbab6a337 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Always open a text control's context menu on the same screenShawn Rutledge2020-04-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's very disorienting when a context menu pops up on a different screen from where the right mouse button was clicked. QWidgetPrivate::setScreenForPoint() can give incorrect results in multi-screen desktop configurations; but we can give the menu a hint by setting initialScreenIndex, which was originally used only when QDesktopScreen or QDesktopScreenWidget is the parent (see b3fc5e1ea3eb4fe838ac716aaca4efaa5de5a814 ). Task-number: QTBUG-76162 Pick-to: 5.15 Pick-to: 5.12 Change-Id: Icd4abdc32564430147e6c63a8ea70d483d25cddd Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Remove deprecated QComboBox::SizeAdjustPolicy enum valueVolker Hilsheimer2020-04-272-23/+4
| | | | | | | | | | Change-Id: Ia8ae2eb11b86bc615e1297d7fabd1afcb821557c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QApplication: deliver all wheel events to widget that accepts the firstVolker Hilsheimer2020-04-251-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For kinetic wheel events, Qt tries to make sure that all events in the stream go to the widget that accepted the first wheel event. It did so by directing all events from the stream to the widget from which the spontaneous event was returned as accepted. However, that widget might have passed the event on to some other widgets; e.g QScrollArea forwards wheel events from the viewport to the relevant scroll bar. The event might then have come back accepted only because parent propagation kicked in (the scrollbar might not accept the event, so the parents get a chance, and some parent's scrollbar ultimately accepts the event). In this scenario, the wheel widget would be the viewport under the mouse, when it should have been the scrollbar of the parent. The next events from the stream were then delivered to a widget that didn't scroll; and parent propagation is not (and should not be) implemented for the case where Qt has a wheel widget. Instead, make the first widget that accepts any initial wheel event the wheel widget, even if the event was not spontaneous. With this change, all events from the stream are delivered to the widget that actually handled the event. That has the effect that ie. a viewport of a scroll area only gets the first event; all following events are delivered directly to the scrollbar. The test case added simulates the different scenarios - nesting of scroll areas, classic wheel events and a stream of kinetic wheel events. [ChangeLog][QtWidgets][QApplication] Wheel events from a device that creates an event stream are correctly delivered to the widget that accepts the first wheel event in the stream. Change-Id: I5ebfc7789b5c32ebc8d881686f450fa05ec92cfe Fixes: QTBUG-79102 Pick-to: 5.15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QMainWindow: don't grow memory when modifying tabbed docks while hiddenVolker Hilsheimer2020-04-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMainWindow tries to avoid memory allocations by caching tab bars that are no longer used. That cache is populated when the layout is activated. The layout might never be activated when the main window is never shown, in which case adding and removing dock widgets at runtime will continuously allocate more memory for tab bars that are created. A workaround is to call QMainWindow::layout()->activate() explicitly in application code, once all dock widgets have been removed. This change avoids that applications have to do that. Change-Id: I70eb585d2120f0b7b73f59c3ee65d7242c12ec59 Fixes: QTBUG-83135 Pick-to: 5.15 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Don't send QEvent::Hide to an already hidden top level widgetVolker Hilsheimer2020-04-241-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When hiding a popup by clicking outside of its area, a window is closed. Depending on the platform specific implementation details, this can result in multiple calls to QWidgetPrivate::setVisible(false). The first one from the handling of the close event in QWidgetWindow::event; the second from the destruction of the window in QWindow::event. Since the first call already sets the Qt::WA_WState_Hidden flag before calling QWidgetPrivate::hide_helper, we can test if the flag is set and skip the second call if it is. The included test does not reproduce the issue, as that issue only reproduces if the close event is generated by the mouse event handling in the Cocoa platform plugin (which doesn't call QWidget::close, but rather sends a native close event to the platform window). However, it verifies that the fix doesn't introduce any regressions. Change-Id: Id0eda9326a8adf0cc1f6a3840f9ac0b635ab39a1 Fixes: QTBUG-79134 Pick-to: 5.15 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Remove deprecated ApplicationAttribute enum valuesVolker Hilsheimer2020-04-241-7/+0
| | | | | | | | | | | | | | | | In the declaration, leave them in as comments so that the gaps in the numbering of the values doesn't create confusion. Change-Id: I92ff299416896c471e7c7d80b988cd4642b6b756 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Move QMargins operator| into qmargins.h, add equivalent for QMarginsFVolker Hilsheimer2020-04-241-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Addresses FIXME comment in qwidget.cpp, where the operator is being used. Add documentation, make constexpr and add noexcept as for the other operators. As a drive-by, remove invalid const from return type in the documentation of the other operators. They all return a non-const QMargins object. Change-Id: I5a9ca82978d38acd02e03ec00ca202fe1b8cf6c1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | QListWidget/View: Update the selection when moving items within the viewVolker Hilsheimer2020-04-242-42/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code for doing that existed in the QListWidget::dropEvent override, and was only using standard itemview APIs to adjust the selection model. There is no reason why dropping items internally in a QListView should not do the exact same thing. As part of moving the code from QListWidget to QListView, replace QList with QVector, and other minor optimizations. [ChangeLog][QtWidgets][QListView] Moving selected items within a list view by drag'n'drop will maintain the selection of those items. Change-Id: Ie24bec38234839dcb2f0b0ee0302cc59ca101631 Fixes: QTBUG-83084 Pick-to: 5.15 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Deprecate QGuiApplication::fontChanged() signalAndy Shaw2020-04-241-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than have a fontChanged() signal which can be connected to for tracking when the application font has changed, then it is better to use the event that is sent to all windows and the application itself. That way it is easy for a window/widget or item that cares about the change to the application font to catch it in the event() function. [ChangeLog][QtGui][QGuiApplication] Deprecated fontChanged() signal in favor of QEvent::ApplicationFontChanged. Change-Id: Iae8e832238fc85e385a52305bc04f16e597454b0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | QWidget: fix regression when changing focus proxy while it has focusVolker Hilsheimer2020-04-231-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This follows up on commits 3e7463411e549100eee7abe2a8fae16fd965f8f6 and 947883141d9d8b3079a8a21981ad8a5ce3c4798e. The changing of the pointer of QApplicationPrivate does not transfer focus properly. It updates the pointer, but it doesn't deliver events or update the widget hierarchy's focus chain. The result is that multiple line edits might show a blinking cursor. Instead, use QWidget::setFocus when the focus proxy has changed while it had focus, and pass OtherFocusReason rather than NoFocusReason. Add a basic test for QWidget::focusProxy, which exercises this code path and verifies that pointers are consistent when focus changes as a side effect of modifying the focusProxy. Change-Id: I15a4d868bab2b590cfe4a1daa6a3c8cebc9c9ca2 Fixes: QTBUG-83720 Fixes: QTBUG-79707 Pick-to: 5.15 Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-233-0/+15
|\| | | | | | | Change-Id: Iaa439ba7dff19a17e3716b3d30f49f60fa6e38f8
| * Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Liang Qi2020-04-221-0/+2
| |\
| | * Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-04-221-0/+2
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3a6d8df5219653b043bd642668cee193f563ec84. That change is only for 5.14. Conflicts: src/plugins/platforms/wasm/qwasmeventtranslator.cpp src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/wasm/qwasmopenglcontext.cpp src/plugins/platforms/wasm/qwasmscreen.cpp Change-Id: Ib9151e199291fe6eb4151027b515393c05303d65
| | | * Merge remote-tracking branch 'origin/5.14.2' into 5.14Qt Forward Merge Bot2020-04-211-0/+2
| | | |\ | | | | | | | | | | | | | | | Change-Id: I11019c23d949af45f0be814ab894dee602fb1b1a
| | | | * widgets: Re-calculate focus frame style option after setting new geometryTor Arne Vestbø2020-03-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-83019 Change-Id: I75d3d93732cb0c5a5b7350f19f0227998bda4791 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | | | Handle specified time-spec in date-time parsingAndrei Golubev2020-04-222-0/+13
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a date-time was parsed from a string, the result was equal (as a date-time) to the correct value, but had (at least in some cases) the wrong spec, where it should have had a spec reflecting the zone specifier parsed. The time-spec imposed for the benefit of QDateTimeEdit is now moved from QDateTimeParser to QDateTimeEditPrivate, which takes over responsibility for imposing it. QDateTimeParser assumes Qt::LocalTime in member functions (where applicable) and uses the time-spec parsed from the string when constructing the date-time. QDateTime::fromString() and QLocale::toDateTime() are updated to use the full QDateTime returned by QDateTimeParser. Fixes: QTBUG-83075 Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I8b79add2c7fc13a200e1252d48dbfa70b36757bf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-229-17/+78
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qabstractbutton.cpp src/widgets/widgets/qbuttongroup.cpp src/widgets/widgets/qbuttongroup.h src/widgets/widgets/qsplashscreen.cpp tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp tests/benchmarks/opengl/main.cpp Needed update: src/plugins/platforms/cocoa/CMakeLists.txt Change-Id: I7be4baebb63844ec2b3e0de859ca9de1bc730bb5
| * | | doc: Recommend the QSplashScreen constructor taking a QScreen*Shawn Rutledge2020-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends 49362d064fffe350600f5324fb510b381578d04a Change-Id: If217af44cf6ebe8ebed37bbd927ac311b23d8c0e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | Add QButtonGroup::idClicked/Pressed/Released/Toggled signalsVolker Hilsheimer2020-04-153-8/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following the deprecation of the signal overloads, the remaining signals did not provide equivalent functionality for connecting a slot expecting an integer. The mapping from QAbstractButton* to the ID is comparatively cumbersome to do in the connected slot. Add uniquely named signals that emit the ID of the button directly. [ChangeLog][QtWidgets][QButtonGroup] Added signals idClicked/Pressed/Released/Toggled that replace the deprecated signal overloads. Change-Id: I77215e4f815c4fb7dd6326e1f431230e6601e8f8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | Deprecate QMacNativeWidget and QMacCocoaViewContainerTor Arne Vestbø2020-04-145-5/+11
| | | | | | | | | | | | | | | | | | | | Change-Id: I489870f97dcf7b54a4427ead3a9e627dd938f4ca Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | Port QT_NO_TOOLTIP to QT_CONFIG(tooltip)Joerg Bornemann2020-04-2136-72/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We remove the QT_NO_TOOLTIP check from qstandarditemmodel.h, because as the 'tooltip' feature is in QtWidgets, we cannot use it properly in QtGui. Also this affects just two non-virtual inline methods, i.e. it has no effect on library size. Task-number: QTBUG-82785 Change-Id: Ic166f14fb1cf3e9dd789573a6b9db6a87fb50e10 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@kdab.com> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | | Always encode HTML as utf-8Lars Knoll2020-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When converting a text document to HTML, always convert it to utf-8, as required by the HTML standard. This also means that we remove the optional encoding parameter. Change-Id: I0bd2fc9df2d06734e1c5b8053b964fbfbb6881e1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Don't fall back to QGuiApplication for line control's layoutDirectionEdward Welbourne2020-04-211-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the widget whose line control we are has its own locale setting, then we should use that rather than the default UI layout direction. Instead, the client of the QWidgetLineControl needs to handle the case where auto-detection of the text direction can't be done based on the content of the line control. Fortunately, QWidget's handling of text direction handles setting to auto gracefully as unsetting, on which it consults the parent widget to set a sensible default. Change-Id: Id0d247f1e6e7219b6d0ece5856ca93ee87778c74 Pick-to: 5.15 Fixes: QTBUG-53110 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | | | Fix QLabel with no "picture" featureNodir Temirkhodjaev2020-04-191-0/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I97bc58438791402168bcc58326f199b5675e75ff Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | | Remove deprecated members from QtWidgets/itemviews classesVolker Hilsheimer2020-04-1717-607/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning up those that are trivial to remove because they have direct replacements. Change-Id: Ie9fecd8c4822ed1a8f378b210cc4c4d9a10f7e36 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Remove deprecated QTest::qWaitForWindowShown overload for QtWidgetsVolker Hilsheimer2020-04-172-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Not used anywhere in qtbase or other modules, so trivial to remove. Change-Id: I98575e77f181e617675e536ff0dd67ac93a2f0f5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | Remove deprecated members from QtWidgets/widgets classesVolker Hilsheimer2020-04-1715-248/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning up those that are trivial to remove because they have direct replacements. The QLabel changes to the pixmap/picture getters provide the following migration path: QPixmap *ppix = l->pixmap(); // up to 5.15, warns in 5.15 QPixmap pval = l->pixmap(Qt::ReturnByValue); // new in 5.15, works in 6 QPixmap pixmap = l->pixmap(); // from Qt 6 on The overload with argument can be deprecated after the first LTS or so. Change-Id: I8494ceeea55b2aeda0bd340640ad95cb7c91f7d6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>