UI: FortSettings: Simplify setupPaths().

This commit is contained in:
Nodir Temirkhodjaev 2021-05-16 19:07:55 +03:00
parent ca4cf234b3
commit 6773991e4f
2 changed files with 7 additions and 1 deletions

View File

@ -116,7 +116,9 @@ void FortSettings::setupGlobal()
void FortSettings::initialize(const QStringList &args, EnvManager *envManager) void FortSettings::initialize(const QStringList &args, EnvManager *envManager)
{ {
processArguments(args); processArguments(args);
setupPaths(envManager); setupPaths(envManager);
createPaths();
setupIni(profilePath() + APP_BASE + ".ini"); setupIni(profilePath() + APP_BASE + ".ini");
@ -251,8 +253,10 @@ void FortSettings::setupPaths(EnvManager *envManager)
} else { } else {
m_userPath = expandPath(m_userPath, envManager); m_userPath = expandPath(m_userPath, envManager);
} }
}
// Create directories void FortSettings::createPaths()
{
FileUtil::makePath(profilePath()); FileUtil::makePath(profilePath());
FileUtil::makePath(statPath()); FileUtil::makePath(statPath());
FileUtil::makePath(logsPath()); FileUtil::makePath(logsPath());

View File

@ -80,7 +80,9 @@ protected:
private: private:
void processArguments(const QStringList &args); void processArguments(const QStringList &args);
void setupPaths(EnvManager *envManager); void setupPaths(EnvManager *envManager);
void createPaths();
private: private:
uint m_isDefaultProfilePath : 1; uint m_isDefaultProfilePath : 1;