summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qversionnumber.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-09-22 15:03:40 -0700
committerKeith Gardner <kreios4004@gmail.com>2015-07-16 13:00:51 +0000
commit287971eb7f64d53a592d0c81d1776e84ade6208b (patch)
treebc2ed12f51492590395d9d37fa8a5015565810f2 /src/corelib/tools/qversionnumber.h
parentf337e22401f5f4efa696d07090b2e4ba5a245c27 (diff)
Refactor QVersionNumber to use the public functions when possible
Use segmentCount() and segmentAt() instead of going to m_segments. This is done in preparation for a major refactor of QVersionNumber that will store the version numbers in the object itself, without QVector. Change-Id: I03dbdee59a3c74c21a0a4e70c1bb9182250f6223 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/tools/qversionnumber.h')
-rw-r--r--src/corelib/tools/qversionnumber.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qversionnumber.h b/src/corelib/tools/qversionnumber.h
index 2da3103be3..449445cac6 100644
--- a/src/corelib/tools/qversionnumber.h
+++ b/src/corelib/tools/qversionnumber.h
@@ -83,10 +83,10 @@ public:
{ m_segments.reserve(3); m_segments << maj << min << mic; }
inline bool isNull() const Q_DECL_NOTHROW Q_REQUIRED_RESULT
- { return m_segments.isEmpty(); }
+ { return segmentCount() == 0; }
inline bool isNormalized() const Q_DECL_NOTHROW Q_REQUIRED_RESULT
- { return isNull() || m_segments.last() != 0; }
+ { return isNull() || segmentAt(segmentCount() - 1) != 0; }
inline int majorVersion() const Q_DECL_NOTHROW Q_REQUIRED_RESULT
{ return segmentAt(0); }