// After loading an ABC and inserting scripts into the verify queue, // process the work queues until they are empty. void BaseExecMgr::verifyEarly(Toplevel* toplevel, AbcEnv* abc_env) { GCList<MethodInfo> verifyQueue2(core->GetGC(), kListInitialCapacity); int verified; do { verified = 0; while (!verifyTraitsQueue.isEmpty()) { Traits* t = verifyTraitsQueue.removeFirst(); t->resolveSignatures(toplevel); TraitsBindingsp td = t->getTraitsBindings(); enqFunction(t->init); for (int i=0, n=td->methodCount; i < n; i++) enqFunction(td->getMethod(i)); } while (!verifyFunctionQueue.isEmpty()) { MethodInfo* f = verifyFunctionQueue.removeLast(); if (!isVerified(f)) { if (f->declaringTraits()->init != f && f->declaringScope() == NULL) { verifyQueue2.add(f); continue; } verified++; //console << "pre verify " << f << "\n"; verifyMethod(f, toplevel, abc_env); setVerified(f); if (config.verifyonly) f->_invoker = verifyOnlyInvoker; } } while (!verifyQueue2.isEmpty()) verifyFunctionQueue.add(verifyQueue2.removeLast()); } while (verified > 0); }
void QFacebookGraphUser::requestDone(bool ok) { if(ok) { QVariantMap map = result(); QVariantMap::const_iterator i; for (i = map.constBegin(); i != map.constEnd(); ++i) { if(i.key() == "name" ) setName(i.value().toString()); if(i.key() == "hometown") setHometown(i.value().toMap()); if(i.key() == "last_name") setLastName(i.value().toString()); if(i.key() == "birthday") setBirthday(i.value().toString()); if(i.key() == "education") { QFacebookGraphCommonEducationModel *edu = new QFacebookGraphCommonEducationModel(); for (int j = 0; j < i.value().toList().size(); ++j) { edu->populate(i.value().toList().at(j).toMap()); m_education.append(edu); edu = new QFacebookGraphCommonEducationModel(); } } if(i.key() == "work") { QFacebookGraphCommonWorkModel *work = new QFacebookGraphCommonWorkModel(); for (int j = 0; j < i.value().toList().size(); ++j) { work->populate(i.value().toList().at(j).toMap()); m_work.append(work); work = new QFacebookGraphCommonWorkModel(); } } if(i.key() == "first_name") setFirstName(i.value().toString()); if(i.key() == "gender") setGender(i.value().toString()); if(i.key() == "id") setFbid(i.value().toString()); if(i.key() == "link") setLink(i.value().toString()); if(i.key() == "locale") setLocale(i.value().toString()); if(i.key() == "location") setLocation(i.value().toMap()); if(i.key() == "middle_name") setMiddleName(i.value().toString()); if(i.key() == "timezone") setTimezone(i.value().toLongLong()); if(i.key() == "updated_time") setUpdatedtime(i.value().toString()); if(i.key() == "verified") setVerified(i.value().toBool()); } emit modelPopulated(); } }
User::User(const QString &userID, const QString &userName, const QString &password, QObject *parent) : UserBase(userID, userName, password, parent) { setVerified(false); rootMode = false; trueName = ""; nickName = ""; gender = GENDER_UNKNOWN; homeAddress = ""; homePhoneNumber = ""; homeZipCode = ""; personalHomepage = ""; personalEmailAddress = ""; lastLoginTime = QDateTime(); lastLogoutTime = QDateTime(); lastLoginExternalHostAddress = ""; lastLoginExternalHostPort = 0; questionForSecurity = ""; answerForSecurity = ""; face = ""; companyName = ""; jobTitle = ""; businessAddress = ""; businessPhoneNumber = ""; businessZipCode = ""; businessFaxNumber = ""; businessHomepage = ""; businessEmailAddress = ""; registrationTime = QDateTime(); loginTimes = 0; description = ""; }