Switched QScopedPointer to std::unique_ptr in DockComponentsFactory

This commit is contained in:
Uwe Kindler 2020-02-13 13:45:40 +01:00
parent 1916bd726d
commit 41173d067b

View File

@ -9,7 +9,8 @@
// INCLUDES // INCLUDES
//============================================================================ //============================================================================
#include <DockComponentsFactory.h> #include <DockComponentsFactory.h>
#include <QScopedPointer>
#include <memory>
#include "DockWidgetTab.h" #include "DockWidgetTab.h"
#include "DockAreaTabBar.h" #include "DockAreaTabBar.h"
@ -19,7 +20,7 @@
namespace ads namespace ads
{ {
static QScopedPointer<CDockComponentsFactory> DefaultFactory(new CDockComponentsFactory()); static std::unique_ptr<CDockComponentsFactory> DefaultFactory(new CDockComponentsFactory());
//============================================================================ //============================================================================
@ -46,7 +47,7 @@ CDockAreaTitleBar* CDockComponentsFactory::createDockAreaTitleBar(CDockAreaWidge
//============================================================================ //============================================================================
const CDockComponentsFactory* CDockComponentsFactory::factory() const CDockComponentsFactory* CDockComponentsFactory::factory()
{ {
return DefaultFactory.data(); return DefaultFactory.get();
} }