// Copyright (C) 2019 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "smartptrtester.h" SharedPtr SmartPtrTester::createSharedPtrStr(const char *what) { return {new Str(what)}; } std::string SmartPtrTester::valueOfSharedPtrStr(const SharedPtr &str) { return str->cstring(); } SharedPtr SmartPtrTester::createSharedPtrInteger(int v) { auto i = SharedPtr(new Integer); i->m_int = v; return i; } int SmartPtrTester::valueOfSharedPtrInteger(const SharedPtr &v) { return v->m_int; } void SmartPtrTester::fiddleInt(const SharedPtr &) // no binding, should not cause errors { }