| 31 | return *this < other || *this == other; |
| 32 | } |
| 33 | bool Version::operator>(const Version &other) const |
| 34 | { |
| 35 | const int size = qMax(m_sections.size(), other.m_sections.size()); |
| 36 | for (int i = 0; i < size; ++i) |
| 37 | { |
| 38 | const Section sec1 = (i >= m_sections.size()) ? Section("0") : m_sections.at(i); |
| 39 | const Section sec2 = |
| 40 | (i >= other.m_sections.size()) ? Section("0") : other.m_sections.at(i); |
| 41 | if (sec1 != sec2) |
| 42 | { |
| 43 | return sec1 > sec2; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | return false; |
| 48 | } |
| 49 | bool Version::operator>=(const Version &other) const |
| 50 | { |
| 51 | return *this > other || *this == other; |