MythTV  master
Classes | Macros
service.h File Reference
#include <QObject>
#include <QMetaType>
#include <QVariant>
#include <QFileInfo>
#include <QDateTime>
#include <QString>
#include "serviceexp.h"
Include dependency graph for service.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Service
 

Macros

#define SCRIPT_CATCH_EXCEPTION(default, code)
 
#define Q_SCRIPT_DECLARE_QMETAOBJECT_MYTHTV(T, _Arg1)
 

Macro Definition Documentation

◆ SCRIPT_CATCH_EXCEPTION

#define SCRIPT_CATCH_EXCEPTION (   default,
  code 
)
Value:
try \
{ \
code \
} \
catch( QString msg ) \
{ \
m_pEngine->currentContext()->throwError( QScriptContext::UnknownError, msg ); \
return default; \
} \
catch( const char *msg ) \
{ \
m_pEngine->currentContext()->throwError( QScriptContext::UnknownError, msg ); \
return default; \
} \
catch( ... ) \
{ \
m_pEngine->currentContext()->throwError( QScriptContext::UnknownError, "Unknown Exception" ); \
return default; \
}

Definition at line 83 of file service.h.

◆ Q_SCRIPT_DECLARE_QMETAOBJECT_MYTHTV

#define Q_SCRIPT_DECLARE_QMETAOBJECT_MYTHTV (   T,
  _Arg1 
)
Value:
template<> inline QScriptValue qscriptQMetaObjectConstructor<T>(QScriptContext *ctx, QScriptEngine *eng, T *) \
{ \
_Arg1 arg1 = qscriptvalue_cast<_Arg1> (ctx->argument(0)); \
T* t = new T(eng, arg1); \
if (ctx->isCalledAsConstructor()) \
return eng->newQObject(ctx->thisObject(), t, QScriptEngine::AutoOwnership); \
QScriptValue o = eng->newQObject(t, QScriptEngine::AutoOwnership); \
o.setPrototype(ctx->callee().property(QString::fromLatin1("prototype"))); \
return o; \
}

Definition at line 110 of file service.h.