summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsgridlayout
Commit message (Collapse)AuthorAgeFilesLines
* Fixed a bug where the MaximumSizeHint of a layout with spans was wrongJan Arve Saether2013-04-051-5/+5
| | | | | | | | | | | | | | This was spotted while tracking down a similar bug related to spans. This now also eliminates the Q_EXPECT_FAILs in heightForWidthWithSpanning(), since it now finally works. The problem was only for the maximum size, since the size of an ignored row/column was min: 0, pref: 0, max: FLT_MAX (the default constructed values for a QGridLayoutBox). Change-Id: Ibb33c26ede40ed02edd26f596ba6133d59c9962f Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> (cherry picked from qtbase/9d7ae6dfbe25fb70a362a4cf955c187cd24cb007)
* Fixed a bug where spans across empty cells got broken.Jan Arve Saether2013-04-041-0/+28
| | | | | | | | | | | | | | | | If a row/column is only used only because of the spanning of an item, the cell should be treated as it didn't exist. We keep track of this with the "ignore" bit array. The old code would always start from the row/column at position 1. In the attached testcase this made the effectiveRowSpan become larger than actually needed. Task-number: QTBUG-30255 Change-Id: Ief0e7018ee8e5ee36272ce075a43312ffeac7b91 (cherry picked from qtbase/f9e43c526a30ae3912adfe3d5cb781af5ddda4b0) Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Merge remote-tracking branch 'qt/4.8'Jyri Tahtela2011-05-181-33/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples/wheel.qdoc src/gui/util/qflickgesture.cpp src/gui/util/qflickgesture_p.h src/gui/util/qscroller.cpp src/gui/util/qscroller.h src/gui/util/qscroller_p.h src/gui/util/qscrollerproperties.cpp src/gui/util/qscrollerproperties.h tests/auto/qscroller/tst_qscroller.cpp
| * Remove dead code from qgraphicsgridlayout autotestJason McDonald2011-05-041-33/+0
| | | | | | | | | | | | Change-Id: I230d1ec9dfd5df2a0fac161a03090308b7f07a1e Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
* | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
|/ | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Merge branch 'master-upstream'Gabriel de Dietrich2011-02-081-0/+158
|\
| * Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-251-0/+158
| |\ | | | | | | | | | | | | | | | Conflicts: configure src/network/bearer/bearer.pri
| | * Merge branch '4.7-review' into 4.7-stagingThierry Bastian2011-01-171-0/+158
| | |\
| | | * Some unit tests for layout explosion thingyJohn Tapsell2011-01-131-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | Adds more tests for commit 7fbf1829e11504eca6a55f1e5dbddf2f658b5302 Task-number: QTBUG-13551
* | | | Merge branch 'master-upstream' into master-waterThierry Bastian2011-01-201-1/+1
|\ \ \ \ | |/ / /
| * | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| | * | Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | |/ | | | | | | | | | Reviewed-by: Trust Me
* | | Enable the widthForHeight() test case.Jan-Arve Saether2011-01-191-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | While I did that I also found a copy-paste (?) bug in the WFH case of QGridLayoutEngine::sizeHint() that caused the widthForHeight() case to fail. Task-number: QTBUG-14693
* | | Fix some wrong tests in heightForWidth()Jan-Arve Saether2011-01-191-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | This aligns better with heightForWidth() as it is in 4.7. However, I've left out the exact matching with stretch factors, (the expectedWidth() function tried to deal with that) because it makes the test less robust (relies on undocumented behaviour and floating point number comparisions).
* | | Fix and enable the tests that were disabled.Jan-Arve Saether2011-01-191-37/+33
|/ / | | | | | | | | | | This is basically doing the same fixes as commit 5c129ceed8cb157354250e1a938f0b8af5dfe507 did in 4.7 branch. (except that in 4.7 branch the tests were removed and then re-added)
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-11-251-22/+330
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/symbian/symmake.cpp src/corelib/global/qglobal.h src/gui/kernel/qwidget_p.h src/gui/painting/qtextureglyphcache.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h src/plugins/qpluginbase.pri src/qbase.pri tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp tests/auto/qthread/tst_qthread.cpp tests/auto/selftests/expected_cmptest.txt tests/auto/selftests/expected_crashes_3.txt tests/auto/selftests/expected_longstring.txt tests/auto/selftests/expected_maxwarnings.txt tests/auto/selftests/expected_skip.txt tools/assistant/tools/assistant/doc/assistant.qdocconf tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qdeclarative.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf tools/qdoc3/test/qt_ja_JP.qdocconf tools/qdoc3/test/qt_zh_CN.qdocconf
| * Fix the tests that got affected by the behaviour added in 604c51f1fc5c79Jan-Arve Sæther2010-11-191-2/+2
| | | | | | | | | | Task-number: QTBUG-13551 Task-number: QTBUG-7756
| * Adhere to code styleJan-Arve Sæther2010-11-151-4/+4
| |
| * Change the QGraphics*Layout documentation to match the code - that the ↵John Tapsell2010-11-151-2/+43
| | | | | | | | | | | | | | | | | | | | default alignment is top-left. This includes unit tests to confirm that the alignment is top-left in a variety of different cases. Merge-request: 894 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| * Fix item alignment in layouts bigger than the items thay they containJohn Tapsell2010-11-151-9/+61
| | | | | | | | | | | | | | | | Task-number: QTBUG-13551 Task-number: QTBUG-7756 Merge-request: 894 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| * Add autotest to test a issue with stretches and preferred width.Jan-Arve Sæther2010-11-151-0/+62
| | | | | | | | | | | | | | | | | | | | The issue seemed to claim that the preferred size was not respected when there was another item that could stretch along the same axis: "A widget with a horizontal stretch next to it should get its preferredWidth()". This seems to works as expected, so nothing to fix. Task-number: QTBUG-12835
| * Add back the tests that were removed by commit ↵Jan-Arve Sæther2010-11-121-0/+174
| | | | | | | | | | | | fcda1b785bd7d86011f49bfe96cb22b04202933f Also add a proper test for the alignment problem
| * Fix a behaviour change of sizeHint() introduced by 6d4d265e7e67dde58Jan-Arve Sæther2010-11-111-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 6d4d265e7e67dde58e45d7d89f4974d0bd8b70e4 added a behaviour change in the cases if there was an item with height-for-width and sizeHint() was called with no constraint. The commit tried to return the height needed for the preferred width, but it still did not satisfy the constraints, since the width used as the constraint could be less than the preferred width. This also meant that the sizeHint(Qt::MinimumSize) could actually be larger than the smallest possible size. The behaviour should be that it should return the smallest width possible regardless of height. For instance, for a label it could return the size of the longest word (to avoid hyphenation issues). The same logic applies for the height: It should return the smallest height possible regardless of width. For instance, for a label it could then return the height of the font. I also had to fix some stuff in the heightForWidthWithSpanning() autotest since it wrongly expected the maximum size to be QWIDGETSIZE_MAX in several of the cases. However, that is the current behaviour (and it is a bug), but it is unrelated to the problem with spans so I simply fix the test and mark them with QEXPECT_FAIL. Reviewed-by: John Tapsell
* | Merge commit 'fcda1b785bd7d86011f49bfe96cb22b04202933f' into qt-master-from-4.7Olivier Goffart2010-10-251-31/+219
|\ \ | |/ | | | | | | | | | | | | Conflicts: tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp Some tests in tst_qgraphicsgridlayout are commented out because they are failing. See task QTBUG-14693
| * QGraphicsLayoutItem - user set sizes should always override, even if there's ↵John Tapsell2010-10-131-156/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a constraint Notes: * I have had to remove some of the old unit tests because the tested for strange behaviour. Now that height for width items behave more like normal items, it's no longer so easy to calculate what the geometries should be in strangely-sized layouts. * This also fixes alignment of height-for-width objects and adds a unit test for this. This couldn't be done in a seperate commit since the two fixes are related. Merge-request: 847 Reviewed-by: Olivier Goffart
| * QGridLayoutEngine - Rework height-for-width support so that row/col spanning ↵John Tapsell2010-10-131-0/+35
| | | | | | | | | | | | | | | | works Task-number: QTBUG-13547 Reviewed-by: Olivier Goffart Merge-request: 847
| * Revert "Revert "Fix (implement!) hfw/wfh in QGridLayoutEngine""Olivier Goffart2010-10-131-4/+360
| | | | | | | | | | | | | | | | This reverts commit 5bd6f7eb5c7d87c08539b6c2df416990cc417ec7. This is a revert of the revert. It is required apply the merge-request 847, which itself revert back part of this commit but fixing it the (hopefuly) right way
| * Revert "Fix (implement!) hfw/wfh in QGridLayoutEngine"Thierry Bastian2010-09-301-360/+4
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 62b5ef3cc1306e46a4042b14867f2f92d9a110f3. The implementation of hfw from this patch is unfortunately not robust enough. It doesn't manage correctly the constraints on the layouts and the cell spans. It caused bad behaviour or regressions seen in tasks: QTBUG-13547, QTBUG-13067, QTBUG-13549, and more Reviewed-By: ogoffart
* | Enable the width-for-height codepath and add autotest for WFH.Jan-Arve Sæther2010-09-021-62/+301
| | | | | | | | Task-number: Side-effect of QTBUG-3570
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-08-131-16/+372
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qpainter.cpp src/gui/text/qtextengine.cpp tests/auto/qimage/tst_qimage.cpp tests/auto/qpainter/tst_qpainter.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf
| * Merge branch 'hfw_2nd' into 4.7Jan-Arve Sæther2010-08-111-4/+360
| |\
| | * Fix (implement!) hfw/wfh in QGridLayoutEngineJan-Arve Sæther2010-08-101-4/+360
| | | | | | | | | | | | | | | | | | | | | | | | Note that only height-for-width works, since we cannot add QSizePolicy::hasWidthForHeight() in a patch release. Task-number: QT-3570 Reviewed-by: Paul
| * | Layout items had the wrong size if the layout was resized to maximum.Jan-Arve Sæther2010-08-111-12/+12
| |/ | | | | | | | | | | | | | | | | | | | | | | The problem was that if targetSize was the layouts maximum size, then sumAvailable could be reduced to exactly 0 in the "while (keepGoing)" loop. That would mean that we would not enter the block that actually copied the new sizes from the temporary "newSizes" array to the output "sizes" array due to the "if (sumAvailable > 0)" condition. Task-number: none, discovered while fixing QT-3570 Reviewed-by: Frederik Gladhorn
* | Some polishing to merge request 723Jan-Arve Sæther2010-08-111-2/+11
| |
* | Patch to QTBUG-3078Carolina Gomes2010-08-111-0/+18
| | | | | | | | | | Merge-request: 723 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-07-281-0/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qapplication.cpp tests/auto/qfileinfo/tst_qfileinfo.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt.qdocconf
| * Work around memory leak issue in grid and linear layouts.Andreas Aardal Hanssen2010-07-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These classes create a new QWidget and assign it to a static pointer which is never cleaned up. Using Q_GLOBAL_STATIC ensures that they are deleted on library unload. This is really just a cosmetic change that removes a leak warning - the real fix should be to find a way to not use a new QWidget like this. It seems odd that QGraphicsLayouts, which don't use QWidget in any other way, should depend on QWidget like this. Task-number: QTBUG-10768 Merge-request: 741 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-07-011-22/+64
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: bin/syncqt src/gui/text/qtextlayout.cpp tools/assistant/tools/assistant/helpviewer_qwv.cpp tools/assistant/tools/assistant/helpviewer_qwv.h tools/configure/configureapp.cpp
| * Fixed problem with wrong size hints when items were removed.Jan-Arve Sæther2010-06-161-22/+64
| | | | | | | | | | | | | | | | | | | | The reason was that the row/column count was not updated after an item was removed. (Note that qgraphicslinearlayout already did this, so we just follow the same pattern, except that the code for QGraphicsGridLayout is a bit more complex... Task-number: QTBUG-10314 Reviewed-by: Alexis Menard
* | Added 'parallel_test' for some QGraphics* auto-tests.Yoann Lopes2010-04-221-1/+1
|/
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-071-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QIODevice: Fix readAll() Temporary hackiesh solution to prevent BOM in the xml data. Fixed qxmlstream autotest when using shadow builds. Attempt at readding the capital P headers for Phonon Remove special Phonon processing from syncqt. Use the lowercase/shortname.h headers for Phonon includes Fixes a crash when setting focus on a widget with a focus proxy. Update copyright year to 2010 doc: Clarified activeSubControls and subControls. Remove warning "statement with no effect" doc: Clarified that .lnk files are System files on Windows.
| * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Fixed a bug with distribution of spans.Jan-Arve Sæther2010-01-051-160/+222
|/ | | | | | | | | | If a span required more size than the rows/columns it spanned, the size of the span was not distributed to the rows it spanned. The result was that the size hints of the layout was not correct, causing the layout to be potentially smaller than the spanning item. Task: QT-2261 Reviewed-by: Alexis
* Replace most processEvents() with sendPostedEvents().Jan-Arve Sæther2009-11-101-8/+8
| | | | | | | After a change Brad did to the event dispatcher we are no longer guaranteed that processEvents will process *all* events in the event queue. (most of the time _it_will_ process all events) I only replaced processEvents for the tests that failed.
* Do not loop forever if we are adding the layout itself to the layout.Jan-Arve Sæther2009-10-191-0/+11
| | | | Reviewed-by: alexis
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me