Commit Graph

20 Commits

Author SHA1 Message Date
Christian Kandeler
baf25e4cdb ClangCodeModel: Do not ignore highlighting for raw string literals
Also add the special handling for prefix and suffix like in CppHighlighter,
as not to re-introduce QTCREATORBUG-19119.

Fixes: QTCREATORBUG-16183
Change-Id: Ie264946782220a8e5a862c1d4550bcd49bc2349f
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-10-22 09:48:02 +00:00
Nikolai Kosjar
32fe77564e CppTools: Simplify
Change-Id: Id10cbcf541d8105265c531e63a64e2fd34e27379
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-11-01 09:53:45 +00:00
Alessandro Portale
1d3d18a969 CppTools: modernize
Change-Id: Iaf02e4d026f1ac8b216833d83cd7a735e21ff60a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-21 09:00:18 +00:00
Orgad Shaneh
bdc2b4b59f Remove hard-coded disabling of debug logs
Instead, set the default level of all logs to QtWarningMsg.

The call to setFilterRules overrides the user preferences in qtlogging.ini.

Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:36:58 +00:00
Eike Ziller
68a89c29a4 Make functionality of applying mixin text styles available for everyone
Change-Id: I0e702be0572229ec96c71d0ae2b5395a3c2fb29e
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-29 06:54:18 +00:00
Thomas Hartmann
d882cb4a8f Utils: Adjust name fillWithZero()
The name was quite missleading.

Change-Id: I538eca2a59e8a861e707fecd8331488e1919408a
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-03-29 08:23:14 +00:00
Marco Bubke
4d6b05c522 CppTools: Fix uninitialized memory
We cast it later to int64 for performance reasons so everything should be
filled by zeros.

Task-number: QTCREATORBUG-16672
Change-Id: Ib79ffa5cef79104dd3454111b52a6615c4b48917
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-01-17 16:45:24 +00:00
Orgad Shaneh
246e72262c CppTools: Separate highlighting for function declarations and calls
Task-number: QTCREATORBUG-15564
Change-Id: Iab1b60e19448202432f98295c89769cd376aa03f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-06-20 10:55:31 +00:00
Eike Ziller
a6aafe3c45 Add QTC_GUARD
Similar to QTC_CHECK, but has the boolean result of the condition as
value. Use it in the form

if (QTC_GUARD(condition)) { ... }

Replace some occurrences of

QTC_CHECK(condition)
if (condition) { .... }

Change-Id: I8eea02f869eb7a183dfbf4810dace48097880519
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-18 11:34:03 +00:00
Orgad Shaneh
4191d9ddcd CppTools: De-noise SemanticHighlighter
Change-Id: Id4655b0d81104468f6fe799744e49e505d3b8748
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-03-09 15:36:48 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Nikolai Kosjar
ca63359386 CppTools/Clang: Clean-up of includes
Change-Id: I0ba340dcf0ee23e61588f17262d07e7088751836
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-12-16 13:15:38 +00:00
Nikolai Kosjar
e50aafafe3 CppEditor: Fix semantic highlighting when zooming
...for the not visible documents.

First reset the extra additional formats, then set the new ones, not the
other way around.

Task-number: QTCREATORBUG-14579
Change-Id: Iae465bd9a7bb0a397fd4917df45955713aaf87c5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-23 08:15:46 +00:00
Friedemann Kleint
fb80206f3c Clean exported headers of the CppTools plugin.
Change-Id: I0144ac33e88980c431c54a6d69bbde28da4b1967
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-05 08:16:48 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Nikolai Kosjar
9cddeef036 CppTools: Make use of QLoggingCategory
...for document processing and highlighting.

Change-Id: I31d42a5a5010260643ec76688080fd14a486f7e3
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2014-11-03 12:11:01 +01:00
Eike Ziller
9c7019f0b2 License update.
Change-Id: I0acde2c3b995693de682679471f03af85bdd0a61
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-15 15:19:55 +02:00
hjk
0fcca946ad Rename {Core,TextEditor},{Base,}TextDocument classes
First step of some more 'Base' removal in TextEditor.
s/Core::TextDocument/Core::BaseTextDocument/
s/TextEditor::BaseTextDocument/TextEditor::TextDocument/

Change-Id: I71ba325a2f0ad72ec9dae0d96846cbae72d326f7
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-09-25 18:00:51 +02:00
Erik Verbruggen
55130a335e C++: prevent possible nullptr deref.
Change-Id: Ibc138bcfdef4b6a5dd154e819d568398ecace982
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-09-12 10:59:03 +02:00
Nikolai Kosjar
89bd4ee3c4 C++: Base parsing on editor document instead of widget
This mainly takes CppEditorSupport apart.

* Parsing is now invoked by CPPEditorDocument itself by listening to
  QTextDocument::contentsChanged().

* Upon construction and destruction CPPEditorDocument creates and
  deletes an EditorDocumentHandle for (un)registration in the model
  manager. This handle provides everything to generate the working copy
  and to access the editor document processor.

* A CPPEditorDocument owns a BaseEditorDocumentProcessor instance that
  controls parsing, semantic info recalculation and the semantic
  highlighting for the document. This is more or less what is left from
  CppEditorSupport and can be considered as the backend of a
  CPPEditorDocument. CPPEditorDocument itself is quite small.

    * BuiltinEditorDocumentProcessor and ClangEditorDocumentProcessor
      derive from BaseEditorDocumentProcessor and implement the gaps.

    * Since the semantic info calculation was bound to the widget, it
      also calculated the local uses, which depend on the cursor
      position. This calculation got moved into the extracted class
      UseSeletionsUpdater in the cppeditor plugin, which is run once the
      cursor position changes or the semantic info document is updated.

    * Some more logic got extracted:
	- SemanticInfoUpdater (logic was in CppEditorSupport)
	- SemanticHighlighter (logic was in CppEditorSupport)

    * The *Parser and *Processor classes can be easily accessed by the
      static function get().

* CppHighlightingSupport is gone since it turned out to be useless.

* The editor dependency in CompletionAssistProviders is gone since we
  actually only need the file path now.

Change-Id: I49d3a7bd138c5ed9620123e34480772535156508
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-08-25 13:06:01 +02:00