Skip to content

Commit

Permalink
Merge pull request #280 from FashionFreedom/issue-#279
Browse files Browse the repository at this point in the history
#279 Create application's directories on startup in user's home directory
  • Loading branch information
slspencer committed Jul 30, 2020
2 parents 112105c + 9cdec22 commit c403baf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/seamly2d/core/vapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,15 @@ void VApplication::InitOptions()
//This does not happen under GNOME or KDE
QIcon::setThemeName("win.icon.theme");
}

OpenSettings();
VSettings *settings = Seamly2DSettings();
QDir().mkpath(settings->GetDefPathLayout());
QDir().mkpath(settings->GetDefPathPattern());
QDir().mkpath(settings->GetDefPathIndividualMeasurements());
QDir().mkpath(settings->GetDefPathMultisizeMeasurements());
QDir().mkpath(settings->GetDefPathTemplate());
QDir().mkpath(settings->GetDefPathLabelTemplate());
}

//---------------------------------------------------------------------------------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions src/app/seamlyme/mapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,11 @@ void MApplication::InitOptions()
qInstallMessageHandler(noisyFailureMsgHandler);

OpenSettings();
VSeamlyMeSettings *settings = SeamlyMeSettings();
QDir().mkpath(settings->GetDefPathTemplate());
QDir().mkpath(settings->GetDefPathIndividualMeasurements());
QDir().mkpath(settings->GetDefPathMultisizeMeasurements());
QDir().mkpath(settings->GetDefPathLabelTemplate());

qCDebug(mApp, "Version: %s", qUtf8Printable(APP_VERSION_STR));
qCDebug(mApp, "Build revision: %s", BUILD_REVISION);
Expand Down

0 comments on commit c403baf

Please sign in to comment.