diff options
author | João Abecasis <joao@trolltech.com> | 2010-02-18 14:36:46 +0100 |
---|---|---|
committer | João Abecasis <joao@trolltech.com> | 2010-02-18 19:20:02 +0100 |
commit | 4c08defe1ac8342b9f8c6aeceebec12b839bae2a (patch) | |
tree | efe16be328caba07f6c92cebecb9995fd9029b1e /src/gui/kernel/qsoftkeymanager.cpp | |
parent | 9d8614d8dcd1ae8389842aa4c48d8c77ae69bf27 (diff) | |
download | qt4-tools-4c08defe1ac8342b9f8c6aeceebec12b839bae2a.tar.gz |
Simplify code, fix a compiler warning... profit!
Well, it was a compiler warning on master... :-/
Reviewed-by: Janne Anttila
Reviewed-by: axis
Diffstat (limited to 'src/gui/kernel/qsoftkeymanager.cpp')
-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 d3cef86bf4..c9a94ee7b7 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; |