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
b13d6ae3
Commit
b13d6ae3
authored
Jun 22, 2010
by
Roberto Raggi
Browse files
Removed CppQuickFixOperation::cppRefactoringChanges().
parent
91eff020
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppquickfix.cpp
View file @
b13d6ae3
...
...
@@ -149,7 +149,7 @@ public:
changes
.
insert
(
endOf
(
binary
),
")"
);
}
replace
(
&
changes
,
binary
->
binary_op_token
,
replacement
);
cppR
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
r
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
}
private:
...
...
@@ -232,7 +232,7 @@ public:
if
(
!
replacement
.
isEmpty
())
replace
(
&
changes
,
binary
->
binary_op_token
,
replacement
);
cppR
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
r
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
}
private:
...
...
@@ -301,8 +301,8 @@ public:
changes
.
insert
(
start
,
QLatin1String
(
"!("
));
changes
.
insert
(
end
,
QLatin1String
(
")"
));
cppR
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
cppR
efactoringChanges
()
->
reindent
(
fileName
(),
range
(
start
,
end
));
r
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
r
efactoringChanges
()
->
reindent
(
fileName
(),
range
(
start
,
end
));
}
private:
...
...
@@ -412,8 +412,8 @@ public:
prevDeclarator
=
declarator
;
}
cppR
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
cppR
efactoringChanges
()
->
reindent
(
fileName
(),
range
(
startOf
(
declaration
->
firstToken
()),
r
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
r
efactoringChanges
()
->
reindent
(
fileName
(),
range
(
startOf
(
declaration
->
firstToken
()),
endOf
(
declaration
->
lastToken
()
-
1
)));
}
...
...
@@ -476,8 +476,8 @@ public:
const
int
end
=
endOf
(
_statement
->
lastToken
()
-
1
);
changes
.
insert
(
end
,
"
\n
}"
);
cppR
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
cppR
efactoringChanges
()
->
reindent
(
fileName
(),
range
(
start
,
end
));
r
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
r
efactoringChanges
()
->
reindent
(
fileName
(),
range
(
start
,
end
));
}
private:
...
...
@@ -537,8 +537,8 @@ public:
move
(
&
changes
,
condition
,
insertPos
);
changes
.
insert
(
insertPos
,
QLatin1String
(
";
\n
"
));
cppR
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
cppR
efactoringChanges
()
->
reindent
(
fileName
(),
range
(
startOf
(
pattern
),
r
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
r
efactoringChanges
()
->
reindent
(
fileName
(),
range
(
startOf
(
pattern
),
endOf
(
pattern
)));
}
...
...
@@ -614,8 +614,8 @@ public:
copy
(
&
changes
,
core
,
insertPos
);
changes
.
insert
(
insertPos
,
QLatin1String
(
";
\n
"
));
cppR
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
cppR
efactoringChanges
()
->
reindent
(
fileName
(),
range
(
startOf
(
pattern
),
r
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
r
efactoringChanges
()
->
reindent
(
fileName
(),
range
(
startOf
(
pattern
),
endOf
(
pattern
)));
}
...
...
@@ -729,8 +729,8 @@ public:
startOf
(
condition
->
right_expression
)
-
lExprEnd
);
changes
.
insert
(
endOf
(
pattern
),
QLatin1String
(
"
\n
}"
));
cppR
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
cppR
efactoringChanges
()
->
reindent
(
fileName
(),
range
(
startOf
(
pattern
),
r
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
r
efactoringChanges
()
->
reindent
(
fileName
(),
range
(
startOf
(
pattern
),
endOf
(
pattern
)));
}
...
...
@@ -759,8 +759,8 @@ public:
const
int
lExprEnd
=
endOf
(
condition
->
left_expression
);
changes
.
remove
(
lExprEnd
,
startOf
(
condition
->
right_expression
)
-
lExprEnd
);
cppR
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
cppR
efactoringChanges
()
->
reindent
(
fileName
(),
range
(
startOf
(
pattern
),
r
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
r
efactoringChanges
()
->
reindent
(
fileName
(),
range
(
startOf
(
pattern
),
endOf
(
pattern
)));
}
...
...
@@ -839,7 +839,7 @@ public:
changes
.
insert
(
endOf
(
stringLiteral
),
")"
);
cppR
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
r
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
}
private:
...
...
@@ -914,7 +914,7 @@ public:
changes
.
insert
(
startOf
(
stringLiteral
),
"@"
);
}
cppR
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
r
efactoringChanges
()
->
changeFile
(
fileName
(),
changes
);
}
private:
...
...
@@ -953,15 +953,12 @@ QString CppQuickFixOperation::fileName() const
void
CppQuickFixOperation
::
apply
()
{
cppR
efactoringChanges
()
->
apply
();
r
efactoringChanges
()
->
apply
();
}
CppEditor
::
CppRefactoringChanges
*
CppQuickFixOperation
::
cppR
efactoringChanges
()
const
CppEditor
::
CppRefactoringChanges
*
CppQuickFixOperation
::
r
efactoringChanges
()
const
{
return
_refactoringChanges
;
}
TextEditor
::
RefactoringChanges
*
CppQuickFixOperation
::
refactoringChanges
()
const
{
return
cppRefactoringChanges
();
}
Document
::
Ptr
CppQuickFixOperation
::
document
()
const
{
return
_document
;
}
...
...
src/plugins/cppeditor/cppquickfix.h
View file @
b13d6ae3
...
...
@@ -41,13 +41,13 @@
#include
<QtCore/QSharedPointer>
#include
<QtGui/QTextCursor>
#include
"cpprefactoringchanges.h"
namespace
CppTools
{
class
CppModelManagerInterface
;
}
// end of namespace CppTools
namespace
CppEditor
{
class
CppRefactoringChanges
;
namespace
Internal
{
class
CppQuickFixOperation
:
public
TextEditor
::
QuickFixOperation
...
...
@@ -69,8 +69,7 @@ protected:
QString
fileName
()
const
;
virtual
void
apply
();
virtual
CppRefactoringChanges
*
cppRefactoringChanges
()
const
;
virtual
TextEditor
::
RefactoringChanges
*
refactoringChanges
()
const
;
virtual
CppRefactoringChanges
*
refactoringChanges
()
const
;
const
CPlusPlus
::
Token
&
tokenAt
(
unsigned
index
)
const
;
...
...
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