Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
20aeec73
Commit
20aeec73
authored
14 years ago
by
Christian Kamm
Browse files
Options
Downloads
Patches
Plain Diff
QuickFix: Add comments to undocumented fixes.
Reviewed-by: Erik Verbruggen
parent
542f21dc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/cppeditor/cppquickfixes.cpp
+32
-4
32 additions, 4 deletions
src/plugins/cppeditor/cppquickfixes.cpp
src/plugins/qmljseditor/qmljsquickfixes.cpp
+10
-0
10 additions, 0 deletions
src/plugins/qmljseditor/qmljsquickfixes.cpp
with
42 additions
and
4 deletions
src/plugins/cppeditor/cppquickfixes.cpp
+
32
−
4
View file @
20aeec73
...
...
@@ -354,6 +354,14 @@ private:
ASTMatcher
matcher
;
};
/*
Rewrite
int *a, b;
As
int *a;
int b;
*/
class
SplitSimpleDeclarationOp
:
public
CppQuickFixFactory
{
static
bool
checkDeclaration
(
SimpleDeclarationAST
*
declaration
)
...
...
@@ -473,7 +481,14 @@ private:
/*
Add curly braces to a if statement that doesn't already contain a
compound statement.
compound statement. I.e.
if (a)
b;
becomes
if (a) {
b;
}
*/
class
AddBracesToIfOp
:
public
CppQuickFixFactory
{
...
...
@@ -844,9 +859,11 @@ private:
/*
Replace
"abcd"
With
QLatin1String("abcd")
"abcd" -> QLatin1String("abcd")
'a' -> QLatin1Char('a')
Except if they are already enclosed in
QLatin1Char, QT_TRANSLATE_NOOP, tr,
trUtf8, QLatin1Literal, QLatin1String
*/
class
WrapStringLiteral
:
public
CppQuickFixFactory
{
...
...
@@ -951,6 +968,7 @@ private:
tr("abcd") or
QCoreApplication::translate("CONTEXT", "abcd") or
QT_TRANSLATE_NOOP("GLOBAL", "abcd")
depending on what is available.
*/
class
TranslateStringLiteral
:
public
CppQuickFixFactory
{
...
...
@@ -1286,6 +1304,9 @@ private:
};
};
/*
Can be triggered on a class forward declaration to add the matching #include.
*/
class
FixForwardDeclarationOp
:
public
CppQuickFixFactory
{
public:
...
...
@@ -1411,6 +1432,13 @@ private:
};
};
/*
Rewrites
a = foo();
As
Type a = foo();
Where Type is the return type of foo()
*/
class
AddLocalDeclarationOp
:
public
CppQuickFixFactory
{
public:
...
...
This diff is collapsed.
Click to expand it.
src/plugins/qmljseditor/qmljsquickfixes.cpp
+
10
−
0
View file @
20aeec73
...
...
@@ -52,6 +52,16 @@ using TextEditor::RefactoringChanges;
namespace
{
/*
Reformats a one-line object into a multi-line one, i.e.
Item { x: 10; y: 20; width: 10 }
into
Item {
x: 10;
y: 20;
width: 10
}
*/
class
SplitInitializerOp
:
public
QmlJSQuickFixFactory
{
public:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment