本文整理汇总了C++中FolderNode::filePath方法的典型用法代码示例。如果您正苦于以下问题:C++ FolderNode::filePath方法的具体用法?C++ FolderNode::filePath怎么用?C++ FolderNode::filePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FolderNode
的用法示例。
在下文中一共展示了FolderNode::filePath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addToProject
void JsonSummaryPage::addToProject(const JsonWizard::GeneratorFiles &files)
{
QTC_CHECK(m_fileList.isEmpty()); // Happens after this page is done
QString generatedProject = generatedProjectFilePath(files);
IWizardFactory::WizardKind kind = wizardKind(m_wizard);
FolderNode *folder = currentNode();
if (!folder)
return;
if (kind == IWizardFactory::ProjectWizard) {
if (!static_cast<ProjectNode *>(folder)->addSubProjects(QStringList(generatedProject))) {
QMessageBox::critical(m_wizard, tr("Failed to Add to Project"),
tr("Failed to add subproject \"%1\"\nto project \"%2\".")
.arg(QDir::toNativeSeparators(generatedProject))
.arg(folder->filePath().toUserOutput()));
return;
}
m_wizard->removeAttributeFromAllFiles(GeneratedFile::OpenProjectAttribute);
} else {
QStringList filePaths = Utils::transform(files, [](const JsonWizard::GeneratorFile &f) {
return f.file.path();
});
if (!folder->addFiles(filePaths)) {
QStringList nativeFilePaths = Utils::transform(filePaths, &QDir::toNativeSeparators);
QMessageBox::critical(wizard(), tr("Failed to Add to Project"),
tr("Failed to add one or more files to project\n\"%1\" (%2).")
.arg(folder->filePath().toUserOutput(),
nativeFilePaths.join(QLatin1String(", "))));
return;
}
}
return;
}