本文整理汇总了C++中service::ErrorInfo::code方法的典型用法代码示例。如果您正苦于以下问题:C++ ErrorInfo::code方法的具体用法?C++ ErrorInfo::code怎么用?C++ ErrorInfo::code使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类service::ErrorInfo
的用法示例。
在下文中一共展示了ErrorInfo::code方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _getGroupInfo
void GroupControler::_getGroupInfo(service::ErrorInfo &info, service::Group group)
{
qDebug() << Q_FUNC_INFO<<"22222222222"<<info.code();
if(info.code()==0){
Group gp;
if(group.info.avatar!=""){
gp.avatar="/data/data/com.vrv.linkDood/public/head/"+QString::fromStdString(group.info.avatar);
}
qDebug() << Q_FUNC_INFO<<gp.avatar<<"ssssssssssssssssssssssss";
gp.createrid=QString::number(group.creater_id);
QDateTime DateTime;
DateTime.setMSecsSinceEpoch(group.create_time);
gp.create_time=DateTime.toString("MM月dd日") +QString::fromLocal8Bit(" ")+DateTime.toString("HH:mm");
gp.extend=QString::fromStdString(group.extend);
gp.id=QString::number(group.info.id);
gp.level=QString::number(group.info.level);
gp.name=QString::fromStdString(group.info.name);
gp.pinyin=QString::fromStdString(group.info.pinyin);
gp.server=QString::fromStdString(group.info.server);
if(group.info.thumb_avatar!=""){
gp.thumbAvatar="/data/data/com.vrv.linkDood/public/head/"+QString::fromStdString(group.info.thumb_avatar);
}
qDebug() << Q_FUNC_INFO<<"22222222222"<<gp.thumbAvatar<<gp.name;
gp.timeZone=QString::number(group.info.time_zone);
gp.brief=QString::fromStdString(group.brief);
gp.bulletin=QString::fromStdString(group.bulletin);
if(gp.brief=="#"){
gp.brief="";
}
qDebug() << Q_FUNC_INFO<<"33333333333"<<gp.brief<<gp.bulletin;
qDebug() << Q_FUNC_INFO<<"member_num:"<<group.member_nums;
emit getGroupInfoResult("获取群信息成功",gp);
}
}
示例2: _getMemberInfo
void GroupControler::_getMemberInfo(service::ErrorInfo& info, service::User& member)
{
qDebug() << Q_FUNC_INFO<<info.code();
if(info.code()==0){
// service::Member mem=dynamic_cast<service::Member&>(member);
Member m;
m.name=QString::fromStdString(member.name);
// m.avatar=QString::fromStdString(mem.avatar);
// if(mem.gender==0){
// m.gender="保密";
// }
// if(mem.gender==1){
// m.gender="男";
// }
// if(mem.gender==2){
// m.gender="女";
// }
// m.groupid=QString::number(mem.groupid);
// m.id=QString::number(mem.id);
// m.member_type=QString::number(mem.member_type);
// m.name=QString::fromStdString(mem.name);
// m.remark=QString::fromStdString(mem.remark);
// m.team=QString::number(mem.team);
// m.thumbAvatar=QString::fromStdString(mem.thumb_avatar);
emit getMemberInfoResult("获取成员信息成功",m);
}
else{
Member m;
emit getMemberInfoResult("获取成员信息失败",m);
}
}
示例3: _getVerifyImg
void AuthControler::_getVerifyImg(service::ErrorInfo info, std::string img)
{
qDebug() << Q_FUNC_INFO<<info.code()<<img.c_str();
if(img!=""){
img="file://"+img;
}
emit getVerifyImgResult(QString::number(info.code()),QString::fromStdString(img));
}
示例4: _removeMember
void GroupControler::_removeMember(service::ErrorInfo &info)
{
qDebug() << Q_FUNC_INFO<<"1111111111:"<<info.code();
if(info.code()==0){
emit removeMemberResult("移除群成员成功");
}
else{
emit removeMemberResult("移除群成员失败");
}
}
示例5: _removeGroup
void GroupControler::_removeGroup(service::ErrorInfo &info)
{
qDebug() << Q_FUNC_INFO<<"ssssssssssssssss"<<info.code();
if(info.code()==0){
emit removeGroupResult("成功");
}
else{
emit removeGroupResult("操作失败");
}
}
示例6: _inviteMember
void GroupControler::_inviteMember(service::ErrorInfo &info)
{
qDebug() << Q_FUNC_INFO<<info.code();
if(info.code()==0){
emit inviteMemberResult("邀请成员成功");
}
else{
emit inviteMemberResult("邀请成员失败");
}
}
示例7: _setMemberInfo
void GroupControler::_setMemberInfo(service::ErrorInfo &info)
{
qDebug() << Q_FUNC_INFO<<info.code();
if(info.code()==0){
emit setMemberInfoResult("设置成员信息成功");
}
else{
emit setMemberInfoResult("设置成员信息失败");
}
}
示例8: onLogoutChanged
void AuthControler::onLogoutChanged(service::ErrorInfo& info)
{
qDebug() << Q_FUNC_INFO << "loginout_code:" << info.code();
if(info.code() == 0 ||info.code() == 1304||info.code()<0)
{
emit loginoutRelust(true);
}else
{
emit loginoutRelust(false);
}
}
示例9: _changepassword
void AuthControler::_changepassword(service::ErrorInfo &info)
{
qDebug() << Q_FUNC_INFO<<info.code();
if(info.code()==0){
emit changePasswordResult("修改成功");
}
else if(info.code()==543){
emit changePasswordResult("旧密码不正确");
}
else{
emit changePasswordResult("修改失败");
}
}
示例10: _getSonOrgs
void EnterpriseControler::_getSonOrgs(service::ErrorInfo info, std::vector<service::Org> orgs, std::vector<service::OrgUser> orgusers)
{
qDebug() << Q_FUNC_INFO<<info.code()<<orgs.size();
OrgList orgList;
OrgUserList orgUserList;
for(auto org:orgs){
orgList.insert(orgList.size(),orgToQorg(org));
}
for(auto orgUser:orgusers){
orgUserList.insert(orgUserList.size(),orguserToQorguser(orgUser));
}
emit getSonOrgsResult(info.code(),orgList,orgUserList);
}
示例11: _getMemberList
void GroupControler::_getMemberList(service::ErrorInfo &info, std::vector<std::shared_ptr<service::User> > members,QString groupId)
{
qDebug() << Q_FUNC_INFO <<"size:"<<members.size()<<"groupId:"<<groupId;
MemberList memberList;
if(info.code()==0){
if(members.size() >0){
memberList=MemberToQMemberList(members);
emit getGroupMemberListReslut(info.code(),groupId,memberList);
}
emit getMemberListResult("获取成员列表成功",memberList);
}
}
示例12: _transferGroup
void GroupControler::_transferGroup(service::ErrorInfo &info)
{
qDebug()<<Q_FUNC_INFO<<info.code();
if(info.code()==0){
emit transferGroupResult("转让群成功");
}
else if(info.code()==303){
emit transferGroupResult("该用户拥有的群数量已经超过限制");
}
else{
emit transferGroupResult("转让群失败");
}
}
示例13: _createGroup
void GroupControler::_createGroup(service::ErrorInfo &info, long long &res)
{
qDebug() << Q_FUNC_INFO<<"2222222......"<<info.code();
if(info.code()==0){
emit createGroupResult(QString::number(res));
}
else if(info.code()==303){
emit createGroupResult("创建群失败(群数量超过限制)");
}
else{
emit createGroupResult("创建群失败");
}
}
示例14: _getMesage
void ChatControler::_getMesage(service::ErrorInfo &info, int64 targetId, std::vector<service::MsgPtr>msgPtr)
{
qDebug() << Q_FUNC_INFO << msgPtr.size();
MsgList msgList;
//std::shared_ptr<service::Msg> msg;
for(auto msg:msgPtr){
if(msg->msgtype == 2||msg->msgtype == 8){
std::shared_ptr<service::MsgText> msgText = std::dynamic_pointer_cast<service::MsgText>(msg);
Msg item;
item.activeType = QString::number(msgText->active_type);
item.body = QString::fromStdString(utils::MsgUtils::getText(msgText->body));
item.fromid = QString::number(msgText->fromid);
item.localid = QString::number(msgText->localid);
item.msgid = QString::number(msgText->msgid);
item.msgProperties = QString::fromStdString(msgText->msg_properties);
item.msgtype = QString::number(msgText->msgtype);
item.relatedMsgid = QString::number(msgText->related_msgid);
item.targetid = QString::number(msgText->targetid);
item.time = QString::number(msgText->time);
item.toid = QString::number(msgText->toid);
msgList.insert(msgList.size(),item);
}
}
if(!info.code()){
emit getMessagesBack(true,targetId,msgList);
}else{
emit getMessagesBack(true,targetId,msgList);
}
}
示例15: _getOrgUserInfo
void EnterpriseControler::_getOrgUserInfo(service::ErrorInfo &info, service::OrgUser &orguser)
{
qDebug() << Q_FUNC_INFO;
OrgUser Qorguser;
Qorguser= orguserToQorguser(orguser);
emit getOrgUserInfoResult(info.code(),Qorguser);
}