diff options
author | João Abecasis <joao@trolltech.com> | 2010-02-18 13:36:46 (GMT) |
---|---|---|
committer | João Abecasis <joao@trolltech.com> | 2010-02-18 18:20:02 (GMT) |
commit | 4c08defe1ac8342b9f8c6aeceebec12b839bae2a (patch) | |
tree | efe16be328caba07f6c92cebecb9995fd9029b1e | |
parent | 9d8614d8dcd1ae8389842aa4c48d8c77ae69bf27 (diff) | |
download | Qt-4c08defe1ac8342b9f8c6aeceebec12b839bae2a.zip Qt-4c08defe1ac8342b9f8c6aeceebec12b839bae2a.tar.gz Qt-4c08defe1ac8342b9f8c6aeceebec12b839bae2a.tar.bz2 |
Simplify code, fix a compiler warning... profit!
Well, it was a compiler warning on master... :-/
Reviewed-by: Janne Anttila
Reviewed-by: axis
-rw-r--r-- | src/gui/kernel/qsoftkeymanager.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index d3cef86..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 + 1 : level; - } - } while (source); + while (source) { + if (appendSoftkeys(*source, level)) + ++level; + source = softkeySource(source, recursiveMerging); + } d->updateSoftKeys_sys(); return true; |