forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/11.0'
Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs Change-Id: I0b0394dd68cf89b2579d623af897f55dc01aeea5
This commit is contained in:
@@ -180,10 +180,10 @@ QVector<FolderNode::LocationInfo> extractBacktraceInformation(const BacktraceInf
|
||||
return info;
|
||||
}
|
||||
|
||||
static bool isChildOf(const FilePath &path, const QStringList &prefixes)
|
||||
static bool isChildOf(const FilePath &path, const FilePaths &prefixes)
|
||||
{
|
||||
for (const QString &prefix : prefixes)
|
||||
if (path.isChildOf(FilePath::fromString(prefix)))
|
||||
for (const FilePath &prefix : prefixes)
|
||||
if (path == prefix || path.isChildOf(prefix))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ const QStringList CMAKE_QUERY_FILENAMES = {"cache-v2", "codemodel-v2", "cmakeFil
|
||||
// Helper:
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
static FilePath cmakeReplyDirectory(const FilePath &buildDirectory)
|
||||
FilePath FileApiParser::cmakeReplyDirectory(const FilePath &buildDirectory)
|
||||
{
|
||||
return buildDirectory.pathAppended(CMAKE_RELATIVE_REPLY_PATH);
|
||||
}
|
||||
@@ -794,7 +794,7 @@ FilePath FileApiDetails::ReplyFileContents::jsonFile(const QString &kind, const
|
||||
// FileApi:
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
bool FileApiParser::setupCMakeFileApi(const FilePath &buildDirectory, Utils::FileSystemWatcher &watcher)
|
||||
bool FileApiParser::setupCMakeFileApi(const FilePath &buildDirectory)
|
||||
{
|
||||
// So that we have a directory to watch.
|
||||
buildDirectory.pathAppended(CMAKE_RELATIVE_REPLY_PATH).ensureWritableDir();
|
||||
@@ -817,7 +817,6 @@ bool FileApiParser::setupCMakeFileApi(const FilePath &buildDirectory, Utils::Fil
|
||||
}
|
||||
}
|
||||
|
||||
watcher.addDirectory(cmakeReplyDirectory(buildDirectory).path(), FileSystemWatcher::WatchAllChanges);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -227,9 +227,9 @@ public:
|
||||
const QString &cmakeBuildType,
|
||||
QString &errorMessage);
|
||||
|
||||
static bool setupCMakeFileApi(const Utils::FilePath &buildDirectory,
|
||||
Utils::FileSystemWatcher &watcher);
|
||||
static bool setupCMakeFileApi(const Utils::FilePath &buildDirectory);
|
||||
|
||||
static Utils::FilePath cmakeReplyDirectory(const Utils::FilePath &buildDirectory);
|
||||
static Utils::FilePaths cmakeQueryFilePaths(const Utils::FilePath &buildDirectory);
|
||||
|
||||
static Utils::FilePath scanForCMakeReplyFile(const Utils::FilePath &buildDirectory);
|
||||
|
||||
@@ -60,7 +60,7 @@ void FileApiReader::setParameters(const BuildDirParameters &p)
|
||||
// Reset watcher:
|
||||
m_watcher.clear();
|
||||
|
||||
FileApiParser::setupCMakeFileApi(m_parameters.buildDirectory, m_watcher);
|
||||
FileApiParser::setupCMakeFileApi(m_parameters.buildDirectory);
|
||||
|
||||
resetData();
|
||||
}
|
||||
@@ -378,7 +378,10 @@ void FileApiReader::cmakeFinishedState(int exitCode)
|
||||
if (m_lastCMakeExitCode != 0)
|
||||
makeBackupConfiguration(false);
|
||||
|
||||
FileApiParser::setupCMakeFileApi(m_parameters.buildDirectory, m_watcher);
|
||||
FileApiParser::setupCMakeFileApi(m_parameters.buildDirectory);
|
||||
|
||||
m_watcher.addDirectory(FileApiParser::cmakeReplyDirectory(m_parameters.buildDirectory).path(),
|
||||
FileSystemWatcher::WatchAllChanges);
|
||||
|
||||
endState(FileApiParser::scanForCMakeReplyFile(m_parameters.buildDirectory),
|
||||
m_lastCMakeExitCode != 0);
|
||||
|
||||
Reference in New Issue
Block a user