forked from qt-creator/qt-creator
QmlJS: Fix superfluous whitespace
When dragging a property on itself inside a "oneline" item Qt Creator prefixes a single whitespace even if it contains already whitespace(s). Change-Id: I3028d8c44d9b91d51c96a6d363e48a877a6a78da Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -125,7 +125,8 @@ Rewriter::Range Rewriter::addBinding(AST::UiObjectInitializer *ast,
|
||||
if (isOneLiner) {
|
||||
if (needsPreceedingSemicolon)
|
||||
newPropertyTemplate.prepend(QLatin1Char(';'));
|
||||
newPropertyTemplate.prepend(QLatin1Char(' '));
|
||||
if (!propertyName.startsWith(' '))
|
||||
newPropertyTemplate.prepend(QLatin1Char(' '));
|
||||
if (needsTrailingSemicolon)
|
||||
newPropertyTemplate.append(QLatin1Char(';'));
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user