mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
Keep field information in sqlb::Table object rather than DBBrowserObject
Keep all the table and field information in a sqlb::Table object (which itself is stored in DBBrowserObject) rather than storing field information in DBBrowserObject and sqlb::Table objects at the same time.
This commit is contained in:
@@ -268,13 +268,13 @@ void MainWindow::populateStructure()
|
||||
if((*it).gettype() == "table" || (*it).gettype() == "view")
|
||||
{
|
||||
QStandardItemModel* tablefieldmodel = new QStandardItemModel();
|
||||
tablefieldmodel->setRowCount((*it).fldmap.count());
|
||||
tablefieldmodel->setRowCount((*it).table.fields().count());
|
||||
tablefieldmodel->setColumnCount(1);
|
||||
|
||||
int fldrow = 0;
|
||||
for(int i=0; i < (*it).fldmap.size(); ++i, ++fldrow)
|
||||
for(int i=0; i < (*it).table.fields().size(); ++i, ++fldrow)
|
||||
{
|
||||
QString fieldname = (*it).fldmap.at(i)->name();
|
||||
QString fieldname = (*it).table.fields().at(i)->name();
|
||||
QStandardItem* fldItem = new QStandardItem(fieldname);
|
||||
fldItem->setIcon(QIcon(":/icons/field"));
|
||||
tablefieldmodel->setItem(fldrow, 0, fldItem);
|
||||
|
||||
Reference in New Issue
Block a user