Merge remote-tracking branch 'origin/11.0'

Change-Id: Iad820911996f8daff6ce63b4f0267bd15d35d176
This commit is contained in:
David Schulz
2023-08-08 07:33:32 +02:00
2 changed files with 13 additions and 3 deletions

View File

@@ -661,9 +661,17 @@ FilePaths CMakeBuildSystem::filesGeneratedFrom(const FilePath &sourceFile) const
FilePath generatedFilePath = buildConfiguration()->buildDirectory().resolvePath(relativePath); FilePath generatedFilePath = buildConfiguration()->buildDirectory().resolvePath(relativePath);
if (sourceFile.suffix() == "ui") { if (sourceFile.suffix() == "ui") {
generatedFilePath = generatedFilePath const QString generatedFileSuffix = "ui_" + sourceFile.completeBaseName() + ".h";
.pathAppended("ui_" + sourceFile.completeBaseName() + ".h");
return {generatedFilePath}; // If AUTOUIC reports the generated header file name, use that path
FilePaths generatedFilePaths = this->project()->files([generatedFileSuffix](const Node *n) {
return Project::GeneratedFiles(n) && n->filePath().endsWith(generatedFileSuffix);
});
if (generatedFilePaths.empty())
generatedFilePaths = {generatedFilePath.pathAppended(generatedFileSuffix)};
return generatedFilePaths;
} }
if (sourceFile.suffix() == "scxml") { if (sourceFile.suffix() == "scxml") {
generatedFilePath = generatedFilePath.pathAppended(sourceFile.completeBaseName()); generatedFilePath = generatedFilePath.pathAppended(sourceFile.completeBaseName());

View File

@@ -11,7 +11,9 @@
#include <utils/temporarydirectory.h> #include <utils/temporarydirectory.h>
#include <QDebug> #include <QDebug>
#ifdef WITH_TESTS
#include <QTest> #include <QTest>
#endif
namespace TextEditor { namespace TextEditor {