forked from qt-creator/qt-creator
Clang: Use Utils::TemporaryDirectory
Task-number: QTCREATORBUG-17401 Change-Id: Ibf6007455ec92b1d9fcac17e1f3b5e2af21b7438 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QMetaMethod>
|
||||
#include <QProcess>
|
||||
#include <QTemporaryDir>
|
||||
#include <QThread>
|
||||
|
||||
namespace ClangBackEnd {
|
||||
@@ -221,8 +220,7 @@ void ConnectionClient::printStandardError()
|
||||
|
||||
void ConnectionClient::resetTemporaryDir()
|
||||
{
|
||||
const QString templatePath = QDir::tempPath() + QStringLiteral("/qtc-clang-XXXXXX");
|
||||
temporaryDirectory_.reset(new QTemporaryDir(templatePath));
|
||||
temporaryDirectory_ = std::make_unique<Utils::TemporaryDirectory>("clang-XXXXXX");
|
||||
}
|
||||
|
||||
void ConnectionClient::connectLocalSocketConnected()
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "clangcodemodelserverproxy.h"
|
||||
#include "lineprefixer.h"
|
||||
|
||||
#include <utils/temporarydirectory.h>
|
||||
|
||||
#include <QLocalSocket>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QScopedPointer>
|
||||
@@ -124,7 +126,7 @@ private:
|
||||
|
||||
mutable std::unique_ptr<QProcess> process_;
|
||||
QLocalSocket localSocket;
|
||||
std::unique_ptr<QTemporaryDir> temporaryDirectory_;
|
||||
std::unique_ptr<Utils::TemporaryDirectory> temporaryDirectory_;
|
||||
QTimer processAliveTimer;
|
||||
QString processPath_;
|
||||
bool isAliveTimerResetted = false;
|
||||
|
||||
Reference in New Issue
Block a user