本文整理汇总了C++中SearchResult::append方法的典型用法代码示例。如果您正苦于以下问题:C++ SearchResult::append方法的具体用法?C++ SearchResult::append怎么用?C++ SearchResult::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SearchResult
的用法示例。
在下文中一共展示了SearchResult::append方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pubDirSearchResult
void
GaduSession::sendResult( gg_pubdir50_t result )
{
int i, count, age;
ResLine resultLine;
SearchResult sres;
count = gg_pubdir50_count( result );
if ( !count ) {
kdDebug(14100) << "there was nothing found in public directory for requested details" << endl;
}
for ( i = 0; i < count; i++ ) {
resultLine.uin = QString( gg_pubdir50_get( result, i, GG_PUBDIR50_UIN ) ).toInt();
resultLine.firstname = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_FIRSTNAME ) );
resultLine.surname = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_LASTNAME ) );
resultLine.nickname = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_NICKNAME ) );
resultLine.age = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_BIRTHYEAR ) );
resultLine.city = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_CITY ) );
QString stat = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_STATUS ) );
resultLine.orgin = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_FAMILYCITY ) );
resultLine.meiden = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_FAMILYNAME ) );
resultLine.gender = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_GENDER ) );
resultLine.status = stat.toInt();
age = resultLine.age.toInt();
if ( age ) {
resultLine.age = QString::number( QDate::currentDate().year() - age );
}
else {
resultLine.age.truncate( 0 );
}
sres.append( resultLine );
kdDebug(14100) << "found line "<< resultLine.uin << " " << resultLine.firstname << endl;
}
searchSeqNr_ = gg_pubdir50_next( result );
emit pubDirSearchResult( sres, gg_pubdir50_seq( result ) );
}