logic: Reparse project of newer version
This commit is contained in:
@@ -30,7 +30,7 @@ bool SqliteStorage::init()
|
|||||||
setup();
|
setup();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (version.isOlderStorageVersionThan(Version::getApplicationVersion()))
|
else if (version.isDifferentStorageVersionThan(Version::getApplicationVersion()))
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -83,24 +83,11 @@ bool Version::operator<(const Version& other) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Version::isOlderStorageVersionThan(const Version& other) const
|
bool Version::isDifferentStorageVersionThan(const Version& other) const
|
||||||
{
|
{
|
||||||
if (m_majorNumber != other.m_majorNumber)
|
return m_majorNumber != other.m_majorNumber ||
|
||||||
{
|
m_minorNumber != other.m_minorNumber ||
|
||||||
return m_majorNumber < other.m_majorNumber;
|
m_refreshNumber != other.m_refreshNumber;
|
||||||
}
|
|
||||||
else if (m_minorNumber != other.m_minorNumber)
|
|
||||||
{
|
|
||||||
return m_minorNumber < other.m_minorNumber;
|
|
||||||
}
|
|
||||||
else if (m_refreshNumber != other.m_refreshNumber)
|
|
||||||
{
|
|
||||||
return m_refreshNumber < other.m_refreshNumber;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Version::toString() const
|
std::string Version::toString() const
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public:
|
|||||||
|
|
||||||
bool isEmpty() const;
|
bool isEmpty() const;
|
||||||
bool operator<(const Version& other) const;
|
bool operator<(const Version& other) const;
|
||||||
bool isOlderStorageVersionThan(const Version& other) const;
|
bool isDifferentStorageVersionThan(const Version& other) const;
|
||||||
|
|
||||||
std::string toString() const;
|
std::string toString() const;
|
||||||
std::string toDisplayString() const;
|
std::string toDisplayString() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user