mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-21 16:38:54 +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:
parent
e6ea8a59d0
commit
f0f5730e76
@ -17432,3 +17432,6 @@
|
||||
* Remved 'rdcheckcuts.pro'.
|
||||
2018-08-15 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed style inconsistencies in dialogs within rddgimport(1).
|
||||
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.
|
||||
|
@ -320,7 +320,8 @@ MainObject::MainObject(QObject *parent)
|
||||
}
|
||||
}
|
||||
else {
|
||||
if((set_schema=GetVersionSchema(set_version))==0) {
|
||||
set_schema=GetVersionSchema(set_version);
|
||||
if(set_schema==0) {
|
||||
fprintf(stderr,"invalid/unsupported Rivendell version\n");
|
||||
exit(1);
|
||||
}
|
||||
|
@ -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]));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user