summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libs/utils/pathchooser.h1
-rw-r--r--src/plugins/android/androidanalyzesupport.cpp2
-rw-r--r--src/plugins/android/androiddebugsupport.cpp2
-rw-r--r--src/plugins/android/androiddeployqtstep.cpp2
-rw-r--r--src/plugins/android/androiddeployqtwidget.cpp4
-rw-r--r--src/plugins/android/androidextralibrarylistmodel.cpp2
-rw-r--r--src/plugins/android/androidmanager.cpp5
-rw-r--r--src/plugins/android/androidmanifesteditorwidget.cpp2
-rw-r--r--src/plugins/android/androidrunconfiguration.cpp4
-rw-r--r--src/plugins/android/createandroidmanifestwizard.cpp2
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp5
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.cpp4
-rw-r--r--src/plugins/baremetal/baremetalrunconfiguration.cpp4
-rw-r--r--src/plugins/baremetal/baremetalruncontrolfactory.cpp2
-rw-r--r--src/plugins/clearcase/clearcaseplugin.cpp2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp4
-rw-r--r--src/plugins/cmakeprojectmanager/cmakebuildinfo.h2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.cpp14
-rw-r--r--src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp2
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp2
-rw-r--r--src/plugins/debugger/debuggerrunner.cpp2
-rw-r--r--src/plugins/debugger/unstartedappwatcherdialog.cpp2
-rw-r--r--src/plugins/genericprojectmanager/genericbuildconfiguration.cpp6
-rw-r--r--src/plugins/ios/iosdebugsupport.cpp2
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.cpp4
-rw-r--r--src/plugins/projectexplorer/localapplicationrunconfiguration.cpp2
-rw-r--r--src/plugins/projectexplorer/project.cpp11
-rw-r--r--src/plugins/projectexplorer/project.h4
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp2
-rw-r--r--src/plugins/projectexplorer/settingsaccessor.cpp4
-rw-r--r--src/plugins/projectexplorer/targetsettingspanel.cpp2
-rw-r--r--src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp2
-rw-r--r--src/plugins/qbsprojectmanager/qbsbuildconfigurationwidget.cpp2
-rw-r--r--src/plugins/qbsprojectmanager/qbsproject.cpp2
-rw-r--r--src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp2
-rw-r--r--src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp6
-rw-r--r--src/plugins/qmakeprojectmanager/externaleditors.cpp2
-rw-r--r--src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp8
-rw-r--r--src/plugins/qmakeprojectmanager/qmakeproject.cpp2
-rw-r--r--src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp10
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp4
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp2
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.cpp2
-rw-r--r--src/plugins/qnx/bardescriptorfilenodemanager.cpp3
-rw-r--r--src/plugins/qnx/blackberrycreatepackagestep.cpp3
-rw-r--r--src/plugins/qnx/blackberryruncontrolfactory.cpp2
-rw-r--r--src/plugins/qnx/qnxruncontrolfactory.cpp2
-rw-r--r--src/plugins/qtsupport/customexecutableconfigurationwidget.cpp2
-rw-r--r--src/plugins/qtsupport/qtoutputformatter.cpp2
-rw-r--r--src/plugins/remotelinux/remotelinuxdebugsupport.cpp2
-rw-r--r--src/plugins/remotelinux/remotelinuxrunconfiguration.cpp4
-rw-r--r--src/plugins/tasklist/taskfilefactory.cpp2
-rw-r--r--src/plugins/valgrind/callgrindtool.cpp2
-rw-r--r--src/plugins/valgrind/memcheckerrorview.cpp2
-rw-r--r--src/plugins/valgrind/memchecktool.cpp4
-rw-r--r--src/plugins/valgrind/suppressiondialog.cpp2
-rw-r--r--src/plugins/vcsbase/vcsbaseplugin.cpp2
-rw-r--r--src/plugins/vcsbase/vcsplugin.cpp2
-rw-r--r--src/plugins/winrt/winrtpackagedeploymentstep.cpp2
59 files changed, 94 insertions, 96 deletions
diff --git a/src/libs/utils/pathchooser.h b/src/libs/utils/pathchooser.h
index 139501cd50..86250849a8 100644
--- a/src/libs/utils/pathchooser.h
+++ b/src/libs/utils/pathchooser.h
@@ -98,6 +98,7 @@ public:
QString baseDirectory() const;
void setBaseDirectory(const QString &directory);
+
Utils::FileName baseFileName() const;
void setBaseFileName(const Utils::FileName &base);
diff --git a/src/plugins/android/androidanalyzesupport.cpp b/src/plugins/android/androidanalyzesupport.cpp
index b29299fcdb..789417bb42 100644
--- a/src/plugins/android/androidanalyzesupport.cpp
+++ b/src/plugins/android/androidanalyzesupport.cpp
@@ -59,7 +59,7 @@ RunControl *AndroidAnalyzeSupport::createAnalyzeRunControl(AndroidRunConfigurati
params.displayName = AndroidManager::packageName(target);
params.sysroot = SysRootKitInformation::sysRoot(target->kit()).toString();
// TODO: Not sure if these are the right paths.
- params.workingDirectory = target->project()->projectDirectory();
+ params.workingDirectory = target->project()->projectDirectory().toString();
if (runMode == ProjectExplorer::QmlProfilerRunMode) {
QTcpServer server;
QTC_ASSERT(server.listen(QHostAddress::LocalHost)
diff --git a/src/plugins/android/androiddebugsupport.cpp b/src/plugins/android/androiddebugsupport.cpp
index 264d26d677..ae1d79b5e9 100644
--- a/src/plugins/android/androiddebugsupport.cpp
+++ b/src/plugins/android/androiddebugsupport.cpp
@@ -119,7 +119,7 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
params.qmlServerAddress = server.serverAddress().toString();
params.remoteSetupNeeded = true;
//TODO: Not sure if these are the right paths.
- params.projectSourceDirectory = project->projectDirectory();
+ params.projectSourceDirectory = project->projectDirectory().toString();
params.projectSourceFiles = project->files(QmakeProject::ExcludeGeneratedFiles);
params.projectBuildDirectory = project->rootQmakeProjectNode()->buildDir();
}
diff --git a/src/plugins/android/androiddeployqtstep.cpp b/src/plugins/android/androiddeployqtstep.cpp
index 3f79bbbf3b..63af796a3f 100644
--- a/src/plugins/android/androiddeployqtstep.cpp
+++ b/src/plugins/android/androiddeployqtstep.cpp
@@ -170,7 +170,7 @@ void AndroidDeployQtStep::ctor()
bool AndroidDeployQtStep::init()
{
- if (AndroidManager::checkForQt51Files(project()->projectDirectory()))
+ if (AndroidManager::checkForQt51Files(project()->projectDirectory().toString()))
emit addOutput(tr("Found old folder \"android\" in source directory. Qt 5.2 does not use that folder by default."), ErrorOutput);
m_targetArch = AndroidManager::targetArch(target());
diff --git a/src/plugins/android/androiddeployqtwidget.cpp b/src/plugins/android/androiddeployqtwidget.cpp
index 86f0537e5c..bcafad77b4 100644
--- a/src/plugins/android/androiddeployqtwidget.cpp
+++ b/src/plugins/android/androiddeployqtwidget.cpp
@@ -98,7 +98,7 @@ AndroidDeployQtWidget::AndroidDeployQtWidget(AndroidDeployQtStep *step)
m_ui->verboseOutputCheckBox->setChecked(m_step->verboseOutput());
m_ui->openPackageLocationCheckBox->setChecked(m_step->openPackageLocation());
- bool oldFiles = AndroidManager::checkForQt51Files(m_step->project()->projectDirectory());
+ bool oldFiles = AndroidManager::checkForQt51Files(m_step->project()->projectDirectory().toString());
m_ui->oldFilesWarningIcon->setVisible(oldFiles);
m_ui->oldFilesWarningLabel->setVisible(oldFiles);
@@ -346,7 +346,7 @@ void AndroidDeployQtWidget::addAndroidExtraLib()
{
QStringList fileNames = QFileDialog::getOpenFileNames(this,
tr("Select additional libraries"),
- m_currentBuildConfiguration->target()->project()->projectDirectory(),
+ m_currentBuildConfiguration->target()->project()->projectDirectory().toString(),
tr("Libraries (*.so)"));
if (!fileNames.isEmpty())
diff --git a/src/plugins/android/androidextralibrarylistmodel.cpp b/src/plugins/android/androidextralibrarylistmodel.cpp
index 9f450fd77b..b2499bcc0b 100644
--- a/src/plugins/android/androidextralibrarylistmodel.cpp
+++ b/src/plugins/android/androidextralibrarylistmodel.cpp
@@ -126,7 +126,7 @@ void AndroidExtraLibraryListModel::addEntries(const QStringList &list)
beginInsertRows(QModelIndex(), m_entries.size(), m_entries.size() + list.size());
foreach (const QString &path, list)
- m_entries += QLatin1String("$$PWD/") + QDir(m_project->projectDirectory()).relativeFilePath(path);
+ m_entries += QLatin1String("$$PWD/") + QDir(m_project->projectDirectory().toString()).relativeFilePath(path);
QmakeProjectManager::QmakeProFileNode *node = m_project->rootQmakeProjectNode();
node->setProVariable(QLatin1String("ANDROID_EXTRA_LIBS"), m_entries, m_scope,
diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp
index 8327237a54..bdd9e7b6e7 100644
--- a/src/plugins/android/androidmanager.cpp
+++ b/src/plugins/android/androidmanager.cpp
@@ -274,7 +274,8 @@ Utils::FileName AndroidManager::dirPath(ProjectExplorer::Target *target)
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(target->kit());
if (qtVersion && qtVersion->qtVersion() >= QtSupport::QtVersionNumber(5, 2, 0))
return target->activeBuildConfiguration()->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY));
- return Utils::FileName::fromString(target->project()->projectDirectory()).appendPath(AndroidDirName);
+ Utils::FileName dir = target->project()->projectDirectory();
+ return dir.appendPath(AndroidDirName);
}
Utils::FileName AndroidManager::manifestPath(ProjectExplorer::Target *target)
@@ -539,7 +540,7 @@ bool AndroidManager::createAndroidTemplatesIfNecessary(ProjectExplorer::Target *
Utils::FileName javaSrcPath
= Utils::FileName::fromString(version->qmakeProperty("QT_INSTALL_PREFIX"))
.appendPath(QLatin1String("src/android/java"));
- QDir projectDir(qmakeProject->projectDirectory());
+ QDir projectDir(qmakeProject->projectDirectory().toString());
Utils::FileName androidPath = dirPath(target);
QStringList m_ignoreFiles;
diff --git a/src/plugins/android/androidmanifesteditorwidget.cpp b/src/plugins/android/androidmanifesteditorwidget.cpp
index 4f388b1629..0d38fc4593 100644
--- a/src/plugins/android/androidmanifesteditorwidget.cpp
+++ b/src/plugins/android/androidmanifesteditorwidget.cpp
@@ -90,7 +90,7 @@ Project *androidProject(const QString &file)
continue;
Kit *kit = project->activeTarget()->kit();
if (DeviceTypeKitInformation::deviceTypeId(kit) == Android::Constants::ANDROID_DEVICE_TYPE
- && fileName.isChildOf(Utils::FileName::fromString(project->projectDirectory())))
+ && fileName.isChildOf(project->projectDirectory()))
return project;
}
return 0;
diff --git a/src/plugins/android/androidrunconfiguration.cpp b/src/plugins/android/androidrunconfiguration.cpp
index baa3cc5029..668f1332d5 100644
--- a/src/plugins/android/androidrunconfiguration.cpp
+++ b/src/plugins/android/androidrunconfiguration.cpp
@@ -80,7 +80,7 @@ void AndroidRunConfiguration::init()
bool AndroidRunConfiguration::fromMap(const QVariantMap &map)
{
- const QDir projectDir = QDir(target()->project()->projectDirectory());
+ const QDir projectDir = QDir(target()->project()->projectDirectory().toString());
m_proFilePath = QDir::cleanPath(projectDir.filePath(map.value(QLatin1String(PRO_FILE_KEY)).toString()));
m_parseSuccess = static_cast<QmakeProject *>(target()->project())->validParse(m_proFilePath);
m_parseInProgress = static_cast<QmakeProject *>(target()->project())->parseInProgress(m_proFilePath);
@@ -90,7 +90,7 @@ bool AndroidRunConfiguration::fromMap(const QVariantMap &map)
QVariantMap AndroidRunConfiguration::toMap() const
{
- const QDir projectDir = QDir(target()->project()->projectDirectory());
+ const QDir projectDir = QDir(target()->project()->projectDirectory().toString());
QVariantMap map(RunConfiguration::toMap());
map.insert(QLatin1String(PRO_FILE_KEY), projectDir.relativeFilePath(m_proFilePath));
return map;
diff --git a/src/plugins/android/createandroidmanifestwizard.cpp b/src/plugins/android/createandroidmanifestwizard.cpp
index 1dfb9a3db3..dca80347dc 100644
--- a/src/plugins/android/createandroidmanifestwizard.cpp
+++ b/src/plugins/android/createandroidmanifestwizard.cpp
@@ -250,7 +250,7 @@ void CreateAndroidManifestWizard::createAndroidManifestFile()
// and now time for some magic
QString dir = QFileInfo(fileName).absolutePath();
QString value = QLatin1String("$$PWD/")
- + QDir(m_target->project()->projectDirectory()).relativeFilePath(dir);
+ + QDir(m_target->project()->projectDirectory().toString()).relativeFilePath(dir);
bool result =
m_node->setProVariable(QLatin1String("ANDROID_PACKAGE_SOURCE_DIR"), QStringList(value));
QStringList unChanged;
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
index efe1b079e6..121f72e8ce 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
+++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
@@ -97,8 +97,7 @@ int AutotoolsBuildConfigurationFactory::priority(const Target *parent) const
QList<BuildInfo *> AutotoolsBuildConfigurationFactory::availableBuilds(const Target *parent) const
{
QList<BuildInfo *> result;
- result << createBuildInfo(parent->kit(),
- Utils::FileName::fromString(parent->project()->projectDirectory()));
+ result << createBuildInfo(parent->kit(), parent->project()->projectDirectory());
return result;
}
@@ -135,7 +134,7 @@ BuildConfiguration *AutotoolsBuildConfigurationFactory::create(Target *parent, c
// ### Build Steps Build ###
// autogen.sh or autoreconf
- QFile autogenFile(parent->project()->projectDirectory() + QLatin1String("/autogen.sh"));
+ QFile autogenFile(parent->project()->projectDirectory().toString() + QLatin1String("/autogen.sh"));
if (autogenFile.exists()) {
AutogenStep *autogenStep = new AutogenStep(buildSteps);
buildSteps->insertStep(0, autogenStep);
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.cpp
index 3e0f90723a..354597258d 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.cpp
+++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildsettingswidget.cpp
@@ -59,13 +59,13 @@ AutotoolsBuildSettingsWidget::AutotoolsBuildSettingsWidget(AutotoolsBuildConfigu
m_pathChooser = new Utils::PathChooser(this);
m_pathChooser->setEnabled(true);
m_pathChooser->setExpectedKind(Utils::PathChooser::Directory);
- m_pathChooser->setBaseDirectory(bc->target()->project()->projectDirectory());
+ m_pathChooser->setBaseFileName(bc->target()->project()->projectDirectory());
m_pathChooser->setEnvironment(bc->environment());
m_pathChooser->setHistoryCompleter(QLatin1String("AutoTools.BuildDir.History"));
fl->addRow(tr("Build directory:"), m_pathChooser);
connect(m_pathChooser, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
- m_pathChooser->setBaseDirectory(bc->target()->project()->projectDirectory());
+ m_pathChooser->setBaseFileName(bc->target()->project()->projectDirectory());
m_pathChooser->setPath(m_buildConfiguration->rawBuildDirectory().toString());
setDisplayName(tr("Autotools Manager"));
diff --git a/src/plugins/baremetal/baremetalrunconfiguration.cpp b/src/plugins/baremetal/baremetalrunconfiguration.cpp
index a92f6253be..f4baf279f4 100644
--- a/src/plugins/baremetal/baremetalrunconfiguration.cpp
+++ b/src/plugins/baremetal/baremetalrunconfiguration.cpp
@@ -131,7 +131,7 @@ QVariantMap BareMetalRunConfiguration::toMap() const
{
QVariantMap map(RunConfiguration::toMap());
map.insert(QLatin1String(ArgumentsKey), d->arguments);
- const QDir dir = QDir(target()->project()->projectDirectory());
+ const QDir dir = QDir(target()->project()->projectDirectory().toString());
map.insert(QLatin1String(ProFileKey), dir.relativeFilePath(d->projectFilePath));
map.insert(QLatin1String(WorkingDirectoryKey), d->workingDirectory);
return map;
@@ -143,7 +143,7 @@ bool BareMetalRunConfiguration::fromMap(const QVariantMap &map)
return false;
d->arguments = map.value(QLatin1String(ArgumentsKey)).toString();
- const QDir dir = QDir(target()->project()->projectDirectory());
+ const QDir dir = QDir(target()->project()->projectDirectory().toString());
d->projectFilePath
= QDir::cleanPath(dir.filePath(map.value(QLatin1String(ProFileKey)).toString()));
d->workingDirectory = map.value(QLatin1String(WorkingDirectoryKey)).toString();
diff --git a/src/plugins/baremetal/baremetalruncontrolfactory.cpp b/src/plugins/baremetal/baremetalruncontrolfactory.cpp
index 91f986ea1f..c4f0db5247 100644
--- a/src/plugins/baremetal/baremetalruncontrolfactory.cpp
+++ b/src/plugins/baremetal/baremetalruncontrolfactory.cpp
@@ -93,7 +93,7 @@ DebuggerStartParameters BareMetalRunControlFactory::startParameters(const BareMe
params.remoteSetupNeeded = false; //FIXME probably start debugserver with that, how?
params.displayName = runConfig->displayName();
if (const Project *project = target->project()) {
- params.projectSourceDirectory = project->projectDirectory();
+ params.projectSourceDirectory = project->projectDirectory().toString();
if (const BuildConfiguration *buildConfig = target->activeBuildConfiguration())
params.projectBuildDirectory = buildConfig->buildDirectory().toString();
params.projectSourceFiles = project->files(Project::ExcludeGeneratedFiles);
diff --git a/src/plugins/clearcase/clearcaseplugin.cpp b/src/plugins/clearcase/clearcaseplugin.cpp
index 95d472aab3..13fba1bec5 100644
--- a/src/plugins/clearcase/clearcaseplugin.cpp
+++ b/src/plugins/clearcase/clearcaseplugin.cpp
@@ -2028,7 +2028,7 @@ void ClearCasePlugin::projectChanged(Project *project)
disconnect(ICore::mainWindow(), SIGNAL(windowActivated()), this, SLOT(syncSlot()));
ProgressManager::cancelTasks(ClearCase::Constants::TASK_INDEX);
if (project) {
- QString projDir = project->projectDirectory();
+ QString projDir = project->projectDirectory().toString();
QString topLevel = findTopLevel(projDir);
m_topLevel = topLevel;
if (topLevel.isEmpty())
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
index 7d84b5eac5..0222417ece 100644
--- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
@@ -132,7 +132,7 @@ QList<ProjectExplorer::BuildInfo *> CMakeBuildConfigurationFactory::availableBui
QList<ProjectExplorer::BuildInfo *> result;
CMakeBuildInfo *info = createBuildInfo(parent->kit(),
- parent->project()->projectDirectory());
+ parent->project()->projectDirectory().toString());
result << info;
return result;
}
@@ -147,7 +147,7 @@ QList<ProjectExplorer::BuildInfo *> CMakeBuildConfigurationFactory::availableSet
const QString &projectPath) const
{
QList<ProjectExplorer::BuildInfo *> result;
- CMakeBuildInfo *info = createBuildInfo(k, ProjectExplorer::Project::projectDirectory(projectPath));
+ CMakeBuildInfo *info = createBuildInfo(k, ProjectExplorer::Project::projectDirectory(Utils::FileName::fromString(projectPath)).toString());
//: The name of the build configuration created by default for a cmake project.
info->displayName = tr("Default");
info->buildDirectory
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildinfo.h b/src/plugins/cmakeprojectmanager/cmakebuildinfo.h
index 6580685a0f..49165537fb 100644
--- a/src/plugins/cmakeprojectmanager/cmakebuildinfo.h
+++ b/src/plugins/cmakeprojectmanager/cmakebuildinfo.h
@@ -57,7 +57,7 @@ public:
useNinja = bc->useNinja();
QTC_ASSERT(bc->target()->project(), return);
- sourceDirectory = bc->target()->project()->projectDirectory();
+ sourceDirectory = bc->target()->project()->projectDirectory().toString();
}
Utils::Environment environment;
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index fce0b4767f..4625dc5b7b 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -184,7 +184,7 @@ QString CMakeProject::shadowBuildDirectory(const QString &projectFilePath, const
const QString projectName = QFileInfo(info.absolutePath()).fileName();
ProjectExplorer::ProjectMacroExpander expander(projectFilePath, projectName, k, bcName);
- QDir projectDir = QDir(projectDirectory(projectFilePath));
+ QDir projectDir = QDir(projectDirectory(Utils::FileName::fromString(projectFilePath)).toString());
QString buildPath = Utils::expandMacros(Core::DocumentManager::buildDirectory(), &expander);
return QDir::cleanPath(projectDir.absoluteFilePath(buildPath));
}
@@ -239,7 +239,7 @@ bool CMakeProject::parseCMakeLists()
projectFiles.insert(node->path());
} else {
// Manually add the CMakeLists.txt file
- QString cmakeListTxt = projectDirectory() + QLatin1String("/CMakeLists.txt");
+ QString cmakeListTxt = projectDirectory().toString() + QLatin1String("/CMakeLists.txt");
bool generated = false;
fileList.append(new ProjectExplorer::FileNode(cmakeListTxt, ProjectExplorer::ProjectFileType, generated));
projectFiles.insert(cmakeListTxt);
@@ -343,7 +343,7 @@ bool CMakeProject::parseCMakeLists()
part->projectFile = projectFilePath().toString();
// This explicitly adds -I. to the include paths
- part->includePaths += projectDirectory();
+ part->includePaths += projectDirectory().toString();
foreach (const QString &includeFile, cbpparser.includeFiles()) {
// CodeBlocks is utterly ignorant of frameworks on Mac, and won't report framework
@@ -531,7 +531,7 @@ bool CMakeProject::fromMap(const QVariantMap &map)
bool hasUserFile = activeTarget();
if (!hasUserFile) {
- CMakeOpenProjectWizard copw(Core::ICore::mainWindow(), m_manager, projectDirectory(), Utils::Environment::systemEnvironment());
+ CMakeOpenProjectWizard copw(Core::ICore::mainWindow(), m_manager, projectDirectory().toString(), Utils::Environment::systemEnvironment());
if (copw.exec() != QDialog::Accepted)
return false;
Kit *k = copw.kit();
@@ -614,7 +614,7 @@ CMakeBuildTarget CMakeProject::buildTargetForTitle(const QString &title)
QString CMakeProject::uiHeaderFile(const QString &uiFile)
{
QFileInfo fi(uiFile);
- Utils::FileName project = Utils::FileName::fromString(projectDirectory());
+ Utils::FileName project = projectDirectory();
Utils::FileName baseDirectory = Utils::FileName::fromString(fi.absolutePath());
while (baseDirectory.isChildOf(project)) {
@@ -710,7 +710,7 @@ void CMakeProject::updateApplicationAndDeploymentTargets()
QString deploymentPrefix;
QDir sourceDir;
- sourceDir.setPath(t->project()->projectDirectory());
+ sourceDir.setPath(t->project()->projectDirectory().toString());
deploymentFile.setFileName(sourceDir.filePath(QLatin1String("QtCreatorDeployment.txt")));
if (deploymentFile.open(QFile::ReadOnly | QFile::Text)) {
deploymentStream.setDevice(&deploymentFile);
@@ -845,7 +845,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
m_buildConfiguration = bc;
m_pathLineEdit->setText(m_buildConfiguration->rawBuildDirectory().toString());
- if (m_buildConfiguration->buildDirectory().toString() == bc->target()->project()->projectDirectory())
+ if (m_buildConfiguration->buildDirectory() == bc->target()->project()->projectDirectory())
m_changeButton->setEnabled(false);
else
m_changeButton->setEnabled(true);
diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
index 5c9df61af8..ee68363dbb 100644
--- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
@@ -248,7 +248,7 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
m_workingDirectoryEdit = new Utils::PathChooser();
m_workingDirectoryEdit->setExpectedKind(Utils::PathChooser::Directory);
- m_workingDirectoryEdit->setBaseDirectory(m_cmakeRunConfiguration->target()->project()->projectDirectory());
+ m_workingDirectoryEdit->setBaseFileName(m_cmakeRunConfiguration->target()->project()->projectDirectory());
m_workingDirectoryEdit->setPath(m_cmakeRunConfiguration->baseWorkingDirectory());
m_workingDirectoryEdit->setHistoryCompleter(QLatin1String("CMake.WorkingDir.History"));
ProjectExplorer::EnvironmentAspect *aspect
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index b42a8f9521..c7f109a708 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1817,7 +1817,7 @@ void DebuggerPluginPrivate::attachToQmlPort()
sourceFiles << project->files(Project::ExcludeGeneratedFiles);
sp.projectSourceDirectory =
- !projects.isEmpty() ? projects.first()->projectDirectory() : QString();
+ !projects.isEmpty() ? projects.first()->projectDirectory().toString() : QString();
sp.projectSourceFiles = sourceFiles;
sp.sysRoot = SysRootKitInformation::sysRoot(kit).toString();
DebuggerRunControlFactory::createAndScheduleRun(sp);
diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp
index 2821d68f7d..e33ff08269 100644
--- a/src/plugins/debugger/debuggerrunner.cpp
+++ b/src/plugins/debugger/debuggerrunner.cpp
@@ -353,7 +353,7 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
if (target) {
if (const Project *project = target->project()) {
- sp.projectSourceDirectory = project->projectDirectory();
+ sp.projectSourceDirectory = project->projectDirectory().toString();
if (const BuildConfiguration *buildConfig = target->activeBuildConfiguration())
sp.projectBuildDirectory = buildConfig->buildDirectory().toString();
sp.projectSourceFiles = project->files(Project::ExcludeGeneratedFiles);
diff --git a/src/plugins/debugger/unstartedappwatcherdialog.cpp b/src/plugins/debugger/unstartedappwatcherdialog.cpp
index 4d835e0202..914e63a056 100644
--- a/src/plugins/debugger/unstartedappwatcherdialog.cpp
+++ b/src/plugins/debugger/unstartedappwatcherdialog.cpp
@@ -174,7 +174,7 @@ void UnstartedAppWatcherDialog::selectExecutable()
project->activeTarget()->activeBuildConfiguration()) {
path = project->activeTarget()->activeBuildConfiguration()->buildDirectory().toString();
} else if (project) {
- path = project->projectDirectory();
+ path = project->projectDirectory().toString();
}
}
m_pathChooser->setInitialBrowsePathBackup(path);
diff --git a/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp b/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp
index 3957b31630..f53f41aa74 100644
--- a/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp
+++ b/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp
@@ -95,7 +95,7 @@ int GenericBuildConfigurationFactory::priority(const Target *parent) const
QList<BuildInfo *> GenericBuildConfigurationFactory::availableBuilds(const Target *parent) const
{
QList<ProjectExplorer::BuildInfo *> result;
- BuildInfo *info = createBuildInfo(parent->kit(), Utils::FileName::fromString(parent->project()->projectDirectory()));
+ BuildInfo *info = createBuildInfo(parent->kit(), parent->project()->projectDirectory());
result << info;
return result;
}
@@ -109,7 +109,7 @@ int GenericBuildConfigurationFactory::priority(const Kit *k, const QString &proj
QList<BuildInfo *> GenericBuildConfigurationFactory::availableSetups(const Kit *k, const QString &projectPath) const
{
QList<BuildInfo *> result;
- BuildInfo *info = createBuildInfo(k, Utils::FileName::fromString(ProjectExplorer::Project::projectDirectory(projectPath)));
+ BuildInfo *info = createBuildInfo(k, ProjectExplorer::Project::projectDirectory(Utils::FileName::fromString(projectPath)));
//: The name of the build configuration created by default for a generic project.
info->displayName = tr("Default");
result << info;
@@ -217,7 +217,7 @@ GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericBuildConfiguration
connect(m_pathChooser, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
m_buildConfiguration = bc;
- m_pathChooser->setBaseDirectory(bc->target()->project()->projectDirectory());
+ m_pathChooser->setBaseFileName(bc->target()->project()->projectDirectory());
m_pathChooser->setEnvironment(bc->environment());
m_pathChooser->setPath(m_buildConfiguration->rawBuildDirectory().toString());
setDisplayName(tr("Generic Manager"));
diff --git a/src/plugins/ios/iosdebugsupport.cpp b/src/plugins/ios/iosdebugsupport.cpp
index 4c4dd9c87c..f68a4a53b6 100644
--- a/src/plugins/ios/iosdebugsupport.cpp
+++ b/src/plugins/ios/iosdebugsupport.cpp
@@ -162,7 +162,7 @@ RunControl *IosDebugSupport::createDebugRunControl(IosRunConfiguration *runConfi
}
if (qmlDebug) {
params.languages |= QmlLanguage;
- params.projectSourceDirectory = project->projectDirectory();
+ params.projectSourceDirectory = project->projectDirectory().toString();
params.projectSourceFiles = project->files(QmakeProject::ExcludeGeneratedFiles);
params.projectBuildDirectory = project->rootQmakeProjectNode()->buildDir();
if (!cppDebug)
diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp
index 15d4242ba8..f5392a5e92 100644
--- a/src/plugins/projectexplorer/buildconfiguration.cpp
+++ b/src/plugins/projectexplorer/buildconfiguration.cpp
@@ -65,7 +65,7 @@ private:
bool BuildConfigMacroExpander::resolveMacro(const QString &name, QString *ret)
{
if (name == QLatin1String("sourceDir")) {
- *ret = QDir::toNativeSeparators(m_bc->target()->project()->projectDirectory());
+ *ret = m_bc->target()->project()->projectDirectory().toUserOutput();
return true;
}
if (name == QLatin1String("buildDir")) {
@@ -125,7 +125,7 @@ BuildConfiguration::~BuildConfiguration()
Utils::FileName BuildConfiguration::buildDirectory() const
{
QString path = QDir::cleanPath(environment().expandVariables(m_buildDirectory.toString()));
- return Utils::FileName::fromString(QDir::cleanPath(QDir(target()->project()->projectDirectory()).absoluteFilePath(path)));
+ return Utils::FileName::fromString(QDir::cleanPath(QDir(target()->project()->projectDirectory().toString()).absoluteFilePath(path)));
}
Utils::FileName BuildConfiguration::rawBuildDirectory() const
diff --git a/src/plugins/projectexplorer/localapplicationrunconfiguration.cpp b/src/plugins/projectexplorer/localapplicationrunconfiguration.cpp
index a646f1d7e9..18aca44940 100644
--- a/src/plugins/projectexplorer/localapplicationrunconfiguration.cpp
+++ b/src/plugins/projectexplorer/localapplicationrunconfiguration.cpp
@@ -52,7 +52,7 @@ private:
bool FallBackMacroExpander::resolveMacro(const QString &name, QString *ret)
{
if (name == QLatin1String("sourceDir")) {
- *ret = QDir::toNativeSeparators(m_target->project()->projectDirectory());
+ *ret = m_target->project()->projectDirectory().toUserOutput();
return true;
}
*ret = Core::VariableManager::value(name.toUtf8());
diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp
index 3348b45ae2..207ce827f5 100644
--- a/src/plugins/projectexplorer/project.cpp
+++ b/src/plugins/projectexplorer/project.cpp
@@ -346,17 +346,16 @@ QVariantMap Project::toMap() const
return map;
}
-QString Project::projectDirectory() const
+Utils::FileName Project::projectDirectory() const
{
- return projectDirectory(document()->filePath());
+ return projectDirectory(projectFilePath());
}
-QString Project::projectDirectory(const QString &top)
+Utils::FileName Project::projectDirectory(const Utils::FileName &top)
{
if (top.isEmpty())
- return QString();
- QFileInfo info(top);
- return info.absoluteDir().path();
+ return Utils::FileName();
+ return Utils::FileName::fromString(top.toFileInfo().absoluteDir().path());
}
diff --git a/src/plugins/projectexplorer/project.h b/src/plugins/projectexplorer/project.h
index 4a33c12ed4..e64d275965 100644
--- a/src/plugins/projectexplorer/project.h
+++ b/src/plugins/projectexplorer/project.h
@@ -116,8 +116,8 @@ public:
virtual QVariantMap toMap() const;
// The directory that holds the project. This includes the absolute path.
- QString projectDirectory() const;
- static QString projectDirectory(const QString &top);
+ Utils::FileName projectDirectory() const;
+ static Utils::FileName projectDirectory(const Utils::FileName &top);
Core::Context projectContext() const;
Core::Context projectLanguages() const;
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 03356fc87e..401f677344 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -1791,7 +1791,7 @@ void ProjectExplorerPlugin::updateExternalFileWarning()
if (!d->m_currentProject || !infoBar->canInfoBeAdded(externalFileId))
return;
Utils::FileName fileName = Utils::FileName::fromString(document->filePath());
- Utils::FileName projectDir = Utils::FileName::fromString(d->m_currentProject->projectDirectory());
+ Utils::FileName projectDir = d->m_currentProject->projectDirectory();
if (projectDir.isEmpty() || fileName.isChildOf(projectDir))
return;
// External file. Test if it under the same VCS
diff --git a/src/plugins/projectexplorer/settingsaccessor.cpp b/src/plugins/projectexplorer/settingsaccessor.cpp
index 56de60867b..895b4a5913 100644
--- a/src/plugins/projectexplorer/settingsaccessor.cpp
+++ b/src/plugins/projectexplorer/settingsaccessor.cpp
@@ -712,7 +712,7 @@ void SettingsAccessor::addVersionUpgrader(VersionUpgrader *handler)
QStringList SettingsAccessor::findSettingsFiles(const QString &suffix) const
{
const QString defaultName = defaultFileName(suffix);
- QDir projectDir = QDir(project()->projectDirectory());
+ QDir projectDir = QDir(project()->projectDirectory().toString());
QStringList result;
if (QFileInfo(defaultName).exists())
@@ -1991,7 +1991,7 @@ QVariantMap UserFileVersion11Upgrader::upgrade(const QVariantMap &map)
addBuildConfiguration(k, bc, bcPos, activeBc);
addDeployConfiguration(k, dc, dcPos, activeDc);
- addRunConfigurations(k, rcs, activeRc, m_accessor->project()->projectDirectory());
+ addRunConfigurations(k, rcs, activeRc, m_accessor->project()->projectDirectory().toString());
if (targetPos == activeTarget && bcPos == activeBc && dcPos == activeDc)
m_targets[k].insert(QLatin1String("Update.IsActive"), true);
} // dcs
diff --git a/src/plugins/projectexplorer/targetsettingspanel.cpp b/src/plugins/projectexplorer/targetsettingspanel.cpp
index a5eeadc61d..43940ddcdc 100644
--- a/src/plugins/projectexplorer/targetsettingspanel.cpp
+++ b/src/plugins/projectexplorer/targetsettingspanel.cpp
@@ -639,7 +639,7 @@ void TargetSettingsPanelWidget::openTargetPreferences()
void TargetSettingsPanelWidget::importTarget()
{
- QString toImport = QFileDialog::getExistingDirectory(this, tr("Import directory"), m_project->projectDirectory());
+ QString toImport = QFileDialog::getExistingDirectory(this, tr("Import directory"), m_project->projectDirectory().toString());
importTarget(Utils::FileName::fromString(toImport));
}
diff --git a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp
index 77b40fa152..31eaa722b5 100644
--- a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp
+++ b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp
@@ -309,7 +309,7 @@ ProjectExplorer::BuildConfiguration *QbsBuildConfigurationFactory::create(Projec
Utils::FileName buildDir = info->buildDirectory;
if (buildDir.isEmpty())
- buildDir = QbsProject::defaultBuildDirectory(parent->project()->projectDirectory(),
+ buildDir = QbsProject::defaultBuildDirectory(parent->project()->projectDirectory().toString(),
parent->kit(), info->displayName);
ProjectExplorer::BuildConfiguration *bc
diff --git a/src/plugins/qbsprojectmanager/qbsbuildconfigurationwidget.cpp b/src/plugins/qbsprojectmanager/qbsbuildconfigurationwidget.cpp
index e5682322de..f62f4d3a1d 100644
--- a/src/plugins/qbsprojectmanager/qbsbuildconfigurationwidget.cpp
+++ b/src/plugins/qbsprojectmanager/qbsbuildconfigurationwidget.cpp
@@ -65,7 +65,7 @@ QbsBuildConfigurationWidget::QbsBuildConfigurationWidget(QbsProjectManager::Inte
m_buildDirChooser = new Utils::PathChooser;
m_buildDirChooser->setExpectedKind(Utils::PathChooser::Directory);
- m_buildDirChooser->setBaseDirectory(bc->target()->project()->projectDirectory());
+ m_buildDirChooser->setBaseFileName(bc->target()->project()->projectDirectory());
m_buildDirChooser->setEnvironment(bc->environment());
layout->addWidget(m_buildDirChooser, 0, 1);
diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp
index 317834df4c..05c6daaa3f 100644
--- a/src/plugins/qbsprojectmanager/qbsproject.cpp
+++ b/src/plugins/qbsprojectmanager/qbsproject.cpp
@@ -253,7 +253,7 @@ Utils::FileName QbsProject::defaultBuildDirectory(const QString &projectFilePath
{
const QString projectName = QFileInfo(projectFilePath).completeBaseName();
ProjectExplorer::ProjectMacroExpander expander(projectFilePath, projectName, k, bcName);
- QString projectDir = projectDirectory(projectFilePath);
+ QString projectDir = projectDirectory(Utils::FileName::fromString(projectFilePath)).toString();
QString buildPath = Utils::expandMacros(Core::DocumentManager::buildDirectory(), &expander);
return Utils::FileName::fromString(Utils::FileUtils::resolvePath(projectDir, buildPath));
}
diff --git a/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
index 6a8363c415..52f971d409 100644
--- a/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
+++ b/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
@@ -476,7 +476,7 @@ void QbsRunConfigurationWidget::targetInformationHasChanged()
m_executableLineEdit->setText(m_rc->executable());
m_workingDirectoryEdit->setPath(m_rc->baseWorkingDirectory());
- m_workingDirectoryEdit->setBaseDirectory(m_rc->target()->project()->projectDirectory());
+ m_workingDirectoryEdit->setBaseFileName(m_rc->target()->project()->projectDirectory());
m_ignoreChange = false;
}
diff --git a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
index 0090568e93..7c7f5c25a3 100644
--- a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
+++ b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
@@ -220,7 +220,7 @@ DesktopQmakeRunConfigurationWidget::DesktopQmakeRunConfigurationWidget(DesktopQm
m_workingDirectoryEdit->setExpectedKind(PathChooser::Directory);
m_workingDirectoryEdit->setHistoryCompleter(QLatin1String("Qmake.WorkingDir.History"));
m_workingDirectoryEdit->setPath(m_qmakeRunConfiguration->baseWorkingDirectory());
- m_workingDirectoryEdit->setBaseDirectory(m_qmakeRunConfiguration->target()->project()->projectDirectory());
+ m_workingDirectoryEdit->setBaseFileName(m_qmakeRunConfiguration->target()->project()->projectDirectory());
EnvironmentAspect *aspect = qmakeRunConfiguration->extraAspect<EnvironmentAspect>();
if (aspect) {
connect(aspect, SIGNAL(environmentChanged()), this, SLOT(environmentWasChanged()));
@@ -412,7 +412,7 @@ QWidget *DesktopQmakeRunConfiguration::createConfigurationWidget()
QVariantMap DesktopQmakeRunConfiguration::toMap() const
{
- const QDir projectDir = QDir(target()->project()->projectDirectory());
+ const QDir projectDir = QDir(target()->project()->projectDirectory().toString());
QVariantMap map(LocalApplicationRunConfiguration::toMap());
map.insert(QLatin1String(COMMAND_LINE_ARGUMENTS_KEY), m_commandLineArguments);
map.insert(QLatin1String(PRO_FILE_KEY), projectDir.relativeFilePath(m_proFilePath));
@@ -424,7 +424,7 @@ QVariantMap DesktopQmakeRunConfiguration::toMap() const
bool DesktopQmakeRunConfiguration::fromMap(const QVariantMap &map)
{
- const QDir projectDir = QDir(target()->project()->projectDirectory());
+ const QDir projectDir = QDir(target()->project()->projectDirectory().toString());
m_commandLineArguments = map.value(QLatin1String(COMMAND_LINE_ARGUMENTS_KEY)).toString();
m_proFilePath = QDir::cleanPath(projectDir.filePath(map.value(QLatin1String(PRO_FILE_KEY)).toString()));
m_runMode = map.value(QLatin1String(USE_TERMINAL_KEY), false).toBool() ? Console : Gui;
diff --git a/src/plugins/qmakeprojectmanager/externaleditors.cpp b/src/plugins/qmakeprojectmanager/externaleditors.cpp
index d24f45b20f..2b5c97f079 100644
--- a/src/plugins/qmakeprojectmanager/externaleditors.cpp
+++ b/src/plugins/qmakeprojectmanager/externaleditors.cpp
@@ -133,7 +133,7 @@ bool ExternalQtEditor::getEditorLaunchData(const QString &fileName,
if (const ProjectExplorer::Target *target = project->activeTarget()) {
if (const QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(target->kit())) {
data->binary = (qtVersion->*commandAccessor)();
- data->workingDirectory = project->projectDirectory();
+ data->workingDirectory = project->projectDirectory().toString();
}
}
}
diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp
index 00dcc07549..dcf5b7edda 100644
--- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp
@@ -68,7 +68,7 @@ static Utils::FileName defaultBuildDirectory(bool supportsShadowBuild,
{
if (supportsShadowBuild)
return Utils::FileName::fromString(QmakeProject::shadowBuildDirectory(projectPath, k, suffix));
- return Utils::FileName::fromString(ProjectExplorer::Project::projectDirectory(projectPath));
+ return ProjectExplorer::Project::projectDirectory(Utils::FileName::fromString(projectPath));
}
using namespace Internal;
@@ -186,7 +186,7 @@ void QmakeBuildConfiguration::updateShadowBuild()
bool currentShadowBuild = supportsShadowBuilds();
if (currentShadowBuild != m_qtVersionSupportsShadowBuilds) {
if (!currentShadowBuild)
- setBuildDirectory(Utils::FileName::fromString(target()->project()->projectDirectory()));
+ setBuildDirectory(target()->project()->projectDirectory());
m_qtVersionSupportsShadowBuilds = currentShadowBuild;
}
}
@@ -244,7 +244,7 @@ void QmakeBuildConfiguration::setFileNodeBuild(FileNode *node)
/// still is a in-source build
bool QmakeBuildConfiguration::isShadowBuild() const
{
- return buildDirectory().toString() != target()->project()->projectDirectory();
+ return buildDirectory() != target()->project()->projectDirectory();
}
void QmakeBuildConfiguration::setBuildDirectory(const FileName &directory)
@@ -254,7 +254,7 @@ void QmakeBuildConfiguration::setBuildDirectory(const FileName &directory)
BuildConfiguration::setBuildDirectory(directory);
QTC_CHECK(supportsShadowBuilds()
|| (!supportsShadowBuilds()
- && buildDirectory().toString() == target()->project()->projectDirectory()));
+ && buildDirectory() == target()->project()->projectDirectory()));
emitProFileEvaluateNeeded();
}
diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp
index 3ae07fe2d1..85721f6da8 100644
--- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp
@@ -1442,7 +1442,7 @@ QString QmakeProject::shadowBuildDirectory(const QString &proFilePath, const Kit
const QString projectName = QFileInfo(proFilePath).completeBaseName();
ProjectExplorer::ProjectMacroExpander expander(proFilePath, projectName, k, suffix);
- QString projectDir = projectDirectory(proFilePath);
+ QString projectDir = projectDirectory(Utils::FileName::fromString(proFilePath)).toString();
QString buildPath = Utils::expandMacros(Core::DocumentManager::buildDirectory(), &expander);
return Utils::FileUtils::resolvePath(projectDir, buildPath);
}
diff --git a/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp
index 6eace76dbf..ec92c63acc 100644
--- a/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp
@@ -69,7 +69,7 @@ QmakeProjectConfigWidget::QmakeProjectConfigWidget(QmakeBuildConfiguration *bc)
m_ui->shadowBuildDirEdit->setExpectedKind(Utils::PathChooser::ExistingDirectory);
m_ui->shadowBuildDirEdit->setHistoryCompleter(QLatin1String("Qmake.BuildDir.History"));
m_ui->shadowBuildDirEdit->setEnvironment(bc->environment());
- m_ui->shadowBuildDirEdit->setBaseDirectory(bc->target()->project()->projectDirectory());
+ m_ui->shadowBuildDirEdit->setBaseFileName(bc->target()->project()->projectDirectory());
bool isShadowBuild = bc->isShadowBuild();
if (isShadowBuild) {
m_ui->shadowBuildDirEdit->setPath(bc->rawBuildDirectory().toString());
@@ -78,7 +78,7 @@ QmakeProjectConfigWidget::QmakeProjectConfigWidget(QmakeBuildConfiguration *bc)
m_ui->shadowBuildDirEdit->setPath(m_defaultShadowBuildDir);
m_ui->shadowBuildDirEdit->setVisible(false);
}
- m_ui->inSourceBuildDirEdit->setPath(bc->target()->project()->projectDirectory());
+ m_ui->inSourceBuildDirEdit->setFileName(bc->target()->project()->projectDirectory());
m_ui->inSourceBuildDirEdit->setReadOnly(true);
m_ui->inSourceBuildDirEdit->setEnabled(false);
@@ -155,9 +155,9 @@ void QmakeProjectConfigWidget::buildDirectoryChanged()
void QmakeProjectConfigWidget::onBeforeBeforeShadowBuildDirBrowsed()
{
- QString initialDirectory = m_buildConfiguration->target()->project()->projectDirectory();
+ Utils::FileName initialDirectory = m_buildConfiguration->target()->project()->projectDirectory();
if (!initialDirectory.isEmpty())
- m_ui->shadowBuildDirEdit->setInitialBrowsePathBackup(initialDirectory);
+ m_ui->shadowBuildDirEdit->setInitialBrowsePathBackup(initialDirectory.toString());
}
void QmakeProjectConfigWidget::shadowBuildClicked(bool checked)
@@ -243,7 +243,7 @@ void QmakeProjectConfigWidget::updateProblemLabel()
}
if (allGood) {
- QString buildDirectory = m_buildConfiguration->target()->project()->projectDirectory();
+ QString buildDirectory = m_buildConfiguration->target()->project()->projectDirectory().toString();
if (m_buildConfiguration->isShadowBuild())
buildDirectory = m_buildConfiguration->buildDirectory().toString();
QList<ProjectExplorer::Task> issues;
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index 58487217f3..53f412cc86 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -208,7 +208,7 @@ AnalyzerRunControl *QmlProfilerTool::createRunControl(const AnalyzerStartParamet
QString projectDirectory;
if (runConfiguration) {
Project *project = runConfiguration->target()->project();
- projectDirectory = project->projectDirectory();
+ projectDirectory = project->projectDirectory().toString();
}
populateFileFinder(projectDirectory, sp.sysroot);
@@ -298,7 +298,7 @@ void QmlProfilerTool::populateFileFinder(QString projectDirectory, QString activ
if (!projects.isEmpty()) {
if (projectDirectory.isEmpty())
- projectDirectory = projects.first()->projectDirectory();
+ projectDirectory = projects.first()->projectDirectory().toString();
if (activeSysroot.isEmpty()) {
if (Target *target = projects.first()->activeTarget())
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
index 498ab8d4d2..f2ca25d3c8 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
@@ -211,7 +211,7 @@ void QmlProjectRunConfiguration::setScriptSource(MainScriptSource source,
} else { // FileInSettings
m_scriptFile = settingsPath;
m_mainScriptFilename
- = target()->project()->projectDirectory() + QLatin1Char('/') + m_scriptFile;
+ = target()->project()->projectDirectory().toString() + QLatin1Char('/') + m_scriptFile;
}
updateEnabled();
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.cpp
index 79623f1877..f6ad493dff 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationwidget.cpp
@@ -97,7 +97,7 @@ static bool caseInsensitiveLessThan(const QString &s1, const QString &s2)
void QmlProjectRunConfigurationWidget::updateFileComboBox()
{
ProjectExplorer::Project *project = m_runConfiguration->target()->project();
- QDir projectDir(project->projectDirectory());
+ QDir projectDir(project->projectDirectory().toString());
if (m_runConfiguration->mainScriptSource() == QmlProjectRunConfiguration::FileInProjectFile) {
const QString mainScriptInFilePath
diff --git a/src/plugins/qnx/bardescriptorfilenodemanager.cpp b/src/plugins/qnx/bardescriptorfilenodemanager.cpp
index 7ad83c88b0..a0ca3eb6a4 100644
--- a/src/plugins/qnx/bardescriptorfilenodemanager.cpp
+++ b/src/plugins/qnx/bardescriptorfilenodemanager.cpp
@@ -221,8 +221,7 @@ bool BarDescriptorFileNodeManager::createBarDescriptor(ProjectExplorer::Project
content.replace(QLatin1String("PROJECTPATH"), targetName);
content.replace(QLatin1String("ID"), QLatin1String("com.example.") + projectName);
- if (Utils::FileName::fromString(project->projectDirectory())
- .appendPath(QLatin1String("qml")).toFileInfo().exists())
+ if (project->projectDirectory().appendPath(QLatin1String("qml")).toFileInfo().exists())
content.replace(QLatin1String("</qnx>"),
QLatin1String(" <asset path=\"%SRC_DIR%/qml\">qml</asset>\n</qnx>"));
diff --git a/src/plugins/qnx/blackberrycreatepackagestep.cpp b/src/plugins/qnx/blackberrycreatepackagestep.cpp
index 486d9e98fb..67a6e1a9c2 100644
--- a/src/plugins/qnx/blackberrycreatepackagestep.cpp
+++ b/src/plugins/qnx/blackberrycreatepackagestep.cpp
@@ -302,8 +302,7 @@ bool BlackBerryCreatePackageStep::prepareAppDescriptorFile(const QString &appDes
//Replace Source path placeholder
QHash<QString, QString> placeHoldersHash;
- placeHoldersHash[QLatin1String("%SRC_DIR%")] =
- QDir::toNativeSeparators(target()->project()->projectDirectory());
+ placeHoldersHash[QLatin1String("%SRC_DIR%")] = target()->project()->projectDirectory().toUserOutput();
doc.expandPlaceHolders(placeHoldersHash);
// Set up correct environment depending on using bundled/pre-installed Qt
diff --git a/src/plugins/qnx/blackberryruncontrolfactory.cpp b/src/plugins/qnx/blackberryruncontrolfactory.cpp
index 3a67695236..f7f1b19d13 100644
--- a/src/plugins/qnx/blackberryruncontrolfactory.cpp
+++ b/src/plugins/qnx/blackberryruncontrolfactory.cpp
@@ -202,7 +202,7 @@ Debugger::DebuggerStartParameters BlackBerryRunControlFactory::startParameters(
params.languages |= Debugger::CppLanguage;
if (const ProjectExplorer::Project *project = runConfig->target()->project()) {
- params.projectSourceDirectory = project->projectDirectory();
+ params.projectSourceDirectory = project->projectDirectory().toString();
if (const ProjectExplorer::BuildConfiguration *buildConfig = runConfig->target()->activeBuildConfiguration())
params.projectBuildDirectory = buildConfig->buildDirectory().toString();
params.projectSourceFiles = project->files(ProjectExplorer::Project::ExcludeGeneratedFiles);
diff --git a/src/plugins/qnx/qnxruncontrolfactory.cpp b/src/plugins/qnx/qnxruncontrolfactory.cpp
index b36343bc4f..5de46486e4 100644
--- a/src/plugins/qnx/qnxruncontrolfactory.cpp
+++ b/src/plugins/qnx/qnxruncontrolfactory.cpp
@@ -101,7 +101,7 @@ static DebuggerStartParameters createDebuggerStartParameters(const QnxRunConfigu
params.languages |= Debugger::CppLanguage;
if (const ProjectExplorer::Project *project = runConfig->target()->project()) {
- params.projectSourceDirectory = project->projectDirectory();
+ params.projectSourceDirectory = project->projectDirectory().toString();
if (const ProjectExplorer::BuildConfiguration *buildConfig = runConfig->target()->activeBuildConfiguration())
params.projectBuildDirectory = buildConfig->buildDirectory().toString();
params.projectSourceFiles = project->files(ProjectExplorer::Project::ExcludeGeneratedFiles);
diff --git a/src/plugins/qtsupport/customexecutableconfigurationwidget.cpp b/src/plugins/qtsupport/customexecutableconfigurationwidget.cpp
index 049b4e91f4..b7fe8fac0f 100644
--- a/src/plugins/qtsupport/customexecutableconfigurationwidget.cpp
+++ b/src/plugins/qtsupport/customexecutableconfigurationwidget.cpp
@@ -66,7 +66,7 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
m_workingDirectory = new Utils::PathChooser(this);
m_workingDirectory->setHistoryCompleter(QLatin1String("Qt.WorkingDir.History"));
m_workingDirectory->setExpectedKind(Utils::PathChooser::Directory);
- m_workingDirectory->setBaseDirectory(rc->target()->project()->projectDirectory());
+ m_workingDirectory->setBaseFileName(rc->target()->project()->projectDirectory());
layout->addRow(tr("Working directory:"), m_workingDirectory);
diff --git a/src/plugins/qtsupport/qtoutputformatter.cpp b/src/plugins/qtsupport/qtoutputformatter.cpp
index 2407b4e739..14549186e1 100644
--- a/src/plugins/qtsupport/qtoutputformatter.cpp
+++ b/src/plugins/qtsupport/qtoutputformatter.cpp
@@ -53,7 +53,7 @@ QtOutputFormatter::QtOutputFormatter(ProjectExplorer::Project *project)
{
if (project) {
m_projectFinder.setProjectFiles(project->files(Project::ExcludeGeneratedFiles));
- m_projectFinder.setProjectDirectory(project->projectDirectory());
+ m_projectFinder.setProjectDirectory(project->projectDirectory().toString());
connect(project, SIGNAL(fileListChanged()),
this, SLOT(updateProjectFileList()));
diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
index f5264d1844..8685b33223 100644
--- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
+++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
@@ -109,7 +109,7 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const AbstractR
params.displayName = runConfig->displayName();
if (const Project *project = target->project()) {
- params.projectSourceDirectory = project->projectDirectory();
+ params.projectSourceDirectory = project->projectDirectory().toString();
if (const BuildConfiguration *buildConfig = target->activeBuildConfiguration())
params.projectBuildDirectory = buildConfig->buildDirectory().toString();
params.projectSourceFiles = project->files(Project::ExcludeGeneratedFiles);
diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
index 460b53f6d0..0473f6e9dc 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
+++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
@@ -135,7 +135,7 @@ QVariantMap RemoteLinuxRunConfiguration::toMap() const
{
QVariantMap map(RunConfiguration::toMap());
map.insert(QLatin1String(ArgumentsKey), d->arguments);
- const QDir dir = QDir(target()->project()->projectDirectory());
+ const QDir dir = QDir(target()->project()->projectDirectory().toString());
map.insert(QLatin1String(ProFileKey), dir.relativeFilePath(d->projectFilePath));
map.insert(QLatin1String(UseAlternateExeKey), d->useAlternateRemoteExecutable);
map.insert(QLatin1String(AlternateExeKey), d->alternateRemoteExecutable);
@@ -149,7 +149,7 @@ bool RemoteLinuxRunConfiguration::fromMap(const QVariantMap &map)
return false;
d->arguments = map.value(QLatin1String(ArgumentsKey)).toStringList();
- const QDir dir = QDir(target()->project()->projectDirectory());
+ const QDir dir = QDir(target()->project()->projectDirectory().toString());
d->projectFilePath
= QDir::cleanPath(dir.filePath(map.value(QLatin1String(ProFileKey)).toString()));
d->useAlternateRemoteExecutable = map.value(QLatin1String(UseAlternateExeKey), false).toBool();
diff --git a/src/plugins/tasklist/taskfilefactory.cpp b/src/plugins/tasklist/taskfilefactory.cpp
index b0bbb394e0..8daa3b50d6 100644
--- a/src/plugins/tasklist/taskfilefactory.cpp
+++ b/src/plugins/tasklist/taskfilefactory.cpp
@@ -55,7 +55,7 @@ TaskFileFactory::TaskFileFactory(QObject * parent) :
Core::IDocument *TaskFileFactory::open(const QString &fileName)
{
ProjectExplorer::Project *project = ProjectExplorer::ProjectExplorerPlugin::currentProject();
- return open(project ? project->projectDirectory() : QString(), fileName);
+ return open(project ? project->projectDirectory().toString() : QString(), fileName);
}
Core::IDocument *TaskFileFactory::open(const QString &base, const QString &fileName)
diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp
index d0a4c9ae89..cc1124552a 100644
--- a/src/plugins/valgrind/callgrindtool.cpp
+++ b/src/plugins/valgrind/callgrindtool.cpp
@@ -401,7 +401,7 @@ void CallgrindToolPrivate::handleFilterProjectCosts()
QTC_ASSERT(pro, return);
if (m_filterProjectCosts->isChecked()) {
- const QString projectDir = pro->projectDirectory();
+ const QString projectDir = pro->projectDirectory().toString();
m_proxyModel->setFilterBaseDir(projectDir);
} else {
m_proxyModel->setFilterBaseDir(QString());
diff --git a/src/plugins/valgrind/memcheckerrorview.cpp b/src/plugins/valgrind/memcheckerrorview.cpp
index 6f3318b1a6..a5782a3985 100644
--- a/src/plugins/valgrind/memcheckerrorview.cpp
+++ b/src/plugins/valgrind/memcheckerrorview.cpp
@@ -188,7 +188,7 @@ static QString relativeToPath()
// The project for which we insert the snippet.
const ProjectExplorer::Project *project = ProjectExplorer::SessionManager::startupProject();
- QString relativeTo(project ? project->projectDirectory() : QDir::homePath());
+ QString relativeTo(project ? project->projectDirectory().toString() : QDir::homePath());
if (!relativeTo.endsWith(QDir::separator()))
relativeTo.append(QDir::separator());
diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp
index e1173a6b99..17227ceff0 100644
--- a/src/plugins/valgrind/memchecktool.cpp
+++ b/src/plugins/valgrind/memchecktool.cpp
@@ -143,7 +143,7 @@ bool MemcheckErrorFilterProxyModel::filterAcceptsRow(int sourceRow, const QModel
// assume this error was created by an external library
QSet<QString> validFolders;
foreach (Project *project, SessionManager::projects()) {
- validFolders << project->projectDirectory();
+ validFolders << project->projectDirectory().toString();
foreach (Target *target, project->targets()) {
foreach (const ProjectExplorer::DeployableFile &file,
target->deploymentData().allFiles()) {
@@ -463,7 +463,7 @@ void MemcheckTool::engineStarting(const AnalyzerRunControl *engine)
QString dir;
if (RunConfiguration *rc = engine->runConfiguration())
- dir = rc->target()->project()->projectDirectory() + QDir::separator();
+ dir = rc->target()->project()->projectDirectory().toString() + QDir::separator();
const MemcheckRunControl *mEngine = dynamic_cast<const MemcheckRunControl *>(engine);
QTC_ASSERT(mEngine, return);
diff --git a/src/plugins/valgrind/suppressiondialog.cpp b/src/plugins/valgrind/suppressiondialog.cpp
index c5b7bac661..239dac1bf2 100644
--- a/src/plugins/valgrind/suppressiondialog.cpp
+++ b/src/plugins/valgrind/suppressiondialog.cpp
@@ -214,7 +214,7 @@ void SuppressionDialog::accept()
// Add file to project if there is a project containing this file on the file system.
if (!ProjectExplorer::SessionManager::projectForFile(path)) {
foreach (ProjectExplorer::Project *p, ProjectExplorer::SessionManager::projects()) {
- if (path.startsWith(p->projectDirectory())) {
+ if (path.startsWith(p->projectDirectory().toString())) {
p->rootProjectNode()->addFiles(QStringList() << path);
break;
}
diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp
index 79268c0dd8..7e9b091eef 100644
--- a/src/plugins/vcsbase/vcsbaseplugin.cpp
+++ b/src/plugins/vcsbase/vcsbaseplugin.cpp
@@ -285,7 +285,7 @@ void StateListener::slotStateChanged()
// Check for project, find the control
Core::IVersionControl *projectControl = 0;
if (const ProjectExplorer::Project *currentProject = ProjectExplorer::ProjectExplorerPlugin::currentProject()) {
- state.currentProjectPath = currentProject->projectDirectory();
+ state.currentProjectPath = currentProject->projectDirectory().toString();
state.currentProjectName = currentProject->displayName();
projectControl = Core::VcsManager::findVersionControlForDirectory(state.currentProjectPath,
&state.currentProjectTopLevel);
diff --git a/src/plugins/vcsbase/vcsplugin.cpp b/src/plugins/vcsbase/vcsplugin.cpp
index 350bd5c63d..ee3a970627 100644
--- a/src/plugins/vcsbase/vcsplugin.cpp
+++ b/src/plugins/vcsbase/vcsplugin.cpp
@@ -147,7 +147,7 @@ void VcsPlugin::updateVariable(const QByteArray &variable)
ProjectExplorer::Project *project = ProjectExplorer::ProjectExplorerPlugin::currentProject();
if (cachedProject != project) {
- cachedVc = Core::VcsManager::findVersionControlForDirectory(project->projectDirectory(),
+ cachedVc = Core::VcsManager::findVersionControlForDirectory(project->projectDirectory().toString(),
&cachedTopLevel);
cachedProject = project;
}
diff --git a/src/plugins/winrt/winrtpackagedeploymentstep.cpp b/src/plugins/winrt/winrtpackagedeploymentstep.cpp
index 56f5a578c4..28b3668fdb 100644
--- a/src/plugins/winrt/winrtpackagedeploymentstep.cpp
+++ b/src/plugins/winrt/winrtpackagedeploymentstep.cpp
@@ -192,7 +192,7 @@ QString WinRtPackageDeploymentStep::defaultWinDeployQtArguments() const
{
QString args;
QtcProcess::addArg(&args, QStringLiteral("--qmldir"));
- QtcProcess::addArg(&args, QDir::toNativeSeparators(project()->projectDirectory()));
+ QtcProcess::addArg(&args, project()->projectDirectory().toUserOutput());
return args;
}