Commit Graph

22 Commits

Author SHA1 Message Date
Orgad Shaneh
cbdf673696 Clang: Replace macro usage with HostOsInfo
Change-Id: Ie2d02785a6f06447a270170d12f580fa1704b7ce
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-09-22 10:19:37 +00:00
Marco Bubke
4cdb5bab15 Clang: Add clang refactoring
Change-Id: I2e3f36f810276da3f8dc7dcc587b06f8edb586d3
GPush-Base: d02f51b48fc752fddcdef6dcb32b3f7f6c0195a3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-04 14:37:19 +00:00
Marco Bubke
48bb527607 Clang: Silence warning
Change-Id: I2b3cdc22678b5454fbd831ad41b7186461289441
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-19 13:38:01 +00:00
Marco Bubke
6e4da842ef Clang: Fix call of already destroyed virtual table
Task-number: QTCREATORBUG-16597
Change-Id: Ic5391ba7529de5b5ef5de260f4a5e831003ffbf6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-18 16:33:31 +00:00
Marco Bubke
c5e79f6269 Clang: Decouple ConnectionClient and ClangCodeModel*
We want to reuse the connection client in other plugins. This is the first
step, the next step is refactoring the IPC mechanismn and move it up to
the IpcServer- and IpcClientInterface.

Change-Id: I6eb6db1e9bc18232c8df350a6303afd2edc68da8
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-12 09:08:23 +00:00
Marco Bubke
cda6e3c15a Clang: Start ConnectionClient asynchronously
The connection client can block main thread at start up. This patch is
removing the wait functions and using signals instead.

Change-Id: I847c98b095752f6a875c0365bc27361bc5bdd051
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-07-12 09:07:39 +00:00
Marco Bubke
d027cab44e Clang: Rename Ipc* in ClangCodeModel*
We want to share more functionality of the IPC mechanism and for what we
need more interface classes. But we use this names already for the
ClangCodeModel implementation. So we rename the them to ClangCodeModel*.

Change-Id: Ie320e0d3b993586a9bcc6a5aa0d32427af41202e
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-06-30 09:28:56 +00:00
Nikolai Kosjar
70e3665c86 Clang: Forward clangbackend output to qDebug instead of stdout/stderr
Now the output of the clangbackend can be viewed with DebugView on Windows.

Downside is that qDebug() will append newlines. This can't be turned off
easily. We accept that.

Change-Id: I7d68bfcf05780c8bcb4a05a538d2d1542a6a6f22
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-15 14:55:36 +00:00
Tobias Hunger
f72370f20a Update License according to agreement with Free Qt Foundation
* Update remaining files in src

Change-Id: I1896f17fcf34f71c3310c87899fb5171b8e4afb1
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:59:41 +00:00
Marco Bubke
5f29a00c89 Clang: Change temporary directory for clangbackend
This is meant to

  1. Work around a libclang bug on Windows (not deleting preamble files)
  2. Delete left-over preamble files in case of a clangbackend crash

The temporary diretory will be removed on Qt Creator exit.

Task-number: QTCREATORBUG-10988
Change-Id: Ia5837c2a6ab2d55366d167dd591d87faaededf3e
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-12-01 12:24:55 +00:00
Nikolai Kosjar
f1300df6b3 Strip BOM from files
Change-Id: I9167c016760fe1e8378cdf84144c4bed5cd4e57c
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-10-01 10:51:10 +00:00
Marco Bubke
87baaee78d Clang: Add environment variable to disable alive timer
Change-Id: I558ff0fe83cce9ee921819c6fd9c18534fad9bcf
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-09-21 13:28:45 +00:00
Marco Bubke
6e14eb6940 Clang: Rename ForCodeCompletion in ForEditor
It reflects that the translation units and projects have a tied
relationship with an editor.

Change-Id: I3c01d5776980fe079af1fdef82feded83fdf5463
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-08-31 15:02:02 +00:00
Marco Bubke
ec4d002857 Clang: Rename command in message
Change-Id: I1e2671d15b0db3c670b86dd0d4bed5ee09e866f1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-08-25 12:54:27 +00:00
Nikolai Kosjar
db3dc92202 Clang: Clarify stdout/stderr prefix of backend
Change-Id: I936e75ddc26b812c4570859e6a61c2a09590ed98
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-07-29 08:53:37 +00:00
Nikolai Kosjar
b783bcea60 Clang: Allow to time high-level functions
...by enabling the logging rule:

    qtc.clangbackend.timers=true

Change-Id: I085c6bbebc0343b74bcb90119d1ebb80ad49518d
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-07-29 08:53:24 +00:00
Nikolai Kosjar
b2ec03c74c Clang: Fix potential infinite loop
Change-Id: I373a652db8811b0ebb416f5914aa4af12a23a3c9
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-02 17:06:46 +00:00
Nikolai Kosjar
2eb3bda5a8 Clang: Indicate lines from ClangBackEnd
...with a prefix.

Change-Id: I6e23e00254d7b7316057514d1234cde66ab44a0d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-26 07:56:44 +00:00
Marco Bubke
0e0f8b318e Clang: Filter out connection errors
The connections server needs some time to start and so the first connect
can be fail. Don't print an error in that case.

Change-Id: I38fe5401cd47a4ad1a552dcbdfafcc851e5dd7cf
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-25 13:08:03 +00:00
Nikolai Kosjar
5d51bd9324 Clang: Ensure end command is send before waiting for process finish
This reverts

    CmbIpc: Remove workaround
    287a263083

since the bug still exists. However, we use waitForBytesWritten()
instead of QCoreApplication::processEvents() since this seems to be fine
(QAbstractSocket::waitForBytesWritten is not called on Windows).

The bug was:
 1. Open a bigger project, like qtcreator.pro.
 2. After 2 seconds, quit it.
 ==> The Qt Creator window is gone but the Qt Creator process waits
     until the clangbackend process is finished.

Change-Id: I25c475d2a6db94a1c3a8d827a41f8c0b2624eaea
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-06-24 10:03:26 +00:00
Marco Bubke
2b84d7611b Clang: Reorder includes
Change-Id: I324e88c0d295114390c1fac2745c0d2d47637ece
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-16 13:53:30 +00:00
Marco Bubke
1402c067b1 Clang: Rename CodeModelBackEnd in ClangBackEnd
Change-Id: I13e8a458634110456375956d4d4da7239c86957f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-16 13:29:27 +00:00