Skip to content
Snippets Groups Projects
Commit 3a157ed8 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

avadapter: return call id by value

This function either returns a reference to a local, or a QString
member whose lifetime is unknown to the caller. We should just
return by value.

Change-Id: Ib87288105daa6bf8cb6b803948411275da980c54
parent b0fdeb79
No related branches found
No related tags found
No related merge requests found
......@@ -88,8 +88,12 @@ AvAdapter::shareEntireScreen(int screenNumber)
return;
QRect rect = screen->geometry();
LRCInstance::avModel()
.setDisplay(getScreenNumber(), rect.x(), rect.y(), rect.width(), rect.height(), getCurrentCallId());
LRCInstance::avModel().setDisplay(getScreenNumber(),
rect.x(),
rect.y(),
rect.width(),
rect.height(),
getCurrentCallId());
}
void
......@@ -206,14 +210,12 @@ AvAdapter::stopAudioMeter(bool async)
LRCInstance::stopAudioMeter(async);
}
const QString&
QString
AvAdapter::getCurrentCallId()
{
const auto& convInfo = LRCInstance::getConversationFromConvUid(LRCInstance::getCurrentConvUid());
auto call = LRCInstance::getCallInfoForConversation(convInfo);
if (!call)
return QString();
return call->id;
return call ? call->id : QString();
}
void
......
......@@ -91,7 +91,7 @@ private:
/*
* Get current callId from current selected conv id.
*/
const QString& getCurrentCallId();
QString getCurrentCallId();
/*
* Used to classify capture device events.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment