mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
add method to easily remove fields from table
This commit is contained in:
@@ -68,6 +68,17 @@ void Table::addField(const FieldPtr& f)
|
||||
m_fields.append(FieldPtr(f));
|
||||
}
|
||||
|
||||
bool Table::removeField(const QString& sFieldName)
|
||||
{
|
||||
int index = findField(sFieldName);
|
||||
if( index != -1)
|
||||
{
|
||||
m_fields.remove(index);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Table::setFields(const FieldVector &fields)
|
||||
{
|
||||
clear();
|
||||
|
||||
Reference in New Issue
Block a user