diff options
author | David Boddie <david.boddie@nokia.com> | 2010-09-06 12:54:55 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2010-09-06 12:54:55 (GMT) |
commit | 4b68c14af425a3f8441ae0377c178d398192d45a (patch) | |
tree | c6f1fe35f946fde9e0f276d7e3b2c00386fd471d /examples | |
parent | 5cfc65d04858563e53987b224f36ee71356aa73c (diff) | |
parent | b3de9c2ee4c9f36a6133fc78109909c3ee6317fd (diff) | |
download | Qt-4b68c14af425a3f8441ae0377c178d398192d45a.zip Qt-4b68c14af425a3f8441ae0377c178d398192d45a.tar.gz Qt-4b68c14af425a3f8441ae0377c178d398192d45a.tar.bz2 |
Merge branch '4.7' into qmldocs
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/declarative/tutorials/samegame/samegame4/content/samegame.js | 4 | ||||
-rwxr-xr-x | examples/tutorials/modelview/2_formatting/mymodel.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js index b1f427c..79ff0c1 100755 --- a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js +++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js @@ -127,7 +127,7 @@ function shuffleDown() { } else { if (fallDist > 0) { var obj = board[index(column, row)]; - obj.y += fallDist * gameCanvas.blockSize; + obj.y = (row + fallDist) * gameCanvas.blockSize; board[index(column, row + fallDist)] = obj; board[index(column, row)] = null; } @@ -145,7 +145,7 @@ function shuffleDown() { obj = board[index(column, row)]; if (obj == null) continue; - obj.x -= fallDist * gameCanvas.blockSize; + obj.x = (fallDist - column) * gameCanvas.blockSize; board[index(column - fallDist, row)] = obj; board[index(column, row)] = null; } diff --git a/examples/tutorials/modelview/2_formatting/mymodel.cpp b/examples/tutorials/modelview/2_formatting/mymodel.cpp index 3e13ff4..2d2556c 100755 --- a/examples/tutorials/modelview/2_formatting/mymodel.cpp +++ b/examples/tutorials/modelview/2_formatting/mymodel.cpp @@ -89,7 +89,7 @@ QVariant MyModel::data(const QModelIndex &index, int role) const if (row == 1 && col == 2) //change background only for cell(1,2) { - QBrush redBackground(QColor(Qt::red)); + QBrush redBackground(Qt::red); return redBackground; } break; |