mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 18:40:13 -06:00
Browseable objects always are tables or views; no need to check
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user