Browseable objects always are tables or views; no need to check

This commit is contained in:
Martin Kleusberg
2016-08-15 23:22:42 +02:00
parent 5d729ac4f5
commit c65c07a433

View File

@@ -361,16 +361,12 @@ void MainWindow::populateStructure()
SqlUiLexer::TablesAndColumnsMap tablesToColumnsMap;
for(objectMap::ConstIterator it=tab.begin(); it!=tab.end(); ++it)
{
// If it is a table or a view add the fields
if((*it).gettype() == "table" || (*it).gettype() == "view")
{
QString objectname = it.value().getname();
QString objectname = it.value().getname();
for(int i=0; i < (*it).table.fields().size(); ++i)
{
QString fieldname = (*it).table.fields().at(i)->name();
tablesToColumnsMap[objectname].append(fieldname);
}
for(int i=0; i < (*it).table.fields().size(); ++i)
{
QString fieldname = (*it).table.fields().at(i)->name();
tablesToColumnsMap[objectname].append(fieldname);
}
}
SqlTextEdit::sqlLexer->setTableNames(tablesToColumnsMap);