void TranslationUnits::checkIfProjectPartsExists(const QVector<FileContainer> &fileContainers) const { Utf8StringVector notExistingProjectParts; for (const FileContainer &fileContainer : fileContainers) { if (!projectParts.hasProjectPart(fileContainer.projectPartId())) notExistingProjectParts.push_back(fileContainer.projectPartId()); } if (!notExistingProjectParts.isEmpty()) throw ProjectPartDoNotExistException(notExistingProjectParts); }
CommandLineArguments::CommandLineArguments(const char *filePath, const std::vector<const char *> &projectPartArguments, const Utf8StringVector &fileArguments, bool addVerboseOption) { const auto elementsToReserve = projectPartArguments.size() + uint(fileArguments.size()) + (addVerboseOption ? 1 : 0); m_arguments.reserve(elementsToReserve); m_arguments = projectPartArguments; for (const auto &argument : fileArguments) m_arguments.push_back(argument.constData()); if (addVerboseOption) m_arguments.push_back("-v"); m_arguments.push_back(filePath); }
void Documents::setVisibleInEditors(const Utf8StringVector &filePaths) { for (Document &document : documents_) document.setIsVisibleInEditor(filePaths.contains(document.filePath())); }
void TranslationUnits::setVisibleInEditors(const Utf8StringVector &filePaths) { for (TranslationUnit &translationUnit : translationUnits_) translationUnit.setIsVisibleInEditor(filePaths.contains(translationUnit.filePath())); }