From 326d91d4c73f4262f52b055a9159d968cadeedde Mon Sep 17 00:00:00 2001 From: csoler Date: Tue, 30 Dec 2014 14:26:04 +0000 Subject: [PATCH] fixed VOIP compilation (patch from electron) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7803 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- plugins/VOIP/gui/PluginGUIHandler.cpp | 4 ++-- plugins/VOIP/gui/VOIPChatWidgetHolder.cpp | 4 ++-- plugins/plugins.pro | 4 ++-- retroshare-gui/src/gui/chat/ChatWidget.cpp | 5 +++++ retroshare-gui/src/gui/chat/ChatWidget.h | 1 + 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/VOIP/gui/PluginGUIHandler.cpp b/plugins/VOIP/gui/PluginGUIHandler.cpp index ce2f8a066..2c72640d5 100644 --- a/plugins/VOIP/gui/PluginGUIHandler.cpp +++ b/plugins/VOIP/gui/PluginGUIHandler.cpp @@ -33,7 +33,7 @@ void PluginGUIHandler::ReceivedVoipData(const QString& qpeer_id) return ; } - ChatDialog *di = ChatDialog::getExistingChat(peer_id) ; + ChatDialog *di = ChatDialog::getExistingChat(ChatId(peer_id)) ; if (di) { ChatWidget *cw = di->getChatWidget(); if (cw) { @@ -74,7 +74,7 @@ void PluginGUIHandler::ReceivedVoipBandwidthInfo(const QString& qpeer_id,int byt { RsPeerId peer_id(qpeer_id.toStdString()) ; - ChatDialog *di = ChatDialog::getExistingChat(peer_id) ; + ChatDialog *di = ChatDialog::getExistingChat(ChatId(peer_id)) ; std::cerr << "PluginGUIHandler::received bw info for peer " << qpeer_id.toStdString() << ": " << bytes_per_sec << " Bps" << std::endl; if(!di) diff --git a/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp b/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp index 659fcd5cb..9652cca40 100644 --- a/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp +++ b/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp @@ -304,7 +304,7 @@ void VOIPChatWidgetHolder::sendVideoData() RsVoipDataChunk chunk ; while(inputVideoDevice && inputVideoDevice->getNextEncodedPacket(chunk)) - rsVoip->sendVoipData(mChatWidget->getPeerId(),chunk) ; + rsVoip->sendVoipData(mChatWidget->getChatId().toPeerId(),chunk) ; } void VOIPChatWidgetHolder::sendAudioData() @@ -315,7 +315,7 @@ void VOIPChatWidgetHolder::sendAudioData() chunk.size = qbarray.size(); chunk.data = (void*)qbarray.constData(); chunk.type = RsVoipDataChunk::RS_VOIP_DATA_TYPE_AUDIO ; - rsVoip->sendVoipData(mChatWidget->getPeerId(),chunk); + rsVoip->sendVoipData(mChatWidget->getChatId().toPeerId(),chunk); } } diff --git a/plugins/plugins.pro b/plugins/plugins.pro index 15fe71c56..4db3505c2 100644 --- a/plugins/plugins.pro +++ b/plugins/plugins.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs SUBDIRS += \ - #VOIP \ - #FeedReader + VOIP \ + FeedReader diff --git a/retroshare-gui/src/gui/chat/ChatWidget.cpp b/retroshare-gui/src/gui/chat/ChatWidget.cpp index 71e5b5321..c50f16d55 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.cpp +++ b/retroshare-gui/src/gui/chat/ChatWidget.cpp @@ -306,6 +306,11 @@ void ChatWidget::init(const ChatId &chat_id, const QString &title) processSettings(true); } +ChatId ChatWidget::getChatId() +{ + return chatId; +} + ChatWidget::ChatType ChatWidget::chatType() { // transformation from ChatId::Type to ChatWidget::ChatType diff --git a/retroshare-gui/src/gui/chat/ChatWidget.h b/retroshare-gui/src/gui/chat/ChatWidget.h index 26dd4a458..f18ec8071 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.h +++ b/retroshare-gui/src/gui/chat/ChatWidget.h @@ -72,6 +72,7 @@ public: ~ChatWidget(); void init(const ChatId &chat_id, const QString &title); + ChatId getChatId(); ChatType chatType(); bool hasNewMessages() { return newMessages; }