Introduce method to access the project directory

... use it.

Reviewed-by: dt
This commit is contained in:
Tobias Hunger
2010-03-25 13:19:27 +01:00
parent 3a15c8c3c5
commit 1ca8cb2397
18 changed files with 36 additions and 39 deletions

View File

@@ -227,6 +227,12 @@ QVariantMap Project::toMap() const
return map;
}
QString Project::projectDirectory() const
{
QFileInfo info(file()->fileName());
return info.absoluteDir().path();
}
bool Project::fromMap(const QVariantMap &map)
{
if (map.contains(QLatin1String(EDITOR_SETTINGS_KEY))) {