// ƒобавление пол¤ в таблицу полей int insertToTable(FieldsTable* table, std::string str, struct FieldInfo field) { int retVal = -1; FieldTable::const_iterator it; int i = 0; for (it = table->begin(); it != table->end(); ++it) { if (it->first == str) retVal = i; ++i; } if (retVal == -1) { table->insert(FieldPair(str, field)); retVal = table->size(); } return retVal; }
void QgsRelation::addFieldPair( const QString &referencingField, const QString &referencedField ) { d.detach(); d->mFieldPairs << FieldPair( referencingField, referencedField ); updateRelationStatus(); }