git-svn-id: svn://db.shs.com.ru/libs@533 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -146,3 +146,20 @@ PropertyStorage::Property PropertyStorage::parsePropertyLine(QString l) {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
PropertyStorage::Property & PropertyStorage::operator[](const QString & name) {
|
||||
for (int i = 0; i < props.size(); ++i)
|
||||
if (props[i].name == name)
|
||||
return props[i];
|
||||
addProperty(name, "");
|
||||
return props.back();
|
||||
}
|
||||
|
||||
|
||||
const PropertyStorage::Property PropertyStorage::operator[](const QString & name) const {
|
||||
for (int i = 0; i < props.size(); ++i)
|
||||
if (props[i].name == name)
|
||||
return props[i];
|
||||
return Property();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user