src: Project Refactoring
* Added language specific Project and ProjectSettings * moved project specific code from Application to Project * made Application a singleton * added handleDialog method to Application which displays a dialog window and waits for user input * Added ScopedFunctor that executes a function when deleted
This commit is contained in:
@@ -248,6 +248,16 @@ bool PersistentStorage::isIncompatible() const
|
||||
return m_sqliteStorage.isIncompatible();
|
||||
}
|
||||
|
||||
std::string PersistentStorage::getProjectSettingsText() const
|
||||
{
|
||||
return m_sqliteStorage.getProjectSettingsText();
|
||||
}
|
||||
|
||||
void PersistentStorage::setProjectSettingsText(std::string text)
|
||||
{
|
||||
m_sqliteStorage.setProjectSettingsText(text);
|
||||
}
|
||||
|
||||
void PersistentStorage::setup()
|
||||
{
|
||||
m_sqliteStorage.setup();
|
||||
|
||||
@@ -52,6 +52,8 @@ public:
|
||||
|
||||
bool isEmpty() const;
|
||||
bool isIncompatible() const;
|
||||
std::string getProjectSettingsText() const;
|
||||
void setProjectSettingsText(std::string text);
|
||||
|
||||
void setup();
|
||||
void clear();
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "utility/utilityString.h"
|
||||
#include "utility/Version.h"
|
||||
|
||||
const size_t SqliteStorage::STORAGE_VERSION = 2;
|
||||
const size_t SqliteStorage::STORAGE_VERSION = 3;
|
||||
|
||||
SqliteStorage::SqliteStorage(const FilePath& dbFilePath)
|
||||
: m_dbFilePath(dbFilePath)
|
||||
@@ -90,6 +90,16 @@ bool SqliteStorage::isIncompatible() const
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string SqliteStorage::getProjectSettingsText() const
|
||||
{
|
||||
return getMetaValue("project_settings");
|
||||
}
|
||||
|
||||
void SqliteStorage::setProjectSettingsText(std::string text)
|
||||
{
|
||||
insertOrUpdateMetaValue("project_settings", text);
|
||||
}
|
||||
|
||||
void SqliteStorage::setVersion()
|
||||
{
|
||||
setStorageVersion();
|
||||
|
||||
@@ -35,6 +35,8 @@ public:
|
||||
|
||||
bool isEmpty() const;
|
||||
bool isIncompatible() const;
|
||||
std::string getProjectSettingsText() const;
|
||||
void setProjectSettingsText(std::string text);
|
||||
|
||||
void setVersion();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user