Updating of detail tabs besides list of tables works correctly again.
Had stopped working because the catalog now behaves a little different, returning nullptr instead of an invalid element.
This commit is contained in:
parent
fcb191f2cc
commit
52011a9842
12 changed files with 114 additions and 92 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include "PgClass.h"
|
||||
#include "PgConstraint.h"
|
||||
#include <QAbstractTableModel>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
class PgDatabaseCatalog;
|
||||
|
|
@ -23,7 +24,7 @@ public:
|
|||
|
||||
explicit ConstraintModel(QObject *parent = nullptr);
|
||||
|
||||
void setData(std::shared_ptr<const PgDatabaseCatalog> cat, const PgClass &table);
|
||||
void setData(std::shared_ptr<const PgDatabaseCatalog> cat, const std::optional<PgClass> &table);
|
||||
|
||||
|
||||
// Header:
|
||||
|
|
@ -43,7 +44,7 @@ protected:
|
|||
|
||||
private:
|
||||
std::shared_ptr<const PgDatabaseCatalog> m_catalog;
|
||||
PgClass m_table;
|
||||
std::optional<PgClass> m_table;
|
||||
|
||||
using t_Constraints = std::vector<PgConstraint>;
|
||||
t_Constraints m_constraints;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue