std::unique_ptr is in the standard and QScopedPointer maybe gets
depreciated in futur. So lets use std::unique_ptr instead so we don't have
to change to much code later.
Change-Id: Id479b0e80adaf3da4e408198d43c5dfd09a8c66d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This reverts commit cbdf673696.
It introduce a dependency to utils for a couple of lines,
so it is not worth.
Change-Id: I2f53ff3f63322719de6faed7f55c66282d1044e8
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
...otherwise they accumulate in the temporary directory.
Change-Id: I0841f3d168f30f559fc718d2825dd3e800515074
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This addresses
SOFT ASSERT made fatal: "m_connection.isConnected()" in file
src/plugins/clangcodemodel/clangbackendipcintegration.cpp, line 230
I could not reproduce the issue locally, so I'm leaving the soft asserts
untouched for now.
Change-Id: If1d55ba7bc7e2d1ac20ad992c6d0d43ceb0f5d73
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
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>
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>
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>
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>
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>
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>
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>
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>