Silence harmless compiler warning.
authorGunnar Sletta <gunnar.sletta@jollamobile.com>
Mon, 11 Aug 2014 12:30:35 +0000 (14:30 +0200)
committerGunnar Sletta <gunnar.sletta@jollamobile.com>
Tue, 12 Aug 2014 10:24:52 +0000 (12:24 +0200)
AlignJustify is not a tested value, but the compiler warning
can throw you off, so best to keep it quiet.

Change-Id: I0b3d717dfe2c11fc4367e7eceb5b83009c4e0a30
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp

index 1ffd67c..741a724 100644 (file)
@@ -2389,10 +2389,9 @@ void tst_qquicktextedit::positionAt()
         break;
     }
 
-    qreal xoff;
+    qreal xoff = 0;
     switch (horizontalAlignment) {
     case QQuickTextEdit::AlignLeft:
-        xoff = 0;
         break;
     case QQuickTextEdit::AlignHCenter:
         xoff = (texteditObject->width() - secondLine.naturalTextWidth()) / 2;
@@ -2400,7 +2399,7 @@ void tst_qquicktextedit::positionAt()
     case QQuickTextEdit::AlignRight:
         xoff = texteditObject->width() - secondLine.naturalTextWidth();
         break;
-    case QQuickTextEdit::AlignJustify:
+    default:
         break;
     }
     int pos = texteditObject->positionAt(texteditObject->width()/2, y0);