MCPcopy Create free account
hub / github.com/bumptop/BumpTop / versionStringLessThanVersionString

Function versionStringLessThanVersionString

trunk/mac/BumpTop/QStringHelpers.cpp:68–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68bool versionStringLessThanVersionString(QString v1, QString v2) {
69 if (v1 == v2) {
70 return false;
71 }
72
73 QStringList l1 = v1.split(".");
74 QStringList l2 = v2.split(".");
75
76 int i = 0;
77 for_each(QString segment, l1) {
78 if (l2.count() < (i+1)) {
79 return false;
80 }
81
82 if (segment.toInt() > l2[i].toInt()) {
83 return false;
84 }
85 i++;
86 }
87 return true;
88}
89
90#endif

Callers 3

TEST_FFunction · 0.85
initFromBufferMethod · 0.85

Calls 1

splitMethod · 0.45

Tested by 1

TEST_FFunction · 0.68