summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Add Qt::ImInputItemClipRectangle support to widgetsJan Arve Saether2016-05-023-2/+15
| | | | | | | | Let widgets respond to ImInputItemClipRectangle inputMethodQuery and notify about potential changes with QInputMethod::update() Change-Id: I01b2c53273df207d26107b237a7096fe53d1b0a5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-05-028-16/+17
|\
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-298-16/+17
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qml_module.prf mkspecs/features/qt_common.prf src/gui/text/qzip.cpp src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/windows/array.h src/testlib/qtestcase.cpp src/widgets/dialogs/qfilesystemmodel.h Change-Id: Ie41c5868415b81f7693c80e045497035504bb210
| | * Fix scroll regression near scroll-view endsAllan Sandfeld Jensen2016-04-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix regression in a7b0cb467ca5c4a9447d049910c9e3f0abc5897c which caused it to be hard to start scrolling at the ends of a scroll-view if using fine grained scrolling events. Change-Id: I55f3210150b993281545c3ad5a7356d892fa30b5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| | * qstyle: Make image description match the image.Sérgio Martins2016-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | The image shows 9 combo boxes, not 8. Change-Id: If229332e1708f624ad9f50fab0b78c011d94f31e Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
| | * Unhide QObject::parent() from QFileSystemModel and QIdentityProxyModelAlexander Volkov2016-04-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was hidden by overridden parent(const QModelIndex &) methods. See also 63b5082ea8e3e750af986f815474f7207006cb46 (Unhide QObject::parent() from QAbstract{Table,List}model). Change-Id: I8b6d4d4175e4d43ff269eaeb0b2b1a9fb8f44bab Task-number: QTBUG-45393 Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * Fix clang developer build due to -Winconsistent-missing-overrideSérgio Martins2016-04-281-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | The existing code keeps the overrides from each base class together, so also move them to the correct group after adding Q_DECL_OVERRIDE. Change-Id: I5d89fb4e7f9454ab0c9c6383f8245e64b95e84e9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * QFileDialog: Fix single-click activationPalo Kisa2016-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QFileDialogPrivate::_q_enterDirectory() the QStyle::styleHint() for QStyle::SH_ItemView_ActivateItemOnSingleClick was called w/o the widget. By such usage the possible StyleSheet setting was ignored, e.g. "QAbstractItemView { activate-on-singleclick: 1; }". Task-number: QTBUG-50871 Change-Id: I7a32c4841db7113f32c3823581c2becc1677e3cc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Change scroll and text areas to respect native wheel focus ruleMarko Kangas2016-04-263-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtWidgets][QAbstractScrollArea,QTextEdit,QPlainTextEdit] Changed focus to Qt::StrongFocus. That respects platforms' native guidelines. Task-number: QTBUG-52559 Change-Id: I2aa25d25bbc15facce85ceb7d4a4c1d0ac7df962 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | QWidgetTextControl: only show cursor when having focusRichard Moe Gustavsen2016-04-302-6/+18
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit d3dcc6f introduced a regression to QTextEdit, leaving it to always show the cursor regardless of focus. The reason is that QTextArea used to toggle visibilty by setting the cursor blink rate. What it really wanted to do was to set cursor visibility explicit. This patch implements function setCursorVisible, and updates the places that used to call setBlinkingCursorEnabled to instead call setCursorVisible (where it makes sense). Change-Id: I58ea965178d4faaf5b09f6f6a37a37d5e8b99c97 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-275-52/+96
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_win.cpp src/widgets/itemviews/qheaderview.cpp Change-Id: I0a59ade9cd6e91f770fdf298a7d72a41e79fd761
| * QWindowsVistaStyle: Fix CE_MenuBarItem with QStyleSheetStyle.Friedemann Kleint2016-04-231-1/+1
| | | | | | | | | | | | | | | | | | Do not paint over CE_MenuBarItem when the palette is set to transparent by QStyleSheetStyle. Task-number: QTBUG-49115 Change-Id: Ib364017179d0852490daad094361eae0ead4fd5f Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| * QFileSystemModel: fix updating QFileInfo for a node after a file renameAlexander Volkov2016-04-221-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the correct parent path for the renamed file when creating QFileInfo. It must be a path to the parent directory, not to the root directory of the model. Modify tst_QFileSystemModel::setData() to test renames in subdirs of the root directory of the model. Change-Id: I69d9e3a937616857a81617791ed118af3f6eea05 Task-number: QTBUG-52561 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Fusion style: Observe text alignment of QGroupBox.Friedemann Kleint2016-04-221-1/+17
| | | | | | | | | | | | | | | | Take alignment into account in QFusionStyle::subControlRect(). Task-number: QTBUG-49068 Change-Id: Ia8f2d06c46b24761bff537247bbadd3323e41fa9 Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
| * QWidget::grab(): Use device pixel ratio.Friedemann Kleint2016-04-221-1/+3
| | | | | | | | | | | | | | | | | | | | Return pixmaps with device pixel ratio similar to QScreen::grabWindow(), cf c0963486ce689e778d59dafd26d36d8ef9e3ee74. Adapt kernel tests accordingly. Task-number: QTBUG-52137 Change-Id: I9ce276d5e2d87ae0d39c8639267d1ac283fed854 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QHeaderView: fixing selection of reordered rows and columnsVyacheslav Grigoryev2016-04-211-48/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code incorrectly calculated visual region for a selection (specified by QItemSelection object) in case of reordered / swapped rows or columns. It used the leftmost and rightmost (upmost and downmost for vertical mode) logical indexes directly. However some middle logical index (in case of reorder) may be the leftmost or rightmost visual index. In such cases the repainting didn't work properly. This fix first checks whether reordering / swapping is in use. If it isn't (ie visual=logical) we use code similar to the old code. Otherwise the new code scans all selected logical indexes, translates them into visual ones and gets the correct leftmost and rightmost indexes. [ChangeLog][QtWidgets][QHeaderView] Fixed a repainting issue when items had been reordered. Task-number: QTBUG-50171 Change-Id: If6afabebf445cf32a8e0afe262b6ee149e7c4b2b Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-04-268-85/+96
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-258-85/+96
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test configure src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java src/corelib/global/qglobal.cpp src/widgets/kernel/qapplication.cpp src/widgets/styles/qwindowsvistastyle.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp Change-Id: I067083f34e5290aa5f7565e40c30a069cc37b83a
| | * QMacPinchGestureRecognizer - fix totalScaleFactorTimur Pocheptsov2016-04-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set totalScaleFactor on a pinch gesture (OS X) so that it works the same way as in 'standard' gesture recognizer and corresponds to what we document. [ChangeLog][QtWidgets] : QPinchGesture on OS X now behaves like on other platforms: totalScaleFactor is the magnitude of the pinch and scaleFactor is the delta for the current event. Task-number: QTBUG-48138 Change-Id: I66b9a1df05cbe106b76aed8f15d900bcdd41fdb7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * QMessageBox: Try to pass window handle to QIcon::pixmap().Friedemann Kleint2016-04-201-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Try to find a window handle so that the pixmap matching the device pixel ratio of the screen can be found. Task-number: QTBUG-52622 Change-Id: Iccf3cea82065af5e055d3cd932cd0808b29b15dc Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| | * QWindowsXPStyle: Enlarge QLineEdit/QComboBox when High DPI scaling is active.Friedemann Kleint2016-04-191-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QWindowsXPStyle::sizeFromContents(), scale the margins using the devicePixelRatio and round the height up. Typically increases the height by 2 pixels when the device pixel ratio equals 2. Change-Id: I446ad518c3808a6454a08db7b66a942d37c1703f Task-number: QTBUG-49374 Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
| | * QTabBar: Fix crash when the tab being dragged is deleted programmatically.Friedemann Kleint2016-04-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call QTabBarPrivate::moveTabFinished() from QTabBar::removeTab() to cancel any drag in progress to prevent crashes due to invalidated indexes. Task-number: QTBUG-52527 Change-Id: I5bd8cc6f55e5aea1f1a4710494ba5b92939a42ee Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * QWindowsXP/VistaStyle: Move the Vista treeview handling to ↵Friedemann Kleint2016-04-184-76/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowsXPStylePrivate. QWindowsXPStylePrivate maintains a list of theme handles for various style items. The derived class QWindowsVistaStylePrivate had logic to use a special helper window with the "explorer" window theme set to obtain the correct treeview arrow branch indicator (arrow shape for Vista as opposed to '+'/'-' on Windows XP) when creating the "TREEVIEW" theme. This required calling the helper function QWindowsVistaStylePrivate::initTreeViewTheming() before QWindowsXPStylePrivate::createTheme(), which is prone to errors and initialization order issues. This could be solved by making QWindowsXPStylePrivate::createTheme() virtual or similar, but since it the fate of QWindowsXPStylePrivate is most likely to be merged into QWindowsVistaStylePrivate; it was decided to move the entire special handling of the Vista treeviews into QWindowsXPStylePrivate. The existing enumeration value QWindowsXPStylePrivate::TreeViewTheme is renamed to QWindowsXPStylePrivate::XpTreeViewTheme and a new value QWindowsXPStylePrivate::VistaTreeViewTheme is added for which QWindowsXPStylePrivate::createTheme() invokes the special handling. This also removes the need to destroy the helper window in unpolish(), which should save some initializations. Task-number: QTBUG-52230 Change-Id: I0492ecf38fb3e5eabc4ecbdef70f0bf05e82e104 Reviewed-by: Adam Light <aclight@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| | * Fix detection of the proxy base style when QT_STYLE_OVERRIDE is setAlexander Volkov2016-04-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QProxyStyle checks QApplicationPrivate::styleOverride but ignores QT_STYLE_OVERRIDE when it is trying to detect the name of the base style. Set styleOverride from QT_STYLE_OVERRIDE to make it work. Thus there is no need to check QT_STYLE_OVERRIDE from multiple places. Change-Id: I2a64b5ff5443701f800ef5d2a9cb425068f909f1 Task-number: QTBUG-52596 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | QWidgetTextControl: respect run-time changes to cursorFlashTimeRichard Moe Gustavsen2016-04-252-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cursorFlashTime will now change dynamically from QPA while platform controlled text selection (on mobile) is ongoing. This patch will therefore update QWidgetTextControl so that it listens to the cursorFlashTimeChanged signal and changes the blinking rate when triggered. Change-Id: I89bdfaab0e93d1d055baba6b132a7911d2ae84f6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | | Darwin: set SH_BlinkCursorWhenTextSelected to false on DarwinRichard Moe Gustavsen2016-04-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When text is selected on e.g iOS or OS X, the cursor should not blink (or be visible), regardless of style. Note that SH_BlinkCursorWhenTextSelected is actually implemented to mean "hide cursor when text selected" in e.g QWidgetTextControl. If this is a bug or not is hard to say, but it is anyway the desired behavior on Apple platforms. Change-Id: I541dabbe1945c266107ba39e3adb006bec0258bf Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | | QWidgetLineControl: respect run-time changes to cursorFlashTimeRichard Moe Gustavsen2016-04-253-28/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cursorFlashTime will now change dynamically from QPA while platform controlled text selection (on mobile) is ongoing. This patch will therefore update QWidgetLineControl so that it listens to the cursorFlashTimeChanged signal and changes the blinking rate when triggered. The previous code had a function setBlinkingRate, which is now changed to setBlinkingCursorEnabled (like in QWidgetTextControl). This is because all callers of the function did either pass "QApplication::cursorFlashTime" or "0", which basically means enable or disable blinking. This moves the control of the blinking rate fully to QWidgetLineControl, which simplifies the code a bit, especially when cursorFlashTime can change. Note that when setting a blink period to 0, it means "show the cursor without blinking". AFAICS, the current implementation did not guarantee that. This is now made more explicit in the code. If hiding the cursor is needed, a separate function "setCursorVisible" is already available for controlling that. Change-Id: I7d39882de192a23e6e7ba370749892c7702c3d3b Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | | Android: don't iterate over .keys()Marc Mutz2016-04-251-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | ... iterate over the container itself instead. Avoids temporary QList creation as well as the lookup cost when actually calling value(key). Change-Id: I63a11e6f8f19919145ea142309ddbacd99c3bfc3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Android: eradicate Q_FOREACH loops [needing qAsConst()]Marc Mutz2016-04-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. To avoid detaches of these mutable Qt containers, wrap the container in qAsConst(). Change-Id: I9158c507f9249a7322b11c982bfcab1e6ed4a38a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Android: eradicate Q_FOREACH loops [already const]Marc Mutz2016-04-251-9/+9
|/ / | | | | | | | | | | | | | | | | ... (or trivially marked const) local variables, parameters, or data members with trivial loop bodies, by replacing them with C++11 range-for loops. Change-Id: I25e9e2148abd7676305ebd18754dc647f217e48b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QtWidgets: Fix qdoc warnings related to inputMethodQuery().Friedemann Kleint2016-04-212-1/+5
| | | | | | | | | | | | | | | | | | | | Mark the overloads taking an additional QVariant as \internal as (cf QTextEdit) and the overridden functions as \reimp. Amends change ab67a5b7b631709aae779c767a903b8982fa7f8e, fixes warnings: qtbase/src/widgets/widgets/qlineedit.cpp:1755: warning: Cannot find base function for '\reimp' in inputMethodQuery() / Change-Id: I9949bf3850ab4200ee500cbe33a44faacecc30b0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | QGuiApplication: don't force lower case styleOverrideJ-P Nurmi2016-04-151-1/+1
| | | | | | | | | | | | | | | | | | QtQuick Controls 2.0 is going to have capitalized style names (Material, Universal, ...) so move the toLower() call to QApplication where widgets make use of styleOverride. Change-Id: I5a8c5ee38517690728f5f8f01024d4e692c81668 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | QComboBox: Implement support for IM queries with QVariant argumentRichard Moe Gustavsen2016-04-142-0/+9
| | | | | | | | | | | | Change-Id: If59c36fa1b18a0d5562047dd06758fbcdbf63bc7 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | QTextEdit: update cursor and anchor rect upon scrollingRichard Moe Gustavsen2016-04-132-0/+2
| | | | | | | | | | | | | | | | | | | | Both cursor and anchor rect will change locally when scrolling. So inform IM about it, so that any overlay done from e.g the platform plugins for dealing with text selection etc. can respond to the change. Change-Id: I4e839e691a20ad07d2aa062e028d22cf5f31b7fa Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | QWidgetTextControl: implement support for pos argument to ImAbsolutePositionRichard Moe Gustavsen2016-04-131-4/+10
| | | | | | | | | | | | | | | | Implement support in QWidgetTextControl for the new API that lets you specify a position argument when querying for Qt::ImCursorPosition. Change-Id: I123e2522d33e783e6f3467b81be872e3620d6d15 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | QTextEdit: translate IM argument before passing it on to QWidgetTextControlRichard Moe Gustavsen2016-04-132-2/+38
| | | | | | | | | | | | | | | | | | | | Since we now have the possibility of providing an extra position argument when querying for Qt::ImCursorPosition, we need to ensure that we translate it from scroll view to local coordinates before passing it on to QWidgetTextControl. Change-Id: I4383ae3ea984b6140d8e9b4198047aec8b7e100b Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | QLineEdit: add support for Qt::ImAnchorRectangleRichard Moe Gustavsen2016-04-133-6/+31
| | | | | | | | | | Change-Id: I52e15aa40af5ff77306c43209af87a3e727d2bdb Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | QLineEdit: add support for ImCursorPosition with position argumentRichard Moe Gustavsen2016-04-132-3/+12
| | | | | | | | | | | | | | | | | | | | | | Follow up f8dbed12, and implement support for IM queries that can take an extra QVariant argument. We use this to implement support for ImCursorPosition with a QPointF argument that specifies that we should return the text position under the given point rather than the current cursor pos (0bb645b). Change-Id: I03ae7af698241f454d35dec84f248ecd5bb6ad51 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | QWidgetTextControl: implement support for Qt::ImAnchorRectangleRichard Moe Gustavsen2016-04-131-0/+2
| | | | | | | | | | | | | | | | Implement support in QWidgetTextControl for the new enum Qt::ImAnchorRectangle. Change-Id: I7978915454a6dd93b2f491ed15619016cda85c7e Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-04-135-26/+24
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-135-26/+24
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/testlib/qtestcase.cpp src/testlib/qtestcase.qdoc Change-Id: Ied3c471dbc9a076c8de33d673bd557e88575609d
| | * QTreeView: re-use cached values in rowsInserted()Marc Mutz2016-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parentRowCount and the delta were already calculated a few lines up, so don't recalculate them here. This improves performance (rowCount() is a virtual function), as well as readability (delta is more readable than end - begin + 1). Change-Id: Iabe88852a61f7ef52139e1ba446e9d3f87d6bd04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * Improve grammar in QUndoStack::beginMacro() documentationMitch Curtis2016-04-111-1/+1
| | | | | | | | | | | | | | | Change-Id: I4e27014a9a39abc03cee25f9753a46225efa43b9 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
| | * Remove QDateTimeEditPrivate's duplication of QDateTimeParser code.Edward Welbourne2016-04-081-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Both constructors set up the first, last and none members. QDateTimeEditPrivate wants first.pos = 0, different to its base, so keep that, but the rest merely duplicated. Change-Id: Ice22e0495112dc3427eb35b5b73420f42d7dafc1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * QDateTimeEditPrivate: make clear which overrides are for which base.Edward Welbourne2016-04-081-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The class does multiple inheritance and over-rides virtuals from both bases; it also declared the over-rides virtual rather than declaring them to be over-rides; so deploy Q_DECL_OVERRIDE and, while changing those lines, move them all together and document which belong to which base. Change-Id: Ica3958d6d24124a537983e7e94fce642284f1f24 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * QDateTimeParser: new Section mask values simplify code.Edward Welbourne2016-04-082-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Various |s of existing section flags were used repeatedly; naming these masks makes the relevant code easier to read. In QDateTimeEdit, add a comment to make clear that its Section enum is based on QDTP's. Change-Id: Ifd8364cd396a6d0d5ed7ae7dc4d31690f77edd30 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Use takeFirst() instead of first() with removeFirst()Anton Kudryavtsev2016-04-131-2/+1
|/ / | | | | | | | | | | | | | | Reduce code size and improve readability. Change-Id: I5ec035a39cb607f15748aaa08d73f1c1bc8e4ad8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtBase: use erase and std::remove_if with QList and QVectorAnton Kudryavtsev2016-04-083-16/+22
| | | | | | | | | | | | | | ... instead of using removeAt in a loop, with quadratic complexity. Change-Id: I38b49e56b12c396db9fc0f1b75d8fb43c503a7f6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | add cross-platform tablet->mouse event synth; enable on AndroidShawn Rutledge2016-04-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's urgent to fix the issue that on Android, it became impossible to interact with any widget or MouseArea which handles only mouse events but not tablet events, using the stylus, because stylus events are sent only as QTabletEvents. Before 5.6 (change 01d78ba86a631386a4d47b7c12d2a359da28f517) they were sent as touch events, and mouse events were synthesized from those. Whereas on other platforms, every QTabletEvent is followed by a synthesized QMouseEvent. This fix proceeds in the direction that event synthesis should be done in cross-platform code so that platform plugins don't have to repeat it, following the same pattern as for touch->mouse synthesis. Just as in that case, the application can disable it, and the platform plugin can also report that it's unnecessary for Qt to do the synthesis because the platform already does. So QTBUG-51618 is fixed, but QTBUG-47007 requires us to remove the tablet->mouse synthesis from all platform plugins, because the plugin does not know whether the tablet event was accepted or not, so it does not have enough information to decide whether to synthesize a mouse event. Synthesis has been unconditional until now, which contradicts what the documentation says: the mouse event should be sent only if the tablet event is NOT accepted. We can now gradually make this promise come true. [ChangeLog][QtCore][Tablet support] A synthetic mouse event will no longer be sent after every QTabletEvent, only after those which are not accepted (as documented). Task-number: QTBUG-47007 Task-number: QTBUG-51618 Change-Id: I99404e0c2b39bbca4377be6fd48e0c6b20338466 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-0714-119/+168
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qftp.cpp src/widgets/itemviews/qheaderview.cpp src/widgets/itemviews/qlistview.cpp tests/auto/network/access/qftp/tst_qftp.cpp Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9