logic: source groups for project settings
* project can not have multiple source groups with different types * language of a project is now inferred from source groups * setting global NameHierarchy delimiter of first sourceGroup in project * added project settings migrations for source groups * Add Settings Migration classes (MoveKey, DeleteKey, Lambda) * Update sample projects with migrations * added method to config to retrieve sublevel key names * implemented recursive removing of keys in settings * moved project files out of top level * removed solution parsing code as it is not used anymore fortune cookie message = The secret of getting ahead is getting started.
This commit is contained in:
@@ -4,19 +4,22 @@
|
||||
#include "data/PersistentStorage.h"
|
||||
#include "utility/scheduling/Blackboard.h"
|
||||
#include "utility/utility.h"
|
||||
#include "Application.h"
|
||||
|
||||
TaskCleanStorage::TaskCleanStorage(
|
||||
PersistentStorage* storage, const std::vector<FilePath>& filePaths, std::shared_ptr<DialogView> dialogView
|
||||
PersistentStorage* storage, const std::vector<FilePath>& filePaths
|
||||
)
|
||||
: m_storage(storage)
|
||||
, m_filePaths(filePaths)
|
||||
, m_dialogView(dialogView)
|
||||
{
|
||||
}
|
||||
|
||||
void TaskCleanStorage::doEnter(std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
m_dialogView->showStatusDialog("Clearing Files", std::to_string(m_filePaths.size()) + " Files");
|
||||
if (std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView())
|
||||
{
|
||||
dialogView->showStatusDialog("Clearing Files", std::to_string(m_filePaths.size()) + " Files");
|
||||
}
|
||||
|
||||
m_start = utility::durationStart();
|
||||
|
||||
@@ -28,10 +31,9 @@ void TaskCleanStorage::doEnter(std::shared_ptr<Blackboard> blackboard)
|
||||
|
||||
Task::TaskState TaskCleanStorage::doUpdate(std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
std::shared_ptr<DialogView> dialogView = m_dialogView;
|
||||
m_storage->clearFileElements(m_filePaths, [=](int progress)
|
||||
{
|
||||
if (dialogView != nullptr)
|
||||
if (std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView())
|
||||
{
|
||||
dialogView->showProgressDialog("Clearing", std::to_string(m_filePaths.size()) + " Files", progress);
|
||||
}
|
||||
@@ -46,8 +48,10 @@ Task::TaskState TaskCleanStorage::doUpdate(std::shared_ptr<Blackboard> blackboar
|
||||
void TaskCleanStorage::doExit(std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
blackboard->set("clear_time", utility::duration(m_start));
|
||||
|
||||
m_dialogView->hideProgressDialog();
|
||||
if (std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView())
|
||||
{
|
||||
dialogView->hideProgressDialog();
|
||||
}
|
||||
}
|
||||
|
||||
void TaskCleanStorage::doReset(std::shared_ptr<Blackboard> blackboard)
|
||||
|
||||
Reference in New Issue
Block a user