data: Saving application version to storage and refresh when version changes
The version string of the application is stored on every parse. The utility class Version is used to parse the version string and compare application and stored string. The third number in the version string is now the storage refresh number, the project will be refreshed when it changes. (0.2.1 -> 0.2.2)
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "data/parser/ParseVariable.h"
|
||||
#include "data/type/DataType.h"
|
||||
#include "settings/ApplicationSettings.h"
|
||||
#include "utility/Version.h"
|
||||
|
||||
Storage::Storage(const FilePath& dbPath)
|
||||
: m_sqliteStorage(dbPath.str())
|
||||
@@ -29,6 +30,11 @@ Storage::~Storage()
|
||||
{
|
||||
}
|
||||
|
||||
Version Storage::getVersion() const
|
||||
{
|
||||
return m_sqliteStorage.getVersion();
|
||||
}
|
||||
|
||||
void Storage::clear()
|
||||
{
|
||||
m_sqliteStorage.clear();
|
||||
@@ -148,6 +154,7 @@ void Storage::logStats() const
|
||||
|
||||
void Storage::startParsing()
|
||||
{
|
||||
m_sqliteStorage.setVersion(Version::getApplicationVersion());
|
||||
}
|
||||
|
||||
void Storage::finishParsing()
|
||||
|
||||
Reference in New Issue
Block a user