mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-12 14:47:44 +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'.
|
* Remved 'rdcheckcuts.pro'.
|
||||||
2018-08-15 Fred Gleason <fredg@paravelsystems.com>
|
2018-08-15 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed style inconsistencies in dialogs within rddgimport(1).
|
* 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 {
|
else {
|
||||||
if((set_schema=GetVersionSchema(set_version))==0) {
|
set_schema=GetVersionSchema(set_version);
|
||||||
|
if(set_schema==0) {
|
||||||
fprintf(stderr,"invalid/unsupported Rivendell version\n");
|
fprintf(stderr,"invalid/unsupported Rivendell version\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ class VersionString : public QString
|
|||||||
int minor() const;
|
int minor() const;
|
||||||
int point() const;
|
int point() const;
|
||||||
bool operator<(const VersionString &rhs) const;
|
bool operator<(const VersionString &rhs) const;
|
||||||
|
bool operator==(const VersionString &rhs) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int ver_major;
|
int ver_major;
|
||||||
@ -95,13 +96,16 @@ bool VersionString::operator<(const VersionString &rhs) const
|
|||||||
if(minor()>rhs.minor()) {
|
if(minor()>rhs.minor()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(point()<rhs.point()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool VersionString::operator==(const VersionString &rhs) const
|
||||||
|
{
|
||||||
|
return (major()==rhs.major())&&(minor()==rhs.minor());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Version -> Schema Map
|
// Version -> Schema Map
|
||||||
//
|
//
|
||||||
@ -169,7 +173,7 @@ int MainObject::GetVersionSchema(const QString &ver) const
|
|||||||
return 0;
|
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