Qt 4.8
Classes | Functions
qdeclarativeobjectscriptclass.cpp File Reference
#include "private/qdeclarativeobjectscriptclass_p.h"
#include "private/qdeclarativeengine_p.h"
#include "private/qdeclarativecontext_p.h"
#include "private/qdeclarativedata_p.h"
#include "private/qdeclarativetypenamescriptclass_p.h"
#include "private/qdeclarativelistscriptclass_p.h"
#include "private/qdeclarativebinding_p.h"
#include "private/qdeclarativeguard_p.h"
#include "private/qdeclarativevmemetaobject_p.h"
#include <QtCore/qtimer.h>
#include <QtCore/qvarlengtharray.h>
#include <QtScript/qscriptcontextinfo.h>

Go to the source code of this file.

Classes

struct  MethodData
 
struct  ObjectData
 

Functions

static QByteArray QMetaMethod_name (const QMetaMethod &m)
 
static int QMetaObject_methods (const QMetaObject *metaObject)
 

Function Documentation

◆ QMetaMethod_name()

static QByteArray QMetaMethod_name ( const QMetaMethod m)
static

Definition at line 1198 of file qdeclarativeobjectscriptclass.cpp.

Referenced by QDeclarativeObjectMethodScriptClass::relatedMethod().

1199 {
1200  QByteArray sig = m.signature();
1201  int paren = sig.indexOf('(');
1202  if (paren == -1)
1203  return sig;
1204  else
1205  return sig.left(paren);
1206 }
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
QByteArray left(int len) const
Returns a byte array that contains the leftmost len bytes of this byte array.
int indexOf(char c, int from=0) const
Returns the index position of the first occurrence of the character ch in the byte array...
const char * signature() const
Returns the signature of this method (e.g., setValue(double)).

◆ QMetaObject_methods()

static int QMetaObject_methods ( const QMetaObject metaObject)
inlinestatic

Definition at line 1185 of file qdeclarativeobjectscriptclass.cpp.

Referenced by QDeclarativeObjectMethodScriptClass::relatedMethod().

1186 {
1187  struct Private
1188  {
1189  int revision;
1190  int className;
1191  int classInfoCount, classInfoData;
1192  int methodCount, methodData;
1193  };
1194 
1195  return reinterpret_cast<const Private *>(metaObject->d.data)->methodCount;
1196 }
const char * className
Definition: qwizard.cpp:137
const uint * data
Definition: qobjectdefs.h:471
struct QMetaObject::@38 d