Clang: Fix compile_commands path setup

Change-Id: I2af0935ad022714f8e929c483455a8800e9f7cca
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-10-14 09:45:31 +02:00
parent f079a36200
commit 1b6728538e

View File

@@ -155,7 +155,7 @@ GenerateCompilationDbResult generateCompilationDB(QList<ProjectInfo::ConstPtr> p
QTC_ASSERT(!projectInfoList.isEmpty(), QTC_ASSERT(!projectInfoList.isEmpty(),
return GenerateCompilationDbResult(QString(), "Could not retrieve project info.")); return GenerateCompilationDbResult(QString(), "Could not retrieve project info."));
QTC_CHECK(baseDir.ensureWritableDir()); QTC_CHECK(baseDir.ensureWritableDir());
QFile compileCommandsFile(baseDir.toString() + "/compile_commands.json"); QFile compileCommandsFile(baseDir.pathAppended("compile_commands.json").toFSPathString());
const bool fileOpened = compileCommandsFile.open(QIODevice::WriteOnly | QIODevice::Truncate); const bool fileOpened = compileCommandsFile.open(QIODevice::WriteOnly | QIODevice::Truncate);
if (!fileOpened) { if (!fileOpened) {
return GenerateCompilationDbResult(QString(), return GenerateCompilationDbResult(QString(),