While parsing a document Bind::asStringLiteral() Token::spell() was
called for a raw string literal token with a Token::literal nullptr.
This is due scanRawStringLiteral() not properly aborting for
invalid/incomplete code and that the code paths handling
multi-line-raw-strings were not limited to the highlighting case.
Address both cases.
Task-number: QTCREATORBUG-18941
Change-Id: I489d288ccbd7b59be396dada846613ff555436cf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Often used for macro names, e.g. TEST_ASSERT_EQUAL_FLOAT(),
which can now be matched by "TAEF".
Change-Id: I0626a60e2be68c1514c28769c679212075227281
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Use the CamelHumpMatcher in the C++, QML, and files filters
* Supports matching against UpperCamelCase, lowerCamelCase
and snake_case strings
* Supports highlighting of matched characters
Task-number: QTCREATORBUG-3111
Started-by: David Kaspar <dkaspar@blackberry.com>
Change-Id: If6220191432ef965bde3c8dbe4a10d89e222ba6f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
When matching NLH against LongCamelHump do _not_ consider the N
of Long as part of the match. The first character needs to meet
the same requirements as the others.
Change-Id: I4e7b2fe5a28296afe6f06f90e1986336fe7f3179
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Handle IPv6, and do not try to interpret the result as hex.
Change-Id: I700c233d03cc706bc8712ab9fabee75d7f126df3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
We should not rely on its presence on non-Darwin platforms.
Change-Id: I3fa722038f9c2d1139f6e1dc8c49d1c4d2fe0bee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Simplifies user code, and it was only ever used in a 1:1 relation,
even in the tests.
Change-Id: I3ce4fc83a361aceb730c05420efdb4ea52d37cda
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
It's mostly the xml/log handling, which can be re-used in other tools.
The change is purely mechanical, including some style fixes and
some modernization.
Change-Id: I6b44ae71451e8d3e26df40b9af9b4ec70038a92d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Parsing has to stop at the first < (coming from the end).
foo::span<int>::bar<double> has a parameter 'double', not 'intdouble'.
Change-Id: Ied142d5e75a7587d6c0efd3b51608b199b999e93
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Pass the mapping from custom enum to text style in form of a function,
which then can use a switch which is checked by compilers, and
avoids the need to lookup a different enum somewhere else to find
out what the mapping actually is.
That mapping is cached to keep performance as before.
Also, most highlighters created an enum just for the purpose of mapping
to text styles, basically creating duplicated subsets of text style like
enums everywhere. Instead provide a default, identity mapping from text
styles to text styles.
Change-Id: I2ea1ca702b99e36b8742dfda510b1b2753f0a1c2
Reviewed-by: David Schulz <david.schulz@qt.io>
With the built-in model, which affects basic highlighting.
Task-number: QTCREATORBUG-17720
Change-Id: I7369d7288d9c2c8e5ef36fc27549121014527e58
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Use a thread pool with reduced max thread count.
Task-number: QTCREATORBUG-18185
Change-Id: I18bd3de82365edaf21d8dcf9c89035da1ac74756
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This requires making template argument extraction a bit more robust
GCC 5.4.1 created debug info only reports the first argument for
boost::variant<int, bool>:
#include <boost/variant/variant.hpp
int main() { boost::variant<int, float> v = 1; return 0; }
py print(gdb.parse_and_eval('v').type)
-> boost::variant<int, float>
py print(gdb.parse_and_eval('v').type.template_argument(0))
-> int
py print(gdb.parse_and_eval('v').type.template_argument(1))
-> Traceback (most recent call last):
File \"<string>\", line 1, in <module>
RuntimeError: No argument 1 in template.
Error while executing Python code.
Change-Id: Iedca8b073078c93449ab61bb2cab05d6cd9803ba
Reviewed-by: Christian Stenger <christian.stenger@qt.io>