add qinfo ldap debug
This commit is contained in:
parent
5953a5a88b
commit
79f27465e5
1 changed files with 6 additions and 3 deletions
|
|
@ -83,16 +83,19 @@ bool isContactTemporary(std::shared_ptr<linphone::Friend> f, bool allowNullFrien
|
||||||
|
|
||||||
void MagicSearchModel::onSearchResultsReceived(const std::shared_ptr<linphone::MagicSearch> &magicSearch) {
|
void MagicSearchModel::onSearchResultsReceived(const std::shared_ptr<linphone::MagicSearch> &magicSearch) {
|
||||||
auto results = magicSearch->getLastSearch();
|
auto results = magicSearch->getLastSearch();
|
||||||
qDebug() << log().arg("SDK send callback: onSearchResultsReceived : %1 results.").arg(results.size());
|
qInfo() << log().arg("SDK send callback: onSearchResultsReceived : %1 results.").arg(results.size());
|
||||||
auto appFriends = ToolModel::getAppFriendList();
|
auto appFriends = ToolModel::getAppFriendList();
|
||||||
auto ldapFriends = ToolModel::getLdapFriendList();
|
auto ldapFriends = ToolModel::getLdapFriendList();
|
||||||
std::list<std::shared_ptr<linphone::SearchResult>> finalResults;
|
std::list<std::shared_ptr<linphone::SearchResult>> finalResults;
|
||||||
for (auto result : results) {
|
for (auto result : results) {
|
||||||
auto f = result->getFriend();
|
auto f = result->getFriend();
|
||||||
|
qInfo() << "result has flag friend" << result->hasSourceFlag(linphone::MagicSearch::Source::Friends);
|
||||||
|
qInfo() << "result has flag ldap" << result->hasSourceFlag(linphone::MagicSearch::Source::LdapServers);
|
||||||
|
qInfo() << "result has flag carddav" << result->hasSourceFlag(linphone::MagicSearch::Source::RemoteCardDAV);
|
||||||
bool isFromRemoteDirectory = result->hasSourceFlag(linphone::MagicSearch::Source::LdapServers) ||
|
bool isFromRemoteDirectory = result->hasSourceFlag(linphone::MagicSearch::Source::LdapServers) ||
|
||||||
result->hasSourceFlag(linphone::MagicSearch::Source::RemoteCardDAV);
|
result->hasSourceFlag(linphone::MagicSearch::Source::RemoteCardDAV);
|
||||||
if (!isFromRemoteDirectory && isContactTemporary(f, true)) {
|
if (!isFromRemoteDirectory && isContactTemporary(f, true)) {
|
||||||
qDebug() << "Do not show friend " << f->getName() << "which is in a temporary friend list";
|
qInfo() << "Do not show friend " << f->getName() << "which is not remote and is in a temporary friend list";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
finalResults.push_back(result);
|
finalResults.push_back(result);
|
||||||
|
|
@ -149,7 +152,7 @@ void MagicSearchModel::updateFriendListWithFriend(const std::shared_ptr<linphone
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qDebug() << log().arg("Adding Friend:") << linphoneFriend.get();
|
qInfo() << log().arg("Adding Friend:") << linphoneFriend.get();
|
||||||
friendList->addFriend(linphoneFriend);
|
friendList->addFriend(linphoneFriend);
|
||||||
emit CoreModel::getInstance()->friendCreated(linphoneFriend);
|
emit CoreModel::getInstance()->friendCreated(linphoneFriend);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue