summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* WebAssembly for QtBaseMorten Johan Sørvig2018-08-303-2/+14
| | | | | | | | | | | | This is the squashed diff from wip/webassembly to dev. Done-with: Peng Wu <peng.wu@intopalo.com> Done-with: Sami Enne <sami.enne@intopalo.com> Done-with: Morten Johan Sørvig <morten.sorvig@qt.io> Started-by: Andrew Knight <andrew.knight@intopalo.com> Change-Id: I6562433c0a38d6ec49ab675e0f104f2665f3392d Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Windows code: Fix clang-tidy warnings about C-style castsFriedemann Kleint2018-08-301-3/+3
| | | | | | | | | | | Replace by reinterpret_cast or const_cast, respectively. Use auto when initializing a variable to fix Clang warnings about repeating the type name, do minor tidying along the way, and a few conversions of 0 or NULL to nullptr. Change-Id: Ieb271a87ddcf064f536e1ff05d23b1e688b1b56a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWidget: fix setTabOrder for compound widgetsChristian Ehrlicher2018-08-301-1/+3
| | | | | | | | | | | | | When adjusting the tab order for compound widgets, it can happen that the order is already correct. The check for this case forgot one case which lead to a garbled focus chain. Task-number: QTBUG-68393 Task-number: QTBUG-69619 Task-number: QTBUG-10907 Change-Id: Ic3242746bdcf3a4db6ea8daa1498381500ca116d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QSS/QTabBar: properly handle QTabBar::scrollerChristian Ehrlicher2018-08-301-3/+8
| | | | | | | | | | | | | | | | PM_TabBarScrollButtonWidth used the size of the ::scroller subcontrol without considering that there are two QToolButtons and therefore returned the wrong size for a single QToolButton. QStyleSheetStyle::subElementRect() had no handling for SE_TabBarScrollLeft/RightButton and therefore the values for the scroller toolbuttons set via the stylesheet were never used. Fix it by dividing the scroller width by two and add the code path to handle SE_TabBarScrollLeft/RightButton in QStyleSheetStyle::subElementRect Task-number: QTBUG-69653 Change-Id: I1adfe6333f3183bba621bbbb4d10969920c6cd46 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Handle device pixel ratio in QHeaderView::setupSectionIndicatorChristian Ehrlicher2018-08-281-1/+3
| | | | | | | | | The device pixel ratio was not applied to the section indicator pixmap which made it look blurry on HighDPI screens. Task-number: QTBUG-70084 Change-Id: I8b07b2ffc51781c2d2d89484b8618173f0692fe4 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QFileDialog: make QFileDialog::selectFile resolve remote dirs correctlyDavid Faure2018-08-221-3/+8
| | | | | | | | | | | | The code was assuming local files, and broke with remote dirs. Testcase: `kwrite sftp://localhost/tmp/file.txt` and then Ctrl+O, the initial directory was $PWD instead of the remote dir. Change-Id: Ie24d4c1b2b3278dce44274af0066105bd1bf9b34 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QWidgetWindow: Ensure Qt::WA_Mapped is set on obscured parent widgetsFriedemann Kleint2018-08-211-0/+3
| | | | | | | | | | | | Frameless obscured windows do not receive WM_PAINT/expose events on Windows. Qt::WA_Mapped needs to be set on them to ensure updating works. Task-number: QTBUG-39220 Task-number: QTBUG-52039 Task-number: QTBUG-58575 Task-number: QTBUG-63927 Change-Id: Ic6c11f2be96378b6a6b61296f1f3e13cd49b50a6 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QWindowsStyle: respect rectangle when drawing PE_IndicatorViewItemCheckRolf Eike Beer2018-08-201-1/+1
| | | | | | | | | | | The hardcoded value is based on the values set in qcommonstyle.cpp, but in case this is changed using a proxy style the actual values are not respected. They would even be wrong if nothing is changed but QStyleHelper::dpiScaled(13.) does not return 13. Change-Id: Ib451d07800b3b4e8cafd1f4fef84cd9bf02f9bba Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Implement exact match expression builder for QRegularExpressionSamuel Gaist2018-08-191-4/+2
| | | | | | | | | | | | | | | | | QRegularExpression doesn't offer a direct equivalent of QRegExp's exact match. There are several places in the Qt sources that use this feature. This patch implements a small helper function that builds the expression as recommended in the documentation and updates the related code. [ChangeLog][Core][Tools] QRegularExpression now provides anchoredPattern() which is a helper function to build regular expressions used for exact matching. Change-Id: Idbbf142c4c5cb9b62abf8229f4ce85fd4409e5d0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QGraphicsAnchorLayout: move some private classes to a namespace with QThiago Macieira2018-08-193-3/+9
| | | | | | | | | Avoids polluting the global namespace Change-Id: Ie01831ddac5446fdbdeefffd15468b5ca22d5e7b Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* Replace QRegExp by QRegularExpression in QFileSystemModelSamuel Gaist2018-08-192-19/+22
| | | | | | | | | | | [ChangeLog][Widgets][Dialogs] QFileSystemModel now uses QRegularExpression internally for wildcard matching. Note that QRegularExpression might not give the exact same result as QRegExp as its implementation follows strictly the glob patterns definition for wildcard expressions. Change-Id: I6ca893833ff7b5b7f678221bb9bc623fd17c1cfa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use nullptr instead of 0Jesus Fernandez2018-08-181-17/+26
| | | | | Change-Id: I8d18dfbc3451fd8748127415fcb1da54b0870b9a Reviewed-by: David Faure <david.faure@kdab.com>
* Fix -Winconsistent-missing-destructor-overrideJesus Fernandez2018-08-171-1/+1
| | | | | Change-Id: I7a33d6b0cf0bd775567235e0efc858796d8ad852 Reviewed-by: David Faure <david.faure@kdab.com>
* QComboBox: Start blockMouseReleaseTimer after showPopup callAles Erjavec2018-08-171-2/+3
| | | | | | | | | | The layout/size hinting done in showPopup should not count towards the mouse release blocking timeout as it might take more then the double click interval itself, causing the popup to hide immediately on button release. Task-number: QTBUG-67583 Change-Id: I37ac77ac331a4f865a9242581232b85606f883c5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-1713-36/+36
|\ | | | | | | Change-Id: I8bb8227f9da982e7d5ebe5324fc27abd9ac0d4fc
| * doc: Add missing override and remove redundant virtual for snippetsAlexander Volkov2018-08-1613-36/+36
| | | | | | | | | | Change-Id: I2395fd01b93c4ea364225e0cf1a5f59908b691d0 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Modernize the "thread" featureUlf Hermann2018-08-173-2/+3
| | | | | | | | | | | | | | | | | | | | Add it to configure.json and replace all occurrences of QT_NO_THREAD with QT_CONFIG(thread). Add conditions for other features that depend on thread support. Remove conditions where we can use the QMutex and QThreadStorage stubs. Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-08-161-0/+10
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/plugins/platforms/xcb/qxcbbackingstore.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I4af138ffb2f5306373244523768209e8873b2798
| * Make QMessageBox window with the detailed text closableAlexander Volkov2018-08-141-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMessageBox window ignores QCloseEvent if it was created with Ok button and the detailed text was set. But it can be closed if it contains only one button. Make it closable if there are two buttons and one of them is the "Show Details..." button. [ChangeLog][QtWidgets][QMessageBox] A message box with two buttons, one of which is the "Show Details..." button, can be closed by clicking the X button on the window's title bar. Task-number: QTBUG-69526 Change-Id: Iba09e38561eb3898dc2aecfd38d8519d512a71c1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | qdoc: Fix several minor errors to reduce qdoc warningsMartin Smith2018-08-148-17/+40
| | | | | | | | | | | | | | | | | | | | This update corrects several minor documentation errors that cause qdoc warnings. These include incorrect or missing \fn commands, incorrect uses of \e and \a commands together, incorrect spellings, etc. Change-Id: Ib26edef541fa3440025490bcf79cc101623e7f7b Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-074-13/+22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/doc/src/objectmodel/signalsandslots.qdoc src/plugins/platforms/cocoa/qcocoamenuloader.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp tests/auto/gui/image/qimage/tst_qimage.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
| * Doc: Update out-of-date image in QColorDialog documentationPaul Wicking2018-08-031-0/+0
| | | | | | | | | | | | Task-number: QTBUG-58420 Change-Id: Ib5c7a3f681b082182cf6ec9aa62028b7040e81bf Reviewed-by: Martin Smith <martin.smith@qt.io>
| * QCommonStylePrivate::viewItemSize: Fix text width bounds calculationAles Erjavec2018-08-021-8/+11
| | | | | | | | | | | | | | | | | | | | | | The width of the icon was subtracted out of the available text area width even when the value of the `decorationPosition` was Top/Bottom. Task-number: QTBUG-69404 Task-number: QTBUG-30116 Change-Id: I501ffc0dab0cff25e525c26adf9bdb060408927b Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * QLabel: Use nullptr in documentationAndre Hartmann2018-08-011-5/+5
| | | | | | | | | | Change-Id: Idc3a5a40e33ddb4257e46d7b6f3279ca14241911 Reviewed-by: Martin Smith <martin.smith@qt.io>
| * QWidget: Add note about fixPosIncludesFrame not supporting window statesTor Arne Vestbø2018-08-011-0/+6
| | | | | | | | | | Change-Id: Iee841e7e6552e24f2b62b0c2df5df3c432680eef Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | QLabel: Use nullptrAndre Hartmann2018-08-061-13/+14
| | | | | | | | | | | | | | Also, change an old-style-cast while touching its line. Change-Id: I7b4a38994fb7f52fb7fb02826a71ef4b3698aa34 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | QToolTip::mouseMoveEvent(): always call base classChristian Ehrlicher2018-08-041-7/+7
| | | | | | | | | | | | | | | | | | QLabel::mouseMoveEvent() only called the base class implementation when a rect was given to showText which could lead to inconsistent behavior. Change-Id: I3e537ba5ae7c3c67715975624d1ee9f0c04fa9a7 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | QAbstractItemDelegate: only handle as json when type is QMetaType::QJsonValueChristian Ehrlicher2018-08-041-11/+14
| | | | | | | | | | | | | | | | | | | | | | Only handle QVariants which has the type QMetaType::QJsonValue as json values. Otherwise other types like e.g. QMetaType::Long/LongLong will also be converted to a QJsonValue and maybe end up being displayed in scientific notation. Task-number: QTBUG-65082 Change-Id: I5d6458cd7e48fec262cda00b584a1a3c45404400 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QHeaderView: respect min/maxSectionSize in setDefaultSectionSize()Christian Ehrlicher2018-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The min/max section size was not checked when setting the default section size. This was an oversight when the check for min/max section size was added to resizeSection(). [ChangeLog][QtWidgets][QHeaderView] setDefaultSectionSize() now checks if the given value is inside min/max section size Task-number: QTBUG-69431 Change-Id: I1b5704282927ce5a8520f52174ebf91d9840bc8a Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | Make local symbols of some leaked namesThiago Macieira2018-08-032-17/+18
| | | | | | | | | | | | | | | | | | Unnamed namespaces and static are great tools. Use them. Change-Id: Ie01831ddac5446fdbdeefffd15468b3acb3ced79 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Don't ignore alpha values in grabFramebuffer methodsAllan Sandfeld Jensen2018-08-031-1/+2
| | | | | | | | | | | | | | | | | | Returns an ARGB32_Premultiplied image when the framebuffer is grabbed on a transparent QOpenGLWidget or QOpenGLWindow. Task-number: QTBUG-55245 Change-Id: I4b7778ecc38275be1ed9fb748c77c7e1f6b65a00 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Don't trigger composeAndFlush for native child widgets unless neededTor Arne Vestbø2018-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The textureChildSeen flag is set on each widget the first time it has a child needing textures, which triggers the composeAndFlush codepath. If a top level widget had a child needing this codepath, but other native children not needing it, we ended up always using composeAndFlush for the native children, since we were checking textureChildSeen of the top level widget. We should check the child widget instead, which will never have the flag set unless itself had children that required composeAndFlush. This matches the logic in findAllTextureWidgetsRecursively, which also checks the child widget and not the top level widget. Done-width: Laszlo Agocs <laszlo.agocs@qt.io> Change-Id: I65064eef41e56d9c1a789a96cedb98b11e8a177a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge branch '5.11' into devEdward Welbourne2018-07-312-8/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp src/plugins/platforms/windows/qwindowstabletsupport.h src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Done-With: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
| * Doc: Make reference to platform styles version agnosticPaul Wicking2018-07-251-4/+3
| | | | | | | | | | | | | | | | Remove platform/version specific reference to avoid outdated docs. Task-number: QTBUG-64304 Change-Id: Ief9d5db95fa1f865fd826a6426b1621e81bdb6ce Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Reset geometry constraints when removing stylesheetSergio Martins2018-07-171-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | CSS geometry constraints such as "min-height" or "min-width" will set size constraints on the widget. Removing the stylesheet should remove these constraints. Task-Id: QTBUG-69418 Change-Id: I1008e4390281c90112303d72dd7d59a8acddfcd9 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QMacStyle: Remove handling of defunct _q_styleObjectWindow propertyTor Arne Vestbø2018-07-302-9/+0
| | | | | | | | | | | | | | | | | | | | It was supposed to be used in Qt Quick Controls 1, for the desktop style, but the followup patches in QQC1 never landed, and QQC1 is now deprecated. Change-Id: Iceefd523fc02a9e48b986dc33bb13a41804dd199 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | QTabBar: fix mixed up left and right css pseudo classesChristian Ehrlicher2018-07-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The pseudo classes left and right for QTabBar were mixed up. This resulted in the fact that the east (=right) tab position was selected with QTabBar::tab::right and the west with ::left [ChangeLog][QTabBar][QTabBar] fixed mixed up css pseudo class for left and right Task-number: QTBUG-18146 Change-Id: I9f485f21c0a1c54bfac757a6f530aeeeef9b08bc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Inline deprecated QTest::qWaitForWindowShownTor Arne Vestbø2018-07-202-7/+2
| | | | | | | | | | | | Change-Id: Ie8c3975643b9d7e60caf9de4dd3eaa13066a1028 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Remove strange icon highlight for active menu itemThorbjørn Lund Martsum2018-07-181-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows and macOS do not highlight the icon for an active menu item. It requires quite a few kludges in styles and/or stylesheets to make it behave and we simply should not highlight this icon. [ChangeLog][QtWidgets][QMenu] Removed icon highlight when a stylesheet was applied the application. Task-number: QTBUG-69199 Change-Id: I35c5b255766254d11312d7f86c625b811d1dfd64 Reviewed-by: Morten Kristensen <msk@nullpointer.dk> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Thiago Macieira2018-07-175-10/+12
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-175-10/+12
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbintegration.cpp Conflicts git missed: src/plugins/platforms/qnx/qqnxglcontext.cpp Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
| | * QCalendarWidget: update the year label correctly on locale changeEirik Aavitsland2018-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The year label in the header would show an unlocalized year number. Fix by setting it equal to the year editor's correctly localized string. Task-number: QTBUG-69038 Change-Id: I87148c607b8fb498c57bcf59bc175154c9e445d1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * QLineEdit: Fix behavior of DeleteStartOfWord keyAlexander Volkov2018-07-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | DeleteStartOfWord key behaves like Delete key when the cursor is at the beginning of the line. Do nothing instead. Task-number: QTBUG-65855 Change-Id: I56402961b44ec6fe3a382df68a76db36891c4522 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * Doc: Remove redundant \codePaul Wicking2018-07-131-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The preceding snippet contains the same line of code. It is unclear why this line is repeated, and it does not seem to serve a purpose. This patch removes the line of code and the QDoc command used to set it apart from the preceding snippet. Task-number: QTBUG-56772 Change-Id: I400b22aa75ee4542bfb67f7e47e3c31c577a39e5 Reviewed-by: Martin Smith <martin.smith@qt.io>
| | * Doc: Explain emission of QAction::changed on calling QAction::togglePaul Wicking2018-07-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend description of QAction::checked() and QAction::toggled(), as it is not clear from the documentation that calling QAction::toggle causes the emission of a QAction::changed signal. Task-number: QTBUG-68213 Change-Id: I5afa4d9a6e6f001dff81271d1e34d0c515da3c24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Show the toolbutton's menu in the right place on multiple screensAndy Shaw2018-07-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a screen is positioned to be above another, then the toolbutton menu could be shown on the wrong screen if it was deemed to not fit below the button the same screen. This ensures that it shows it on the right screen when there is sufficient space to do so. Change-Id: Ia626b28f74c1931904ff5b30cca17e63914d3c79 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * QSplashScreen: Pass the layout direction set on widget to the painterAndy Shaw2018-07-101-0/+1
| | | | | | | | | | | | | | | Change-Id: I6adc9f6fd77b6e9f9387393884e13285f4452018 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Remove left-over commentFrederik Gladhorn2018-07-161-2/+0
|/ / | | | | | | | | | | | | This is private API and the protected does hardly matter. Change-Id: I8e5c99db16d521d47eb9a5fb57a6519301d63a9b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | testlib: Move qtestsystem helpers to their respective modulesTor Arne Vestbø2018-07-163-2/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | Having the helpers in each respective module lets us implement the helpers using private APIs without forcing the test to add private dependencies. It also makes it easier to test Qt using a third party testing framework (for running the test suite), while still using the helpers for ensuring tests behave expectedly. Change-Id: I2a6ce24526ed345f3513548f11da05c7804c203f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add QStyle::SH_SpinBox_StepModifier style hintNathan Collins2018-07-124-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows the developer to pick which keyboard modifier increases the number of steps a QAbstractSpinBox takes when the user interacts with it. The modifier can be either Qt::ControlModifier (default), Qt::ShiftModifier or Qt::NoModifier. Qt::NoModifier disables the step modifier. Note that on macOS, Control corresponds to the Command key. Holding the modifier increases the step rate when: - scrolling; - pressing the up/down keys; - pressing the spin box up/down buttons. [ChangeLog][QtWidgets][QStyle] QStyle::SH_SpinBox_StepModifier allows the developer to pick which keyboard modifier increases the number of steps a QAbstractSpinBox takes for the following interactions: scrolling, up/down keyboard keys and the spin box buttons. The Qt::ShiftModifier can now be used, or the feature can be disabled using Qt::NoModifier. Previously, only Qt::ControlModifier could be used as the modifier. Change-Id: Ib5518127e86a8f67798a9a1d6e860c6e35896e6f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>