summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-0233-332/+337
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
| * Convert features.tabbar to QT_[REQUIRE_]CONFIGStephan Binner2017-07-2515-147/+144
| | | | | | | | | | Change-Id: Id21a95cbc61b2559a8f517ee60548b61536e3cc4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.dockwidget to QT_[REQUIRE_]CONFIGStephan Binner2017-07-2511-127/+125
| | | | | | | | | | Change-Id: I1d4b0268df01f8bc0aec28af52cc4b639a376863 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.tabwidget to QT_[REQUIRE_]CONFIGStephan Binner2017-07-2511-38/+41
| | | | | | | | | | Change-Id: Iab985564fd2069188df01f8ff3e00add86eb86f4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.itemviews to QT_[REQUIRE_]CONFIGStephan Binner2017-07-257-2/+14
| | | | | | | | | | | | | | The QT_NO_ITEMVIEWS queries in corelib/ seem to had no effect at all. Change-Id: I494ee2309a96b0cf25de18781fc9a675878a2ee9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.combobox to QT_[REQUIRE_]CONFIGStephan Binner2017-07-256-14/+14
| | | | | | | | | | Change-Id: I2f415de8556289a6461a645d559be17089c43c99 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.calendarwidget to QT_[REQUIRE_]CONFIGStephan Binner2017-07-253-12/+7
| | | | | | | | | | Change-Id: I93c2e00828a233f004c599bd0702d0a470ae29ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * QLineEdit: Don't move the cursor after internalInsert() has done soAndy Shaw2017-07-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | internalInsert() will set the cursor to the right position which accounts for any input mask set on the control as well. Therefore it will already be placed at the next correct position and should not be changed again after that. Task-number: QTBUG-40943 Change-Id: Ic0f5fad6999ddd367e435ec4409a5db5b9eacb7b Reviewed-by: Daniel Teske <qt@squorn.de> Reviewed-by: David Faure <david.faure@kdab.com>
* | QLineEdit: Add selectionEnd() and selectionLength()Daniel Teske2017-07-202-0/+29
| | | | | | | | | | | | | | | | | | | | Getting the end position of the selection was not possible. [ChangeLog][QtWidgets][QLineEdit] Added selectionEnd(), selectionLength(), complementing selectionStart(). Change-Id: Iaecc624063d7c043f9502351f07eb76f869e86f1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devSimon Hausmann2017-07-202-3/+7
|\ \
| * | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-192-3/+7
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qwindowspipewriter.cpp src/widgets/styles/qcommonstyle.cpp Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
| | * QDialogButtonBox: Don't overwrite shortcut with standardButtonShortcutKai Uwe Broulik2017-07-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | de63bbd2f806b0219a60775017899cedb121581f introduced a new QPlatformTheme::standardButtonShortcut which would then unconditionally overwrite the QPushButton shortcut, even when empty, breaking activating mnemonics potentially included in the button's text. Task-number: QTBUG-61197 Change-Id: I2a5a460a820a5ab4054eb44f349066aaeca1436f Reviewed-by: Marco Martin <notmart@gmail.com> Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * Convert features.treeview to QT_[REQUIRE_]CONFIGStephan Binner2017-07-151-2/+4
| | | | | | | | | | | | | | | Change-Id: I4a036a0410615ac563b17f7715c47acccb8abfca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | widgets: remove redundant check in QMenu::popupGatis Paeglis2017-07-191-2/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if (A) doA() else if (B) doB() if (B) doB() is equal to: if (A) doA() if (B) doB() when doB() is a self-contained basic operation like QRect::setY(int ay) with { y1 = ay; } as body. Change-Id: I3421493fe47459bd9b3d4cb5f4cfdd30ce566003 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devGabriel de Dietrich2017-07-1318-66/+74
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmainwindowlayout.cpp Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
| * QLineEdit: Fix length calculation for input mask "\\\\"Daniel Teske2017-07-131-3/+11
| | | | | | | | | | | | | | | | | | | | | | Consider the raw string \\\\. The previous algorithm would consider the last 3 \ to be escaped because the previous character is a \ and thus calculating a maxLength of 3. But this should be treated as two escaped \ with a maxLength of 2. Change-Id: I6c4b8d090a2e1c6e85195d5920ce8b80aea1bc2d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Convert features.tableview to QT_[REQUIRE_]CONFIGStephan Binner2017-07-111-2/+4
| | | | | | | | | | Change-Id: I7ab479deff7bbf3083d1efa196e0480b181548c5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.datetimeedit to QT_[REQUIRE_]CONFIGStephan Binner2017-07-115-16/+13
| | | | | | | | | | Change-Id: I083cd565fab8c33dc3633b71f962de099c2b3481 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.rubberband to QT_[REQUIRE_]CONFIGStephan Binner2017-07-1112-45/+46
| | | | | | | | | | Change-Id: I6d634bafa6d26c1e78069fddd412e6de24f5775c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | macOS QComboBox: Don't show scrollers if they aren't neededDaniel Teske2017-07-102-0/+14
| | | | | | | | | | | | | | Task-number: QTBUG-13925 Task-number: QTBUG-18788 Change-Id: Id155ea26824e1cb470cc6174704436d99fb7ac87 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-062-2/+8
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
| * Fix build with MSVC 2015 Update 2 if constexpr is enabledThiago Macieira2017-07-031-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This compiler seems to require explicit initialization of all member variables in a constexpr constructor, even if they have an implicit default constructor of their own. We probably fixed the rest of Qt a couple of years ago, but not these two places because they were arrays and those require the C++11 syntax for uniform initialization. All compilers that support constexpr do support uniform initialization. MSVC 2015 fixed our issues with it on the same update. Change-Id: Ibc1eb23e3ae093f5c6928ded3a041be35eb9baae Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QLineEdit: Document that []{} are reserved in Input MasksDaniel Teske2017-07-031-0/+1
| | | | | | | | | | | | | | | | They don't have any meaning, seems like they were meant for a future extension. Documenting them, documents that they need to be escaped. Change-Id: I90079766ffd45fab8c4676f7a9212ff6dec4a732 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * QLineEdit: Tweak selectionStart() documentationDaniel Teske2017-07-031-1/+1
| | | | | | | | | | Change-Id: I55defa5ed182373f435b06c92770da5b05c01459 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-0434-77/+77
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * Convert features.fontcombobox to QT_[REQUIRE_]CONFIGStephan Binner2017-06-293-9/+6
| | | | | | | | | | Change-Id: I98f85cdb3b1c1ceae010362a5d5747d62ba62a22 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.statustip to QT_CONFIGStephan Binner2017-06-294-6/+6
| | | | | | | | | | Change-Id: Ic719ab93ed1802fcc713885ad0421cb44c7a998b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.whatsthis to QT_[REQUIRE_]CONFIGStephan Binner2017-06-2911-23/+30
| | | | | | | | | | | | | | Move feature definition to gui/configure.json Change-Id: I00b35c0e259d0a695d84a9bf6803eba74d41465a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * QTabBar: fix expanded tabs appearanceOleg Yadrov2017-06-281-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix regression introduced by 175f33ed8. 'expanding' property set to true was ignored when QStyle::styleHint() returned Qt::AlignRight for SH_TabBar_Alignment. When we calculate tabs geometry, we put an empty tab at the front and back and set its expansive attribute depending on tab alignment AND 'expanding' property. Task-number: QTBUG-61480 Change-Id: I6a1827ae8a3f2c6bee5124c18c7f2b1c0a7862f3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| * Convert features.wheelevent to QT_CONFIGStephan Binner2017-06-2822-26/+26
| | | | | | | | | | Change-Id: I46083a9115c199d1ebe024ed5f64b160a27462f1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Fix current tab text color on Mac when a proxy style is installedGabriel de Dietrich2017-06-281-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | We move the code forcing white text on the current tab to QMacStyle. This removes the small encapsulation violation even though we need to check for the tab text color in the style and modify the palette. Amends 2fbc1432025dd478cf9e940e3c2a1952b218c6dc. Change-Id: If31dc11ae389ee5315e84ab03cf1c08540d81640 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | QDateTimeEdit: update cursor blinking code to match new APIRichard Moe Gustavsen2017-06-261-2/+2
| | | | | | | | | | | | | | | | Update old, if-deffed out, code to match changed method signatures. Change-Id: If9751599c9446f8dbd554a41ab97f597258fa1c5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Restrict QStyleHints::showShortcutsInContextMenus() to context menusFriedemann Kleint2017-06-262-2/+10
| | | | | | | | | | | | | | | | | | | | Amends c2c3452ba5b4c32d0c2d5df9193bf89986623ab5. Task-number: QTBUG-49435 Task-number: QTBUG-61181 Change-Id: I4de9dcb45a86fc2db07185a4a499a511fb1a1567 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | macOS: Remove support for child NSWindowsTor Arne Vestbø2017-06-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The private feature was only used by QToolBar to solve QTBUG-33082, but the solution doesn't work, and complicates the macOS platform plugin quite a bit. A better solution is likely to use Core Animation layers, which is a direction we're going in anyways. To make it easier to modernize the macOS platform plugin, including moving to using layers, we remove the child NSWindows codepaths for now. Change-Id: I4b19464be3980fd84dd7af8316d4d5e85ba813b1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Eliminate in/out arguments from QDateTimeParser::parse()Edward Welbourne2017-06-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its first two arguments were non-const references that it modified. A copy of the first was already being passed back in the returned struct; and the one caller that wanted the modified value was in fact copying this copy back over the QString it had passed in (that was thus equal already). So passing by value is fine. The second's only change was increment by a field I've just added to StateNode in refactoring parse(); so we can let the caller do that adding, instead. Change-Id: I05abb644f3e5a60f94b03292302dd1bbe996cce9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-194-4/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/windows/qwindowscontext.cpp src/plugins/platforms/windows/windows.pri src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/doc/src/widgets-and-layouts/gallery.qdoc Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
| * Doc: Update widget style gallery topicLeena Miettinen2017-06-093-3/+4
| | | | | | | | | | | | | | | | | | | | | | To avoid repetition, remove the individual style gallery topics. Add images of the Styles and Calendar widget examples and use them instead of individual images of each widget. Task-number: QTBUG-5894 Change-Id: I1231824df60e39e8fb89ac2a764e12151636c019 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * QPlainTextEdit: not show place holder when having preedit stringLiang Qi2017-06-081-1/+1
| | | | | | | | | | | | | | Task-number: QTBUG-61210 Change-Id: I4891c21fc4e1923b5929defeacab26114c00a7e3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-0722-201/+73
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * Doc: Remove references to screenshots illustrating different stylesLeena Miettinen2017-06-0116-171/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... from widget class descriptions. Use one screenshot from Windows instead. The styles change and the screenshots become outdated very fast, so it is easier to update just one screenshot now and then. The styles can still be seen in the style gallery topics. The image files will be removed in a follow-up commit after all references to them have been removed. Change-Id: Id326c141f4884a2e4f67a4fe8681d8c65f8b24ba Reviewed-by: Martin Smith <martin.smith@qt.io>
| * Convert features.splashscreen to QT_REQUIRE_CONFIGStephan Binner2017-05-293-10/+10
| | | | | | | | | | Change-Id: Ie46b7c6fb52773dea25c552a77c96d800f471738 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.lcdnumber to QT_[REQUIRE_]CONFIGStephan Binner2017-05-293-9/+9
| | | | | | | | | | Change-Id: Ie99d2ce0a836c27fb882c04ff465e6cdd483d360 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.movie to QT_[REQUIRE_]CONFIGStephan Binner2017-05-293-13/+15
| | | | | | | | | | Change-Id: I838c7305d4649f953c5bb972f1aa51dbb078afe2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QStyle: deprecate SH_Widget_Animate in favor of SH_Widget_Animation_DurationElvis Angelaccio2017-06-042-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a new SH_Widget_Animation_Duration style hint that applications can query instead of manually hardcoding the duration of an animation. As default value we use 200, which is the value that was already used in QWidgetAnimator. A value equal to 0 means that the animations will be disabled. This also implies that the SH_Widget_Animate style hint is superseded and can be deprecated. The new style hint is configurable with style sheets. [ChangeLog][QtWidgets][Styles] Added SH_Widget_Animation_Duration style hint which deprecates SH_Widget_Animate. Change-Id: Ic3f5e4f7145a89697f28666aeaecabb1f3c5c96f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Do its best in QComboBox to map completer's indexAlexey Chernov2017-06-011-1/+15
| | | | | | | | | | | | | | | | | | | | Add additional code paths to map the index passed by QCompleter in its activated() signal in case when QCompleter's model isn't the same as QComboBox's one. Task-number: QTBUG-52027 Change-Id: I1d74037fccbe19962bb7f242aa7b1c2441aa5d54 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | QSplashScreen: make all ctors use the same Qt::WindowFlagsMarc Mutz2017-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | One was setting FramelessWindowHint, the other didn't. Settle on setting it. [ChangeLog][QtWidgets][QSplashScreen] All constructors now implicitly set Qt::FramelessWindowHint, not just the (pixmap, flags) one. Change-Id: I5e3919acac80bf31c2c61fbade938ff319a6cea9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-079-52/+84
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * QMenu: Ensure popup() gets the right screen geometryGabriel de Dietrich2017-05-041-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many QMenu related functions end up calling sizeHint() which does call updateActionRects(). Since we try not to update the action rects if no action has changed, we must be careful to call it the first time with the right screen geometry. Other- wise, multi-display setups may get the action rects based on the wrong display. In QMenu::popup(), this can be solved by using the position passed as argument. Incidentally, we were already computing the right display geometry in the same function, only a bit later. The updated position around an eventual push button menu should not change the screen onto which the menu popup will be displayed. Tested with the multiscreen-menus manual test. Change-Id: Id7fc24be6908b4a9d24b8b9c8b8006efe45d69be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QMenu: Refactor column layout logicGabriel de Dietrich2017-05-031-5/+3
| | | | | | | | | | Change-Id: I30f1c87092447abf1c94e69c0124eeeee43666e2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Fix build without features.style-stylesheetTasuku Suzuki2017-04-281-1/+1
| | | | | | | | | | | | Change-Id: Ib7cf5db6c9a49e7f359410bc0ec3d1ceadcde5cf Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>