a op b -> !(a invop b)
(a op b) -> !(a invop b)
!(a op b) -> (a invob b)
+
+ Activates on: <= < > >= == !=
*/
class UseInverseOp: public CppQuickFixFactory
{
As
b flipop a
+
+ Activates on: <= < > >= == != && ||
*/
class FlipBinaryOp: public CppQuickFixFactory
{
As
!(a || b)
+
+ Activates on: &&
*/
class RewriteLogicalAndOp: public CppQuickFixFactory
{
As
int *a;
int b;
+
+ Activates on: the type or the variable names.
*/
class SplitSimpleDeclarationOp: public CppQuickFixFactory
{
if (a) {
b;
}
+
+ Activates on: the if
*/
class AddBracesToIfOp: public CppQuickFixFactory
{
With
Type name = foo;
if (name) {...}
+
+ Activates on: the name of the introduced variable
*/
class MoveDeclarationOutOfIfOp: public CppQuickFixFactory
{
With
Type name;
while ((name = foo()) != 0) {...}
+
+ Activates on: the name of the introduced variable
*/
class MoveDeclarationOutOfWhileOp: public CppQuickFixFactory
{
x;
else if (something_else)
x;
+
+ Activates on: && or ||
*/
class SplitIfStatementOp: public CppQuickFixFactory
{
/*
Replace
"abcd" -> QLatin1String("abcd")
+ @"abcd" -> QLatin1String("abcd")
'a' -> QLatin1Char('a')
Except if they are already enclosed in
QLatin1Char, QT_TRANSLATE_NOOP, tr,
trUtf8, QLatin1Literal, QLatin1String
+
+ Activates on: the string literal
*/
class WrapStringLiteral: public CppQuickFixFactory
{
QCoreApplication::translate("CONTEXT", "abcd") or
QT_TRANSLATE_NOOP("GLOBAL", "abcd")
depending on what is available.
+
+ Activates on: the string literal
*/
class TranslateStringLiteral: public CppQuickFixFactory
{
};
};
+/**
+ * Replace
+ * "abcd"
+ * QLatin1String("abcd")
+ * QLatin1Literal("abcd")
+ * With
+ * @"abcd"
+ *
+ * Activates on: the string literal, if the file type is a Objective-C(++) file.
+ */
class CStringToNSString: public CppQuickFixFactory
{
public:
-017;
0783; // invalid octal
0; // border case, allow only hex<->decimal
+
+ Activates on: numeric literals
*/
class ConvertNumericLiteral: public CppQuickFixFactory
{
/*
Can be triggered on a class forward declaration to add the matching #include.
+
+ Activates on: the name of a forward-declared class or struct
*/
class FixForwardDeclarationOp: public CppQuickFixFactory
{
As
Type a = foo();
Where Type is the return type of foo()
+
+ Activates on: the assignee, if the type of the right-hand side of the assignment is known.
*/
class AddLocalDeclarationOp: public CppQuickFixFactory
{
};
};
-/*
+/**
* Turns "an_example_symbol" into "anExampleSymbol" and
* "AN_EXAMPLE_SYMBOL" into "AnExampleSymbol".
+ *
+ * Activates on: identifiers
*/
class ToCamelCaseConverter : public CppQuickFixFactory
{