Finish main part of the recent refactoring effort

This finally gets rid of the DBBrowserObject class entirely and moves
all its functionality to the newer classes in the sqlb namespace.

I'm still not entirely happy with this but at least things should be a
little more consistent now.
This commit is contained in:
Martin Kleusberg
2017-01-23 20:59:12 +01:00
parent 383925652f
commit 38144bbcad
14 changed files with 79 additions and 98 deletions

View File

@@ -17,13 +17,13 @@ EditIndexDialog::EditIndexDialog(DBBrowserDB& db, const QString& indexName, bool
ui->setupUi(this);
// Get list of tables, sort it alphabetically and fill the combobox
QMultiMap<QString, DBBrowserObject> dbobjs;
QList<DBBrowserObject> tables = pdb.objMap.values("table");
objectMap dbobjs;
QList<sqlb::ObjectPtr> tables = pdb.objMap.values("table");
for(auto it=tables.constBegin();it!=tables.constEnd();++it)
dbobjs.insert((*it).getname(), (*it));
dbobjs.insert((*it)->name(), (*it));
ui->comboTableName->blockSignals(true);
for(auto it=dbobjs.constBegin();it!=dbobjs.constEnd();++it)
ui->comboTableName->addItem(QIcon(QString(":icons/table")), (*it).getname());
ui->comboTableName->addItem(QIcon(QString(":icons/table")), (*it)->name());
ui->comboTableName->blockSignals(false);
QHeaderView *tableHeaderView = ui->tableIndexColumns->horizontalHeader();