ProjectExplorer: Modernize even more

Use unique_ptr for all *Private classes, except for those
in singletons.

Change-Id: Ib56c31ddedc6e9cf321f15de1f1e697a27ad4089
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Tobias Hunger
2018-07-16 13:59:39 +02:00
parent 48850dfa4d
commit 80c2ce118d
50 changed files with 130 additions and 144 deletions

View File

@@ -117,12 +117,11 @@ QString languageId(Language l)
// --------------------------------------------------------------------------
ToolChain::ToolChain(Core::Id typeId, Detection d) :
d(new Internal::ToolChainPrivate(typeId, d))
d(std::make_unique<Internal::ToolChainPrivate>(typeId, d))
{
}
ToolChain::ToolChain(const ToolChain &other) :
d(new Internal::ToolChainPrivate(other.d->m_typeId, ManualDetection))
ToolChain::ToolChain(const ToolChain &other) : ToolChain(other.d->m_typeId, ManualDetection)
{
d->m_language = other.d->m_language;
@@ -140,10 +139,7 @@ void ToolChain::setLanguage(Core::Id language)
d->m_language = language;
}
ToolChain::~ToolChain()
{
delete d;
}
ToolChain::~ToolChain() = default;
QString ToolChain::displayName() const
{