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) ...@@ -88,8 +88,12 @@ AvAdapter::shareEntireScreen(int screenNumber)
return; return;
QRect rect = screen->geometry(); QRect rect = screen->geometry();
LRCInstance::avModel() LRCInstance::avModel().setDisplay(getScreenNumber(),
.setDisplay(getScreenNumber(), rect.x(), rect.y(), rect.width(), rect.height(), getCurrentCallId()); rect.x(),
rect.y(),
rect.width(),
rect.height(),
getCurrentCallId());
} }
void void
...@@ -206,14 +210,12 @@ AvAdapter::stopAudioMeter(bool async) ...@@ -206,14 +210,12 @@ AvAdapter::stopAudioMeter(bool async)
LRCInstance::stopAudioMeter(async); LRCInstance::stopAudioMeter(async);
} }
const QString& QString
AvAdapter::getCurrentCallId() AvAdapter::getCurrentCallId()
{ {
const auto& convInfo = LRCInstance::getConversationFromConvUid(LRCInstance::getCurrentConvUid()); const auto& convInfo = LRCInstance::getConversationFromConvUid(LRCInstance::getCurrentConvUid());
auto call = LRCInstance::getCallInfoForConversation(convInfo); auto call = LRCInstance::getCallInfoForConversation(convInfo);
if (!call) return call ? call->id : QString();
return QString();
return call->id;
} }
void void
......
...@@ -91,7 +91,7 @@ private: ...@@ -91,7 +91,7 @@ private:
/* /*
* Get current callId from current selected conv id. * Get current callId from current selected conv id.
*/ */
const QString& getCurrentCallId(); QString getCurrentCallId();
/* /*
* Used to classify capture device events. * 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