KexiDB::LookupFieldSchema *KexiComboBoxBase::lookupFieldSchema() const { if (field() && field()->table()) { KexiDB::LookupFieldSchema *lookupFieldSchema = field()->table()->lookupFieldSchema(*field()); if (lookupFieldSchema && !lookupFieldSchema->rowSource().name().isEmpty()) return lookupFieldSchema; } return 0; }
static bool hasEnumType(const KexiTableViewColumn &column) { /*not db-aware case*/ if (column.relatedData()) return true; /*db-aware case*/ if (!column.field() || !column.field()->table()) return false; KexiDB::LookupFieldSchema *lookupFieldSchema = column.field()->table()->lookupFieldSchema(*column.field()); if (!lookupFieldSchema) return false; if (lookupFieldSchema->rowSource().name().isEmpty()) return false; return true; }