CreateIndexDialog: Sort tables names alphabetically

Sort the table names in the combo box in the CreateIndexDialog
alphabetically.

Add the table icon to each entry of the combo box - not because there
are any possible object types other than tables here but just for
improved consistency with the rest of the UI.
This commit is contained in:
Martin Kleusberg
2014-05-25 14:42:57 +02:00
parent 297bfbce0a
commit c1bbbac56b

View File

@@ -14,9 +14,10 @@ CreateIndexDialog::CreateIndexDialog(DBBrowserDB* db, QWidget* parent)
ui->setupUi(this);
// Fill table combobox
QList<DBBrowserObject> tables = pdb->objMap.values("table");
for(int i=0; i < tables.count(); ++i)
ui->comboTableName->addItem(tables.at(i).getname());
QStringList tables = pdb->getBrowsableObjectNames();
tables.sort();
for(QStringList::ConstIterator i=tables.begin();i!=tables.end();++i)
ui->comboTableName->addItem(QIcon(QString(":icons/table")), *i);
}
CreateIndexDialog::~CreateIndexDialog()