summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-281-0/+11
| | |\| | | | | | | | | | | | | Change-Id: I4788bc037c55c48563ffd4ba9633a22aa1d12f22
| | | * Make sure QDBusMenuBar is restored when the window is hidden and shownDmitry Shachnev2017-03-271-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-58723 Change-Id: Ib4c3dac8a8cce717f4d47ab619c05b9e1719f311 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | Prefer rvalue versions of toLower() and toUpper()Anton Kudryavtsev2017-03-281-1/+1
| |/ / | | | | | | | | | | | | | | | | | | ... to re-use existing buffers. Change-Id: Ib2bc938f1cf0451c1dbc012b3db022b878e987cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Introduce QInputControl::isCommonTextEditShortcutJoerg Bornemann2017-03-271-45/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For handling ShortcutOverride events in text-edit-like controls one must know if a key event matches a common text edit short cut. The code that was formerly in QWidgetTextControl is now moved into QInputControl::isCommonTextEditShortcut to remove duplicated code in QtQuick and to avoid adding adding a third duplicate in QtWebEngine. Task-number: QTBUG-59053 Change-Id: I18723bb0224acd33c8ea4a8d0a601bb5e274a7a9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Build fix for -no-feature-texteditPaul Olav Tvete2017-03-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | After change e54356151c, qwidgettextcontrol_p.h does not always include qtextedit_p.h Change-Id: If7b54384d644fda4985eb1966d6773ee393ba107 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Remove bad compile-time check for QMacStyleJake Petroules2017-04-011-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | QMacStyle already sets SH_Workspace_FillSpaceOnMaximize, so this will have the same behavior when QMacStyle is in use. Change-Id: Ibe9f93b2ca94d84b0ce2d3a3078b7db6d5906042 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-2811-21/+101
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro tests/auto/corelib/tools/qchar/tst_qchar.cpp tests/auto/other/qaccessibility/accessiblewidgets.h Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
| * | Workaround GHS compiler bugKimmo Ollila2017-03-271-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | This temporary workaround allows to compile with GHS toolchain and should be removed when GHS provides patch to fix the compiler issue. Change-Id: I0d0eac8054e6ba2f448fed3d3c80a518e0d2af97 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-271-3/+3
| |\| | | | | | | | | | Change-Id: Icdd71e9713725bda9c305e338f5c8b41a92ed8e8
| | * Fix floating dock widget having the wrong parentOlivier Goffart2017-03-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When dragging out a tabbed group which contains placeholder for floating QDockWidget, the floating QDockWidget would not be reparented to the new QDockWidgetGroupWindow. That's because QDockAreaLayoutInfo::reparentWidgets does not reparent floating widget (because of the item.skip test) However, we need to be careful when reparenting to pass the flags so it does not get docked. Also do not reparent QDockWidgetGroupWindow which may end up temporarily in the layout during animation when dragging a QDockWidgetGroupWindow onto another. Step to reproduce a crash that if fixed by this patch (with the mainwindow example): 1. Enable QMainWindow::GroupedDragging from the "Main window" menu 2. Add a new dock widget, "Foo", from the "Dock Widgets" 3. Tab "Foo" together with the black dock widget 4. Drag "Foo" out. (Now, Foo is still a child of the QMainWindow, and is still in the layout as tabbed, but is skipped) 5. Drag the black dockwidget out. (This, in fact, crates a QDockWidgetGroupWindow which contains the black dockwidget and the floating "Foo", but since "Foo" is floating, it is not reparented) 6. Destroy "Foo" using the "Dock Widgets" menu. (Since Foo's parent is the QMainWindow, it is not removed from the QDockWidgetGroupWindow's layout, which will cause crash on the next relayout)" This commits amends commits d57bb19902f863fc6db07674f6bd8881b0886b39 and 0feeb6f6d2cfaa964763ca1fcab65672812b4eef Change-Id: I600a56cdd889435b83d2b740598a24d81059bf44 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
| * | Add feature.dialogStephan Binner2017-03-222-1/+16
| | | | | | | | | | | | | | | Change-Id: I160d0f270d7f41671459358b9c180d71dd7786d6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-212-8/+49
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/eglfs/eglfs-plugin.pro Change-Id: Id76cdbb41b7758572a3b8ea4dcb40d49bac968db
| | * QToolBox: fix potential UB (invalid cast) in Private::_q_widgetDestroyed()Marc Mutz2017-03-211-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't cast an expiring QObject down to QWidget. Cast the QWidgets stored internally up to QObject to perform the comparison. The result is the same, but no invalid casts are possible anymore. Found by independent review. Change-Id: Iffa8a66cf5cab0270961befe982637ac8e4f0f7b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Fix char format of preedit text in empty text blockEskil Abrahamsen Blomfeldt2017-03-201-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a text block is empty, and we are adding preedit text to it, we need to merge the format of the preedit text with the current format of the cursor, otherwise we will use a default format and then suddenly switch to the proper one when the text is committed. The reason this becomes a bit complex is that there are no rules preventing someone from using several ime attributes to specify formats for isolated parts of the text, and no rules defining the order of such attributes. So even if the common case is one text format attribute for the entire string, we need to make sure we also handle the other cases gracefully, e.g. when we are setting different formats for different substrings and then providing these out of order. To make sure we have these corner cases covered, we also add a set of autotests. [ChangeLog][Qt Widgets][TextEdit] Fixed initial char format of input method text as it is in pre-edit mode. Task-number: QTBUG-59196 Change-Id: I1e37928e3bd1395fec1b5591908d4c69b84eb618 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Add features.widgettextcontrolStephan Binner2017-03-205-9/+21
| | | | | | | | | | | | | | | Change-Id: I6d525f70e1d54b4c8383dfa387cfd5c364fab354 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | QDockAreaLayout: Simplify QDockAreaLayout::gapRectOlivier Goffart2017-03-222-47/+27
| | | | | | | | | | | | | | | | | | | | | | | | Merge with QDockAreaLayoutInfo::itemRect, so it can be re-used fromp the QDockWidgetGroupWindow layout. Change-Id: Ic072eceb786be394f96e378a3ade4462cd1043fd Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-2010-51/+60
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemengine_win.cpp src/gui/text/qdistancefield.cpp src/plugins/platforms/xcb/qxcbconnection.h Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
| * | Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Liang Qi2017-03-135-41/+37
| |\ \
| | * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-135-41/+37
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| | | * Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | | * QMenu: make wide submenu appear on the same screen with its parent menuOleg Yadrov2017-03-041-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a multi-display system wide submenu might either appear on wrong screen or not appear at all (depending on the specific display configuration). Task-number: QTBUG-56917 Change-Id: I40013b0bee340a01ae1c08a5e074afa63da4dbfd Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
| | | * Wide QMenu: fix size and positionOleg Yadrov2017-03-042-30/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes 2 issues related to wide menus: 1) Menu took on full screen height when menu width was larger than screen width; 2) On a multi-display system wide menu might appear on wrong monitor (not the one where show event was triggered). The idea is we limit parent menu and all its submenus within the screen where it was opened. Note that this patch fixes only geometry-related issues and there are also some style flaws which need to be addressed (for example, currently the text does not elide if it doesn’t fit to the menu’s width). Task-number: QTBUG-56917 Change-Id: I7e9ff4a48bf03060d76e34d33a13ad6cc890c133 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| | | * QDialogButtonGroup: Fix removal of deleted buttonsOlivier Goffart2017-03-021-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the destroyed() signal is emitted from ~QObject, it is not allowed to use static_cast to a QAbstractButton on that pointer anymore. And the qobject_cast will also fail which will keep a dangling pointer in the hash. Change-Id: If0d22fcc30cde87e771e70914c3afb04ea207289 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | | * Fix UB in QWidgetResizeHandler::eventFilterOlivier Goffart2017-02-271-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unconditional cast to a QMouseEvent while the event might also be a QKeyEvent. Change-Id: If5eb6fbad6e4440c167ff95298f51efde1834217 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | | Add feature.abstractbuttonStephan Binner2017-03-134-8/+21
| |/ / | | | | | | | | | | | | Change-Id: Ie93c6d0a8256bc466d3419408b753d5f3738aa6b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Deprecate QString::nullMarc Mutz2017-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a Qt 3 compatibility vehicle, and as such inherits the now-alien property to distinguish empty and null strings. Particularly worrisome is the following asymmetry: QString("") == QString::null // false QString("") == QString(QString::null) // true Instead of fixing this behavior, recognize that people might use it as a weird way to call isNull(), albeit one that once was idiomatic, and simply deprecate everything that deals with QString::null. [ChangeLog][QtCore][QString] QString::null is now deprecated. When used to construct a QString, use QString() instead. When used to compare to a QString, replace with QString::isNull(). Change-Id: I9f7e84a92522c75666da15f49324c500ae93af42 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-1428-61/+198
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qpushbutton.cpp Change-Id: I615de00e6e64540c50f658d4d8ab3e002d701a81
| * | QMacStyle: update QTabBar styleOleg Yadrov2017-03-083-9/+40
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-58266 Change-Id: I135e4dae44e2e97d73b7c7c97d8e682bcf459d75 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| * | Add feature.abstractsliderStephan Binner2017-03-086-16/+28
| | | | | | | | | | | | | | | Change-Id: Ib5d0186162fc3b750e6440c74b1181787093ef97 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | Add feature.pushbuttonStephan Binner2017-03-063-3/+14
| | | | | | | | | | | | | | | Change-Id: I654d91635e60b177df16f6dfe00acc940132f66a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Add feature.checkboxStephan Binner2017-03-062-2/+10
| | | | | | | | | | | | | | | | | | Change-Id: Ib387390b796c3cab6de4ce94e0d217280a300df8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Add feature.dialogbuttonboxStephan Binner2017-03-063-4/+13
| | | | | | | | | | | | | | | | | | Change-Id: I8c136024c3bf431529033a806be646d867919daa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | QLineEditPrivate: introduce SideWidgetLocation classMarc Mutz2017-03-062-16/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... as a replacement for QPair<enum, int>, and move some repsonsibilities into it. This avoids the repeated use of the magic number -1 to indicate invalid locations and does away with the confusing .first and .second, replacing them instead with proper names, .position and .index. Change-Id: If904c5333cecf8ce3d5160ca4be9264a13a2b72a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Add feature.label and feature.formlayoutStephan Binner2017-03-033-4/+11
| | | | | | | | | | | | | | | | | | Change-Id: Ic8dc0aee7f3fc0d8218ba709352b1378078c6070 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Add feature.radiobuttonStephan Binner2017-03-033-2/+14
| | | | | | | | | | | | | | | Change-Id: Ie11f178ce22e2fafdfdf1760288e90563569e0cb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Build fix for -no-feature-shortcutPaul Olav Tvete2017-03-034-2/+10
| | | | | | | | | | | | | | | Change-Id: I99144b114b3c2eacb56b522b3059aa53a6bbd969 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Fix build with -no-feature-tabbarPaul Olav Tvete2017-03-011-0/+4
| | | | | | | | | | | | | | | Change-Id: I7b692f5308efa92da8c2101e07e9a803c6c69d99 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Build fix for -no-feature-actionPaul Olav Tvete2017-03-013-1/+22
| | | | | | | | | | | | | | | Change-Id: I62291af347dca7c1bb4a53d2cb698e4f1a38743d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Add feature.commandlinkbuttonStephan Binner2017-03-012-2/+10
| | | | | | | | | | | | | | | Change-Id: I057ed507552c74a787e5bcdaa28a18c667eecd43 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Add new API to control whether shortcuts are shown in context menusJake Petroules2017-03-143-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shortcuts are universally not shown on macOS or mobile platforms, making applications look very obviously out of place. Windows and GNOME desktop environments almost never use them. Only KDE appears to do so commonly; default accordingly. Task-number: QTBUG-49435 Change-Id: Ieac4cee57b15a02be5258f3d07749af6316af62b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | Introduce SH_TitleBar_ShowToolTipsOnButtons style hintJake Petroules2017-03-081-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes some tight coupling between QMdiSubWindow and QMacStyle in order to allow the latter to be moved into a plugin. Change-Id: I090c2c5774279c0454486c3db2e77f00a646b145 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | Remove QT_CONFIG checks for style_macJake Petroules2017-03-031-16/+6
| | | | | | | | | | | | | | | | | | | | | These checks are now done entirely at runtime. Change-Id: I63cfee6123fc8465cee2ee36049ece0e5262ce8f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-025-20/+39
|\| | | | | | | | | | | Change-Id: I84097f8e7b3b2128028bd7693c913d6968b82bfe
| * | Widgets: Replace LGPL21 with LGPL license headerKai Koehne2017-02-281-14/+20
| | | | | | | | | | | | | | | | | | | | | Also use canonical contact url. Change-Id: I59ed3d09d2fee877a577a00e7e1cb09782d26512 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-244-6/+19
| |\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/moc.prf Change-Id: Ia71c8e3b3185f7c999bf226d0675051b10b8740b
| | * QDockWidget: Fix memory leak when dragging a tab outside of a floating tab ↵Olivier Goffart2017-02-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | window A QDockWidgetItem will be leaked if a QDockWidget is dragged out of a floating tab window, and then plugged back somewhere. The problem is that QMainWindowLayout::unplug was not returning the QDockWidgetItem* from the floating tab's layout. When that's the case, a new QDockWidgetItem is created in QDockWidgetPrivate::startDrag and will be put into the layout, leaking the old QDockWidgetItem. Change-Id: Ifb9c1c562cb74383ebff1df0f91ee225c5cdb296 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
| | * dockwidgets: recalculate the press position if the window resizesSergio Martins2017-02-222-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | A window can resize while dragging, this happens on Windows when dragging across screens, to a screen with a bigger scale factor. When that occurs it might lead to the press pos being outside of the window. Change-Id: Ic61ec7088c8fa81395d43ce665952dbd2eecba39 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Fix crash while dropping a tabbed group into a single floating QDockWidgetOlivier Goffart2017-02-212-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was caused by commit 0feeb6f6d2cfaa964763ca1fcab65672812b4eef which fixed QTBUG-58036. It reparented widget that used to be skiped. In particular, floating widgets are skiped. But seting the parent of a floating widget docks it. And so as a result it would not be skiped anymore. This has two side effect: This breaks the animation (as the widget is docked too early; and cause crash when QDockWidgetGroupWindow get reparented as this breaks invariant that these are always floating. So restore the skip from before commit 0feeb6f6d2cfaa964763ca1fcab65672812b4eef, and explicitly set the parent in all cases when the animation finishes. Change-Id: I0e3e29ad22d6ffe4d62242d48a18dadb916fc14f Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* | | Remove more tight coupling between QMdiSubWindow and QMacStyleJake Petroules2017-02-281-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | This technically just changes a compile time check to a run time check and better options should be explored later, but it removes the compile time dependency for now. Change-Id: I58c5599baf2c338e88bd558a82093835124d6f67 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Remove unused references to QMacStyle headersJake Petroules2017-02-284-17/+0
| | | | | | | | | | | | | | | Change-Id: If7b84e3b8a0a8682d031e7a1ebf066feedf6a97c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>