mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-19 00:51:13 +02:00
2018-08-15 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rddbmgr(8) that caused unreliable calculation of the correct schema version from a package version string.
This commit is contained in:
@@ -32,6 +32,7 @@ class VersionString : public QString
|
||||
int minor() const;
|
||||
int point() const;
|
||||
bool operator<(const VersionString &rhs) const;
|
||||
bool operator==(const VersionString &rhs) const;
|
||||
|
||||
private:
|
||||
int ver_major;
|
||||
@@ -95,13 +96,16 @@ bool VersionString::operator<(const VersionString &rhs) const
|
||||
if(minor()>rhs.minor()) {
|
||||
return false;
|
||||
}
|
||||
if(point()<rhs.point()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool VersionString::operator==(const VersionString &rhs) const
|
||||
{
|
||||
return (major()==rhs.major())&&(minor()==rhs.minor());
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Version -> Schema Map
|
||||
//
|
||||
@@ -169,7 +173,7 @@ int MainObject::GetVersionSchema(const QString &ver) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
return global_version_map[VersionString(f0[0]+"."+f0[1])];
|
||||
return global_version_map.value(VersionString(f0[0]+"."+f0[1]));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user