forked from qt-creator/qt-creator
ClangTools: Remove dead code
Change-Id: I5db111402902e81099489dc5ab4b0b929c574969 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -387,7 +387,7 @@ void ClangToolRunControl::analyzeNextFile()
|
|||||||
|
|
||||||
void ClangToolRunControl::onRunnerFinishedWithSuccess(const QString &filePath)
|
void ClangToolRunControl::onRunnerFinishedWithSuccess(const QString &filePath)
|
||||||
{
|
{
|
||||||
const QString logFilePath = qobject_cast<ClangToolRunner *>(sender())->actualLogFile();
|
const QString logFilePath = qobject_cast<ClangToolRunner *>(sender())->logFilePath();
|
||||||
qCDebug(LOG) << "onRunnerFinishedWithSuccess:" << logFilePath;
|
qCDebug(LOG) << "onRunnerFinishedWithSuccess:" << logFilePath;
|
||||||
|
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
@@ -415,7 +415,7 @@ void ClangToolRunControl::onRunnerFinishedWithFailure(const QString &errorMessag
|
|||||||
<< errorMessage << '\n' << errorDetails;
|
<< errorMessage << '\n' << errorDetails;
|
||||||
|
|
||||||
// Even in the error case the log file was created, so clean it up here, too.
|
// Even in the error case the log file was created, so clean it up here, too.
|
||||||
QFile::remove(qobject_cast<ClangToolRunner *>(sender())->actualLogFile());
|
QFile::remove(qobject_cast<ClangToolRunner *>(sender())->logFilePath());
|
||||||
|
|
||||||
++m_filesNotAnalyzed;
|
++m_filesNotAnalyzed;
|
||||||
m_success = false;
|
m_success = false;
|
||||||
|
|||||||
@@ -105,11 +105,6 @@ bool ClangToolRunner::run(const QString &filePath, const QStringList &compilerOp
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ClangToolRunner::filePath() const
|
|
||||||
{
|
|
||||||
return m_filePath;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ClangToolRunner::onProcessStarted()
|
void ClangToolRunner::onProcessStarted()
|
||||||
{
|
{
|
||||||
emit started();
|
emit started();
|
||||||
@@ -171,15 +166,5 @@ QString ClangToolRunner::processCommandlineAndOutput() const
|
|||||||
QString::fromLocal8Bit(m_processOutput)));
|
QString::fromLocal8Bit(m_processOutput)));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ClangToolRunner::actualLogFile() const
|
|
||||||
{
|
|
||||||
if (QFileInfo(m_logFile).size() == 0) {
|
|
||||||
// Current clang-cl ignores -o, always putting the log file into the working directory.
|
|
||||||
return m_clangLogFileDir + QLatin1Char('/') + QFileInfo(m_filePath).completeBaseName()
|
|
||||||
+ QLatin1String(".plist");
|
|
||||||
}
|
|
||||||
return m_logFile;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace ClangTools
|
} // namespace ClangTools
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ public:
|
|||||||
// (2) -o output-file
|
// (2) -o output-file
|
||||||
bool run(const QString &filePath, const QStringList &compilerOptions = QStringList());
|
bool run(const QString &filePath, const QStringList &compilerOptions = QStringList());
|
||||||
|
|
||||||
QString filePath() const;
|
QString filePath() const { return m_filePath; }
|
||||||
QString actualLogFile() const;
|
QString logFilePath() const { return m_logFile; }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void started();
|
void started();
|
||||||
|
|||||||
Reference in New Issue
Block a user