| 51 | return *this > other || *this == other; |
| 52 | } |
| 53 | bool Version::operator==(const Version &other) const |
| 54 | { |
| 55 | const int size = qMax(m_sections.size(), other.m_sections.size()); |
| 56 | for (int i = 0; i < size; ++i) |
| 57 | { |
| 58 | const Section sec1 = (i >= m_sections.size()) ? Section("0") : m_sections.at(i); |
| 59 | const Section sec2 = |
| 60 | (i >= other.m_sections.size()) ? Section("0") : other.m_sections.at(i); |
| 61 | if (sec1 != sec2) |
| 62 | { |
| 63 | return false; |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | return true; |
| 68 | } |
| 69 | bool Version::operator!=(const Version &other) const |
| 70 | { |
| 71 | return !operator==(other); |