-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.hpp
43 lines (35 loc) · 823 Bytes
/
test.hpp
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
#ifndef TEST_HPP
#define TEST_HPP
#include <QObject>
#include <QString>
class Test : public QObject
{
Q_OBJECT
public:
Q_INVOKABLE QString get1_RetByValue_NonConstLocalString()
{
QString s { __func__ };
return s;
}
Q_INVOKABLE const QString get2_RetByConstValue_ConstLocalString()
{
const QString s { __func__ };
return s;
}
Q_INVOKABLE const QString get3_RetByConstValue_StaticString()
{
static QString s { __func__ };
return s;
}
Q_INVOKABLE const QString& get4_RetByConstRef_LocalString()
{
QString s { __func__ };
return s;
}
Q_INVOKABLE static const QString& get5_RetByStaticConstRef_StaticString()
{
static QString s { __func__ };
return s;
}
};
#endif // TEST_HPP