[krita/rempt/T379-resource-management] libs/resources: Fix compilation
Boudewijn Rempt
boud at valdyas.org
Tue Feb 18 07:59:43 GMT 2020
I wonder why this was needed for you -- this code has been around since november, and we've all built this branch many times ever since.
On maandag 17 februari 2020 17:56:59 CET Dmitry Kazakov wrote:
> Git commit fea686c7a1e31e76e1127ad501ad948431b0b960 by Dmitry Kazakov.
> Committed on 17/02/2020 at 16:56.
> Pushed by dkazakov into branch 'rempt/T379-resource-management'.
>
> Fix compilation
>
> M +3 -2 libs/resources/KisTagModelProvider.cpp
>
> https://invent.kde.org/kde/krita/commit/fea686c7a1e31e76e1127ad501ad948431b0b960
>
> diff --git a/libs/resources/KisTagModelProvider.cpp b/libs/resources/KisTagModelProvider.cpp
> index eb8b076b37..84b9e52135 100644
> --- a/libs/resources/KisTagModelProvider.cpp
> +++ b/libs/resources/KisTagModelProvider.cpp
> @@ -50,8 +50,9 @@ KisTagModel* KisTagModelProvider::tagModel(const QString& resourceType)
>
> if (found == s_instance->d->tagModelsMap.end())
> {
> - KisTagModel* model = new KisTagModel(resourceType);
> - s_instance->d->tagModelsMap.insert(std::make_pair(resourceType, model));
> + std::unique_ptr<KisTagModel> modelStorage(new KisTagModel(resourceType));
> + KisTagModel *model = modelStorage.get();
> + s_instance->d->tagModelsMap.insert(std::make_pair(resourceType, std::move(modelStorage)));
> return model;
> }
> return found->second.get();
>
--
https://www.krita.org
More information about the kimageshop
mailing list