diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2010-04-14 05:48:40 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2010-04-14 05:48:40 (GMT) |
commit | 2333ad8b4b93337c2515bc673b100c47b45e516b (patch) | |
tree | a338e4682dc857658824e7f07efe9ca57e4b9d0e /src/declarative/graphicsitems/qdeclarativepositioners.cpp | |
parent | c6483baf226e9e698983aa596761825ad4a8a698 (diff) | |
parent | 37581fa549c5cbe56afc68c71fa97d8f933512c0 (diff) | |
download | Qt-2333ad8b4b93337c2515bc673b100c47b45e516b.zip Qt-2333ad8b4b93337c2515bc673b100c47b45e516b.tar.gz Qt-2333ad8b4b93337c2515bc673b100c47b45e516b.tar.bz2 |
Merge branch '4.7' into reviews/2361
Conflicts:
src/declarative/graphicsitems/qdeclarativeitem.h
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativepositioners.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativepositioners.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index d33a8be..f436471 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -700,14 +700,15 @@ void QDeclarativeGrid::setRows(const int rows) void QDeclarativeGrid::doPositioning(QSizeF *contentSize) { - int c=_columns,r=_rows;//Actual number of rows/columns + int c = _columns; + int r = _rows; int numVisible = positionedItems.count(); - if (_columns==-1 && _rows==-1){ + if (_columns <= 0 && _rows <= 0){ c = 4; r = (numVisible+3)/4; - }else if (_rows==-1){ + } else if (_rows <= 0){ r = (numVisible+(_columns-1))/_columns; - }else if (_columns==-1){ + } else if (_columns <= 0){ c = (numVisible+(_rows-1))/_rows; } |