summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* QCommonStylePrivate::viewItemSize: fix text height calculationChristian Ehrlicher2018-01-172-0/+10
| | | | | | | | | | | QCommonStylePrivate::viewItemSize did not adjust the width when the item had a decoration or a checkbox. This lead to a too big width used for the layouting and therefore sometimes the calculated height was too small. Task-number: QTBUG-30116 Change-Id: I4468daa9820b9a8aa00fe959ab9b73fec23cc24e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@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>
* QItemDelegate::doLayout: only call QStyle::pixelMetric() onceChristian Ehrlicher2018-01-162-10/+16
| | | | | | | | | | | | QStyle::pixelMetric(QStyle::PM_FocusFrameHMargin) was called three times in the worst case but it returns a constant value. Therefore cache this value and call pixelMetric() only once. Since this code is duplicated from QCommonStylePrivate::viewItemLayout() also change it there. Change-Id: I6d5f0a8d2b1373bd36f0520f404e6a3cb0794f12 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* qstylesheet: remove a few unneeded memory allocationsSergio Martins2018-01-131-11/+6
| | | | | | | | One foreach too many, creating a temporary container. Converted to range-loop, as drive-by change. Change-Id: Ie2bb94a7147edcfc0d8b5f479604f5ebe113d7cb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* doc: Add template clause to qstyleoption_cast functionsMartin Smith2018-01-121-4/+4
| | | | | | | | clang-qdoc requires the template clause in \fn commands for template functions. Change-Id: I4999fdbd3e12d883b5a4e0d68509cbcf919a31b0 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Remove several uses of '/' as continuation characterMartin Smith2018-01-121-8/+4
| | | | | | | clang-qdoc doesn't need continuation characters in \fn commands. Change-Id: I25e262451822e3d4e2bce8866bcbd5540458844b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Add missing template clauses in qitemeditorfactory.cppMartin Smith2018-01-121-6/+6
| | | | | | | Added several missing template clauses to member functions. Change-Id: I95b46de84c9afa74b74fc36818094b0fff41f755 Reviewed-by: Topi Reiniö <topi.reinio@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-127-27/+33
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-117-27/+33
| |\ | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into ↵Liang Qi2018-01-115-7/+30
| | |\ | | | | | | | | | | | | refs/staging/5.10
| | | * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-095-7/+30
| | | |\ | | | | | | | | | | | | | | | Change-Id: I840849c072075a69819eb185b20bc42c3de0f825
| | | | * Clarify behavior of setData in QListWidget, QTableWidget, and QTreeWidgetKavindra Palaraja2018-01-093-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setData()'s default implementation for QListWidget, QTableWidget, and QTreeWidget treats Qt::EditRole and Qt::DisplayRole as referring to the same data. Used the same sentence from QStandardItem::setData for consistency. Task-number: QTBUG-11549 Change-Id: I41d06bdaaa8e7d4a86e24147b3d8222ad7823a6c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | | * QFileSystemModel/Windows: Make file name checking case-insensitiveFriedemann Kleint2018-01-092-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a special hash modeled on the one used for QFileSystemWatcher on Windows. Task-number: QTBUG-31103 Task-number: QTBUG-64147 Change-Id: I69ebabe841716e4957ae3fb04fa5c43d233a3552 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | | 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>
| | * | QStyleHelper: Use palette cache key in pixmap keyGabriel de Dietrich2018-01-051-20/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d7bcdc3a442b99c2caebd4cfd38de67e14090e05. Now that QPalette::setBrush() is a bit smarter (see c564779c071b35fddb76f4e50afda4305b634651), we can be confident the palette's cache key won't change so often. Therefore, we can use it again as part of every pixmap's cache key. Change-Id: I5cab2296a937f9149c7745291e0442eea24f4e9d Task-number: QTBUG-65475 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Add more Q_FALLTHROUGH()Friedemann Kleint2018-01-1216-23/+24
|/ / / | | | | | | | | | | | | | | | | | | | | | Silence g++ 7.X warnings. Change-Id: Id06d06e7e3b5be2cf3934d81f1891da58dea2649 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QHeaderView: fix visualIndexAt() in rtl-modeChristian Ehrlicher2018-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | QHeaderView::visualIndexAt() did not calculate the correct position in right-to-left mode. This lead e.g. to missing vertical grid lines in QTableView/Widget when scrolling horizontally. Change-Id: Ia50e5cfd7830a6ad8abd17ff79d9fbb33dc4097c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Avoid useless casts to/from uintChristian Ehrlicher2018-01-093-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | QStyledItemDelegate: adjust editor geometry also in LTR-modeChristian Ehrlicher2018-01-061-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The editor geometry was adjusted to a proper size in RTL-mode, but not in LTR-mode. To fix this inconsistency, the geometry is now also adjusted in LTR-mode to make sure the editor has enough space for the min/max values for the given datatype. Task-number: QTBUG-37433 Change-Id: Iff41e854f2fa2104ab5c589d24780facc3ed5815 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | QHeaderView: respect min/maximumSectionSize propertyChristian Ehrlicher2018-01-061-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QHeaderView::resizeSection() did not check if the given section size is inside the min/max property bounds. Also on calling setMin/MaximumSectionSize() the current section sizes were not checked if they are inside the new given bounds. This is a small behavior change when a user is setting the section size via resizeSection() without respecting the min/maxSectionSizes. Task-number: QTBUG-64173 Change-Id: Ia9c9eebf058d60c776ab5f8f8336642013ec553f Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | | Add an option to scroll the QComboBox on macOS with the mouse wheelAndy Shaw2018-01-054-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-042-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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 devLiang Qi2018-01-041-1/+1
|\| | | | | | | | | | | Change-Id: I644cd82b0d952b7d139e0228bf5017f147db77e7
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-041-1/+1
| |\| | | | | | | | | | Change-Id: I3fa5c9e216201bdf7da260c395f65d7fb95cba0b
| | * QTreeView: Fix QTreeViewPrivate::itemAtCoordinate()Christian Ehrlicher2018-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTreeViewPrivate::itemAtCoordinate() did not calculate the correct item when non-uniformRowHeights is enabled and vertical scroll mode is ScrollPerPixel. This results e.g. in an activation of the item above when the click happens on the very first pixel line of an item. Another, more problematic effect was that once a drop happened on the very first line of an item, QAbstractItemViewPrivate::dropOn() calculated the root as the drop index because the visualRect of the calculated item is compared with the drop position which did not match. Task-number: QTBUG-57538 Change-Id: If89571bf0fb76fc01d60ba7139f1d985b49d70db Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | | QTreeWidget: fix visualItemRect()Christian Ehrlicher2018-01-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTreeWidget::visualItemRect() returned an invalid QRect when a column was moved and then hidden (or the other way round). The reason was that the logical index returned by QHeaderView::logicalIndexAt() was again passed to QHeaderView::logicalIndex() to create the QModelIndexes needed for QTreeView::visualRect() Task-number: QTBUG-28733 Change-Id: I8676f21bcab8c05c2260b85d483902f18cbf3e24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | | QToolButton: adjust menu indicator in RTL-modeChristian Ehrlicher2018-01-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The menu indicator was not adjusted in RTL-Mode to be on the left side of the text. Use visualRect() to adjust the rectangle before drawing the PE_IndicatorArrowDown. Task-number: QTBUG-50084 Change-Id: I20129499f111d06637c98ede23b4635a3fc34a6c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | QItemViews: Add ability to show QJsonValue::Bool/DoubleChristian Ehrlicher2018-01-031-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Q(Tree|Table|List)View was able to display a simple QJsonValue::String, but not QJsonValue::Bool/Double. This is an inconsistent behavior which is fixed with this patch. Task-number: QTBUG-65082 Change-Id: I22c2fe2890f11e283cae4f7ea947aa67ff36f367 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2018-01-0217-179/+272
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-0217-179/+272
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3014-175/+267
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | * QGestureManager: fix UB (invalid pointer comparison)Marc Mutz2017-12-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comparing pointers with op< that do not point into the same array is UB. Fix, in the usual way, by using std::less. Change-Id: Id2c957557719887b2016632d683dbab8af07b34c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Widgets: check if parent exists before calling parent->locale()Richard Moe Gustavsen2017-12-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a top level, parentless widget has Qt::WA_WindowPropagation set, Qt will crash when trying to resolve the widgets locale. The reason is that we try to access the QLocale of the non-existing parent. This patch will add a check if a parent exists before trying to access it. Task-number: QTBUG-61213 Change-Id: I09a6351a12dc1fffab3069b70e3d7b3932317c85 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * 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>
| | | * QTreeView: Make sure QHeaderView is notified on layoutChanged()Christian Ehrlicher2017-12-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QHeaderViewPrivate::_q_layoutChanged() was not called when used in a QTreeView because it was explicitly disconnected in setModel(). The disconnect was added sometime prio to Qt 4.3, but there the signal was connected to the doItemsLayout() slot. This was correct since QTreeView::doItemsLayout() is calling header->doItemsLayout(). In Qt 4.3.0 _q_layoutChanged() was introduced and the disconnect was adjusted. But since _q_layoutChanged() is doing much more than doItemsLayout() (e.g. restoring hidden sections), functionality was lost. The problem was already observed for Qt 4.6 (QTBUG-18196) but only partially fixed. Task-number: QTBUG-41124 Task-number: QTBUG-54610 Change-Id: Id13a9930d0163812e12a0287016bab9c3aa02068 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| | | * QStyleSheetStyle: Draw menu item also when font is setFriedemann Kleint2017-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-64055 Change-Id: I0674e7b43bb56aa1834c8df10794714dbcc4e5e3 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | * QFileSystemModel: Enable experimental code path for per-file watchingFriedemann Kleint2017-12-142-18/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFileSystemModel had a #ifdefed out experimental code path for watching single files to track changes in size, which got outdated over time. Replace the #ifdef 0 by a check for the environment variable QT_FILESYSTEMMODEL_WATCH_FILES, fix it up and apply some fixes to related code to make it work: - Split file names signaled by QFileSystemWatcher on '/' always. - Do not instantiate QDirIterator on "", which means "current directory" and results in mixed-up directories. - Check on lastModified() in QExtendedInformation::operator==() so that changes trigger an update in _q_fileSystemChanged(). - Fix the #ifdefed out part to compile and not to add directories to the watcher. [ChangeLog][QtWidgets][QFileSystemModel] It is now possible to enable per-file watching by setting the environment variable QT_FILESYSTEMMODEL_WATCH_FILES, allowing to track for example changes in file size. Task-number: QTBUG-46684 Change-Id: Ia5da9170866416c9529251f889814b23d7a7d069 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * Share QWidget update and repaint code for QRect and QRegionTor Arne Vestbø2017-12-142-46/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidgetBackingStore::markDirty has an optimization for QRect, so we don't want to unify these two functions by calling update/repaint(QRegion(rect)). Change-Id: Id2a42f478f71863da45697041e0ab0130c74b9d2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * QWidget: Remove dead code for handling painting without a backingstoreTor Arne Vestbø2017-12-141-49/+18
| | | | | | | | | | | | | | | | | | | | Change-Id: Iacf852c8620ea06d790cddcf6774b772f754e08a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * Teach QPlatformWindow about safe area margins and implement for iOSTor Arne Vestbø2017-12-133-30/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The safe area margins of a window represent the area that is safe to place content within, without intersecting areas of the screen where system UI is placed, or where a screen bezel may cover the content. QWidget will incorporate the safe area margins into its contents margins, so that they are are never smaller than the safe area margins. This can be disabled by unsetting the Qt::WA_ContentsMarginsRespectsSafeArea widget attribute, which is set by default. QLayouts will automatically use the contents area of a widget for their layout, unless the Qt::WA_LayoutOnEntireRect attribute has been set. This can be used, along with a contents margin of 0 on the actual layout, to allow e.g. a background image to underlay the status bar and other system areas on an iOS device, while still allowing child widgets of that background to be inset based on the safe area. [ChangeLog][iOS/tvOS] Qt will now take the safe area margins of the device into account when computing layouts for QtWidgets. Change-Id: Ife3827ab663f0625c1451e75b14fb8eeffb00754 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * Set sharedPainter correctly for QGraphicsEffectLaszlo Agocs2017-12-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Autotest is taken from the previously reverted 8b1377fde16a2049a1c27f6d005bff84a8f85f28. Task-number: QTBUG-60231 Change-Id: I44dd79cba22b6baefdd6d95c176790bef0b7eafe Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * QHeaderView: Use correct font for drag'n'drop indicator pixmapChristian Ehrlicher2017-12-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QHeaderViewPrivate::setupSectionIndicator() did not honor the font set for the QHeaderView which results in a wrong font in the indicator pixmap. Fix it by using the correct font for the dragged section as it is done in paintEvent() Task-number: QTBUG-65017 Change-Id: I5393c6861073de22f30ffa13e12c5e2cf8aa7776 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * QHeaderView: Fix painting vertical headers in rtl modeChristian Ehrlicher2017-12-121-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In rtl mode, the headers were not painted correctly. The style option selectedPosition was not filled correctly and the paint rect needed to be adjusted by one pixel to fit the table grid. Task-number: QTBUG-56520 Change-Id: Ib92d5ab6ff730bba67eca35c83cd638e613f58b9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * QFileSystemModel: properly align file size columnChristian Ehrlicher2017-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file size column was not properly horizontally aligned. The model only returned Qt::AlignRight with no horizontal alignment. This lead to a top alignment within QStyle::alignedRect(). Task-number: QTBUG-64098 Change-Id: Iaef30200a63bd0975c88a67d0af2eb1d5254f588 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@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>