Make calls like a->b()->c() assignable to a local variable.
Task-number: QTCREATORBUG-10355
Change-Id: If4a55b435c99150710d00567188f901acb2c1a89
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Trust the matcher to do the job.
Task-number: QTCREATORBUG-13564
Change-Id: I4ff14608a1ce12d3f4424242e50ba71233ac9bfd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This should improve results of CI tests where multiple creator instances
execute the plugin tests.
Change-Id: I557a0964568655662108df201589ba369096f4bf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
We will add another type of test case that allows us to test the list of
offered operations.
Change-Id: I528b3844181c139c8955091ac0bbcf6475fd8a4f
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Fixes multiple addition of same include.
* Takes over the check of AddIncludeForForwardDeclaration for forward
headers.
Task-number: QTCREATORBUG-9704
Change-Id: I84629d35ae433385942a9157e5d32ef04159d07f
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
...when adding an include for an undefined identifier.
Change-Id: Ia338e924901262a847d3bd7ed9733d8e66c631dd
Task-number: QTCREATORBUG-10391
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Now there is no need to position the cursor on "C" of "Namespace::C" to
trigger the quick fix. It will already trigger if the cursor is
somewhere within the name.
Change-Id: Ic99325f95b5cf5551fc74b55606c402461849fb0
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
...for AddIncludeForUndefinedIdentifier.
There are two basic tests for AddIncludeForUndefinedIdentifier:
* Tests bypassing match() in order to only test the inserting of an
include at the right position (now named *_inserting_*)
* Tests also testing match()
Change-Id: I5b2b008ff9462a1cdaa5718f6a430c46992effab
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Limitations:
* Overloads are not yet handled
* Action is not offered if the slot can't be looked up in the
receiver expression (e.g. when it's a base class pointer).
Change-Id: I5779ff1b74657025d058d4f3690f6723b4784497
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This eliminates a bunch of list->set->list conversions. Especially the
ProjectInfo::appendProjectPart takes lots of time converting for every
part added.
Change-Id: Ib3c8cd4b0ad6c012ccbeed12ebedd46b9b6cca95
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
No declarator was provided but we assumed one.
Task-number: QTCREATORBUG-12853
Change-Id: I5faf96b63f39aff43c0165f7277345737e53f191
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The ConvertFromAndToPointer quickfix allows to convert a pointer to a
stack variable and vice versa. The initializer of the declaration is
adjusted. Member accesses change to . or -> accordingly.
Usages of the & and * operators are automatically fixed.
Task-number: QTCREATORBUG-9598
Task-number: QTCREATORBUG-12733
Change-Id: I388a9bd32179c79bff808615299a91a225acea64
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
The base pattern is FooEditor for BaseTextEditor derived classes
and FooEditorWidget for BaseTextEditorWidget derived classes. So:
CPPEditorWidget -> CppEditorWidget
CPPEditorWidgetPrivate -> CppEditorWidgetPrivate
...::EditorWidget -> PythonEditorWidget
GLSLTextEditorWidget -> GlslEditorWidget
GLSLEditorEditable -> GlslEditor
Change-Id: I76d34a3694c2fb35491982d86e83f7e4774c0be6
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
...if enum type is defined inside a class or namespace.
Task-number: QTCREATORBUG-12311
Change-Id: I71b64bbe9d419707b66caacd10550041efc1520c
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
... when macros are used in function definition
Task-number: QTCREATORBUG-12314
Change-Id: I811f93cde3dffa75fb71684569706f284939d7f5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Instead of having two lists of paths, now only one list is used where
both include paths and framework paths can be mixed. This reflects the
way the compiler is invoked, and retains the (correct) search order.
Task-number: QTCREATORBUG-11599
Change-Id: I373953e3e305df5b7a0d10920e12d146584adf9f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
If a variable's name is only "m_" it should not be recognized as a
prefix (resulting in an invalid/empty getter and meaningless setter) but
rather as a name with the "_" postfix. This way, it results in getM()
and setM().
Change-Id: I9a8249fc12319034b95532415f40b6c3183f7754
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
They belong there. This will also kill the CppSourceProcessor dependency
from CppEditor.
Change-Id: Ic2ae6b0c6f0913d913636be61df194846985d1ce
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...since it does quite a bit more than only preprocessing, as the name
suggests. We use that class to process source files in general. The
output is not a preprocessed source, but a set of CPlusPlus::Documents
with symbols.
Change-Id: I787d0f22f9f042ddf0c99e8c2f0bdb9aa7001735
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This is necessary in order to add tests with multi-byte UTF-8 code
points. Otherwise the initial and target source code marker positions
will be calculated on the QByteArray (test code) but used with a QString
(editor document).
Change-Id: I108961b13d32912a4d3193cf26eb59f65d296f57
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
For example test_quickfix_InsertDefFromDecl_afterClass led to a
QByteArray::remove(-1) call. According to the doc nothing happens, but
it will become problematic later when we change to QString (with that, a
character will be removed from the end).
Change-Id: Ie89dd7834e44fbcfde63ea6ca3ab181dfe50e191
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
removeTrailingWhitespace() appended one '\n' too much. As time went by,
excess '\n' where added to the test code.
* Remove excess '\n'.
* For consistency, ensure that each test code line ends with '\n'.
Change-Id: Ie2d4a1b8b27989f26bf154cb3b891dfb8fe6b2fd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
It contains many components, doesn't make sense to have it with all
other quickfixes.
Change-Id: Idede14c90ba9b612ae9e9048f5795d674811acfe
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>