Commit 8d5e4b32 authored by Tobias Hunger's avatar Tobias Hunger

Project: Use Utils::FileName as return type for projectFilePath()

Change-Id: If304d5e95cd9ac714100abaae35d60e3e1050eb2
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent faab380c
......@@ -415,7 +415,7 @@ void AutotoolsProject::updateCppCodeModel()
CppTools::ProjectPart::Ptr part(new CppTools::ProjectPart);
part->project = this;
part->displayName = displayName();
part->projectFile = projectFilePath();
part->projectFile = projectFilePath().toString();
if (activeTarget()) {
ProjectExplorer::Kit *k = activeTarget()->kit();
......
......@@ -287,7 +287,7 @@ ParserTreeItem::ConstPtr Parser::parse()
QString prjName(prj->displayName());
QString prjType(prjName);
if (prj->document())
prjType = prj->projectFilePath();
prjType = prj->projectFilePath().toString();
SymbolInformation inf(prjName, prjType);
QStringList projectList = addProjectNode(item, prj->rootProjectNode());
......
......@@ -56,7 +56,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(ProjectExplorer::Target *parent
BuildConfiguration(parent, Core::Id(Constants::CMAKE_BC_ID)), m_useNinja(false)
{
CMakeProject *project = static_cast<CMakeProject *>(parent->project());
setBuildDirectory(Utils::FileName::fromString(project->shadowBuildDirectory(project->projectFilePath(),
setBuildDirectory(Utils::FileName::fromString(project->shadowBuildDirectory(project->projectFilePath().toString(),
parent->kit(),
displayName())));
}
......@@ -169,7 +169,7 @@ ProjectExplorer::BuildConfiguration *CMakeBuildConfigurationFactory::create(Proj
if (copy.buildDirectory.isEmpty())
copy.buildDirectory
= Utils::FileName::fromString(project->shadowBuildDirectory(project->projectFilePath(),
= Utils::FileName::fromString(project->shadowBuildDirectory(project->projectFilePath().toString(),
parent->kit(),
copy.displayName));
......
......@@ -74,9 +74,8 @@ QList<Core::LocatorFilterEntry> CMakeLocatorFilter::matchesFor(QFutureInterface<
if (cmakeProject) {
foreach (const CMakeBuildTarget &ct, cmakeProject->buildTargets()) {
if (ct.title.contains(entry)) {
Core::LocatorFilterEntry entry(this, ct.title, cmakeProject->projectFilePath());
entry.extraInfo = FileUtils::shortNativePath(
FileName::fromString(cmakeProject->projectFilePath()));
Core::LocatorFilterEntry entry(this, ct.title, cmakeProject->projectFilePath().toString());
entry.extraInfo = FileUtils::shortNativePath(cmakeProject->projectFilePath());
result.append(entry);
}
}
......@@ -93,7 +92,7 @@ void CMakeLocatorFilter::accept(Core::LocatorFilterEntry selection) const
foreach (Project *p, SessionManager::projects()) {
cmakeProject = qobject_cast<CMakeProject *>(p);
if (cmakeProject && cmakeProject->projectFilePath() == selection.internalData.toString())
if (cmakeProject && cmakeProject->projectFilePath().toString() == selection.internalData.toString())
break;
cmakeProject = 0;
}
......
......@@ -340,7 +340,7 @@ bool CMakeProject::parseCMakeLists()
CppTools::ProjectPart::Ptr part(new CppTools::ProjectPart);
part->project = this;
part->displayName = displayName();
part->projectFile = projectFilePath();
part->projectFile = projectFilePath().toString();
// This explicitly adds -I. to the include paths
part->includePaths += projectDirectory();
......
......@@ -1612,15 +1612,14 @@ void CppCodeModelInspectorDialog::updateProjectPartData(const ProjectPart::Ptr &
QString projectFilePath = QLatin1String("<None>");
if (ProjectExplorer::Project *project = part->project) {
projectName = project->displayName();
projectFilePath = project->projectFilePath();
projectFilePath = project->projectFilePath().toUserOutput();
}
KeyValueModel::Table table = KeyValueModel::Table()
<< qMakePair(QString::fromLatin1("Project Part Name"), part->displayName)
<< qMakePair(QString::fromLatin1("Project Part File"),
QDir::toNativeSeparators(part->projectFile))
<< qMakePair(QString::fromLatin1("Project Name"), projectName)
<< qMakePair(QString::fromLatin1("Project File"),
QDir::toNativeSeparators(projectFilePath))
<< qMakePair(QString::fromLatin1("Project File"), projectFilePath)
<< qMakePair(QString::fromLatin1("C Version"),
CMI::Utils::toString(part->cVersion))
<< qMakePair(QString::fromLatin1("CXX Version"),
......
......@@ -467,8 +467,8 @@ void Dumper::dumpProjectInfos( const QList<CppModelManagerInterface::ProjectInfo
m_out << "Projects loaded: " << projectInfos.size() << "{{{1\n";
foreach (const CppModelManagerInterface::ProjectInfo &info, projectInfos) {
const QPointer<ProjectExplorer::Project> project = info.project();
m_out << i1 << "Project " << project->displayName() << " (" << project->projectFilePath()
<< "){{{2\n";
m_out << i1 << "Project " << project->displayName()
<< " (" << project->projectFilePath().toUserOutput() << "){{{2\n";
const QList<ProjectPart::Ptr> projectParts = info.projectParts();
foreach (const ProjectPart::Ptr &part, projectParts) {
......@@ -476,7 +476,7 @@ void Dumper::dumpProjectInfos( const QList<CppModelManagerInterface::ProjectInfo
QString projectFilePath = QLatin1String("<None>");
if (ProjectExplorer::Project *project = part->project) {
projectName = project->displayName();
projectFilePath = project->projectFilePath();
projectFilePath = project->projectFilePath().toUserOutput();
}
if (!part->projectConfigFile.isEmpty())
m_out << i3 << "Project Config File: " << part->projectConfigFile << "\n";
......
......@@ -3526,7 +3526,7 @@ void DebuggerPluginPrivate::testProjectLoaded(Project *project)
void DebuggerPluginPrivate::testProjectEvaluated()
{
QString fileName = m_testProject->projectFilePath();
QString fileName = m_testProject->projectFilePath().toUserOutput();
QVERIFY(!fileName.isEmpty());
qWarning("Project %s loaded", qPrintable(fileName));
connect(BuildManager::instance(), SIGNAL(buildQueueFinished(bool)),
......
......@@ -244,7 +244,7 @@ void GenericProject::refresh(RefreshOptions options)
CppTools::ProjectPart::Ptr part(new CppTools::ProjectPart);
part->project = this;
part->displayName = displayName();
part->projectFile = projectFilePath();
part->projectFile = projectFilePath().toString();
part->includePaths += projectIncludePaths();
......
......@@ -110,7 +110,7 @@ void GenericProjectPlugin::updateContextMenu(ProjectExplorer::Project *project,
void GenericProjectPlugin::editFiles()
{
GenericProject *genericProject = static_cast<GenericProject *>(m_contextMenuProject);
ProjectExplorer::SelectableFilesDialogEditFiles sfd(QFileInfo(genericProject->projectFilePath()).path(), genericProject->files(),
ProjectExplorer::SelectableFilesDialogEditFiles sfd(genericProject->projectFilePath().toFileInfo().path(), genericProject->files(),
Core::ICore::mainWindow());
if (sfd.exec() == QDialog::Accepted)
genericProject->setFiles(sfd.selectedFiles());
......
......@@ -83,7 +83,7 @@ Utils::FileIterator *CurrentProjectFind::files(const QStringList &nameFilters,
return new Utils::FileIterator(QStringList(), QList<QTextCodec *>()));
QString projectFile = additionalParameters.toString();
foreach (Project *project, SessionManager::projects()) {
if (project->document() && projectFile == project->projectFilePath())
if (project->document() && projectFile == project->projectFilePath().toString())
return filesForProjects(nameFilters, QList<Project *>() << project);
}
return new Utils::FileIterator(QStringList(), QList<QTextCodec *>());
......@@ -107,7 +107,7 @@ void CurrentProjectFind::recheckEnabled()
return;
QString projectFile = getAdditionalParameters(search).toString();
foreach (Project *project, SessionManager::projects()) {
if (projectFile == project->projectFilePath()) {
if (projectFile == project->projectFilePath().toString()) {
search->setSearchAgainEnabled(true);
return;
}
......
......@@ -98,7 +98,7 @@ QVariant DependenciesModel::data(const QModelIndex &index, int role) const
case Qt::CheckStateRole:
return SessionManager::hasDependency(m_project, p) ? Qt::Checked : Qt::Unchecked;
case Qt::DecorationRole:
return Core::FileIconProvider::icon(p->projectFilePath());
return Core::FileIconProvider::icon(p->projectFilePath().toString());
default:
return QVariant();
}
......
......@@ -261,7 +261,7 @@ QListWidgetItem *ProjectListWidget::itemForProject(Project *project)
QString ProjectListWidget::fullName(ProjectExplorer::Project *project)
{
return tr("%1 (%2)").arg(project->displayName(), project->projectFilePath());
return tr("%1 (%2)").arg(project->displayName(), project->projectFilePath().toUserOutput());
}
void ProjectListWidget::addProject(Project *project)
......@@ -1512,7 +1512,7 @@ void MiniProjectTargetSelector::updateActionAndSummary()
projectName = project->displayName();
foreach (Project *p, SessionManager::projects()) {
if (p != project && p->displayName() == projectName) {
fileName = project->projectFilePath();
fileName = project->projectFilePath().toUserOutput();
break;
}
}
......
......@@ -120,9 +120,9 @@ Core::Id Project::id() const
return d->m_id;
}
QString Project::projectFilePath() const
Utils::FileName Project::projectFilePath() const
{
return document()->filePath();
return Utils::FileName::fromString(document()->filePath());
}
bool Project::hasActiveBuildSettings() const
......
......@@ -34,6 +34,8 @@
#include <coreplugin/id.h>
#include <utils/fileutils.h>
#include <QObject>
#include <QFileSystemModel>
......@@ -77,7 +79,7 @@ public:
virtual Core::IDocument *document() const = 0;
virtual IProjectManager *projectManager() const = 0;
QString projectFilePath() const;
Utils::FileName projectFilePath() const;
bool hasActiveBuildSettings() const;
......
......@@ -1381,7 +1381,7 @@ QList<Project *> ProjectExplorerPlugin::openProjects(const QStringList &fileName
filePath = fi.canonicalFilePath();
bool found = false;
foreach (Project *pi, SessionManager::projects()) {
if (filePath == pi->projectFilePath()) {
if (filePath == pi->projectFilePath().toString()) {
found = true;
break;
}
......@@ -2370,7 +2370,7 @@ void ProjectExplorerPlugin::projectRemoved(ProjectExplorer::Project * pro)
void ProjectExplorerPlugin::projectDisplayNameChanged(Project *pro)
{
addToRecentProjects(pro->projectFilePath(), pro->displayName());
addToRecentProjects(pro->projectFilePath().toString(), pro->displayName());
updateActions();
}
......
......@@ -347,7 +347,7 @@ void ProjectWindow::registerProject(ProjectExplorer::Project *project)
}
m_tabIndexToProject.insert(index, project);
m_tabWidget->insertTab(index, project->displayName(), project->projectFilePath(), subtabs);
m_tabWidget->insertTab(index, project->displayName(), project->projectFilePath().toString(), subtabs);
connect(project, SIGNAL(removedTarget(ProjectExplorer::Target*)),
this, SLOT(removedTarget(ProjectExplorer::Target*)));
......
......@@ -200,7 +200,7 @@ bool SessionManagerPrivate::recursiveDependencyCheck(const QString &newDep, cons
QList<Project *> SessionManager::dependencies(const Project *project)
{
const QString proName = project->projectFilePath();
const QString proName = project->projectFilePath().toString();
const QStringList proDeps = d->m_depMap.value(proName);
QList<Project *> projects;
......@@ -214,8 +214,8 @@ QList<Project *> SessionManager::dependencies(const Project *project)
bool SessionManager::hasDependency(const Project *project, const Project *depProject)
{
const QString proName = project->projectFilePath();
const QString depName = depProject->projectFilePath();
const QString proName = project->projectFilePath().toString();
const QString depName = depProject->projectFilePath().toString();
const QStringList proDeps = d->m_depMap.value(proName);
return proDeps.contains(depName);
......@@ -223,16 +223,16 @@ bool SessionManager::hasDependency(const Project *project, const Project *depPro
bool SessionManager::canAddDependency(const Project *project, const Project *depProject)
{
const QString newDep = project->projectFilePath();
const QString checkDep = depProject->projectFilePath();
const QString newDep = project->projectFilePath().toString();
const QString checkDep = depProject->projectFilePath().toString();
return d->recursiveDependencyCheck(newDep, checkDep);
}
bool SessionManager::addDependency(Project *project, Project *depProject)
{
const QString proName = project->projectFilePath();
const QString depName = depProject->projectFilePath();
const QString proName = project->projectFilePath().toString();
const QString depName = depProject->projectFilePath().toString();
// check if this dependency is valid
if (!d->recursiveDependencyCheck(proName, depName))
......@@ -250,8 +250,8 @@ bool SessionManager::addDependency(Project *project, Project *depProject)
void SessionManager::removeDependency(Project *project, Project *depProject)
{
const QString proName = project->projectFilePath();
const QString depName = depProject->projectFilePath();
const QString proName = project->projectFilePath().toString();
const QString depName = depProject->projectFilePath().toString();
QStringList proDeps = d->m_depMap.value(proName);
proDeps.removeAll(depName);
......@@ -347,7 +347,7 @@ bool SessionManager::save()
QVariantMap data;
// save the startup project
if (d->m_startupProject)
data.insert(QLatin1String("StartupProject"), d->m_startupProject->projectFilePath());
data.insert(QLatin1String("StartupProject"), d->m_startupProject->projectFilePath().toString());
QColor c = StyleHelper::requestedBaseColor();
if (c.isValid()) {
......@@ -360,7 +360,7 @@ bool SessionManager::save()
QStringList projectFiles;
foreach (Project *pro, d->m_projects)
projectFiles << pro->projectFilePath();
projectFiles << pro->projectFilePath().toString();
// Restore infromation on projects that failed to load:
// don't readd projects to the list, which the user loaded
......@@ -449,7 +449,7 @@ QStringList SessionManagerPrivate::dependenciesOrder() const
// copy the map to a temporary list
foreach (Project *pro, m_projects) {
const QString &proName = pro->projectFilePath();
const QString &proName = pro->projectFilePath().toString();
unordered << QPair<QString, QStringList>(proName, m_depMap.value(proName));
}
......@@ -481,13 +481,13 @@ QList<Project *> SessionManager::projectOrder(Project *project)
QStringList pros;
if (project)
pros = d->dependencies(project->projectFilePath());
pros = d->dependencies(project->projectFilePath().toString());
else
pros = d->dependenciesOrder();
foreach (const QString &proFile, pros) {
foreach (Project *pro, projects()) {
if (pro->projectFilePath() == proFile) {
if (pro->projectFilePath().toString() == proFile) {
result << pro;
break;
}
......@@ -605,7 +605,7 @@ void SessionManager::removeProjects(QList<Project *> remove)
QSet<QString> projectFiles;
foreach (Project *pro, projects()) {
if (!remove.contains(pro))
projectFiles.insert(pro->projectFilePath());
projectFiles.insert(pro->projectFilePath().toString());
}
QSet<QString>::const_iterator i = projectFiles.begin();
......@@ -807,7 +807,7 @@ void SessionManagerPrivate::restoreStartupProject(const PersistentSettingsReader
const QString startupProject = reader.restoreValue(QLatin1String("StartupProject")).toString();
if (!startupProject.isEmpty()) {
foreach (Project *pro, d->m_projects) {
if (QDir::cleanPath(pro->projectFilePath()) == startupProject) {
if (pro->projectFilePath().toString() == startupProject) {
m_instance->setStartupProject(pro);
break;
}
......@@ -844,7 +844,7 @@ void SessionManagerPrivate::restoreProjects(const QStringList &fileList)
if (!errors.isEmpty())
QMessageBox::critical(Core::ICore::mainWindow(), SessionManager::tr("Failed to open project"), errors);
foreach (Project *p, projects)
m_failedProjects.removeAll(p->projectFilePath());
m_failedProjects.removeAll(p->projectFilePath().toString());
}
}
......
......@@ -736,7 +736,7 @@ QByteArray SettingsAccessor::creatorId()
QString SettingsAccessor::defaultFileName(const QString &suffix) const
{
return project()->projectFilePath() + suffix;
return project()->projectFilePath().toString() + suffix;
}
int SettingsAccessor::currentVersion() const
......@@ -836,7 +836,7 @@ QVariantMap SettingsAccessor::readUserSettings(QWidget *parent) const
QVariantMap SettingsAccessor::readSharedSettings(QWidget *parent) const
{
SettingsAccessorPrivate::Settings sharedSettings;
QString fn = project()->projectFilePath() + m_sharedSuffix;
QString fn = project()->projectFilePath().toString() + m_sharedSuffix;
sharedSettings.path = FileName::fromString(fn);
sharedSettings.map = readFile(sharedSettings.path);
......
......@@ -530,7 +530,7 @@ void Target::updateDefaultBuildConfigurations()
qWarning("No build configuration factory found for target id '%s'.", qPrintable(id().toString()));
return;
}
QList<BuildInfo *> infoList = bcFactory->availableSetups(this->kit(), project()->projectFilePath());
QList<BuildInfo *> infoList = bcFactory->availableSetups(this->kit(), project()->projectFilePath().toString());
foreach (BuildInfo *info, infoList) {
BuildConfiguration *bc = bcFactory->create(this, info);
if (!bc)
......
......@@ -97,7 +97,7 @@ TargetSetupPageWrapper::TargetSetupPageWrapper(Project *project) :
m_targetSetupPage = new TargetSetupPage(this);
m_targetSetupPage->setProjectImporter(project->createProjectImporter());
m_targetSetupPage->setUseScrollArea(false);
m_targetSetupPage->setProjectPath(project->projectFilePath());
m_targetSetupPage->setProjectPath(project->projectFilePath().toString());
m_targetSetupPage->setRequiredKitMatcher(project->createRequiredKitMatcher());
m_targetSetupPage->setPreferredKitMatcher(project->createPreferredKitMatcher());
m_targetSetupPage->initializePage();
......
......@@ -577,7 +577,7 @@ QbsGroupNode *QbsProductNode::findGroupNode(const QString &name)
// --------------------------------------------------------------------
QbsProjectNode::QbsProjectNode(QbsProject *project) :
QbsBaseProjectNode(project->projectFilePath()),
QbsBaseProjectNode(project->projectFilePath().toString()),
m_project(project)
{
ctor();
......
......@@ -199,8 +199,8 @@ NamedWidget *QmakeBuildConfiguration::createConfigWidget()
QString QmakeBuildConfiguration::defaultShadowBuildDirectory() const
{
// todo displayName isn't ideal
return QmakeProject::shadowBuildDirectory(target()->project()->projectFilePath(),
target()->kit(), displayName());
return QmakeProject::shadowBuildDirectory(target()->project()->projectFilePath().toString(),
target()->kit(), displayName());
}
bool QmakeBuildConfiguration::supportsShadowBuilds()
......@@ -341,7 +341,7 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF
BaseQtVersion *version = QtKitInformation::qtVersion(target()->kit());
if (!version)
return MakefileForWrongProject;
if (QtSupport::QtVersionManager::makefileIsFor(makefile, qs->project()->projectFilePath())
if (QtSupport::QtVersionManager::makefileIsFor(makefile, qs->project()->projectFilePath().toString())
!= QtSupport::QtVersionManager::SameProject) {
if (debug) {
qDebug() << "different profile used to generate the Makefile:"
......@@ -591,7 +591,7 @@ int QmakeBuildConfigurationFactory::priority(const Target *parent) const
QList<BuildInfo *> QmakeBuildConfigurationFactory::availableBuilds(const Target *parent) const
{
QList<ProjectExplorer::BuildInfo *> result;
QmakeBuildInfo *info = createBuildInfo(parent->kit(), parent->project()->projectFilePath(),
QmakeBuildInfo *info = createBuildInfo(parent->kit(), parent->project()->projectFilePath().toString(),
BuildConfiguration::Debug);
info->displayName.clear(); // ask for a name
info->buildDirectory.clear(); // This depends on the displayName
......@@ -666,7 +666,7 @@ BuildConfiguration *QmakeBuildConfigurationFactory::create(Target *parent, const
Utils::FileName directory = qmakeInfo->buildDirectory;
if (directory.isEmpty()) {
directory = defaultBuildDirectory(qmakeInfo->supportsShadowBuild,
parent->project()->projectFilePath(),
parent->project()->projectFilePath().toString(),
parent->kit(), info->displayName);
}
......
......@@ -891,7 +891,7 @@ bool QmakeProject::supportsKit(Kit *k, QString *errorMessage) const
QString QmakeProject::displayName() const
{
return QFileInfo(projectFilePath()).completeBaseName();
return projectFilePath().toFileInfo().completeBaseName();
}
Core::IDocument *QmakeProject::document() const
......@@ -1394,10 +1394,10 @@ void QmakeProject::configureAsExampleProject(const QStringList &platforms)
if (!platforms.isEmpty() && !platforms.contains(version->platformName()))
continue;
IBuildConfigurationFactory *factory = IBuildConfigurationFactory::find(k, projectFilePath());
IBuildConfigurationFactory *factory = IBuildConfigurationFactory::find(k, projectFilePath().toString());
if (!factory)
continue;
foreach (BuildInfo *info, factory->availableSetups(k, projectFilePath()))
foreach (BuildInfo *info, factory->availableSetups(k, projectFilePath().toString()))
infoList << info;
}
setup(infoList);
......@@ -1648,7 +1648,7 @@ void QmakeProject::emitBuildDirectoryInitialized()
ProjectImporter *QmakeProject::createProjectImporter() const
{
return new QmakeProjectImporter(projectFilePath());
return new QmakeProjectImporter(projectFilePath().toString());
}
KitMatcher *QmakeProject::createRequiredKitMatcher() const
......
......@@ -49,7 +49,7 @@ QmakeProjectConfigWidget::QmakeProjectConfigWidget(QmakeBuildConfiguration *bc)
m_ignoreChange(false)
{
m_defaultShadowBuildDir
= QmakeProject::shadowBuildDirectory(bc->target()->project()->projectFilePath(),
= QmakeProject::shadowBuildDirectory(bc->target()->project()->projectFilePath().toString(),
bc->target()->kit(),
Utils::FileUtils::qmakeFriendlyName(bc->displayName()));
......@@ -193,7 +193,7 @@ void QmakeProjectConfigWidget::updateProblemLabel()
{
m_ui->shadowBuildDirEdit->triggerChanged();
ProjectExplorer::Kit *k = m_buildConfiguration->target()->kit();
const QString proFileName = m_buildConfiguration->target()->project()->projectFilePath();
const QString proFileName = m_buildConfiguration->target()->project()->projectFilePath().toString();
// Check for Qt version:
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
......
......@@ -123,9 +123,9 @@ QString QMakeStep::allArguments(bool shorted)
if (bc->subNodeBuild())
arguments << QDir::toNativeSeparators(bc->subNodeBuild()->path());
else if (shorted)
arguments << QDir::toNativeSeparators(QFileInfo(project()->projectFilePath()).fileName());
arguments << project()->projectFilePath().toFileInfo().fileName();
else
arguments << QDir::toNativeSeparators(project()->projectFilePath());
arguments << project()->projectFilePath().toUserOutput();
arguments << QLatin1String("-r");
bool userProvidedMkspec = false;
......
......@@ -173,7 +173,7 @@ void QmlProject::addedRunConfiguration(ProjectExplorer::RunConfiguration *rc)
QDir QmlProject::projectDir() const
{
return QFileInfo(projectFilePath()).dir();
return projectFilePath().toFileInfo().dir();
}
QString QmlProject::filesFileName() const
......
......@@ -141,8 +141,7 @@ QString QmlProjectRunConfiguration::commandLineArguments() const
QString QmlProjectRunConfiguration::workingDirectory() const
{
QFileInfo projectFile(target()->project()->projectFilePath());
return canonicalCapsPath(projectFile.absolutePath());
return canonicalCapsPath(target()->project()->projectFilePath().toFileInfo().absolutePath());
}
/* QtDeclarative checks explicitly that the capitalization for any URL / path
......
......@@ -191,7 +191,7 @@ bool BarDescriptorFileNodeManager::createBarDescriptor(ProjectExplorer::Project
tr("Setup Application Descriptor File"),
tr("You need to set up a bar descriptor file to enable "
"packaging.\nDo you want Qt Creator to generate it for your project (%1)?")
.arg(project->projectFilePath()),
.arg(project->projectFilePath().toUserOutput()),
tr("Don't ask again for this project"), &skipFileCreation);
if (button != QDialogButtonBox::Yes) {
......
......@@ -59,7 +59,7 @@ WinRtPackageDeploymentStep::WinRtPackageDeploymentStep(BuildStepList *bsl)
bool WinRtPackageDeploymentStep::init()
{
Utils::FileName proFile = Utils::FileName::fromString(project()->projectFilePath());
Utils::FileName proFile = project()->projectFilePath();
const QString targetPath
= target()->applicationTargets().targetForProject(proFile).toString()
+ QLatin1String(".exe");
......@@ -115,7 +115,7 @@ bool WinRtPackageDeploymentStep::init()
bool WinRtPackageDeploymentStep::processSucceeded(int exitCode, QProcess::ExitStatus status)
{
if (m_createMappingFile) {
Utils::FileName proFile = Utils::FileName::fromString(project()->projectFilePath());
Utils::FileName proFile = project()->projectFilePath();
QString targetPath
= target()->applicationTargets().targetForProject(proFile).toString();
QString targetDir = targetPath.left(targetPath.lastIndexOf(QLatin1Char('/')) + 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment