forked from qt-creator/qt-creator
Project: Use Utils::FileName as return type for projectDirectory(...)
Change-Id: I3ea10aa204b1ea41702edab09884b416cd6d9e06 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user