summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Merge remote-tracking branch 'origin/5.9' into 5.11" into ↵Liang Qi2018-02-141-1/+3
|\ | | | | | | refs/staging/5.11
| * Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-141-1/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| | * QComboBoxPrivate::showNativePopup(): Scale target rectangleJ-P Nurmi2018-02-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | The QPlatform* classes operate in native pixels. Task-number: QTBUG-55251 Change-Id: I80490fa802fbc77a1e02c176528cc047630f9a7d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Fix typo in code handling Qt::AA_DontShowShortcutsInContextMenusFriedemann Kleint2018-02-142-6/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Use Qt::AA_DontShowShortcutsInContextMenus instead of Qt::AA_DontShowIconsInMenus in the getters and helpers for formatting the action text. Streamline the code and use static method invocation. Amends c2c3452ba5b4c32d0c2d5df9193bf89986623ab5. Task-number: QTBUG-49435 Change-Id: I8827c2dc757e5899e5a26ffbf2d0b5018aa7544a Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/dev' into 5.11Liang Qi2018-02-104-2/+28
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvarlengtharray.qdoc src/corelib/tools/qvector.qdoc Resolved documentation changes in favor of 017569f702b6dd0, which keeps the move overloads along with its const-ref sibling. Change-Id: I0835b0b3211a418e5e50defc4cf315f0964fab79
| * | QLineEdit: implement quick text selection by mouseElvis Angelaccio2018-02-033-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a standard feature in GtkEntry widgets or HTML <input type="text"> elements. During a normal text selection by mouse (LeftButton press + mouse move event), it's now possible to quickly select all the text from the start of the selection to the end of the line edit by moving the mouse cursor down. By moving it up instead, all the text up to the start of the line edit gets selected. If the layout direction is right-to-left, the semantic of the mouse movement is inverted. This feature is only enabled if the y() of the mouse move event is bigger than a fixed threshold, to avoid unexpected selections in the normal case. This threshold is set by the QPlatformTheme and a value smaller than zero disables this feature. The threshold is updated whenever the style or the screen changes. [ChangeLog][QtWidgets][QLineEdit] Implemented quick text selection by mouse in QLineEdit. Change-Id: I4de33c2d11c033ec295de2b2ea81adf786324f4b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | QMenuBar::mouseReleaseEvent: fix triggering hidden actionsYulong Bai2018-01-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While menubar actions are hidden, as menubar was too narrow to contain them, by clicking the blank area, where the action was supposed to place, can still trigger the action. Task-number: QTBUG-65488 Change-Id: I6b137e0717f634ebd3371dbcc2c1ce2089688374 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | QDockWidget: Use theme font for titleGabriel de Dietrich2018-02-052-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the QPA theme provides support for dock widgets title font we never use it. This is a very similar solution to what we do in QMdiSubWindow, setting the platform theme font at few specific points. This patch also fixes the dock window title font on macOS, as queried in QCoreTextFontDatabase. Change-Id: Ie264e4e83e0d3d1e8f78bd378359f3063cc1d525 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | QMdiSubWindow: Hide "system" menu icons on macOSGabriel de Dietrich2018-02-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Not only they should not appear (icons in menus is a special thing on macOS), they don't match the look on the window frame buttons. So, it's better to hide them completely. Change-Id: I8814ed3e128480abff4f53fdd40a0bb13f1796ef Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Introducing SH_SpinBox_ButtonsInsideFrameGabriel de Dietrich2018-02-051-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is currently only used in QMacStyle since, on macOS, the spin-box buttons are always beside the line-edit. Hence, there is no need to tamper with the line-edit frame. Change-Id: I8ccfbab547fccae89a8ddeaeb7005cb17d5951e6 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | QMacStyle: CC_SpinBox is now HITheme-freeGabriel de Dietrich2018-02-051-0/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bonus changes in this edition: * The focus frame shows only around the spin-box's line-edit, as it should. This requires getting access to the spin-box's line-edit, which we do by setting a property on the former. Notice that the stepper doesn't get focus. On this point, macOS is inconsistent (partly because there's no such thing as an NSSpinBox, and partly because spin-box buttons are a separate control), so we copy the same focus behavior as NSDatePicker. * We clean some QFocusFrame related dead code in QMacStyle::event(). Change-Id: I204ca2093d9db343c78f0420811dda35c463bbcd Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | doc: Fix many qdoc warnings, mostly missing return typesMartin Smith2018-01-246-7/+9
| | | | | | | | | | | | | | | | | | | | | | Fixed many cases of missing return types in \fn commands. Added a fake GLxxx typedef for a GL type that wasn't there because the GL includes weren't accessible. Also added some fake declarations for a few functions declared in namespace Qt in QtWidgets that must be seen by qdoc in QtCore. Change-Id: Id82476042d0563d32fa85c4ae81a58c1298a468a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | QDockWidgetTitleButton: Limit icon size to dpiScaled(10) on WindowsFriedemann Kleint2018-01-241-5/+47
| | | | | | | | | | | | | | | | Adding larger pixmaps to the icon caused the icon to grow. Task-number: QTBUG-38776 Change-Id: I29148d70afa55e287f2ad254e449a98c4aa631fb Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | QMenuBar: Fix repetitive emission of triggered() when using addAction(QString)Yulong Bai2018-01-211-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The action which added by QMenuBar::addAction(const QString &text) already connected relevant signals and slots implicitly, however, while QMenuBarPrivate::updateGeometry -ing, it reconnects them if there's a extension button associated with a hidden popup menu. In that case the QMenuBar::triggered would be fired twice. Since the QAction's ownership may be changed or added dynamically, there are still very rare cases like several widgets share the same QAction object to result in this problem. [ChangeLog][QtWidgets][QMenu] Fixed a bug in QMenu that caused QMenuBar::triggered to be fired multiple times. Task-number: QTBUG-25669 Change-Id: I4d52e82a2136a992e0b37118e41237d96a2c5d22 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | doc: Fix remaining clang parsing errors in QtWidgetsMartin Smith2018-01-182-7/+4
| | | | | | | | | | | | | | | | Removed two unnecessary \fn commands. Also documented a parameter correctly. Change-Id: Ia2f22a76a18fc42127bd24b132750373675b6853 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | QMacStyle: Set WA_MacShowFocusRect for checkbox, radio buttonGabriel de Dietrich2018-01-172-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes small and mini checkbox and radio button focus rings since the previous HITheme removal patch (90c9370d5098db95). But also allows to properly draw the focus ring outside the widget's boundaries, as it's common in macOS. More importantly, we pave the way to use QFocusFrame for most widgets and, eventually, implement the focus ring animation. Finally, we tweak the spacing between the indicators and their respective label. Change-Id: I4bf7ac1a06ce924a043f0365e487777d0b20a104 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | doc: Add template clause to \fn commands in qmenu.cppMartin Smith2018-01-121-6/+6
| | | | | | | | | | | | | | | | clang-qdoc requires the template clause in \fn commands for template functions. Change-Id: I5719f39ebca6064e6480e873a1d4f339f41df436 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | doc: Add template clause to \fn commands in qtoolbar.cppMartin Smith2018-01-121-6/+6
| | | | | | | | | | | | | | | | clang-qdoc requires the template clause in \fn commands for template functions. Change-Id: I838bae74102e99b64f04960ad88f192e45d901ba Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | doc: Remove <CR> from \fn commandsMartin Smith2018-01-121-4/+2
| | | | | | | | | | | | | | clang fails for \fn commands that contain CR. Change-Id: I4ece5110437cf358e408731f93993bf2d9702381 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2018-01-121-0/+2
|\ \ | | | | | | | | | refs/staging/dev
| * \ Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-111-0/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/src/hb-private.hh src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/sql/doc/src/sql-driver.qdoc Change-Id: I38f0e82fcd37926cbf3c1915e009a731040d4598
| | * | qtlite: Fix compilation of QWidgetLineControl when configured with ↵Rainer Keller2018-01-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | no-feature-itemviews Task-number: QTBUG-53141 Change-Id: I00d9d7fc43a4531c9213281f529b2d0f3164a5c6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | Add more Q_FALLTHROUGH()Friedemann Kleint2018-01-129-12/+12
|/ / / | | | | | | | | | | | | | | | | | | | | | Silence g++ 7.X warnings. Change-Id: Id06d06e7e3b5be2cf3934d81f1891da58dea2649 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Avoid useless casts to/from uintChristian Ehrlicher2018-01-092-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove some c-style casts from int to uint which were needed in Qt3 (or earlier?) but nowadays the values are all int. Change-Id: Iecd739c450873adf952a17f635d7fb6825537907 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | QMenuBar: Add overloads of addAction() using Qt 5 signals and slotsAnton Kudryavtsev2018-01-062-0/+62
| | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtWidgets][QMenuBar] Add overloads of addAction() using Qt 5 signals and slots Change-Id: Ief21974213b80111f0ca87df490eb72dd6b9c9b9 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | Add an option to scroll the QComboBox on macOS with the mouse wheelAndy Shaw2018-01-051-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since there may be some applications that want to make their comboboxes scrollable or not with the mouse wheel then a style hint is added to make this toggable. It defaults to true for all platforms except macOS to keep it in line with existing behavior. [ChangeLog][QtWidgets][QStyle] Added SH_ComboBox_AllowWheelScrolling as a style hint to enable/disable the use of the mouse wheel in a QComboBox. This defaults to true in all styles except the macOS one so there is no change in existing behavior. Task-number: QTBUG-53094 Change-Id: I6eb61e1990bfc79e3b3ea82d7b91ee39096fa077 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | QtWidgets: Raise minimum supported MSVC version to 2015Friedemann Kleint2018-01-041-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: I2ba95bde2b8bbcca1833dc14c344b9a14394bc1d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-024-9/+22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-303-7/+21
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| | * Prevent infinite relayout when adding scrollbarsAndy Shaw2017-12-182-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When one scrollbar is added, this may cause the other to be needed as well. This change does a second calculation immediately instead of relying on a signal through a QueuedConnection. Task-number: QTBUG-62818 Task-number: QTBUG-56280 Change-Id: Iee9a083e3a6cd3765e6bb9206687a8a6e7f99cff Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | * QWidgetResizeHandler - undo (potential) move breakThorbjørn Lund Martsum2017-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the mode is center we are typically moving the dock widget, but we should however not stop if the mode is Center. Though the regression (in commit e662b4ed721ee36f0a17cc413494b7d09395d52e) is not easy to reproduce it is clear that the code later may call "mouseMoveEvent(e)" and the mode is also checked for being Center and in that case the eventfilter (function) returns true (not false). Change-Id: I3936ec56833d613f78920d9ccf8ddb66e19e9802 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-12-051-2/+1
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/ios/quiview.mm Change-Id: I88384c70047391c75d9ff166c8d9881ff6751dbf
| | * QMenu: Corner case size fix (high DPI + multi screen)Thorbjørn Lund Martsum2017-11-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We always need to set the QMenu screen explicit also when it is about to be shown on the primary screen. The reason is QWidget::metric (called from style/sizeHint) may use qApp->devicePixelRatioF() when it does not know about the topLevelWindow. That may not be the same value as DPR on primary screen. It can be argued that it likely is a bug in QWidget::metric, but fixing that looks to be a somewhat dangerous behavior change. Task-number: QTBUG-59794 Change-Id: I6ed0e808aa31bee5b77c0e19ce61a77548fdbb38 Reviewed-by: Morten Kristensen <msk@nullpointer.dk> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | Update usage of QFontMetrics::width() to new APIEskil Abrahamsen Blomfeldt2017-12-0814-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFontMetrics(F)::width() has been deprecated and is replaced by horizontalAdvance(). This updates all usage of it in tests and documentation. It is worth noting that many or most of the usages of QFontMetrics::width() probably intended to use boundingRect().width(), but since it currently works, I have not looked into that, just replaced the function name mechanically. Change-Id: Iec382e5bad0b50f37a6cfff841bfb46ed4d4555f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Raise the upper bound on years to 9999Edward Welbourne2017-11-302-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test-case taken from bug-report; fits in as an easy row in an existing data-driven test. Add similar tests for date-time and time; and an isValid test on the end of year 9999. The date-time parser was using the end of year 7999 as maximum value for dates and date-times; extend this to year 9999, as I can see no reason not to. [ChangeLog][QtCore][QDateTime] Years up to 9999 can now be parsed without error (previously 8000 and beyond were treated as invalid) in all formats (not only in ISO format). Widgets handling dates now support dates to 9999, likewise. Task-number: QTBUG-64401 Change-Id: I518cfa6c2cb4ecc5a85b896dc9e56b4fdd8a8bb1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-301-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qsemaphore.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-231-0/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstandardpaths_win.cpp src/plugins/platforms/ios/qioswindow.mm src/plugins/platforms/ios/quiview.mm tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: I5deb0a0176a454a9c566e924d074ba60ce04f0bc
| | * QToolBar: Don't crash on macOS with 'minimal' QPA pluginGabriel de Dietrich2017-11-171-0/+2
| | | | | | | | | | | | | | | | | | | | | 'minimal' doesn't provide any native interface. Change-Id: I116c9905977ccc6ededf0c6c41b92b6f785f2875 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-236-153/+174
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-171-1/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also blacklist tst_QNetworkReply::ioHttpRedirectErrors(too-many-redirects) on RHEL 6.6 in CI. Conflicts: tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Task-number: QTBUG-64569 Change-Id: I7514fc0660c18fd3a3e1d0d0af3f15d879e3c6f4
| | * QAbstractButton: don't clear 'pressed' flag unless left button is releasedRichard Moe Gustavsen2017-11-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As it stood, we would set 'pressed' to false regardless of which button that was released. This would end up wrong if pressing the left button, and at the same time, did a click with the right button. This would clear the flag prematurely, and cause a release signal not to be emitted when later releasing the left button. tst_QAbstractButton: adding autotest Adding tests to simulate the bug report's cases: 1) left press button 2) click right/middle key 3) move mouse out of button's boundary 4) test if the released() signal triggered properly Taks-number: QTBUG-53244 Change-Id: Ifc0d5f52a917ac9cd2df5e86c0475abcda47e425 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | QMenu: Refactor insertion of action in QPA menuGabriel de Dietrich2017-11-152-54/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | First, remove a bit of code duplication around the creation of the platform menu item. Then, we move copyActionToPlatformItem() inside QMenuPrivate to get rid of one parameter. Change-Id: I5a33103566367f2313930479844365e79773d82f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | QMenu: Update menu action sizes if popup is (not)caused from menu barBłażej Szczygieł2017-11-152-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Menu width differs if it contains key shortcuts or not. Amends 6634c424f8ca0e3aed2898507d5f9f4b774c4602 Task-number: QTBUG-49435 Task-number: QTBUG-61181 Task-number: QTBUG-64449 Change-Id: I8c479af550128069ca91dd089dfc7bd8c24c66ba Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-094-98/+107
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
| | * QMainWindow: Clear menubar parent when new one is setGabriel de Dietrich2017-11-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QMainWindow::setMenuBar(), we hide and schedule the current menubar, if any, to be deleted later. However, it remains installed as its whole ancestry's event filter, which could conflict with the newly assigned menubar until the old menubar is destroyed. In our case, we have noticed issues with the Cocoa QPA plugin. We force uninstalling the old menubar as event filter by setting its parent to null, pending its deletion shortly after. This fixes BigMenuCreator's empty menubar when calling it with only the "--new-menubar" option. It also fixes QTBUG-34160 example which was not behaving as well as it should. Task-number: QTBUG-34160 Change-Id: Ifefb72affad01e7b7371005442074afd6a39a5b8 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * QMenuBar: Update title on changeGabriel de Dietrich2017-11-072-24/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When one of the menubar actions changed, we would omit to update several properties on the platform menu, most notably its title. Manual tested with BigMenuCreator, where the sequence menu->addAction(action); // A-operation action->setMenu(submenu); // S-operation would result in an "Untitled" menubar item on macOS, and this regardless of when the submenu is populated. Change-Id: I43989f36f6bf3f0b7056310ac986c06f8e02f128 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * QMenuPrivate: Use in-class initializers where possibleGabriel de Dietrich2017-11-071-56/+31
| | | | | | | | | | | | | | | | | | Change-Id: I5347cb41443baf96e28bd399c84983a801b10fcd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * QMenuPrivate: Rearrange member variablesGabriel de Dietrich2017-11-071-53/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | This saves 32 bytes per instance on 64-bit macOS, from 888 down to 856 bytes. Change-Id: I2592631aa3566d2eab72bad338aacfe76bee8ef3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Remove a few more uses of deprecated QDesktopWidget APIsTor Arne Vestbø2017-11-171-2/+1
| | | | | | | | | | | | | | | | | | Change-Id: I3834ba7ce8f9bd7026f3d59f15d268b4c03e364a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix accessibility info for tri-state checkboxesAndre de la Rocha2017-11-141-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The state information provided by QAccessibleInterface::state() was not correctly reflecting the state of tri-state checkboxes: checkStateMixed was never set. This change fixes this issue and also adds accessibility update notifications for changes in checkStateMixed, which were missing. Change-Id: Ia4a114559d5a957ca85bf2f169a6cece2c98d077 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>