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