diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-11-13 14:15:53 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-11-13 14:15:53 (GMT) |
commit | 2432150f9eabbaa0317eeed038eaf661f8ce507e (patch) | |
tree | e45eaa146aa68f776b7d2f12b9cdaacf37d54095 /src | |
parent | 3764f6a3109266bf55aed1a18dd992e90fb85221 (diff) | |
parent | aefd76b0052cd36ed7f890dd4b91f38873bec251 (diff) | |
download | Qt-2432150f9eabbaa0317eeed038eaf661f8ce507e.zip Qt-2432150f9eabbaa0317eeed038eaf661f8ce507e.tar.gz Qt-2432150f9eabbaa0317eeed038eaf661f8ce507e.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/itemviews/qitemselectionmodel.cpp | 5 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qtriangulatingstroker.cpp | 3 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qtriangulatingstroker_p.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/itemviews/qitemselectionmodel.cpp b/src/gui/itemviews/qitemselectionmodel.cpp index c6e02a6..2e4a602 100644 --- a/src/gui/itemviews/qitemselectionmodel.cpp +++ b/src/gui/itemviews/qitemselectionmodel.cpp @@ -730,13 +730,14 @@ void QItemSelectionModelPrivate::_q_layoutAboutToBeChanged() savedPersistentIndexes.clear(); savedPersistentCurrentIndexes.clear(); - // special case for when all indexes are selected + // optimisation for when all indexes are selected + // (only if there is lots of items (1000) because this is not entirely correct) if (ranges.isEmpty() && currentSelection.count() == 1) { QItemSelectionRange range = currentSelection.first(); QModelIndex parent = range.parent(); tableRowCount = model->rowCount(parent); tableColCount = model->columnCount(parent); - if (tableRowCount * tableColCount > 100 + if (tableRowCount * tableColCount > 1000 && range.top() == 0 && range.left() == 0 && range.bottom() == tableRowCount - 1 diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp index 1163eba..206104f 100644 --- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp +++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp @@ -61,6 +61,9 @@ void QTriangulatingStroker::endCapOrJoinClosed(const qreal *start, const qreal * } else { endCap(cur); } + int count = m_vertices.size(); + m_vertices.add(m_vertices.at(count-2)); + m_vertices.add(m_vertices.at(count-1)); } diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h index defa3f1..a0117d5 100644 --- a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h +++ b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h @@ -188,10 +188,6 @@ inline void QTriangulatingStroker::endCap(const qreal *pts) break; default: break; // to shut gcc up... } - - int count = m_vertices.size(); - m_vertices.add(m_vertices.at(count-2)); - m_vertices.add(m_vertices.at(count-1)); } |