| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Fixes: QTCREATORBUG-21981
Change-Id: Iaded998eb793fb4284a9f8b22b2fa7a7443a1585
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Arguments of funstion-like macro may contain the name of this
macro. The attempt to expand it results into infinite recursion.
Patch solves that by saving the macro name until the arguments
are collected to determine that it should not be expanded.
Fixes: QTCREATORBUG-21642
Change-Id: Iafb404ecd3959a2f1011c12c1c3f1c0c54ed3547
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
| |
Qt Creator almost hangs and consumes a lot of memory if that happens.
Just ignore such cases in preprocessor.
Task-number: QTCREATORBUG-18995
Change-Id: Ib81cc18738696b02f98e5064d06c719a44ebdaa3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
|
| |
Try to complete constructor after left brace with fallback
to normal completion.
Task-number: QTCREATORBUG-20957
Change-Id: I6c33790a3ee1e623a3d8abe9a44cfd821b6f3106
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
| |
In preperation for the language server protocol support.
Change-Id: Iee4ccd53a86d9afdb357972ea62b75ace2edcb1d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
|
|
|
|
|
|
|
|
| |
warning: prefer using 'override' or (rarely) 'final' instead of
'virtual' [modernize-use-override]
Change-Id: I6dac7a62b627fa1353b4455e1af92f869c2571cc
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change limits the set of tokens that fall under
Token::isOperator(). That allows cpphighlighter.cpp to
distinguish operator tokens from punctuator tokens
(without changing any logic in cpphighlighter.cpp).
This change moves punctuators from "Operator"
to the "Text" style category where they belong.
Punctuators are not operators. Punctuators are
dumb text tokens.
Why don't we let the clang backend alone separate
these tokens for us?
1. Clang is slow on big files. Sometimes the
highlighting dictated by clang is painted _seconds_
after cpphighlighter.cpp runs. CppHighlighter is way
faster so we use it to "prepaint" code while clang is
busy in the background.
2. Secondly, clang cannot yet handle all operator types.
In particular, none if its "operator cursors"
CXCursor_UnaryOperator:
CXCursor_BinaryOperator:
CXCursor_CompoundAssignOperator:
CXCursor_ConditionalOperator:
includes the -> and . operators.
We still need CppHighlighter to paint those tokens.
However, once clang has finished processing the file some
operator tokens will be repainted. We need clang to get
all operators' semantics. In particular, we need clang to
tell us if < is a "smaller than"-operator or part of a
template parameter like set<int>.
Task-number: QTCREATORBUG-19659
Change-Id: I952cb58f7c79134b3281e2a8221425cc1d0ad263
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
|
|
| |
BackwardScanner required more investigation and this is
the better fix than 413c66ec.
Change-Id: I651a7b416b549cc4a0e086873262d04409a7448e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Introduced by 0629400.
Sometimes typing '{' after class crashes QtC.
Task-number: QTCREATORBUG-19726
Change-Id: Idbbfaaa21837ec4afbe7debbd80ddaa484120f09
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Introduce abstract model to be able to use clang
based version of it in follow up patches.
Fix warnings and modernize source code a little.
Move OverviewModel to CppTools.
Change-Id: Idcc9bf03cad047026a456bd01063597a1eb95147
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
...when typing the opening brace. This restores the initial behavior
from version 4.3.
Not auto-inserting the closing brace allows the user to press Enter to
get "};" completed.
Change-Id: I8c62a08433a947e28f0555338a5fb8eeeae11bea
Task-number: QTCREATORBUG-18872
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If '{' is typed, we check whether '}' should be auto-inserted.
Previously, we did this by only looking at the tokens of the current
line. By using the BackwardsScanner we can easily look also at the
previous lines, which fixes e.g.
namespace N
<CURSOR> // type '{' - no '}' should be inserted.
Change-Id: Ib2c2989c33f87464431d45facf986bcbb2eff2f8
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
|
|
|
| |
...to avoid out of memory crashes.
Task-number: QTCREATORBUG-18649
Change-Id: I5e121bf4be0fd0c01a97a182ed07ee7552fb68ac
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Regression from
commit a6aa287720112c70c1363bcb46d55d438fe57eac
C++: Fine-tune auto insertion of '}'
Change-Id: I3ede8c7a1e3c73708d5d5a59c314e4b4596976b2
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
| |
Change-Id: Ib86e09d6d516b175e715725fa9b60d7ae2626ff8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not insert for these cases:
* <Cursor>{
* namespace X <Cursor>
* if the next block is indented, like e.g.:
if (e) <Cursor>
g();
* on empty line if text before looks like a finished statement or
scope opening/end
Change-Id: Id9decc1e964a775724a929c2a3e79b5283105560
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
| |
...when typing '{'.
Change-Id: Ia1d3bcd7440c96ed3c8c1479148dd74d3d291689
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
qtcreator.qbs
Change-Id: Ic5e268326d93172208de291d31a716e437b9cedf
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
...due to indirect recursion:
...
CPlusPlus::ClassOrNamespace::lookupType LookupContext.cpp 833 0x7fffd6c954cc
CPlusPlus::ClassOrNamespace::nestedType LookupContext.cpp 1364 0x7fffd6c94bc6
CPlusPlus::ClassOrNamespace::lookupType_helper LookupContext.cpp 955 0x7fffd6c9517f
CPlusPlus::ClassOrNamespace::lookupType_helper LookupContext.cpp 983 0x7fffd6c952ad
CPlusPlus::ClassOrNamespace::lookupType LookupContext.cpp 833 0x7fffd6c954cc
CPlusPlus::ClassOrNamespace::nestedType LookupContext.cpp 1364 0x7fffd6c94bc6
CPlusPlus::ClassOrNamespace::lookupType_helper LookupContext.cpp 955 0x7fffd6c9517f
CPlusPlus::ClassOrNamespace::lookupType_helper LookupContext.cpp 983 0x7fffd6c952ad
CPlusPlus::ClassOrNamespace::lookupType LookupContext.cpp 833 0x7fffd6c954cc
...
ClassOrNamespace::lookupType(const Name *) already guards with a list of
entries already processed, but some calls deeper the list is not passed
on and lookupType() starts again with an empty list. Handle that case,
too.
Task-number: QTCREATORBUG-18499
Change-Id: Iab8978f6ac1d0aea16f49b3547415f43de887b07
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fix makes some trick and replaces existing typedef of 'pointer'
to the simplest one(only in class unique_ptr), e.g.:
template <class _Tp>
class unique_ptr
{
typedef some_strange_things pointer;
pointer operator->();
}
is replace with
template <class _Tp>
class unique_ptr
{
typedef _Tp* pointer;
pointer operator->();
}
In most of the implementation of unique_ptr it should work.
Similar approach is done for std::list, std::vector, std::queue, std::set,
std::multiset, std::unordered_set.
It is done in this hacky way to omit problems with cyclic and complex
resolving of typedefs.
Change-Id: I1363dfc5e23d3cd2fa7af7fc27423bfbac2d894d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Properties have been so useful in Qt for Years, and they will
continue being so. Properties deserve a proper icon.
Change-Id: Ifd19c97470a48a033bbe4017855f7b150befb365
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
...from coverity scan.
Change-Id: I44663354b3ee4854dd6335121a0160e35f14976c
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Unless it balances the curly braces
* typing '{' leads to auto insertion of '}'.
* typing '}' skips already present '}'.
* removing '{' leads to auto removal of '}'.
This prevents unbalanced curly braces, which are problematic for clang.
Concrete use cases are: typing of initializer lists, lambdas, function
definitions.
Task-number: QTCREATORBUG-15073
Change-Id: Iec8c6aa5aca054455c1e1bfde3a65c4fd1f579c3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
Conflicts:
qbs/modules/qtc/qtc.qbs
qtcreator.pri
Change-Id: I6d89ea588de955f5d878500b59285d3adde6c77d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The change
CPlusPlus: Fix isQtReservedWord
commit 7d76dd007954ee48182beb2adf17dab5df5fbea8
enabled the problematic code path.
Change-Id: Ic89e3976b07ad55976c474f9c4b6d6f6cf64d29e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
| |
| |
| |
| |
| | |
Change-Id: I1d22333ad60d229202db5d372d00019b5870e60f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ibe717dc587d817d53356771507b4aa3072554cb1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ie28ff761b0bae13c6ebdf7dd649cfbba28e0fc2c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: I44511e06986b7df6007be7daf7051c895a10794b
|
| |
| |
| |
| |
| |
| |
| |
| | |
Change-Id: I4f2e61e4bade9e7b4518d144db8163e596ab6264
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Iec2c2db7afd8e5fe463a32c6b5167592cdd7617c
Reviewed-by: Laurent Montel <laurent.montel@kdab.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|/
|
|
|
| |
Change-Id: Idfa5ffdcf23d1ef80442276690b8082b8279dbfa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
| |
Change-Id: Iceef4e9a6f213a747045db3b06a5608d77652f98
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
| |
Change-Id: If4562fff4271dd8be3ec2b3394fdcbe5a9cb4e50
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|\
| |
| |
| | |
Change-Id: I9006dd493707ae626ae3502541599c8789e1aab0
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: QTCREATORBUG-16086
Change-Id: Ic2f3fd38ae6cc93725bc214c24320f40a0a519a8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Format initializer lists code style like.
Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
|
| |
| |
| |
| |
| |
| | |
Task-number: QTCREATORBUG-17717
Change-Id: Iffb34a3d77ada624dc13b8ab050ac08731d25863
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We use "shared" to define a shared library and not dll.
Change-Id: Ia97ebd0042a7ef0f33eadaa448d9a44b42331ad1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/android/androidbuildapkstep.cpp
src/plugins/genericprojectmanager/genericproject.cpp
Change-Id: I3484b668f9323ed0c05de99f8dfed07c9e65ab98
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The Control of the Document "exprDoc" in ResolveExpression::visit(
SimpleNameAST*ast) owns names that are passed on further as part of the
LookupItems. However, the life time of that Document and thus the
Control ends in that function.
Fix by using the appropriate Control object.
Task-number: QTCREATORBUG-16731
Change-Id: I5a7af0a67613fff79f7e07865801585c13bb9b45
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Objective C/C++ was not enabled in highlighter.
- QMake project part for Objective C/C++ did not have ObjectiveC extension enabled.
- As languageFeatures.objCEnabled is a bitfield, it was actually always set to 0.
- Highlight ObjC class & protocol declarations.
- Highlight ObjC message passing.
Change-Id: I64d12c9509058d05f7adce94598cb7ce91727ac8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|/
|
|
|
|
|
| |
checking for size >= 4 masks Q_D and Q_Q.
Change-Id: If9ab7d3b2c2c571e73b98e89908e492fc6241296
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The modification of the TemplateNameId changed "global state" because
the TemplateNameId is potentially accessed by multiple threads doing
lookup (access to same document and thus same symbol names).
Depending on the thread scheduling and access to
ClassOrNamespace::_specializations, the changed TemplateNameId
"suddenly" led to inconsistent results of TemplateNameId::Compare and
thus broke the std::map assertions.
Get rid of the const_cast, the setter and simply construct a temporary
TemplateNameId with isSpecializaton = true.
Task-number: QTCREATORBUG-14911
Change-Id: Ie381d132cc0d06af351ace4257773637d1ebee4e
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
|
|
| |
...so that it can be used in the ScxmlEditor plugin
Change-Id: I0e0ed050f7765bcc901db3bb2c3273456a228b5e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
|
|
|
|
|
|
|
| |
Do not require directly passing the enclosing template.
Change-Id: Ie03bc58338fe003677a5f5311d86d70f499373ee
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some (legacy) C files, new and delete may be used for regular identifier.
There are some limitations:
* Header files have no 'implicit' type, and may be parsed as C++ or ObjC depending on the
other files in the project.
* QMakeProject use a single ProjectPart for C and C++ files, so there will still be the issue.
Change-Id: Iec11687b35f7ccf1e7c0d091b143ae90d950e440
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
| |
Change-Id: Ib228184e1259585eeac61b9196195c39a9550cb9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The m_parserFuture.cancel() in ~BuiltinEditorDocumentProcessor() did not
cancel anything. Thus, closing a document while the parser was running
led to a blocking UI thread.
Now it cancels at the next include directive it encounters.
Change-Id: I092fddbbd747e0bc95265b6e9b4fcc26b3f76cb3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Now the ref-qualifier (& or &&) of the function declaration
is propagated to GUI. For example, 'Refactor' -> 'Add Definition'
preserves the ref-qualifier.
Change-Id: I8ac4e1cad4e44985e94230aabbd9858a7e929fee
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|