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
|
|
@ -1,4 +1,4 @@
|
|||
#include "OpenDatabase.h"
|
||||
#include "OpenDatabase.h"
|
||||
#include "PgDatabaseCatalogue.h"
|
||||
#include "Pgsql_Connection.h"
|
||||
#include "TypeSelectionItemModel.h"
|
||||
|
|
@ -19,13 +19,12 @@ Expected<OpenDatabase*> OpenDatabase::createOpenDatabase(const ConnectionConfig
|
|||
OpenDatabase::OpenDatabase(const ConnectionConfig& cfg, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_config(cfg)
|
||||
, m_catalogue(new PgDatabaseCatalogue)
|
||||
, m_catalogue(std::make_shared<PgDatabaseCatalogue>())
|
||||
{
|
||||
}
|
||||
|
||||
OpenDatabase::~OpenDatabase()
|
||||
{
|
||||
delete m_catalogue;
|
||||
}
|
||||
|
||||
bool OpenDatabase::Init()
|
||||
|
|
@ -40,7 +39,7 @@ bool OpenDatabase::Init()
|
|||
return false;
|
||||
}
|
||||
|
||||
PgDatabaseCatalogue* OpenDatabase::catalogue()
|
||||
std::shared_ptr<PgDatabaseCatalogue> OpenDatabase::catalogue()
|
||||
{
|
||||
return m_catalogue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue