restored project properties dialog

This commit is contained in:
itsmattkc
2022-01-12 13:15:52 -08:00
parent 1e5ecaace6
commit 88b7151c17
10 changed files with 390 additions and 3 deletions
+12 -3
View File
@@ -320,6 +320,15 @@ bool Project::is_new() const
return !is_modified_ && filename_.isEmpty();
}
QString Project::get_cache_alongside_project_path() const
{
if (!filename_.isEmpty()) {
// Non-translated string so the path doesn't change if the language does
return QFileInfo(filename_).dir().filePath(QStringLiteral("cache"));
}
return QString();
}
QString Project::cache_path() const
{
ProjectSettingsNode::CacheSetting setting = settings_->GetCacheSetting();
@@ -330,7 +339,6 @@ QString Project::cache_path() const
case ProjectSettingsNode::kCacheCustomPath:
{
QString cache_path = settings_->GetCustomCachePath();
if (cache_path.isEmpty()) {
return cache_path;
}
@@ -338,8 +346,9 @@ QString Project::cache_path() const
}
case ProjectSettingsNode::kCacheStoreAlongsideProject:
{
if (!filename_.isEmpty()) {
return QFileInfo(filename_).path();
QString alongside = get_cache_alongside_project_path();
if (!alongside.isEmpty()) {
return alongside;
}
break;
}