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
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
|
||||
#include "BaseTableModel.h"
|
||||
#include <memory>
|
||||
|
||||
class PgAuthIdContainer;
|
||||
|
||||
|
|
@ -20,7 +21,7 @@ public:
|
|||
|
||||
explicit RolesTableModel(QObject *parent);
|
||||
|
||||
void setRoleList(const PgAuthIdContainer* roles);
|
||||
void setRoleList(std::shared_ptr<const PgAuthIdContainer> roles);
|
||||
|
||||
// Header:
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
|
|
@ -35,7 +36,7 @@ public:
|
|||
// QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
private:
|
||||
const PgAuthIdContainer *m_roles = nullptr;
|
||||
std::shared_ptr<const PgAuthIdContainer> m_roles;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue