summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-18 23:08:17 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-18 23:08:17 (GMT)
commit85b82c845c32d383cdb9ec9f6ac21a0e86e4308a (patch)
treebdee720f7f004a7dae4c7a52d07317c0f8926056 /src/gui
parent14866f7fd79f39c2f20f5e0149fe6e11d7121d70 (diff)
parentb8f9453eec3b218317a3dae0acfe444bc00c3093 (diff)
downloadQt-85b82c845c32d383cdb9ec9f6ac21a0e86e4308a.zip
Qt-85b82c845c32d383cdb9ec9f6ac21a0e86e4308a.tar.gz
Qt-85b82c845c32d383cdb9ec9f6ac21a0e86e4308a.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Moving QDir benchmarks; making way for new test cases Fixing QDir benchmarks... QTreeView: Fix premature pessimization Simplify code, fix a compiler warning... profit! tst_qnetworkreply: Add another testcase QNAM HTTP: Clean code a bit QNAM HTTP: Always set channel.reply to 0 when done Revert "Added note to make QList destructor virtual in version 5" Fix s390(x) atomic ops related crashes Fix undefined sequence point compiler warning
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemviews/qtreeview.cpp9
-rw-r--r--src/gui/kernel/qsoftkeymanager.cpp12
2 files changed, 10 insertions, 11 deletions
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index d0fa22d..706d2a8 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -2474,10 +2474,11 @@ void QTreeView::rowsInserted(const QModelIndex &parent, int start, int end)
QVector<QTreeViewItem> insertedItems(delta);
for (int i = 0; i < delta; ++i) {
- insertedItems[i].index = d->model->index(i + start, 0, parent);
- insertedItems[i].level = childLevel;
- insertedItems[i].hasChildren = d->hasVisibleChildren(insertedItems[i].index);
- insertedItems[i].hasMoreSiblings = !((i == delta - 1) && (parentRowCount == end +1));
+ QTreeViewItem &item = insertedItems[i];
+ item.index = d->model->index(i + start, 0, parent);
+ item.level = childLevel;
+ item.hasChildren = d->hasVisibleChildren(item.index);
+ item.hasMoreSiblings = !((i == delta - 1) && (parentRowCount == end +1));
}
if (d->viewItems.isEmpty())
d->defaultItemHeight = indexRowSizeHint(insertedItems[0].index);
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp
index 7412b06..c9a94ee 100644
--- a/src/gui/kernel/qsoftkeymanager.cpp
+++ b/src/gui/kernel/qsoftkeymanager.cpp
@@ -210,13 +210,11 @@ bool QSoftKeyManager::handleUpdateSoftKeys()
d->requestedSoftKeyActions.clear();
bool recursiveMerging = false;
QWidget *source = softkeySource(NULL, recursiveMerging);
- do {
- if (source) {
- bool added = appendSoftkeys(*source, level);
- source = softkeySource(source, recursiveMerging);
- level = added ? ++level : level;
- }
- } while (source);
+ while (source) {
+ if (appendSoftkeys(*source, level))
+ ++level;
+ source = softkeySource(source, recursiveMerging);
+ }
d->updateSoftKeys_sys();
return true;