1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Fix some ChatForm debug spam

Don't log an event if it isn't meant for you
This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2015-01-04 17:59:30 +01:00
parent 37ea7c359c
commit fbc77864aa
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -255,10 +255,11 @@ void ChatForm::onFileRecvRequest(ToxFile file)
void ChatForm::onAvInvite(int FriendId, int CallId, bool video)
{
qDebug() << "onAvInvite";
if (FriendId != f->getFriendID())
return;
qDebug() << "onAvInvite";
callId = CallId;
callButton->disconnect();
videoButton->disconnect();
@ -292,10 +293,11 @@ void ChatForm::onAvInvite(int FriendId, int CallId, bool video)
void ChatForm::onAvStart(int FriendId, int CallId, bool video)
{
qDebug() << "onAvStart";
if (FriendId != f->getFriendID())
return;
qDebug() << "onAvStart";
audioInputFlag = true;
audioOutputFlag = true;
callId = CallId;
@ -326,11 +328,12 @@ void ChatForm::onAvStart(int FriendId, int CallId, bool video)
void ChatForm::onAvCancel(int FriendId, int)
{
qDebug() << "onAvCancel";
if (FriendId != f->getFriendID())
return;
qDebug() << "onAvCancel";
stopCounter();
audioInputFlag = false;
@ -355,11 +358,11 @@ void ChatForm::onAvCancel(int FriendId, int)
void ChatForm::onAvEnd(int FriendId, int)
{
qDebug() << "onAvEnd";
if (FriendId != f->getFriendID())
return;
qDebug() << "onAvEnd";
audioInputFlag = false;
audioOutputFlag = false;
micButton->setObjectName("green");
@ -382,10 +385,11 @@ void ChatForm::onAvEnd(int FriendId, int)
void ChatForm::onAvRinging(int FriendId, int CallId, bool video)
{
qDebug() << "onAvRinging";
if (FriendId != f->getFriendID())
return;
qDebug() << "onAvRinging";
callId = CallId;
callButton->disconnect();
videoButton->disconnect();
@ -411,11 +415,11 @@ void ChatForm::onAvRinging(int FriendId, int CallId, bool video)
void ChatForm::onAvStarting(int FriendId, int CallId, bool video)
{
qDebug() << "onAvStarting";
if (FriendId != f->getFriendID())
return;
qDebug() << "onAvStarting";
callButton->disconnect();
videoButton->disconnect();
if (video)
@ -442,11 +446,11 @@ void ChatForm::onAvStarting(int FriendId, int CallId, bool video)
void ChatForm::onAvEnding(int FriendId, int)
{
qDebug() << "onAvEnding";
if (FriendId != f->getFriendID())
return;
qDebug() << "onAvEnding";
audioInputFlag = false;
audioOutputFlag = false;
micButton->setObjectName("green");
@ -471,11 +475,11 @@ void ChatForm::onAvEnding(int FriendId, int)
void ChatForm::onAvRequestTimeout(int FriendId, int)
{
qDebug() << "onAvRequestTimeout";
if (FriendId != f->getFriendID())
return;
qDebug() << "onAvRequestTimeout";
audioInputFlag = false;
audioOutputFlag = false;
micButton->setObjectName("green");
@ -498,11 +502,11 @@ void ChatForm::onAvRequestTimeout(int FriendId, int)
void ChatForm::onAvPeerTimeout(int FriendId, int)
{
qDebug() << "onAvPeerTimeout";
if (FriendId != f->getFriendID())
return;
qDebug() << "onAvPeerTimeout";
audioInputFlag = false;
audioOutputFlag = false;
micButton->setObjectName("green");
@ -525,11 +529,11 @@ void ChatForm::onAvPeerTimeout(int FriendId, int)
void ChatForm::onAvRejected(int FriendId, int)
{
qDebug() << "onAvRejected";
if (FriendId != f->getFriendID())
return;
qDebug() << "onAvRejected";
audioInputFlag = false;
audioOutputFlag = false;
micButton->setObjectName("green");
@ -554,11 +558,11 @@ void ChatForm::onAvRejected(int FriendId, int)
void ChatForm::onAvMediaChange(int FriendId, int CallId, bool video)
{
qDebug() << "onAvMediaChange";
if (FriendId != f->getFriendID() || CallId != callId)
return;
qDebug() << "onAvMediaChange";
if (video)
{
netcam->show(Core::getInstance()->getVideoSourceFromCall(CallId), f->getDisplayedName());
@ -579,7 +583,7 @@ void ChatForm::onAnswerCallTriggered()
}
void ChatForm::onHangupCallTriggered()
{
{
qDebug() << "onHangupCallTriggered";
audioInputFlag = false;
@ -615,11 +619,11 @@ void ChatForm::onVideoCallTriggered()
void ChatForm::onAvCallFailed(int FriendId)
{
qDebug() << "onAvCallFailed";
if (FriendId != f->getFriendID())
return;
qDebug() << "onAvCallFailed";
audioInputFlag = false;
audioOutputFlag = false;
callButton->disconnect();