Debian Codegraph @

tests/testso/testso.h

raw
1 // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2 //
3 // SPDX-License-Identifier: LGPL-3.0-or-later
4
5 #include <QDebug>
6
7 namespace TestClass { // test case use multiple inheritance
8 struct A
9 {
10 int aa;
11 virtual char test(int v);
12 virtual ~A() {}
13 };
14
15 struct B
16 {
17 int bx;
18 virtual char test(int v)
19 {
20 qDebug() << Q_FUNC_INFO << v;
21
22 return 'b';
23 }
24
25 virtual ~B() {}
26 };
27
28 struct C : public A, public B
29 {
30 int cx;
31 char test(int v) override
32 {
33 qDebug() << Q_FUNC_INFO << v;
34 return 'c';
35 }
36 };
37 } // namespace TestClass