Commit Graph

9 Commits

Author SHA1 Message Date
Nikolai Kosjar
aa290912b8 Clang: Remove project tracking on clangbackend side
...as it is not needed. Just provide the compilation arguments as part
of the Document.

As a side effect, re-initializing the backend after a crash is cheaper
and will not freeze the UI anymore (referenced bug).

Task-number: QTCREATORBUG-21097
Change-Id: I866e25ef1fd5e4d318df16612a7564469e6baa11
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-26 10:45:41 +00:00
Nikolai Kosjar
f01fbcb789 Clang: Clean up some IPC names
This is long overdue since some names were simply wrong and/or
misleading. Also, some of the old names were long enough to almost get
crazy.

The renaming starts from ClangCodeModelServerInterface and
ClangCodeModelClientInterface and affects usages and related functions.

For the ClangCodeModelServerInterface, categorize the messages in
 - messages that require a response (request*)
 - notification messages (the remaining ones)

Change-Id: I5342ed8e0d87404ee72f3c3766fd8ef7505defb1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-04 09:54:01 +00:00
Nikolai Kosjar
ca72c29462 Clang: Provide highlighting for identifier under cursor
Change-Id: I80ffe23cbcc84ab7323124581d9dd6afbe974fd0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-14 12:49:05 +00:00
Nikolai Kosjar
ac59e2be40 Clang: Move createJobRequest into Jobs
This simplifies the high level client ClangCodeModelServer and removes
quite some duplication in tests.

Change-Id: I4c6ab8646c8728990ebaca2b920ae514e949c54a
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-05 10:39:39 +00:00
Marco Bubke
ada5ea1952 UnitTests: Fix names and disable slow tests by default
Slow and very slow tests have now their own test category. We add SlowTest
for tests which are slower than ~5ms and VerySlowTest if they are slower
than ~100ms. They are disabled them by "-*SlowTest.*". If you have a faster
machine than most developers simply try lower values. The aim is that most
developers can execute the tests in under ~2s.

In the long run we should use dependency breaking and data sharing to
reduce the count of the slow tests.

Change-Id: I8578071258d7f89b2052709f3dd526ced811483f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-01-04 12:35:52 +00:00
Nikolai Kosjar
bf5c1cc4fb Clang: Avoid duplicate jobs without changes in-between
This could happen, e.g. with this message order:

  >>> updateTranslationUnitsForEditor()
  add job<1>
  run job<1>
  >>> updateVisibleTranslationUnits(Utf8String(), {})
  >>> updateVisibleTranslationUnits(path, {path})
  add job<2>
  finish job<1>
  run job<2> -- Ops, nothing is changed but job<2> is started

This led to an outdated translation unit (e.g. wrong highlighting).

Now JobQueue checks for duplicates in the queue and checks all the
currently running jobs.

Change-Id: I05843fddcbd21ce0489681c283227c0027ded428
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-10 12:37:20 +00:00
Nikolai Kosjar
c8cec2dd0d Clang: Base JobQueue on translation unit
This enables a job per translation unit instead of per document.

This does not change any behavior yet.

Change-Id: Iafb8dab5da32b53dbb3010c16241bf89cbb81b38
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-10 12:36:33 +00:00
Nikolai Kosjar
c12d01fb41 Clang: Add job queue for each document
...in preparation for follow-up changes. This will enable e.g. a timer
per document.

This does not change any behavior yet.

Change-Id: Ic1dc06de602373c666d47ce7a95ab99e56d389d5
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-10 12:35:35 +00:00
Marco Bubke
47c01daeb2 UnitTest: Cleanup
Improve naming and introduce googletest.h.

Change-Id: I445c13db4c23d6dd5682ce0db3b83055cc6b8a89
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-09-19 15:17:54 +00:00