diff --git a/src/libs/solutions/tasking/tasktree.h b/src/libs/solutions/tasking/tasktree.h index 94db0d7c7ea..9478ac10250 100644 --- a/src/libs/solutions/tasking/tasktree.h +++ b/src/libs/solutions/tasking/tasktree.h @@ -41,14 +41,13 @@ class TASKING_EXPORT TreeStorageBase public: bool isValid() const; -protected: +private: using StorageConstructor = std::function; using StorageDestructor = std::function; TreeStorageBase(StorageConstructor ctor, StorageDestructor dtor); void *activeStorageVoid() const; -private: int createStorage() const; void deleteStorage(int id) const; void activateStorage(int id) const; @@ -71,13 +70,15 @@ private: int m_storageCounter = 0; }; QSharedPointer m_storageData; + + template friend class TreeStorage; friend ExecutionContextActivator; friend TaskContainer; friend TaskTreePrivate; }; template -class TreeStorage : public TreeStorageBase +class TreeStorage final : public TreeStorageBase { public: TreeStorage() : TreeStorageBase(TreeStorage::ctor(), TreeStorage::dtor()) {}