From c65c07a433573178a2e42e8fd80667a9b1da4de5 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Mon, 15 Aug 2016 23:22:42 +0200 Subject: [PATCH] Browseable objects always are tables or views; no need to check --- src/MainWindow.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index edec691e..47576a0c 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -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);