summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qheaderview.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QHeaderView: fix visual/logical index corruption when restoring statev5.9.0-rc2v5.9.0David Faure2017-05-261-3/+5
| | | | | | | | | | | | | | | | | | | This is a followup to 77a8e90cddcfa1c34518ef846a4838874a7bc0c7 which didn't handle the case where no columns had been moved. visualIndices and logicalIndices are empty until initializeIndexMapping() is called, in which case appending is wrong. As a result, visualIndex(i) would return -1 for the values over those added by read(), and an assert would happen at painting time. The fix is to leave visualIndices and logicalIndices empty if they are empty already, leaving it to initializeIndexMapping() to fill them later if necessary (e.g. when moving a column). Task-number: QTBUG-60837 Change-Id: Ia7e4b9d3122647984acd434dfaa0400df319d065 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-281-0/+1
|\ | | | | | | Change-Id: I4788bc037c55c48563ffd4ba9633a22aa1d12f22
| * Annotate more implicit fallthroughsAllan Sandfeld Jensen2017-03-271-0/+1
| | | | | | | | | | | | | | Reduces our number of gcc 7 warnings Change-Id: I792d658cbc11cad15cf45da3a36fc93fcdcc67ea Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Add feature.label and feature.formlayoutStephan Binner2017-03-031-2/+17
|/ | | | | | Change-Id: Ic8dc0aee7f3fc0d8218ba709352b1378078c6070 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QHeaderView: fix restoreState() on a model with more columnsDavid Faure2016-12-291-0/+14
| | | | | | | | | | | | | When saving state for a 3-columns headerview and then restoring that state onto a 5-column headerview, the headerview shouldn't suddenly think it has 3 columns. Rather than making restoreState() fail, we adjust for the additional columns, so that we can still apply the customizations from the user to all other columns (hiding, moving, etc.). Change-Id: I3f220aa322ea8b629d2fe345f8cde13e0ea615d6 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Change confusing Q_DEAD_CODE_FROM_QT4_FOO defineTor Arne Vestbø2016-10-141-1/+1
| | | | | | | | | | | | | | | | | | | Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code that the code in question was a left-over from Qt4, when we used Q_WS_ defines instead of Q_OS_ defines. This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually unconditionally included. To make this even clearer, the defines have been replaced by checks for 1 or 0, with a comment describing how the code used to look in Qt4. The use of constants in the check also makes it easier for editors to parse the condition and show visually that the code is defined out. Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge dev into 5.8Oswald Buddenhagen2016-08-221-0/+1
|\ | | | | | | Change-Id: I41ee7b50534b01cf042bed8bb8824ba2e5026a29
| * QHeaderView: Reset lastSectionLogicalIdx on clear()Ulf Hermann2016-08-091-0/+1
| | | | | | | | | | | | | | | | | | Otherwise we can fail to stretch the last section when adding new sections. Task-number: QTBUG-52446 Change-Id: I7eb5267ac500bf4246e57c3e3a43268bb65ef1f7 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | Support C++17 fallthrough attributeAllan Sandfeld Jensen2016-08-191-2/+2
|/ | | | | | | | | Replaces our mix of comments for annotating intended absence of break in switches with the C++17 attribute [[fallthrough]], or its earlier a clang extension counterpart. Change-Id: I4b2d0b9b5e4425819c7f1bf01608093c536b6d14 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-271-46/+70
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_win.cpp src/widgets/itemviews/qheaderview.cpp Change-Id: I0a59ade9cd6e91f770fdf298a7d72a41e79fd761
| * 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>
* | 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>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-071-3/+3
|\| | | | | | | | | | | | | | | | | | | 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
| * QHeaderView::setStretchLastSection: make it a noop when setting the same valueGiuseppe D'Angelo2016-04-051-0/+2
| | | | | | | | | | | | | | | | | | | | For some reason this setter wasn't protected against setting the same value again, and always did work (including resizing the last section when setting it to false). Change-Id: I044404eef95d52d165100254f3afd489997e0872 Task-number: QTBUG-52308 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devFrederik Gladhorn2016-01-081-3/+5
|\| | | | | | | | | | | Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
| * QHeaderView: Reset cached section sizes on font and style changeGabriel de Dietrich2015-12-211-3/+5
| | | | | | | | | | | | | | | | Change-Id: I7ce88b7e43249499343a9aae6acb806dd9c41f31 Task-number: QTBUG-33855 Task-number: QTBUG-37153 Task-number: QTBUG-50010 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QHeaderView - fix broken stretchLastSectionThorbjørn Martsum2016-01-011-14/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In setStretchLastSection we restore a default section size if we no longer use stretch. That size was however not sufficient - we should restore the actual size. Furthermore we should also always stretch the last section (last visible index) - and not leave a section with a huge size and stretch another. This patch refactors stretch handling and keeps track of the last section and its size in eg. moveSection, swapSection, hideSection, showSection etc. There is an auto test showing and guarding its behavior. [ChangeLog][QtWidgets][QHeaderView] Fixed some issues (e.g QTBUG-39010) with restoring of section size after a section is no longer the last visible section (in stretchLastSection mode). Task-number: QTBUG-39010 Change-Id: Id47075b5a9dfeb250027374ecbd10eb8babbf9ef Reviewed-by: David Faure <david.faure@kdab.com>
* | QtWidgets: replace some index-based for loops with C++11 range-forMarc Mutz2015-12-161-4/+2
|/ | | | | | | | | | | | | | | | | | | | This needs to be handled a bit carefully, because Qt containers will detach upon being iteratoed over using range-for. In the cases of this patch, that cannot happen, because all containers are marked as const (either by this patch or before). Separate patches will deal with other situations. Apart from being more readable, range-for loops are also the most efficient for loop. This patch shaves almost 2K of text size off an optimized Linux AMD64 GCC 4.9 build. Change-Id: I53810c7b25420b4fd449d20c90c07503c5e76a66 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QHeaderView - fix a logical / visual index mismatchThorbjørn Martsum2015-06-271-1/+1
| | | | | | | | | | | f9408317e70bc2e635a2f9baeff35d1c06227734 was unfortunately approved though it had an annoying bug. The patch had an assign of a visual index into a logical index. This patch fixes that issue. Change-Id: I9cc75e4e9701858c92e2c3e5817415041b42f8e8 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Improve QHeaderView::sectionsInserted performanceIvan Komissarov2015-05-281-7/+7
| | | | | | | | | Old implementation had complexity O(oldSectionCount); replace it with O(hiddenSectionCount) algorithm. This boosts performance in case of the vertical headers for models with big row count. Change-Id: I7bb02f5579ce83fbdecf5f8c3aa7dcc0ac60dd40 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Make it more obvious that Q_WS_ is dead code, and should perhaps be portedTor Arne Vestbø2015-02-031-1/+1
| | | | | | | | | | | | We still have a bunch of Q_WS_ ifdefs in our code, which are easy to mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming the ifdefs we make it clear that the code in question is dead. In incremental follow-ups, we can then selectively either remove, or port, the pieces that are dead code. Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QHeaderView: fix restoring Qt4 state.Arnaud Bienner2015-01-201-1/+3
| | | | | | | | When multiple sections were grouped together, sectionItem.size was the total size of grouped sections, not the size of one section. Task-number: QTBUG-40462 Change-Id: I401a1583dd30880ccf5b4c105a237d6563f212e8 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* QHeaderView: check that length is correct during restoreState.Arnaud Bienner2014-12-171-23/+52
| | | | | | | | | | Length is supposed to be equal to the section items length, but the state saved might be corrupted. If so, print a warning, return false and don't restore this corrupted state. Change-Id: I4d3dfec528a65fc81ed70d1c8cc69c11faf414e0 Task-number: QTBUG-40462 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Make the defaultSectionSize property of QHeaderView style dependentAlexander Volkov2014-12-111-0/+39
| | | | | | | | | | | | | | | Add new enum items PM_HeaderDefaultSectionSizeHorizontal and PM_HeaderDefaultSectionSizeVertical to QStyle and get corresponding values in QHeaderView. This way we get rid of some magic constants in QHeaderView and we can have reasonable values for the default section size for high-DPI displays. [ChangeLog][QtWidgets][QHeaderView] Default section size is now style-dependent by default. [ChangeLog][QtWidgets][QHeaderView] Added resetDefaultSectionSize(). Change-Id: I44e152c5cf0bec1e5d78e1e62f47a2d1f761dfbf Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-101-2/+9
|\ | | | | | | | | | | | | | | Conflicts: doc/global/template/style/online.css mkspecs/android-g++/qmake.conf Change-Id: Ib39ea7bd42f5ae12e82a3bc59a66787a16bdfc61
| * QHeaderView: take the sort indicator into account when eliding textGiuseppe D'Angelo2014-12-091-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | By adding PM_HeaderMarkSize to the margins if the section is showing a sort indicator. Turns out that that particular enum was actually unused in QtWidgets (!), so tune the value to match reality. Task-number: QTBUG-629 Change-Id: I8bc70451656d634a064c8b5014e449977c55aa9d Reviewed-by: Cristian Oneț <onet.cristian@gmail.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Auto-scroll while selecting entire rows/columns did not workJan Arve Saether2014-11-291-2/+4
|/ | | | | | | | | | | | | | | If you press and hold a section in a header view you can extend the selection to more rows by moving the mouse. This worked fine until you moved the mouse outside the geometry of the header view. The expected behavior was then to scroll the view (this is what happens with extended selections on regular table cells). [ChangeLog][QtWidgets][QHeaderView] Auto-scroll the view when making extended row/column selections. Change-Id: Ic65aa34d370e74054b2123ab57edb1add0e8adb9 Task-number: QTBUG-21201 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Fix the drawing of elided text in QHeaderView.Cristian Oneț2014-09-231-1/+2
| | | | | | | | | | The text was not drawn properly because when eliding the text a fixed value '4' was substracted from the rect to compute the available width instead of the actual value of the header margin. Change-Id: I1e110f1a6490679730ddf5815d3ff7b679dc1a47 Task-number: QTBUG-24772 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Correct information about all headers being movable.Mitch Curtis2014-09-221-3/+0
| | | | | | | | | This only applies to QTreeView. 8eb3d724a92b8eeb1e96362bd6997fcee178af89 introduced this error. Change-Id: Ia8a2c387afbd19e4d98ea6f81e5ce6409d79bcd9 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Add missing period to QHeaderView documentation.Mitch Curtis2014-09-181-1/+1
| | | | | Change-Id: Ibf3fdb4e1c149b2dbee7bf3043cec9d3e167381d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Improve documentation regarding moving item view columns.Mitch Curtis2014-09-181-0/+3
| | | | | | | | | The only way I was able to find information on this was through bug reports. Change-Id: Iac59a82fab9c216495860ad3b1efad1125130002 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QHeaderView::restoreState(): Add sanity check.Friedemann Kleint2014-08-061-9/+26
| | | | | | | | Read data into local variables and apply only after a check. Task-number: QTBUG-40462 Change-Id: Id06060d0d5b0eafc2d303526a86d552ff5747a72 Reviewed-by: David Faure <david.faure@kdab.com>
* Account for the sort indicator being placed above the text on VistaAndy Shaw2014-05-261-9/+3
| | | | | | | | | | | In WindowsVista style and later the sort indicator is placed above the text as opposed to alongside it. Therefore the extra space given is moved to the common style allowing styles that have it placed differently to easily ensure it is not included. Task-number: QTBUG-19915 Change-Id: Ic21fcc1d95f4c3cc2eb9c465e1c8afb9b805389a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QHeaderView - do simple section move/rotate in moveSectionThorbjørn Martsum2014-02-181-42/+19
| | | | | | | | It is in nearly all cases much faster (in our benchmark it is about a factor 8) - and it also makes the code more readable. Change-Id: I075e1d1a96756e5e9a2bf53b5479094f7d87883d Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QHeaderView - move ishidden into the sectionThorbjørn Martsum2013-12-021-53/+25
| | | | | | | | | | | | Since we already have the section there is no need to have an extra structure. It simplifies the code itself and the code is overall more efficient. The benchmark seems to show overall performance increasement various places (e.g insert, swapSection). Change-Id: I623453b69a9a830908e8d9d5f3816ccebe073c9f Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QHeaderView - do not ignore -1 as minimum section sizeThorbjørn Martsum2013-11-171-1/+1
| | | | | | | | | We claim that -1 is a special automatic value, but calling setMinimumSectionSize with -1 is unfortunately ignored due a regression in 524c3e05e811d81fbcd71eedb377b7eaa0a21ef3 Change-Id: I7d7e5dbbf78e561849d2f2352c9edb2df36aa181 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QHeaderView - remove confusing boolThorbjørn Martsum2013-11-081-6/+1
| | | | | | | | | | It is probably better not to have a default boolean in QHeaderView::setResizeContentsPrecision Task-number: QTBUG-34665 Change-Id: I0bb2c35abc1d5713bb3ee65df3af86c04f175a38 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Don't rely on the Qt version when reading a QHeaderView state streamAndy Shaw2013-10-121-4/+5
| | | | | | | | | | Since the datastream version is not set in previous versions of Qt when streaming the state of the QHeaderView then we cannot rely on this when adding new data to the state. Therefore we check if we read past the end before assigning to the new variable. Change-Id: I7128ffc91e47f9c8797cfa24d206a789d2814908 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-8/+8
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QHeaderView - add maximum section sizeThorbjørn Martsum2013-09-021-3/+47
| | | | | | | | | | | | | | | When we auto resize it is handy to be able to limit the maximum size (just like the minimum size). [ChangeLog][QtWidgets][QHeaderView]A maximumSize for sections has been introduced. The maximum section size is by default the largest possible section size which in Qt 5.2 has been limited to 1048575 pixels. Task-number: QTBUG-4346 Change-Id: Ida9cbcc11bd5c4498e319df2e6379c69a7033c04 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-211-3/+21
|\ | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/src.pro Change-Id: I0a560826c420e46988da3776bd8f9160c365459a
| * QHeaderView::paintSection(): fix visible index handlingJ-P Nurmi2013-08-151-3/+21
| | | | | | | | | | | | | | | | | | | | | | Sections may be hidden => QStyleOptionHeader::position must reflect the state seen on the screen. Otherwise styles will give wrong visual results. Task-number: QTBUG-32203 Change-Id: I7ef86496be092bf6f52ec45f757b501f38c3a431 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | QHeaderView - reduce memory usageThorbjørn Martsum2013-08-161-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Though the worst case memory usage was improved in b800d8b94a7861ecf8853621f6556fca186fb5b7 the best case usage changed. Since best case is the same as worst case in Qt5, we should use as little as possible, which this patch ensures. We reduce the memory usage from 3 to 2 ints per section - which is half of worst case in Qt4. There seems to be no bigger cost in performance doing that. The recalcSectionStartPos is still very fast. This patch limits the maximum section size to (2^20) ~ 1.000.000 pixels. This alleviates Task-number: QTBUG-32325 Change-Id: I9b7530030a31b4e35cf1ca9e32c6b936f5ea9790 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | QHeaderView - add parameter to control sizeHint precisionThorbjørn Martsum2013-05-131-1/+54
| | | | | | | | | | | | | | | | | | | | | | Currently Qt looks at 1000 rows when scaling a column. That can be slow in some situations and too inaccurate in others. With this patch we leave it up to the user to decide how precise e.g resizeToContents should be. Change-Id: I6ef60f9a3bb40fc331ce1a1544fdc77488d20ca3 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Unify header-based scroll offsets in itemviewsJ-P Nurmi2013-05-071-0/+13
| | | | | | | | | | | | | | | | This is a spin-off of 00b11cc. Change-Id: I042f066bdb1d248a04473d4b0a31002330a73907 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | QAbstractScrollArea - add SizeAdjustPolicy and viewportSizeHintChristoph Schleifenbaum2013-04-221-0/+28
|/ | | | | | | | | | This patch adds SizeAdjustPolicy to QAbstractScrollArea. If it is set to AdjustToContents it will make use of the new protected viewportSizeHint() (BC since it was reserved in Qt5). This function returns a suggested size based on contents. Change-Id: I5d8aa517e88b8b21c5712e62b4d574c3aad99d3b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix license headers stating QtGui for QtWidgets files.Jake Petroules2013-03-191-1/+1
| | | | | Change-Id: I0ca49e3e1f9f603f0b0f7f3553e854b871efe303 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>