summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljsreformatter.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2013-07-17 00:01:45 +0300
committerOrgad Shaneh <orgads@gmail.com>2013-07-17 11:11:25 +0200
commitad9e7ccab6e8476c0cb478ea2e4f13354dc21635 (patch)
tree9c67e7cfec7e7d0603e9279de9227cdef1cac530 /src/libs/qmljs/qmljsreformatter.cpp
parentc67f7f63497b321f42ee0081f29b7e3804023a10 (diff)
downloadqt-creator-ad9e7ccab6e8476c0cb478ea2e4f13354dc21635.tar.gz
Fix coding style for else statements
Change-Id: I1309db70e98d678e150388c76ce665e988fdf081 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/libs/qmljs/qmljsreformatter.cpp')
-rw-r--r--src/libs/qmljs/qmljsreformatter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libs/qmljs/qmljsreformatter.cpp b/src/libs/qmljs/qmljsreformatter.cpp
index a9eede5e3e..b3d5d1e7d3 100644
--- a/src/libs/qmljs/qmljsreformatter.cpp
+++ b/src/libs/qmljs/qmljsreformatter.cpp
@@ -255,14 +255,13 @@ protected:
qreal result = badnessFromSplits;
foreach (const QString &line, lines) {
// really long lines should be avoided at all cost
- if (line.size() > strongMaxLineLength)
+ if (line.size() > strongMaxLineLength) {
result += 50 + (line.size() - strongMaxLineLength);
// having long lines is bad
- else if (line.size() > maxLineLength) {
+ } else if (line.size() > maxLineLength) {
result += 3 + (line.size() - maxLineLength);
- }
// and even ok-sized lines should have a cost
- else {
+ } else {
result += 1;
}