diff options
Diffstat (limited to 'sources/shiboken6/tests/libminimal/listuser.h')
-rw-r--r-- | sources/shiboken6/tests/libminimal/listuser.h | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/sources/shiboken6/tests/libminimal/listuser.h b/sources/shiboken6/tests/libminimal/listuser.h index 6c7e6aedd..9904ef27d 100644 --- a/sources/shiboken6/tests/libminimal/listuser.h +++ b/sources/shiboken6/tests/libminimal/listuser.h @@ -1,44 +1,24 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of Qt for Python. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #ifndef LISTUSER_H #define LISTUSER_H -#include <list> #include "obj.h" #include "val.h" #include "minbool.h" #include "libminimalmacros.h" +#include <list> + struct LIBMINIMAL_API ListUser { - virtual ~ListUser() {} + LIBMINIMAL_DEFAULT_COPY(ListUser) + LIBMINIMAL_DISABLE_MOVE(ListUser) + + ListUser() noexcept = default; + virtual ~ListUser() = default; // List of C++ primitive type items virtual std::list<int> createIntList(int num); @@ -46,6 +26,9 @@ struct LIBMINIMAL_API ListUser virtual int sumIntList(std::list<int> intList); int callSumIntList(std::list<int> intList) { return sumIntList(intList); } + int sumIntListDefaultParamConstRef(const std::list<int> &intList = {1, 2, 3}); + int sumIntListDefaultParam(std::list<int> intList = {1, 2, 3}); + // List of C++ MinBool objects used as primitives in Python virtual std::list<MinBool> createMinBoolList(MinBool mb1, MinBool mb2); std::list<MinBool> callCreateMinBoolList(MinBool mb1, MinBool mb2) { return createMinBoolList(mb1, mb2); } @@ -69,6 +52,20 @@ struct LIBMINIMAL_API ListUser std::list<std::list<int> > callCreateListOfIntLists(int num) { return createListOfIntLists(num); } virtual int sumListOfIntLists(std::list<std::list<int> > intListList); int callSumListOfIntLists(std::list<std::list<int> > intListList) { return sumListOfIntLists(intListList); } + + void setStdIntList(const std::list<int> &l); + std::list<int> &getIntList(); + const std::list<int> &getConstIntList() const; + + int modifyIntListPtr(std::list<int> *list) const; + + virtual std::list<int> *returnIntListByPtr() const; + + int callReturnIntListByPtr() const; + + int modifyDoubleListPtr(std::list<double> *list) const; + + std::list<int> m_stdIntList; }; #endif // LISTUSER_H |