Commit 16cc4991 authored by luyikei's avatar luyikei

Library: Use unique_ptr for m_settings

parent d03b004b
...@@ -62,8 +62,8 @@ Library::Library( Settings* vlmcSettings, Settings *projectSettings ) ...@@ -62,8 +62,8 @@ Library::Library( Settings* vlmcSettings, Settings *projectSettings )
// Setting up the project section of the Library // Setting up the project section of the Library
m_settings->createVar( SettingValue::List, QString( "medias" ), QVariantList(), "", "", SettingValue::Nothing ); m_settings->createVar( SettingValue::List, QString( "medias" ), QVariantList(), "", "", SettingValue::Nothing );
connect( m_settings, &Settings::postLoad, this, &Library::postLoad, Qt::DirectConnection ); connect( m_settings.get(), &Settings::postLoad, this, &Library::postLoad, Qt::DirectConnection );
connect( m_settings, &Settings::preSave, this, &Library::preSave, Qt::DirectConnection ); connect( m_settings.get(), &Settings::preSave, this, &Library::preSave, Qt::DirectConnection );
projectSettings->addSettings( "Library", *m_settings ); projectSettings->addSettings( "Library", *m_settings );
} }
...@@ -96,7 +96,6 @@ Library::postLoad() ...@@ -96,7 +96,6 @@ Library::postLoad()
Library::~Library() Library::~Library()
{ {
delete m_settings;
} }
void void
......
...@@ -111,7 +111,7 @@ private: ...@@ -111,7 +111,7 @@ private:
private: private:
std::unique_ptr<medialibrary::IMediaLibrary> m_ml; std::unique_ptr<medialibrary::IMediaLibrary> m_ml;
MediaLibraryModel* m_model; MediaLibraryModel* m_model;
Settings* m_settings; std::unique_ptr<Settings> m_settings;
bool m_initialized; bool m_initialized;
bool m_cleanState; bool m_cleanState;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment