summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicslinearlayout
Commit message (Collapse)AuthorAgeFilesLines
* Update licenseheader text in source filesJyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Avoid flicker when invalidate is propagated in a widget/layout hierarchyJan-Arve Sæther2011-04-141-0/+40
| | | | | | | | | | | | | | | | | | | | | * Do not call invalidate from activateRecursive(). This resulted in that a layout was invalidated as many times as there were items in the layout. * Several improvements. Do not call resize(size()) too often. Calling resize() from the widgetEvent() is not very nice though... * Remove commented out code * make sure layout is activated even if the widget does not change size * activate the layout if the resize is same as size() * In order to not break existing apps, make this an opt-in feature with QGraphicsLayout::setInstantInvalidatePropagation(true); Reviewed-by: Frederik Gladhorn Reviewed-by: John Tapsell
* Merge branch '4.7-review' into 4.7-stagingThierry Bastian2011-01-171-0/+26
|\
| * Fix a bug that got revealed by 604c51f1fc5c79b7fad12cda911b06b9e6e5005fJan-Arve Sæther2011-01-131-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug has been around for a while, but change 604c51f1fc5c7 made it emerge. The problem was that stretches were combined by always *maxing* them. The values of 'stretch' can be interpreted as this: -1: (the default) it means that the items should be stretched with the stretch factor dervived from the size hints. (In practice this means that they are distributed fairly). 0: Means that the item should not be stretched >0: Means that the item should be stretch with that number as a factor. This meant that combining one item with a fixed size(0) and another item with a default stretch (-1) the combined row stretch would end up being fixed. This also fixes how stretches are combined for spanning items too. Task-number: QTBUG-13551 Reviewed-by: John Tapsell
* | Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
|/ | | | Reviewed-by: Trust Me
* Adhere to code styleJan-Arve Sæther2010-11-151-1/+1
|
* Change the QGraphics*Layout documentation to match the code - that the ↵John Tapsell2010-11-151-0/+33
| | | | | | | | | | 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-0/+85
| | | | | | | | Task-number: QTBUG-13551 Task-number: QTBUG-7756 Merge-request: 894 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* 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>
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Compilation fix for Windows Mobileninerider2009-11-231-1/+1
| | | | | | | | The default style (plastique) used was not available if not included in the build. Using now the windows style instead. Reviewed-by: Maurice
* processEvents() does not always process *all* events in the queue.Jan-Arve Sæther2009-11-101-3/+3
| | | | | | This was a small behaviour change introduced by Brad that caused the autotest to fail (not every time). Our workaround is to call sendPostedEvents().
* 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
* Compilation of the QGraphicsAnchorLayout test on 64bitOlivier Goffart2009-10-151-1/+2
| | | | + stabilize the linear layout test
* Merge commit 'origin/4.5' into 4.6Joerg Bornemann2009-10-061-0/+2
|\ | | | | | | | | Conflicts: tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
| * tst_QGraphicsLinearLayout::layoutDirection fixed for Windows mobileJoerg Bornemann2009-10-061-0/+2
| | | | | | | | | | | | | | This test depends on a layout spacing set to 6. The Windows mobile style has layout spacing 8. Reviewed-by: mauricek
| * Update license headers again.Jason McDonald2009-09-081-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Fixed style dependent failures for S60 in QGraphicsLinearLayout test.Janne Anttila2009-09-281-1/+3
| | | | | | | | | | | | Since S60 does not compile QPlastiqueStyle, we use QWindowsStyle Reviewed-by: TrustMe
* | Fix QGraphicsLinearLayout autotest for Symbian OS.Janne Anttila2009-09-251-0/+2
| | | | | | | | | | | | | | QPlastiqueStyle is not compiled for Symbian OS, but default ones seems to make the job fine since all get passed. Reviewed-by: Janne Koskinen
* | Fixed qgraphicslinearlayout autotest compilation for Symbian (Nokia X86).Janne Anttila2009-09-251-4/+4
| | | | | | | | | | | | | | Nokia X86 compiler does not resolve QCOMPARE corrctly for derived types, that's why we cast it explicitly. Reviewed-by: Janne Koskinen
* | Fix QGraphicsLinearLayout::layoutDirection test failure on cocoa.Marius Bugge Monsen2009-09-231-0/+5
| | | | | | | | | | | | | | The style influences the layout results. To get consistent results across platforms, we have to specify the style when testing. Reviewed-by: Jan-Arve Sæther
* | Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Make sure itemAt() reflects the visual order.Jan-Arve Sæther2009-08-271-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This means it should respect the order that was defined with insertItem() and addItem(). Note that this is not strictly necessary (as now explicitly written in the docs for QGraphicsLayout::itemAt()), but commit 2ec56d158dc140f68efb45e2e0613f0e4026ddf6 broke the order and for people that relied on this that commit caused a regression. In addition, after commit 2ec56d158dc140f68efb45e2e0613f0e4026ddf6 it was not longer possible to query the "item at visual index". Thus, instead of adding another function (like QGGL::itemAt(int,int)) we make sure that itemAt() also returns the "item at visual index".
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Removed trailing whitespace.Jan-Arve Sæther2009-06-241-21/+21
| |
* | Fixed count(), itemAt() and removeAt() in QGraphicsLinearLayout.Jan-Arve Sæther2009-06-241-24/+29
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to this, the behaviour of count(), itemAt() and removeAt() was different between QGraphicsLinearLayout and QGraphicsGridLayout. QGraphicsGridLayout does it right. This adds some behaviour changes: 1. QGraphicsLinearLayout::count() is no longer affected by inserted stretches (through insertStretch) This means that code like this will break: QGraphicsLinearLayout *linearLayout = new QGraphicsLinearLayout; linearLayout->addItem(new QGraphicsWidget); linearLayout->addStretch(); int count = linearLayout->count(); linearLayout->removeAt(count - 1); // before this patch it would do nothing (and it wouldn't // actually remove the stretch), with the new patch it would // remove the QGraphicsWidget. 2. count(), itemAt() and removeAt() now prints a warning for an invalid index. The documentation actually says that "The reimplementation can assume that index is valid (i.e., it respects the value of count()", but I decided that its too risky to not assume that it is valid, since it would break the following common pattern: while(layout->itemAt(0)) { layout->removeAt(0); } Cleaned up autotests (and a small codeblock) that assumed itemAt/removeAt with an invalid index to work, since we should try to follow our own advice. :-) This change is also an alignment with what QGraphicsGridLayout does (it checks the index argument and prints a warning too.)
* Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | Reviewed-by: Trust Me
* Long live Qt 4.5!Lars Knoll2009-03-233-0/+1417