Moving things from the application specific DatabaseWindow to generic LMainWindow (Leon framework)

To achieve flexibility the getDatabase call on the context which was application specific to
has been replaced with a type based object registry.
This commit is contained in:
eelke 2019-01-05 09:49:12 +01:00
parent 4a78330153
commit fd603a7434
5 changed files with 137 additions and 99 deletions

View file

@ -48,7 +48,7 @@ CrudTab::~CrudTab()
void CrudTab::setConfig(Oid oid) //std::shared_ptr<OpenDatabase> db, const PgClass &table)
{
m_db = context()->getDatabase();;
m_db = context()->getObject<OpenDatabase>(); // getDatabase();;
m_table = *m_db->catalog()->classes()->getByKey(oid);
m_crudModel->setConfig(m_db, *m_table);
}