File: jsdefs.h

package info (click to toggle)
syncthingtray 2.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,124 kB
  • sloc: cpp: 34,081; xml: 1,705; java: 1,258; sh: 97; javascript: 54; makefile: 25
file content (36 lines) | stat: -rw-r--r-- 1,453 bytes parent folder | download | duplicates (3)
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
// Created via CMake from template jsdefs.h.in
// WARNING! Any changes to this file will be overwritten by the next CMake run!

#ifndef SYNCTHINGCTL_JAVA_SCRIPT_DEFINES
#define SYNCTHINGCTL_JAVA_SCRIPT_DEFINES

#include <QtGlobal>

#if defined(SYNCTHINGCTL_USE_JSENGINE)
# define SYNCTHINGCTL_JS_ENGINE QJSEngine
# define SYNCTHINGCTL_JS_VALUE QJSValue
# define SYNCTHINGCTL_JS_READONLY
# define SYNCTHINGCTL_JS_UNDELETABLE
# define SYNCTHINGCTL_JS_QOBJECT(engine, obj) engine.newQObject(obj)
# define SYNCTHINGCTL_JS_INT(value) value.toInt()
# define SYNCTHINGCTL_JS_IS_VALID_PROG(program) (!program.isError() && program.isCallable())
#elif defined(SYNCTHINGCTL_USE_SCRIPT)
# define SYNCTHINGCTL_JS_ENGINE QScriptEngine
# define SYNCTHINGCTL_JS_VALUE QScriptValue
# define SYNCTHINGCTL_JS_READONLY ,QScriptValue::ReadOnly
# define SYNCTHINGCTL_JS_UNDELETABLE ,QScriptValue::Undeletable
# define SYNCTHINGCTL_JS_QOBJECT(engine, obj) engine.newQObject(obj, QScriptEngine::ScriptOwnership)
# define SYNCTHINGCTL_JS_INT(value) value.toInt32()
# define SYNCTHINGCTL_JS_IS_VALID_PROG(program) (!program.isError() && program.isFunction())
#elif !defined(SYNCTHINGCTL_NO_JSENGINE)
# error "No definition for JavaScript provider present."
#endif

#ifdef SYNCTHINGCTL_JS_ENGINE
QT_FORWARD_DECLARE_CLASS(SYNCTHINGCTL_JS_ENGINE)
#endif
#ifdef SYNCTHINGCTL_JS_VALUE
QT_FORWARD_DECLARE_CLASS(SYNCTHINGCTL_JS_VALUE)
#endif

#endif // SYNCTHINGCTL_JAVA_SCRIPT_DEFINES