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 "PgIndex.h"
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
class PgDatabaseCatalog;
|
||||
|
|
@ -25,7 +26,7 @@ public:
|
|||
|
||||
|
||||
using BaseTableModel::BaseTableModel;
|
||||
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:
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||
|
|
@ -42,7 +43,7 @@ protected:
|
|||
using t_Columns = std::vector<PgAttribute>;
|
||||
|
||||
std::shared_ptr<const PgDatabaseCatalog> m_catalog;
|
||||
PgClass m_table;
|
||||
std::optional<PgClass> m_table;
|
||||
t_Columns m_columns;
|
||||
std::vector<PgIndex> m_indexes;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue