summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* QFormLayout: honor vertical expanding size policyChristian Ehrlicher2019-02-141-1/+1
| | | | | | | | | | | | | | | | | QFormLayout did not honor the vertical expanding state for widgets. Therefore e.g. a QTextEdit was not expanded vertically when it was inside a QFormLayout but worked fine inside a QGridLayout. It was honored when a stretch factor was set though. Fix it by not adding a dummy stretch item when one item is expanding. [ChangeLog][QtWidgets][QFormLayout] Honor the vertical expanding state of a widget inside a QFormLayout. Fixes: QTBUG-72676 Change-Id: If4456145918afa5a10435063770cc93bb9315fbe Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* QStyleSheet/QToolbox: don't overlap text and iconChristian Ehrlicher2019-02-131-0/+5
| | | | | | | | | | | | | When an icon was specified with a style sheet, the content rect for the toolbox label was not adjusted which results in an overlapping of the text and the icon. Fix it by adjusting the rect used by drawing the label when an icon is specified with a style sheet. Fixes: QTBUG-40871 Change-Id: I088b319e6355d78066d0bc4472882a5d9a599091 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
* Remove eval modeKai Koehne2019-02-123-17/+0
| | | | | | | | | | The evaluation mode of Qt hasn't been used since quite some time. Let's just remove the remaining logic from the code base. Change-Id: I61a2c432cbae78bf973f882848b3732e27431351 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLineEdit: don't emit editingFinished if nothing was doneSamuel Gaist2019-02-123-5/+18
| | | | | | | | | | | | | | | | | | | When a modal dialog is called from a slot connected to the editingFinished signal, the chain of events resulting from the focus returning to this widget will make the editingFinished signal emitted again. This patch uses a new variable to keep track of the fact that there was a modification. Once editingFinished was emitted, that flag is cleared so next time the signal will be emitted again only if a modification was made to the line edit content. [ChangeLog][QtWidget][QLineEdit] Behavior change: now the editingFinished signal is emitted only once after the line edit content was edited. Fixes: QTBUG-40 Change-Id: Ia4760bad8717f1758c3939132c446b4b4c6cd498 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove old dead codeAllan Sandfeld Jensen2019-02-082-7/+0
| | | | | | | | Nothing references this, not even commented out debug code, and some functions doesn't even have implementations. Change-Id: I344de26a650b1180f0da78eaece5bd5688fdcd95 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QtWidgets/Graphics-/ItemViews: mark obsolete functions as deprecatedChristian Ehrlicher2019-02-0510-7/+38
| | | | | | | | | | | | | | | Mark some long obsolete functions as deprecated so the can be removed with Qt6: - QGraphicsItem::matrix()/setMatrix()/resetMatrix()/sceneMatrix() - QGraphicsItemAnimation::reset() - QGraphicsScene::isSortCacheEnabled()/setSortCacheEnabled() - QAbstractItemDelegate::elidedText() - QAbstractItemView::setHorizontalStepsPerItem()/horizontalStepsPerItem() - QAbstractItemView::setVerticalStepsPerItem()/verticalStepsPerItem() Change-Id: I7244078552ebeac9dfbcf3291b3ae0c44cc2c1d9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QtWidgets: replace 0 with \nullptr in documentationChristian Ehrlicher2019-02-0512-88/+90
| | | | | | | | | Replace 0 with \nullptr in the documentation. As a drive-by also replace some 0 with nullptr in the corresponding code. Change-Id: I5e5bc1ae892f270d7c3419db1c179053561f1b26 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QtWidgets documentation: cleanupChristian Ehrlicher2019-02-0520-114/+104
| | | | | | | | | Cleanup the QtWidgets documentation: - use new signal/slot syntax - use range-based for loop instead foreach Change-Id: I621b1ddac108d3df676209241d93d9b4f04a25fe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtWidgets: replace 0 with \nullptr in documentationChristian Ehrlicher2019-02-0212-117/+120
| | | | | | | | | Replace 0 with \nullptr in the documentation. As a drive-by also replace some 0 with nullptr in the corresponding code. Change-Id: Id8056dc2364a372e40bc04e8cb9fcc443e49fb18 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QtGui/QPainter: mark obsolete functions as deprecatedChristian Ehrlicher2019-02-021-3/+1
| | | | | | | | | | | | | | Mark some long obsolete functions as deprecated so the can be removed with Qt6: - initFrom() - setMatrix()/matrix()/deviceMatrix()/resetMatrix() - setWorldMatrix()/worldMatrix()/combinedMatrix() - setMatrixEnabled()/matrixEnabled() - drawRoundRect() - setRedirected()/redirected()/restoreRedirected() Change-Id: I0daed72c0ef06c192309f02366a7201154e75ac9 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QtGui: mark obsolete QPixmapCache::find() functions as deprecatedChristian Ehrlicher2019-02-025-19/+35
| | | | | | | | | QPixmapCache::find(QString) and QPixmapCache::find(QString, QPixmap&) are deprecated since Qt4 times. Explicit mark them as deprecated so they can be removed with Qt6. Change-Id: Iaf185f69afe02203559a1c812fbb4a95c9049a1d Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Merge dev into 5.13Paul Wicking2019-02-0126-104/+133
|\ | | | | | | Change-Id: I8113c6d8735a151bd152e6096f8c8b8e63a05474
| * QtWidgets: replace 0 with \nullptr in documentationChristian Ehrlicher2019-01-2816-49/+52
| | | | | | | | | | | | | | | | | | | | Replace 0 with \nullptr in the documentation. As a drive-by also replace some 0 with nullptr in the corresponding code. Change-Id: I8d7e9c838da1399988a830669d58fc7f2f010696 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Merge "Merge remote-tracking branch 'origin/5.12' into dev" into ↵Liang Qi2019-01-2811-55/+81
| |\ | | | | | | | | | refs/staging/dev
| | * Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-2611-55/+81
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Change-Id: I4c9679e3a8ebba118fbf4772301ff8fde60455b9
| | | * QAbstractItemView: fix rendering centered/right aligned item textChristian Ehrlicher2019-01-241-13/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5712c62d1cfdcf56c772d8a63d52ad58945f194c introduced a regression for item texts which were aligned right or horizontally centered. The layoutRect was calculated wrong and started below zero and later the correct x offset could not be calculated since QTextLine::x() does not return a calculated value. Fix it by first calculating the complete string and pass it completely to QTextLayout::draw() instead trying to draw the single lines on our own - QTextLayout has a better working algorithm so no need to reinvent the wheel here. [ChangeLog][QtWidgets][ItemViews] Fixed a regression with wrongly drawn centered/right aligned item texts Fixes: QTBUG-34133 Fixes: QTBUG-56759 Fixes: QTBUG-72805 Fixes: QTBUG-72869 Change-Id: I0ed521c3a9d35446d190ac22aa9f2374814fd278 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-01-238-36/+29
| | | |\ | | | | | | | | | | | | | | | Change-Id: Icebd151eae0cf9d400319a42573290d1a911ce26
| | | | * Merge remote-tracking branch 'origin/5.12' into 5.12.1Liang Qi2019-01-0818-83/+227
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qtooltip.cpp Change-Id: Ic2f9a425359050eb56b3a4e5162cf5e3447058c8
| | | | * | Drag'n'Drop: fix dnd when dragMoveEvent() is not implementedChristian Ehrlicher2019-01-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The refactoring of dnd with f8944a7f07112c85dc4f66848cabb490514cd28e added a regression which results in a need to reimplement dragMoveEvent() on the drop side. Before this change it was possible to accept the dnd in dragEnterEvent() without again accepting it in dragMoveEvent(). Fix it in a similar way it's done in QGuiApplicationPrivate::processDrag() by prefilling the first simulated QDragMoveEvent with the values from the previous QDragEnterEvent before it is sent to the drop receiver. Fixes: QTBUG-72844 Change-Id: I1300dd02b7f1d9dcd44ecefa8335f92ad6c6cafa Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | | | * | Revert "QListView: Honor css :first/:middle/:last Pseudo-States"Christian Ehrlicher2019-01-041-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1aa3edf3f888f394040d32d4a211257f9e9e2791 since it created a regression within the windows styling. Task-number: QTBUG-27110 Fixes: QTBUG-72748 Change-Id: I7e5004be6cf398ef0b533a25066d924310ed1e48 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | | * | Doc: Restore documentation for QTest functions in other modulesTopi Reinio2019-01-042-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Test library sources specific to Core, GUI and Widgets modules were moved around in commit 88867e39b. The new source locations must be referenced in Qt Test documentation configuration. The same sources are excluded in their original doc projects, and the related snippet file is moved over to qttestlib. The commit also fixes the remaining documentation issues for Qt Test. Change-Id: Ibe011aa83639e574d647f12bc9e53e618781bce6 Reviewed-by: Martin Smith <martin.smith@qt.io>
| | | | * | Restore behavior for QToolTip not wrapping by defaultKai Koehne2019-01-041-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts 7a1d77b6e4ec38ae8fc17, which caused regressions e.g. in Qt Creator. The behavior of QToolTip for wrapping has been always special in that wordWrap was enabled as soon as some HTML tags were detected, while plain text was not wrapped. This is arguably bad API, but by now a lot of applications depend on this exact behavior, so I don't think it's worth to change this anymore. What can be kept though is the check for overlong tooltips that do not fit on the screen. In this case wrapping makes sense. [ChangeLog][QtWidgets] Reverted a Qt 5.12.0 behavior change in QToolTip that made plain tooltip text be wrapped automatically. Fixes: QTBUG-72568 Change-Id: I6fa3e455f09cffaeb8ad1cdc6e81d71ae344dd34 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | | * | Doc: Fix linking errors qtbaseNico Vertriest2019-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I225e59bea0a8eac14fd11ef2b091907ae955c447 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| | | | * | Doc: Add missing \since to QLineEdit's inputRejected signalPaul Wicking2018-12-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signal was introduced in 5.12.0, according to qtbase/dist/changes-5.12.0 (which refers to QTBUG-57448). Also confirmed in qtdoc/doc/src/whatsnew/whatsnew512.qdoc. Added in commit c901cdadc0a. Fixes: QTBUG-72386 Change-Id: I291dfefe40eea0e9208bda6eed6dd96e41ba6d2b Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | | * | Bump copyright year to 2019Kai Koehne2018-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-72635 Change-Id: Idc9bd97fe873b332d7ff72cb44a00334a472404f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | | * | | Fix resolve() on fonts returned from QWidget::font()Allan Sandfeld Jensen2019-01-223-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the inherited properties as resolved on the font, so non-default values are passed on in contexts that does resolve logic like QPainter. One test is updated as it actually tests what it is supposed to on more configurations. Fixes: QTBUG-39560 Change-Id: Ief668e992ccdc091337a259a4c1306a00e67c73f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | | | QFileDialog: Fix deprecation warningFriedemann Kleint2019-01-291-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: dialogs/qfiledialog.cpp:3698:43: warning: ‘QDir& QDir::operator=(const QString&)’ is deprecated: Use QDir::setPath() instead [-Wdeprecated-declarations] dir = getEnvironmentVariable(path2); Change-Id: If8d93374cf2900974bcbd14caf2b1ef488409518 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* / / / / QMdiSubWindow: Avoid potential shaking motion when moving windowChristian Andersen2019-01-281-2/+5
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using QMouseEvent::pos to change the position of a widget, the widget may shift in a shaking motion. This is warned about in its documentation. For example if the system has a bit of load, we might receive multiple mouse move events from the OS, before QMdiSubWindow gets the first move event. In that case the first mouse move is ok, but subsequent move events, will use a ::pos value that now does not make sense as the position of the window have changed. The fix is to use QMouseEvent::globalPos. Fixes: QTBUG-72646 Change-Id: I3211cc6627ff8fe26c9520ad0457872f01c32471 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | QDrag: mark QDrag::start() as deprecatedChristian Ehrlicher2019-01-232-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDrag::start() is deprecated since Qt4. Therefore annotate it with Q_DEPRECATED so it can be removed in Qt6. Change-Id: I5b82c482fa579f357cc67e38b86e6fe587f18ded Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-2121-56/+96
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ibfcb30053f3aacb8ec2ec480e146538c9bf440ea
| * | | Documentation: Add \nullptr macro and use where applicableFriedemann Kleint2019-01-1019-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt for Python users reading the documentation assume that int(0) can be passed for pointer parameters. Use the newly introduced \nullptr to disambiguate this. In a follow-up step, the \nullptr macro can be defined as None when generating the Qt for Python documentation. Task-number: PYSIDE-903 Change-Id: I3a45f87175a0668ab5f3f95f0aff409f7e3ef027 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | | Emit paletteChanged and send ApplicationPaletteChange on theme changeTimur Pocheptsov2019-01-082-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-72575 Change-Id: I407e081295a456a7bdd36de91ca5bbf74bba6078 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | | QSplashScreen: Fix positioning in multimonitor setupsFriedemann Kleint2019-01-081-10/+47
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, QSplashScreen::setPixmap() used QDesktopWidgetPrivate::screenGeometry().center() to determine the screen position, which would always result in the primary screen being used. That is counter to the documentation of QSplashScreen(QWidget *, QPixmap), which states that a desktop screen widget can be passed as parent to set the screen. To fix that and make it easier to work with QScreen (which is the likely outcome of QTBUG-62094), extract the setPixmap() to QSplashScreenPrivate with an additional QScreen * parameter and add a helper to determine it. Do not set a position in case no parent was passed so that QPlatformWindow::initialGeometry() triggers, centering it over the cursor. Fixes: QTBUG-72819 Task-number: QTBUG-62094 Change-Id: Ic38cfecd24c3ff6b82dff37702b627c5a50a3e1d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Don't treat the ampersand in a titlebar as a mnemonicAndy Shaw2019-01-086-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the mnemonic has no meaning when it is in a dockwidget title, we should just treat it as a literal ampersand instead and display it as such. Fixes: QTBUG-54485 Change-Id: I96c856ce2771a68d226f48f8f47affc24f1c53cd Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Doc: replace QItemDelegate with QStyledItemDelegateChristian Ehrlicher2019-01-0612-22/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since QStyledItemDelegate should be preferred over QItemDelegate the documentation should point to QStyledItemDelegate instead. Also mark some internal classes which derive from QItemDelegate so they will not be forgotten during Qt6 porting. Change-Id: I2dd17feedf8593afac5ca16d2546e1f0bc0250ae Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | QProgressDialog: remove unused QCursor memberChristian Ehrlicher2019-01-061-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The private member parentCursor was not populated since Qt4 times. This lead to an unexpected behavior: When QProgressDialog::reset() was called and value() was greater than 0, the cursor of the parent was set to a default-constructed QCursor. Therefore remove QProgressDialogPrivate::parentCursor. Fixes: QTBUG-72660 Change-Id: I195688300e07ddbbb7c17a9f471513c542269c2a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | QFormLayout: honor Qt::AlignHCenter for labelAlignmentChristian Ehrlicher2019-01-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QFormLayout did not handle Qt::AlignCenter, only Qt::AlignLeft/Right for the labelAlignment property. Therefore also add the code for Qt::AlignHCenter to be consistent Fixes: QTBUG-2780 Change-Id: I0d6dd61ba583e3ee37a003fae000d992505c08d1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-0413-74/+214
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also blacklist tst_QRawFont::unsupportedWritingSystem() and tst_QGlyphRun::mixedScripts() on windows for now. Conflicts: qmake/generators/makefile.cpp src/corelib/itemmodels/qstringlistmodel.cpp src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp tests/auto/gui/text/qglyphrun/BLACKLIST tests/auto/gui/text/qrawfont/BLACKLIST Task-number: QTBUG-72836 Change-Id: I10fea1493f0ae1a5708e1e48d0a4d7d6b76258b9
| * | Respect roles of buttons added to QMessageBoxVitaly Fanaskov2019-01-033-15/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a button added to QMessageBox has AcceptRole or YesRole, the signal accepted() will be emitted upon click on the button. If the button has RejectRole or NoRole, the signal rejected() will be emitted upon click on the button. If a button has a different role, neither accepted() nor rejected() will be emitted. This works for both standard and custom buttons. The signal finished() with result code will be sent regardless of a clicked button role. Also added documentation strings for some methods of private classes in order to have better tooltips in IDE(s). Task-number: QTBUG-44131 Change-Id: I521a4e5112eb4cf168f6fbb4c002dbe119aeeb09 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | QDialog: Pass transient parent as a parent to native dialogsAlexander Volkov2018-12-242-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes it's needed to show a native dialog for another process, for example in xdg-desktop-portal-kde. In this case we have WId of a parent window which can be used for calling QWindow::setTransientParent(QWindow::fromWinId(...)). Pass this transient parent to a native dialog so it could use it as a transient parent for itself. Rename QDialogPrivate::parentWindow() for clarity. Change-Id: I68974ddea35f9366a0ddffe602d9d028f45e26fa Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Doc: Fix typo in QStyleKai Koehne2018-12-221-1/+1
| | | | | | | | | | | | | | | Change-Id: Ic979cb66acb3f8824aefb6ad858c0f746ce3e02b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * | Pass the alignment to QFontMetrics::elidedText()Andy Shaw2018-12-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When the text is elided, it needs to account for the mnenomic if there is one so it does not end up eliding the text unnecessarily. Change-Id: I77c15067f3e8d57d8deca83090bcb80554c3733f Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | QToolTip - set correct screen before resizeThorbjørn Lund Martsum2018-12-185-19/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to get a correctly not truncated size we need the hint to be calculated based on the screen it is about to be shown on. This patch places some code in QWidgetPrivate that is used by QMenu and QToolTip + can be used to solve similar problems in the future. Task-number: QTBUG-72306 Change-Id: I58c058761f71b4a7675b6a078be62aa813ead752 Reviewed-by: Morten Kristensen <msk@nullpointer.dk> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | QTableView: Fix keyboard navigation with disabled rowsChristian Ehrlicher2018-12-182-32/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keyboard navigation with MovePageUp/Down and MoveEnd did not honor disabled cells in all cases which lead to inconsistencies in the navigation (esp. since MoveHome does honor them correctly). Therefore make sure that all four move operations work consistent by refactoring the code to use common functions. Fixes: QTBUG-72400 Change-Id: I63fa3b626510d21c66f4f9b2b1bfb3261728ecaf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | QRegularExpression: anchor wildcard patternSamuel Gaist2018-12-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation of wildcardToRegularExpression doesn't anchor the pattern which makes it not narrow enough for globbing patterns. This patch fixes that by applying anchoredPattern before returning the wildcard pattern. [ChangeLog][QtCore][QRegularExpression] The wildcardToRegularExpression method now returns a properly anchored pattern. Change-Id: I7bee73389d408cf42499652e4fb854517a8125b5 Fixes: QTBUG-72539 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Remove unused pointers for PressDelayHandlerAlejandro Exojo2018-12-312-5/+0
| | | | | | | | | | | | | | | Change-Id: I7e2fcf828c6027737b176aa566ebd7e48c7953e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | QbstractItemView: Allow Key_Space for keyboardSearch()Christian Ehrlicher2018-12-251-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keyboard search in QAbstractItemView did not handled Key_Space because this is also an edit trigger. It was also consumed if no edit was started. This patch changes this behavior and triggers the keybaord search when the editing was not started. Fixes: QTBUG-48505 Change-Id: I58e0d283f863c9b12ac5d2f6171f15522bd7c30a Reviewed-by: David Faure <david.faure@kdab.com>
* | | QTreeView: fix keyboard navigation when first or last item is disabledChristian Ehrlicher2018-12-252-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keyboard navigation did not consider the disabled state when trying to find the new index under all circumstances. This lead to a non-working PageUp/Down/Home/End navigation when the first or last item was disabled or hidden. Fix it by explicitly checking if the calculated item is hidden/enabled and skip it in this case. Fixes: QTBUG-44746 Fixes: QTBUG-34832 Change-Id: Ifa3b64a405e67b792db5db9d186d426fcfe183fb Reviewed-by: David Faure <david.faure@kdab.com>
* | | QTabWidget: properly horizontally align tab iconChristian Ehrlicher2018-12-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an icon used for a QTabWidget is smaller than the default size, it was not properly aligned horizontally although it was done for the vertical alignment. Therefore also align it horizontally to be consistent. Fixes: QTBUG-38108 Change-Id: I0e2e3af7ead699f2834aed1d8b67cbe775c897af Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Styles: replace deprecated QPalette functionsChristian Ehrlicher2018-12-174-63/+63
| | | | | | | | | | | | | | | | | | | | | | | | QPalette::foreground()/background() are deprecated since 5.13 - replace those functions with their successors. Change-Id: I158b6403437d3d48c0859360823133ca4ced2c23 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>