Skip to content

Commit d833ae5

Browse files
committed
Rename "after-version" attribute to "since-version"
since that better matches the actual behavior
1 parent 8355416 commit d833ae5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

generator/typesystem.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ void Handler::fetchAttributeValues(const QString &name, const QXmlAttributes &at
269269
QString key = atts.localName(i).toLower();
270270
QString val = atts.value(i);
271271

272-
if (!acceptedAttributes->contains(key) && key != "after-version" && key != "before-version") {
272+
if (!acceptedAttributes->contains(key) && key != "since-version" && key != "before-version") {
273273
ReportHandler::warning(QString("Unknown attribute for '%1': '%2'").arg(name).arg(key));
274274
} else {
275275
(*acceptedAttributes)[key] = val;
@@ -484,16 +484,16 @@ bool Handler::qtVersionMatches(const QXmlAttributes& atts, bool& ok)
484484
m_error = "Invalid 'before-version' version string: " + atts.value(beforeIndex);
485485
}
486486
}
487-
int afterIndex = atts.index("after-version"); // after-version really means this version or any version after
488-
if (afterIndex >= 0) {
489-
uint afterVersion = TypeSystem::qtVersionFromString(atts.value(afterIndex), ok);
487+
int sinceIndex = atts.index("since-version");
488+
if (sinceIndex >= 0) {
489+
uint sinceVersion = TypeSystem::qtVersionFromString(atts.value(sinceIndex), ok);
490490
if (ok) {
491-
if (m_qtVersion < afterVersion) {
491+
if (m_qtVersion < sinceVersion) {
492492
return false;
493493
}
494494
}
495495
else {
496-
m_error = "Invalid 'after-version' version string: " + atts.value(afterIndex);
496+
m_error = "Invalid 'since-version' version string: " + atts.value(sinceIndex);
497497
}
498498
}
499499
return true;

0 commit comments

Comments
 (0)