aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/pysidetest/sharedpointertestbench.h
blob: b23fd1b6cbe739d632801a99c075990a3207489e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#ifndef SHAREDPOINTERTESTBENCH_H
#define SHAREDPOINTERTESTBENCH_H

#include "pysidetest_macros.h"

#include <QtCore/QSharedPointer>

QT_FORWARD_DECLARE_CLASS(QObject)

class PYSIDETEST_API SharedPointerTestbench
{
public:
    SharedPointerTestbench();

    static QSharedPointer<int> createSharedPointerInt(int v);
    static void printSharedPointerInt(const QSharedPointer<int> &p);

    static QSharedPointer<QObject> createSharedPointerQObject();
    static void printSharedPointerQObject(const QSharedPointer<QObject> &p);

    static QSharedPointer<const QObject> createSharedPointerConstQObject();
    static void printSharedPointerConstQObject(const QSharedPointer<const QObject> &p);

};

#endif // SHAREDPOINTERTESTBENCH_H