19 #include <QStringList> 40 mMajor = fileVersionParts.
at( 0 ).toInt();
42 if ( fileVersionParts.
size() > 1 )
44 mMinor = fileVersionParts.
at( 1 ).toInt();
46 if ( fileVersionParts.
size() > 2 )
48 mSub = fileVersionParts.
at( 2 ).toInt();
50 mName =
string.
section(
'-', 1 );
60 return (( mMajor == other.mMajor ) &&
61 ( mMinor == other.mMinor ) &&
62 ( mSub == other.mSub ) );
69 return (( mMajor != other.mMajor ) ||
70 ( mMinor != other.mMinor ) ||
71 ( mSub != other.mSub ) );
78 return (( mMajor >= other.mMajor ) ||
79 (( mMajor == other.mMajor ) && ( mMinor >= other.mMinor ) ) ||
80 (( mMajor == other.mMajor ) && ( mMinor == other.mMinor ) && ( mSub >= other.mSub ) ) );
87 return (( mMajor > other.mMajor ) ||
88 (( mMajor == other.mMajor ) && ( mMinor > other.mMinor ) ) ||
89 (( mMajor == other.mMajor ) && ( mMinor == other.mMinor ) && ( mSub > other.mSub ) ) );
bool operator>(const QgsProjectVersion &other) const
Boolean > operator.
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
const T & at(int i) const
A class to describe the version of a project.
bool operator!=(const QgsProjectVersion &other) const
Boolean equal operator.
bool operator>=(const QgsProjectVersion &other) const
Boolean >= operator.
bool operator==(const QgsProjectVersion &other) const
Boolean equal operator.
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