Esempio n. 1
0
void Func::init(int numParams, bool isGenerator) {
  // For methods, we defer setting the full name until m_cls is initialized
  m_maybeIntercepted = -1;
  if (!preClass()) {
    setNewFuncId();
    setFullName();
  } else {
    m_fullName = 0;
  }
  if (isSpecial(m_name)) {
    /*
     * i)  We dont want these compiler generated functions to
     *     appear in backtraces.
     *
     * ii) 86sinit and 86pinit construct NameValueTableWrappers
     *     on the stack. So we MUST NOT allow those to leak into
     *     the backtrace (since the backtrace will outlive the
     *     variables).
     */
    m_attrs = m_attrs | AttrNoInjection;
  }
#ifdef DEBUG
  m_magic = kMagic;
#endif
  assert(m_name);
  initPrologues(numParams, isGenerator);
}
ManagementNode::ManagementNode(const char* fullname) {
    if(setFullName(fullname)){
        char msg[512];

        sprintf(msg, "Invalid context: %s", fullname);
        //TODO call ErrorHandler XXX
        LOG.error("%s", msg);
    }
}
Esempio n. 3
0
void SimObject::copyStandardMembers(const SimObject* other)
{
  setName(other->name);
  setFullName(other->fullName);
  setPosition(other->position);
  rotation = other->rotation;
  parentNode = other->parentNode;
  movableID = other->movableID;
  boundLight = other->boundLight;
  mbMethod = other->mbMethod;
}
Esempio n. 4
0
void Func::init(int numParams) {
  // For methods, we defer setting the full name until m_cls is initialized
  m_maybeIntercepted = s_interceptsEnabled ? -1 : 0;
  if (!preClass()) {
    setNewFuncId();
    setFullName();
  } else {
    m_fullName = 0;
  }
#ifdef DEBUG
  m_magic = kMagic;
#endif
  ASSERT(m_name);
  initPrologues(numParams);
}
void JabberPersonalInfoService::updatePersonalInfo(const QString &id, Buddy buddy)
{
	Q_UNUSED(id);

	if (!VCardService)
	{
		emit personalInfoUpdated(false);
		return;
	}

	CurrentBuddy = buddy;

	auto  vcard = QXmppVCardIq{};
	vcard.setFullName(CurrentBuddy.firstName());
	vcard.setNickName(CurrentBuddy.nickName());
	vcard.setMiddleName(CurrentBuddy.familyName());
	QDate birthday;
	birthday.setDate(CurrentBuddy.birthYear(), 1, 1);
	vcard.setBirthday(birthday);

	auto addr = QXmppVCardAddress{};
	addr.setLocality(CurrentBuddy.city());
	vcard.setAddresses({addr});

	auto email = QXmppVCardEmail{};
	email.setAddress(CurrentBuddy.email());
	vcard.setEmails({email});

	vcard.setUrl(CurrentBuddy.website());

	auto vCardUploader = VCardService->createVCardUploader();
	if (!vCardUploader)
	{
		emit personalInfoUpdated(false);
		return;
	}

	vCardUploader->uploadVCard(vcard);
	emit personalInfoUpdated(true);
}
Esempio n. 6
0
void Func::rename(const StringData* name) {
  m_name = name;
  setFullName();
  // load the renamed function
  Unit::loadFunc(this);
}