Commit a234be25 authored by Fabian Kosmale's avatar Fabian Kosmale Committed by Fabian Kosmale

fix clazy warning: qstring-ref

parent 47fb4d4e
......@@ -160,8 +160,8 @@ int compare_versions(QString const& a, QString const& b)
if (i2->length() > i && i1->at(i) != i2->at(i))
return i1->at(i).toLatin1() > i2->at(i).toLatin1() ? 1 : -1;
p1 = i1->mid(i + 1).toInt(&conversion1);
p2 = i2->mid(i + 1).toInt(&conversion2);
p1 = i1->midRef(i + 1).toInt(&conversion1);
p2 = i2->midRef(i + 1).toInt(&conversion2);
if (conversion1 && conversion2)
break;
......
......@@ -298,9 +298,9 @@ bool Package::Version::respectsConstraint(const QString& cV) const
if (cV.startsWith('<')) {
// Is it <=?
if (cV.startsWith("<=")) {
return (*this) <= cV.mid(2).toUtf8();
return (*this) <= cV.midRef(2).toUtf8();
} else {
return (*this) < cV.mid(1).toUtf8();
return (*this) < cV.midRef(1).toUtf8();
}
} else if (cV.startsWith('>')) {
// Is it <=?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment