File: main.cpp

package info (click to toggle)
clazy 1.17-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 5,248 kB
  • sloc: cpp: 23,552; python: 1,450; xml: 450; sh: 237; makefile: 46
file content (83 lines) | stat: -rw-r--r-- 1,358 bytes parent folder | download | duplicates (2)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#include <QtCore/QObject>
#include <QtWidgets/QWidget>

class Test : public QObject // Warn
{
public:
    Test();
};

class Test2 : public Test // Warn
{
public:
    Test2();
};

class Test3 // OK
{
public:
    Test3();
};

class Test4 : public Test // OK
{
public:
    Test4();
    Test4(QObject*); //  Not common, but lets not warn
};

class Test5 : public Test // Warn
{
public:
    Test5(const QObject*);
};

class QObject; // OK

class WTest : public QWidget
{
public:
    WTest(QWidget *); // OK
};

class WTest2 : public QWidget
{
public:
    WTest2(QObject *); // Warn
};
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
    class QNode : public QObject { QNode(); };
    // This is just a dummy so we don't have to depend on Qt3D
    class QEntity : public QNode // clazy:exclude=ctor-missing-parent-argument
    {
    };
}
QT_END_NAMESPACE
struct MyEntity : Qt3DCore::QEntity // Warn
{
    MyEntity();
};

struct MyEntity2 : Qt3DCore::QEntity { // OK
    MyEntity2(Qt3DCore::QNode*);
};
QT_BEGIN_NAMESPACE
namespace Qt3DCore
{
    struct MyEntity3 : QEntity { // OK
    MyEntity3(QNode*);
};
}
QT_END_NAMESPACE
class Test6 : public QT_PREPEND_NAMESPACE(QObject) // OK
{
public:
};

#include <QtCore/QCoreApplication>
class MyApplication : public QCoreApplication
{
public:
    MyApplication(int a, char **b) : QCoreApplication(a, b) {} // OK. Bug 384926
};