Debian Codegraph @

t/samples/kdelibs/backportglobal.h

raw symbols SCIP
1 /*
2
3 **ANALIZO NOTE**
4
5 This file was copied from kdelibs project for testing analizo features.
6
7 The original file was modified and some code was deleted to keep only what is
8 needed to create automated tests on analizo side fixing the bug below.
9
10 - https://github.com/analizo/analizo/issues/173
11
12 GitHub kdelibs repository:
13
14 - https://github.com/KDE/kdelibs.git
15
16 Original file was copied from the commit 0f4cf41b22 from kdelibs git repository
17 and it is located inside kdelibs repository on the path below.
18
19 - experimental/libkdeclarative/bindings/backportglobal.h
20
21 Link to the original file on GitHub:
22
23 - https://github.com/KDE/kdelibs/blob/9941ebff54bd9d4349c0384dfa0cca2ace9549c4/experimental/libkdeclarative/bindings/backportglobal.h
24
25 */
26
27 /****************************************************************************
28 **
29 ** This file is part of the Qt Script Generator.
30 **
31 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
32 **
33 ** Contact: Nokia Corporation [email protected]
34 **
35 ** GNU Lesser General Public License Usage
36 ** This file may be used under the terms of the GNU Lesser General Public
37 ** License version 2.1 as published by the Free Software Foundation
38 ** and appearing in the file LICENSE.LGPL included in the packaging of
39 ** this file. Please review the following information to ensure the GNU
40 ** Lesser General Public License version 2.1 requirements will be met:
41 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
42 **
43 ** Copyright (C) 2011 Nokia. All rights reserved
44 ****************************************************************************/
45 #ifndef QTSCRIPTEXTENSIONS_GLOBAL_H
46 #define QTSCRIPTEXTENSIONS_GLOBAL_H
47
48 #include <QtCore/QSharedData>
49
50 #define DECLARE_GET_METHOD(Class, __get__) \
51 BEGIN_DECLARE_METHOD(Class, __get__) { \
52 return qScriptValueFromValue(eng, self->__get__()); \
53 } END_DECLARE_METHOD
54
55 #define DECLARE_SET_METHOD(Class, T, __set__) \
56 BEGIN_DECLARE_METHOD(Class, __set__) { \
57 self->__set__(qscriptvalue_cast<T>(ctx->argument(0))); \
58 return eng->undefinedValue(); \
59 } END_DECLARE_METHOD
60
61 #define DECLARE_GET_SET_METHODS(Class, T, __get__, __set__) \
62 DECLARE_GET_METHOD(Class, /*T,*/ __get__) \
63 DECLARE_SET_METHOD(Class, T, __set__)
64
65 namespace QScript
66 {
67
68 enum {
69 UserOwnership = 1
70 };
71
72 } // namespace QScript
73
74 #endif // QTSCRIPTEXTENSIONS_GLOBAL_H