19 #include <QStringList>
34 QString pre =
string.section(
'-', 0, 0 );
36 QStringList fileVersionParts = pre.section(
'-', 0 ).split(
'.' );
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 );
57 return ( ( mMajor == other.mMajor ) &&
58 ( mMinor == other.mMinor ) &&
59 ( mSub == other.mSub ) );
64 return ( ( mMajor != other.mMajor ) ||
65 ( mMinor != other.mMinor ) ||
66 ( mSub != other.mSub ) );
71 return ( *
this == other ) || ( *
this > other );
76 return ( ( mMajor > other.mMajor ) ||
77 ( ( mMajor == other.mMajor ) && ( mMinor > other.mMinor ) ) ||
78 ( ( mMajor == other.mMajor ) && ( mMinor == other.mMinor ) && ( mSub > other.mSub ) ) );
83 if ( mName.isEmpty() )
85 return QStringLiteral(
"%1.%2.%3" ).arg( mMajor ).arg( mMinor ).arg( mSub );
89 return QStringLiteral(
"%1.%2.%3-%4" ).arg( mMajor ).arg( mMinor ).arg( mSub ).arg( mName );
95 return mMajor == 0 && mMinor == 0 && mSub == 0;