本文整理汇总了C++中FileName::appendPath方法的典型用法代码示例。如果您正苦于以下问题:C++ FileName::appendPath方法的具体用法?C++ FileName::appendPath怎么用?C++ FileName::appendPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileName
的用法示例。
在下文中一共展示了FileName::appendPath方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: bundleDirectory
FileName IosRunConfiguration::bundleDirectory() const
{
FileName res;
Core::Id devType = DeviceTypeKitInformation::deviceTypeId(target()->kit());
bool isDevice = (devType == Constants::IOS_DEVICE_TYPE);
if (!isDevice && devType != Constants::IOS_SIMULATOR_TYPE) {
qCWarning(iosLog) << "unexpected device type in bundleDirForTarget: " << devType.toString();
return res;
}
QmakeBuildConfiguration *bc =
qobject_cast<QmakeBuildConfiguration *>(target()->activeBuildConfiguration());
if (bc) {
QmakeProject *pro = qobject_cast<QmakeProject *>(target()->project());
const QmakeProFileNode *node = 0;
if (pro)
node = pro->rootProjectNode();
if (node)
node = node->findProFileFor(profilePath());
if (node) {
TargetInformation ti = node->targetInformation();
if (ti.valid)
res = FileName::fromString(ti.buildDir);
}
if (res.isEmpty())
res = bc->buildDirectory();
switch (bc->buildType()) {
case BuildConfiguration::Debug :
case BuildConfiguration::Unknown :
if (isDevice)
res.appendPath(QLatin1String("Debug-iphoneos"));
else
res.appendPath(QLatin1String("Debug-iphonesimulator"));
break;
case BuildConfiguration::Profile :
case BuildConfiguration::Release :
if (isDevice)
res.appendPath(QLatin1String("Release-iphoneos"));
else
res.appendPath(QLatin1String("Release-iphonesimulator"));
break;
default:
qCWarning(iosLog) << "IosBuildStep had an unknown buildType "
<< target()->activeBuildConfiguration()->buildType();
}
}
res.appendPath(applicationName() + QLatin1String(".app"));
return res;
}
示例2: versionRegExp
QList<AndroidToolChainFactory::AndroidToolChainInformation> AndroidToolChainFactory::toolchainPathsForNdk(const FileName &ndkPath)
{
QList<AndroidToolChainInformation> result;
if (ndkPath.isEmpty())
return result;
QRegExp versionRegExp(NDKGccVersionRegExp);
FileName path = ndkPath;
QDirIterator it(path.appendPath(QLatin1String("toolchains")).toString(),
QStringList() << QLatin1String("*"), QDir::Dirs);
while (it.hasNext()) {
const QString &fileName = FileName::fromString(it.next()).fileName();
int idx = versionRegExp.indexIn(fileName);
if (idx == -1)
continue;
for (const ToolChain::Language lang : { ToolChain::Language::Cxx, ToolChain::Language::C }) {
AndroidToolChainInformation ati;
ati.language = lang;
ati.version = fileName.mid(idx + 1);
QString platform = fileName.left(idx);
ati.abi = AndroidConfig::abiForToolChainPrefix(platform);
if (ati.abi.architecture() == Abi::UnknownArchitecture) // e.g. mipsel which is not yet supported
continue;
ati.compilerCommand = AndroidConfigurations::currentConfig().gccPath(ati.abi, lang, ati.version);
result.append(ati);
}
}
return result;
}
示例3: openJDKBinPath
FileName AndroidConfigurations::openJDKBinPath() const
{
FileName path = m_config.openJDKLocation;
if (!path.isEmpty())
return path.appendPath(QLatin1String("bin"));
return path;
}
示例4: androidToolPath
FileName AndroidConfigurations::androidToolPath() const
{
if (HostOsInfo::isWindowsHost()) {
// I want to switch from using android.bat to using an executable. All it really does is call
// Java and I've made some progress on it. So if android.exe exists, return that instead.
FileName path = m_config.sdkLocation;
path.appendPath(QLatin1String("tools/android" QTC_HOST_EXE_SUFFIX));
if (path.toFileInfo().exists())
return path;
path = m_config.sdkLocation;
return path.appendPath(QLatin1String("tools/android" ANDROID_BAT_SUFFIX));
} else {
FileName path = m_config.sdkLocation;
return path.appendPath(QLatin1String("tools/android"));
}
}
示例5: versionRegExp
QList<AndroidToolChainFactory::AndroidToolChainInformation> AndroidToolChainFactory::toolchainPathsForNdk(const Utils::FileName &ndkPath)
{
QList<AndroidToolChainInformation> result;
if (ndkPath.isEmpty())
return result;
QRegExp versionRegExp(NDKGccVersionRegExp);
FileName path = ndkPath;
QDirIterator it(path.appendPath(QLatin1String("toolchains")).toString(),
QStringList() << QLatin1String("*"), QDir::Dirs);
while (it.hasNext()) {
const QString &fileName = QFileInfo(it.next()).fileName();
int idx = versionRegExp.indexIn(fileName);
if (idx == -1)
continue;
AndroidToolChainInformation ati;
ati.version = fileName.mid(idx + 1);
QString platform = fileName.left(idx);
ati.architecture = AndroidConfig::architectureForToolChainPrefix(platform);
if (ati.architecture == Abi::UnknownArchitecture) // e.g. mipsel which is not yet supported
continue;
// AndroidToolChain *tc = new AndroidToolChain(arch, version, true);
ati.compilerCommand = AndroidConfigurations::currentConfig().gccPath(ati.architecture, ati.version);
// tc->setCompilerCommand(compilerPath);
result.append(ati);
}
return result;
}
示例6: takeParsedConfiguration
CMakeConfig TeaLeafReader::takeParsedConfiguration()
{
FileName cacheFile = m_parameters.workDirectory;
cacheFile.appendPath(QLatin1String("CMakeCache.txt"));
if (!cacheFile.exists())
return { };
QString errorMessage;
CMakeConfig result = BuildDirManager::parseCMakeConfiguration(cacheFile, &errorMessage);
if (!errorMessage.isEmpty()) {
emit errorOccured(errorMessage);
return { };
}
const FileName sourceOfBuildDir
= FileName::fromUtf8(CMakeConfigItem::valueOf("CMAKE_HOME_DIRECTORY", result));
const FileName canonicalSourceOfBuildDir = FileUtils::canonicalPath(sourceOfBuildDir);
const FileName canonicalSourceDirectory = FileUtils::canonicalPath(m_parameters.sourceDirectory);
if (canonicalSourceOfBuildDir != canonicalSourceDirectory) { // Uses case-insensitive compare where appropriate
emit errorOccured(tr("The build directory is not for %1 but for %2")
.arg(canonicalSourceOfBuildDir.toUserOutput(),
canonicalSourceDirectory.toUserOutput()));
return { };
}
return result;
}
示例7: toolPath
FileName AndroidConfigurations::toolPath(Abi::Architecture architecture) const
{
FileName path = m_config.ndkLocation;
return path.appendPath(QString::fromLatin1("toolchains/%1-%2/prebuilt/%3/bin/%4")
.arg(toolchainPrefix(architecture))
.arg(m_config.ndkToolchainVersion)
.arg(ToolchainHost)
.arg(toolsPrefix(architecture)));
}
示例8: mkspecsPath
FileName BaseQtVersion::mkspecsPath() const
{
FileName result = FileName::fromUserInput(qmakeProperty("QT_HOST_DATA"));
if (result.isEmpty())
result = FileName::fromUserInput(qmakeProperty("QMAKE_MKSPECS"));
else
result.appendPath(QLatin1String("mkspecs"));
return result;
}
示例9: updateAvailablePlatforms
void AndroidConfigurations::updateAvailablePlatforms()
{
m_availablePlatforms.clear();
FileName path = m_config.ndkLocation;
QDirIterator it(path.appendPath(QLatin1String("platforms")).toString(), QStringList() << QLatin1String("android-*"), QDir::Dirs);
while (it.hasNext()) {
const QString &fileName = it.next();
m_availablePlatforms.push_back(fileName.mid(fileName.lastIndexOf(QLatin1Char('-')) + 1).toInt());
}
qSort(m_availablePlatforms.begin(), m_availablePlatforms.end(), qGreater<int>());
}
示例10: versionRegExp
QList<ToolChain *>
AndroidToolChainFactory::autodetectToolChainsForNdk(const FileName &ndkPath,
const QList<ToolChain *> &alreadyKnown)
{
QList<ToolChain *> result;
if (ndkPath.isEmpty())
return result;
QRegExp versionRegExp(NDKGccVersionRegExp);
FileName path = ndkPath;
QDirIterator it(path.appendPath(QLatin1String("toolchains")).toString(),
QStringList("*"), QDir::Dirs);
QHash<Abi, QList<AndroidToolChain *>> newestToolChainForArch;
while (it.hasNext()) {
const QString &fileName = FileName::fromString(it.next()).fileName();
int idx = versionRegExp.indexIn(fileName);
if (idx == -1)
continue;
QString version = fileName.mid(idx + 1);
QString platform = fileName.left(idx);
Abi abi = AndroidConfig::abiForToolChainPrefix(platform);
if (abi.architecture() == Abi::UnknownArchitecture)
continue;
QList<AndroidToolChain *> toolChainBundle;
for (Core::Id lang : {ProjectExplorer::Constants::CXX_LANGUAGE_ID, ProjectExplorer::Constants::C_LANGUAGE_ID}) {
FileName compilerPath = AndroidConfigurations::currentConfig().gccPath(abi, lang, version);
AndroidToolChain *tc = findToolChain(compilerPath, lang, alreadyKnown);
if (!tc || tc->originalTargetTriple().isEmpty()) {
tc = new AndroidToolChain(abi, version, lang,
ToolChain::AutoDetection);
tc->resetToolChain(compilerPath);
QTC_ASSERT(!tc->originalTargetTriple().isEmpty(),
delete tc; continue);
}
result.append(tc);
toolChainBundle.append(tc);
}
QTC_ASSERT(!toolChainBundle.isEmpty(), continue);
auto it = newestToolChainForArch.constFind(abi);
if (it == newestToolChainForArch.constEnd())
newestToolChainForArch.insert(abi, toolChainBundle);
else if (versionCompareLess(it.value(), toolChainBundle))
newestToolChainForArch[abi] = toolChainBundle;
}
示例11: ndkToolchainVersions
QStringList AndroidConfigurations::ndkToolchainVersions() const
{
QRegExp versionRegExp(NDKGccVersionRegExp);
QStringList result;
FileName path = m_config.ndkLocation;
QDirIterator it(path.appendPath(QLatin1String("toolchains")).toString(),
QStringList() << QLatin1String("*"), QDir::Dirs);
while (it.hasNext()) {
const QString &fileName = it.next();
int idx = versionRegExp.indexIn(fileName);
if (idx == -1)
continue;
QString version = fileName.mid(idx+1);
if (!result.contains(version))
result.append(version);
}
return result;
}
示例12: gdbServerPath
FileName AndroidConfigurations::gdbServerPath(Abi::Architecture architecture) const
{
FileName gdbServerPath;
switch (architecture) {
case Abi::ArmArchitecture:
gdbServerPath = m_config.armGdbserverLocation;
break;
case Abi::X86Architecture:
gdbServerPath = m_config.x86GdbserverLocation;
break;
default:
gdbServerPath = FileName::fromString(Unknown);
break;
}
if (!gdbServerPath.isEmpty())
return gdbServerPath;
FileName path = m_config.ndkLocation;
return path.appendPath(QString::fromLatin1("toolchains/%1-%2/prebuilt/gdbserver")
.arg(toolchainPrefix(architecture))
.arg(m_config.ndkToolchainVersion));
}
示例13: emulatorToolPath
FileName AndroidConfigurations::emulatorToolPath() const
{
FileName path = m_config.sdkLocation;
return path.appendPath(QLatin1String("tools/emulator" QTC_HOST_EXE_SUFFIX));
}
示例14: adbToolPath
FileName AndroidConfigurations::adbToolPath() const
{
FileName path = m_config.sdkLocation;
return path.appendPath(QLatin1String("platform-tools/adb" QTC_HOST_EXE_SUFFIX));
}