19 #include <QStringList>
41 mMajor = fileVersionParts.
at( 0 ).toInt();
43 if ( fileVersionParts.
size() > 1 )
45 mMinor = fileVersionParts.
at( 1 ).toInt();
47 if ( fileVersionParts.
size() > 2 )
49 mSub = fileVersionParts.
at( 2 ).toInt();
51 mName =
string.
section(
'-', 1 );
61 return (( mMajor == other.mMajor ) &&
62 ( mMinor == other.mMinor ) &&
63 ( mSub == other.mSub ) );
70 return (( mMajor >= other.mMajor ) ||
71 (( mMajor == other.mMajor ) && ( mMinor >= other.mMinor ) ) ||
72 (( mMajor == other.mMajor ) && ( mMinor == other.mMinor ) && ( mSub >= other.mSub ) ) );
79 return (( mMajor > other.mMajor ) ||
80 (( mMajor == other.mMajor ) && ( mMinor > other.mMinor ) ) ||
81 (( mMajor == other.mMajor ) && ( mMinor == other.mMinor ) && ( mSub > other.mSub ) ) );
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
bool operator==(const QgsProjectVersion &other)
const T & at(int i) const
bool operator>=(const QgsProjectVersion &other)
A class to describe the version of a project.
bool operator>(const QgsProjectVersion &other)
QString section(QChar sep, int start, int end, QFlags< QString::SectionFlag > flags) const
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const