Bunch of raw pointers replaced with smart pointers of references.
This commit is contained in:
parent
5a199c9138
commit
ea035f58c8
20 changed files with 67 additions and 79 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#define DATABASESTABLEMODEL_H
|
||||
|
||||
#include "BaseTableModel.h"
|
||||
#include <memory>
|
||||
|
||||
class PgDatabaseContainer;
|
||||
class PgDatabaseCatalogue;
|
||||
|
|
@ -22,7 +23,7 @@ public:
|
|||
|
||||
explicit DatabasesTableModel(QObject *parent);
|
||||
|
||||
void setDatabaseList(const PgDatabaseCatalogue* cat);
|
||||
void setDatabaseList(std::shared_ptr<const PgDatabaseCatalogue> cat);
|
||||
|
||||
// Header:
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
|
|
@ -34,11 +35,9 @@ public:
|
|||
virtual Oid getType(int column) const override;
|
||||
virtual QVariant getData(const QModelIndex &index) const override;
|
||||
|
||||
// QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
private:
|
||||
const PgDatabaseCatalogue *m_catalog = nullptr;
|
||||
const PgDatabaseContainer *m_databases = nullptr;
|
||||
std::shared_ptr<const PgDatabaseCatalogue> m_catalog;
|
||||
std::shared_ptr<const PgDatabaseContainer> m_databases;
|
||||
};
|
||||
|
||||
#endif // DATABASESTABLEMODEL_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue