Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
79cbc07b
Commit
79cbc07b
authored
May 25, 2010
by
Erik Verbruggen
Browse files
Fixed superfluous (and erroneous) semi-colon insertion.
Bug: BAUHAUS-674
parent
e997f6de
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/designercore/filemanager/addpropertyvisitor.cpp
View file @
79cbc07b
...
...
@@ -112,12 +112,12 @@ void AddPropertyVisitor::addInMembers(QmlJS::AST::UiObjectInitializer *initializ
if
(
isOneLiner
)
{
if
(
insertAfter
==
0
)
{
// we're inserting after an lbrace
if
(
initializer
->
members
)
{
// we're inserting before a member (and not the rbrace)
needsTrailingSemicolon
=
true
;
needsTrailingSemicolon
=
m_propertyType
==
QmlRefactoring
::
ScriptBinding
;
}
}
else
{
// we're inserting after a member, not after the lbrace
if
(
endOfPreviousMember
.
isValid
())
{
// there already is a semicolon after the previous member
if
(
insertAfter
->
next
&&
insertAfter
->
next
->
member
)
{
// and the after us there is a member, not an rbrace, so:
needsTrailingSemicolon
=
true
;
needsTrailingSemicolon
=
m_propertyType
==
QmlRefactoring
::
ScriptBinding
;
}
}
else
{
// there is no semicolon after the previous member (probably because there is an rbrace after us/it, so:
needsPreceedingSemicolon
=
true
;
...
...
src/plugins/qmldesigner/designercore/filemanager/addpropertyvisitor.h
View file @
79cbc07b
...
...
@@ -58,7 +58,7 @@ private:
quint32
m_parentLocation
;
QString
m_name
;
QString
m_value
;
QmlDesigner
::
QmlRefactoring
::
PropertyType
m_propertyType
;
QmlRefactoring
::
PropertyType
m_propertyType
;
QStringList
m_propertyOrder
;
};
...
...
src/plugins/qmldesigner/designercore/model/rewriteactioncompressor.cpp
View file @
79cbc07b
...
...
@@ -108,7 +108,7 @@ void RewriteActionCompressor::compressImports(QList<RewriteAction *> &actions) c
void
RewriteActionCompressor
::
compressRereparentActions
(
QList
<
RewriteAction
*>
&
actions
)
const
{
Q
Map
<
ModelNode
,
ReparentNodeRewriteAction
*>
reparentedNodes
;
Q
Hash
<
ModelNode
,
ReparentNodeRewriteAction
*>
reparentedNodes
;
QMutableListIterator
<
RewriteAction
*>
iter
(
actions
);
iter
.
toBack
();
...
...
tests/auto/qml/qmldesigner/coretests/testcore.cpp
View file @
79cbc07b
...
...
@@ -804,8 +804,6 @@ void TestCore::testRewriterForGradientMagic()
" }
\n
"
"}"
);
QSKIP
(
"See BAUHAUS-674"
,
SkipAll
);
QPlainTextEdit
textEdit
;
textEdit
.
setPlainText
(
qmlString
);
NotIndentingTextEditModifier
modifier
(
&
textEdit
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment