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:
parent
4a78330153
commit
fd603a7434
5 changed files with 137 additions and 99 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue