Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
43129a29
Commit
43129a29
authored
Nov 26, 2009
by
Christian Kamm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quickfix: Add flip helpers.
parent
746bea8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
src/plugins/cppeditor/cppquickfix.cpp
src/plugins/cppeditor/cppquickfix.cpp
+10
-0
src/plugins/cppeditor/cppquickfix.h
src/plugins/cppeditor/cppquickfix.h
+2
-0
No files found.
src/plugins/cppeditor/cppquickfix.cpp
View file @
43129a29
...
...
@@ -733,6 +733,16 @@ void QuickFixOperation::remove(const CPlusPlus::AST *ast)
remove
(
startOf
(
ast
),
endOf
(
ast
));
}
void
QuickFixOperation
::
flip
(
int
start1
,
int
end1
,
int
start2
,
int
end2
)
{
_changeSet
.
flip
(
start1
,
end1
-
start1
,
start2
,
end2
-
start2
);
}
void
QuickFixOperation
::
flip
(
const
CPlusPlus
::
AST
*
ast1
,
const
CPlusPlus
::
AST
*
ast2
)
{
flip
(
startOf
(
ast1
),
endOf
(
ast1
),
startOf
(
ast2
),
endOf
(
ast2
));
}
void
QuickFixOperation
::
copy
(
int
start
,
int
end
,
int
to
)
{
_changeSet
.
copy
(
start
,
end
-
start
,
to
);
...
...
src/plugins/cppeditor/cppquickfix.h
View file @
43129a29
...
...
@@ -106,6 +106,8 @@ protected:
void
remove
(
int
start
,
int
end
);
void
remove
(
unsigned
tokenIndex
);
void
remove
(
const
CPlusPlus
::
AST
*
ast
);
void
flip
(
int
start1
,
int
end1
,
int
start2
,
int
end2
);
void
flip
(
const
CPlusPlus
::
AST
*
ast1
,
const
CPlusPlus
::
AST
*
ast2
);
void
copy
(
int
start
,
int
end
,
int
to
);
void
copy
(
unsigned
tokenIndex
,
int
to
);
void
copy
(
const
CPlusPlus
::
AST
*
ast
,
int
to
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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