States Database::fillState() { States s; this->query.first(); this->record = this->query.record(); s.setId(this->query.value(this->record.indexOf("id")).toUInt()); s.setDescription(this->query.value(this->record.indexOf("name")).toString()); return s; }