From f2bab2f1d153d2c688d9581d034da42501320a90 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Fri, 14 Oct 2022 18:47:40 +0200 Subject: [PATCH] Clean logs. --- .../src/components/call/CallModel.cpp | 2 +- .../chat-room/ChatRoomInitializer.cpp | 6 ++-- .../components/chat-room/ChatRoomListener.cpp | 1 - .../ParticipantDeviceListModel.cpp | 8 ++--- .../participant/ParticipantDeviceListener.cpp | 6 ++-- .../participant/ParticipantDeviceModel.cpp | 2 +- .../src/components/recorder/RecorderModel.cpp | 2 +- .../components/timeline/TimelineListModel.cpp | 2 -- .../Linphone/Dialog/SipAddressDialog.qml | 4 +-- .../NotificationReceivedMessage.qml | 2 +- .../Linphone/Presence/PresenceLevel.qml | 2 -- .../ui/views/App/Calls/CallsWindow.js | 10 ------ linphone-app/ui/views/App/Calls/Incall.qml | 2 -- .../views/App/Calls/IncallActiveSpeaker.qml | 31 +------------------ .../ui/views/App/Calls/IncallFullscreen.qml | 1 - linphone-app/ui/views/App/Main/Contacts.qml | 2 +- linphone-app/ui/views/App/Main/MainWindow.qml | 2 +- 17 files changed, 19 insertions(+), 66 deletions(-) diff --git a/linphone-app/src/components/call/CallModel.cpp b/linphone-app/src/components/call/CallModel.cpp index 333f76ad0..52b63264c 100644 --- a/linphone-app/src/components/call/CallModel.cpp +++ b/linphone-app/src/components/call/CallModel.cpp @@ -1027,7 +1027,7 @@ void CallModel::updateConferenceVideoLayout(){ settings->setCameraMode(settings->getActiveSpeakerCameraMode()); }else settings->setCameraMode(settings->getCallCameraMode()); - qWarning() << "Changing layout from " << mConferenceVideoLayout << " into " << newLayout; + qDebug() << "Changing layout from " << mConferenceVideoLayout << " into " << newLayout; mConferenceVideoLayout = newLayout; emit conferenceVideoLayoutChanged(); emit snapshotEnabledChanged(); diff --git a/linphone-app/src/components/chat-room/ChatRoomInitializer.cpp b/linphone-app/src/components/chat-room/ChatRoomInitializer.cpp index 076d318a6..8139f3fc3 100644 --- a/linphone-app/src/components/chat-room/ChatRoomInitializer.cpp +++ b/linphone-app/src/components/chat-room/ChatRoomInitializer.cpp @@ -84,7 +84,7 @@ void ChatRoomInitializer::setAdmins(QList< std::shared_ptr> a void ChatRoomInitializer::start(QSharedPointer initializer){ QObject * context = new QObject(); QObject::connect(initializer.get(), &ChatRoomInitializer::finished, context, [context, initializer](int state){ - qInfo() << "[ChatRoomInitializer] initialized"; + qDebug() << "[ChatRoomInitializer] initialized"; context->deleteLater();// This will destroy context and initializer }); } @@ -97,12 +97,12 @@ void ChatRoomInitializer::checkInitialization(){ } void ChatRoomInitializer::onConferenceJoined(const std::shared_ptr & chatRoom, const std::shared_ptr & eventLog) { - qInfo() << "[ChatRoomInitializer] Conference has been set"; + qDebug() << "[ChatRoomInitializer] Conference has been set"; setAdmins(mAdmins); } void ChatRoomInitializer::onStateChanged(const std::shared_ptr & chatRoom, linphone::ChatRoom::State newState) { - qInfo() << "[ChatRoomInitializer] State : " << (int)newState; + qDebug() << "[ChatRoomInitializer] State : " << (int)newState; if( newState >= linphone::ChatRoom::State::Created || newState == linphone::ChatRoom::State::Instantiated) { checkInitialization(); } diff --git a/linphone-app/src/components/chat-room/ChatRoomListener.cpp b/linphone-app/src/components/chat-room/ChatRoomListener.cpp index 8fbc7edb2..f881ecbc7 100644 --- a/linphone-app/src/components/chat-room/ChatRoomListener.cpp +++ b/linphone-app/src/components/chat-room/ChatRoomListener.cpp @@ -29,7 +29,6 @@ ChatRoomListener::ChatRoomListener(QObject * parent): QObject(parent){ } ChatRoomListener::~ChatRoomListener(){ - qDebug() << "Destroying ChatRoomListener " << this; } //--------------------------------------------------------------------------------------------------- diff --git a/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp b/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp index a44f56f98..05f132cd9 100644 --- a/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp +++ b/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp @@ -102,7 +102,7 @@ bool ParticipantDeviceListModel::add(std::shared_ptr(); if(deviceModel->getDevice() == deviceToAdd) { - qWarning() << "Device already exist. Send video update event"; + qDebug() << "Device already exist. Send video update event"; deviceModel->updateVideoEnabled(); return false; } @@ -208,7 +208,7 @@ void ParticipantDeviceListModel::onSecurityLevelChanged(std::shared_ptr & participant){ std::list> devices = participant->getDevices() ; if(devices.size() == 0) - qWarning() << "Participant has no device. It will not be added : " << participant->getAddress()->asString().c_str(); + qDebug() << "Participant has no device. It will not be added : " << participant->getAddress()->asString().c_str(); else for(auto device : devices) add(device); @@ -237,13 +237,13 @@ void ParticipantDeviceListModel::onParticipantDeviceAdded(const std::shared_ptr< } } - qWarning() << "No participant device found from linphone::ParticipantDevice at onParticipantDeviceAdded"; + qDebug() << "No participant device found from linphone::ParticipantDevice at onParticipantDeviceAdded"; } void ParticipantDeviceListModel::onParticipantDeviceRemoved(const std::shared_ptr & participantDevice){ qDebug() << "Removing participant device : " << mList.count(); if(!remove(participantDevice)) - qWarning() << "No participant device found from linphone::ParticipantDevice at onParticipantDeviceRemoved"; + qDebug() << "No participant device found from linphone::ParticipantDevice at onParticipantDeviceRemoved"; } void ParticipantDeviceListModel::onConferenceStateChanged(linphone::Conference::State newState){ diff --git a/linphone-app/src/components/participant/ParticipantDeviceListener.cpp b/linphone-app/src/components/participant/ParticipantDeviceListener.cpp index bd595368e..93c1344ce 100644 --- a/linphone-app/src/components/participant/ParticipantDeviceListener.cpp +++ b/linphone-app/src/components/participant/ParticipantDeviceListener.cpp @@ -29,17 +29,17 @@ ParticipantDeviceListener::ParticipantDeviceListener(QObject *parent) : QObject( //-------------------------------------------------------------------- void ParticipantDeviceListener::onIsSpeakingChanged(const std::shared_ptr & participantDevice, bool isSpeaking) { - qInfo() << "onIsSpeakingChanged " << participantDevice->getAddress()->asString().c_str() << " " << isSpeaking; + qDebug() << "onIsSpeakingChanged " << participantDevice->getAddress()->asString().c_str() << " " << isSpeaking; emit isSpeakingChanged(participantDevice, isSpeaking); } void ParticipantDeviceListener::onIsMuted(const std::shared_ptr & participantDevice, bool isMutedVar) { - qInfo() << "onIsMuted " << isMutedVar << " vs " << participantDevice->getIsMuted() << " for " << participantDevice->getAddress()->asString().c_str(); + qDebug() << "onIsMuted " << isMutedVar << " vs " << participantDevice->getIsMuted() << " for " << participantDevice->getAddress()->asString().c_str(); emit isMuted(participantDevice, isMutedVar); } void ParticipantDeviceListener::onStateChanged(const std::shared_ptr & participantDevice, linphone::ParticipantDeviceState state){ - qInfo() << "onStateChanged: " << participantDevice->getAddress()->asString().c_str() << " " << (int)state; + qDebug() << "onStateChanged: " << participantDevice->getAddress()->asString().c_str() << " " << (int)state; emit stateChanged(participantDevice, state); } diff --git a/linphone-app/src/components/participant/ParticipantDeviceModel.cpp b/linphone-app/src/components/participant/ParticipantDeviceModel.cpp index 76fc2bcb0..3fe0f5dc1 100644 --- a/linphone-app/src/components/participant/ParticipantDeviceModel.cpp +++ b/linphone-app/src/components/participant/ParticipantDeviceModel.cpp @@ -147,7 +147,7 @@ void ParticipantDeviceModel::updateVideoEnabled(){ ) || isMe()) && !mIsPaused; if( mIsVideoEnabled != enabled && mCall && mCall->getCall()->getState() == linphone::Call::State::StreamsRunning) { - qWarning() << "VideoEnabled: " << enabled << ", old=" << mIsVideoEnabled << (mParticipantDevice ? mParticipantDevice->getAddress()->asString().c_str() : "") << ", me=" << isMe() << ", CallState=" << (mCall ? (int)mCall->getCall()->getState() : -1); + qDebug() << "VideoEnabled: " << enabled << ", old=" << mIsVideoEnabled << (mParticipantDevice ? mParticipantDevice->getAddress()->asString().c_str() : "") << ", me=" << isMe() << ", CallState=" << (mCall ? (int)mCall->getCall()->getState() : -1); mIsVideoEnabled = enabled; emit videoEnabledChanged(); } diff --git a/linphone-app/src/components/recorder/RecorderModel.cpp b/linphone-app/src/components/recorder/RecorderModel.cpp index a6ce2258a..75dd5a114 100644 --- a/linphone-app/src/components/recorder/RecorderModel.cpp +++ b/linphone-app/src/components/recorder/RecorderModel.cpp @@ -86,7 +86,7 @@ void RecorderModel::start(){ } void RecorderModel::pause(){ - qWarning() << mRecorder->pause(); + mRecorder->pause(); emit stateChanged(); } diff --git a/linphone-app/src/components/timeline/TimelineListModel.cpp b/linphone-app/src/components/timeline/TimelineListModel.cpp index 39a3ff584..c9a4f521d 100644 --- a/linphone-app/src/components/timeline/TimelineListModel.cpp +++ b/linphone-app/src/components/timeline/TimelineListModel.cpp @@ -119,7 +119,6 @@ bool TimelineListModel::removeRows (int row, int count, const QModelIndex &paren for(auto timeline : oldTimelines) if(timeline->mSelected) { - qWarning() << "Unselecting timemodel " << timeline; timeline->setSelected(false); } @@ -239,7 +238,6 @@ void TimelineListModel::onSelectedHasChanged(bool selected){ emit selectedChanged(qobject_cast(sender())); } }else{// Do nothing - qWarning() << "Timeline selection (selected=" << selected << ") is more than 1 : " << mSelectedCount; } } diff --git a/linphone-app/ui/modules/Linphone/Dialog/SipAddressDialog.qml b/linphone-app/ui/modules/Linphone/Dialog/SipAddressDialog.qml index 1529b61bc..a2a5d47f2 100644 --- a/linphone-app/ui/modules/Linphone/Dialog/SipAddressDialog.qml +++ b/linphone-app/ui/modules/Linphone/Dialog/SipAddressDialog.qml @@ -58,14 +58,14 @@ DialogPlus { return UtilsCpp.hasCapability(entry.sipAddress, LinphoneEnums.FriendCapabilityLimeX3Dh) }, handler: function (entry) { - console.log("Call selected: " +entry + "/"+entry.sipAddress) + console.debug("Call selected: " +entry + "/"+entry.sipAddress) mainItem.addressSelectedCallback(entry.sipAddress) exit(1) }, }] onEntryClicked: { - console.log("Call selected: " +entry + "/"+entry.sipAddress) + console.debug("Call selected: " +entry + "/"+entry.sipAddress) mainItem.addressSelectedCallback(entry.sipAddress) exit(1) } diff --git a/linphone-app/ui/modules/Linphone/Notifications/NotificationReceivedMessage.qml b/linphone-app/ui/modules/Linphone/Notifications/NotificationReceivedMessage.qml index cfe2a894b..f679679c1 100644 --- a/linphone-app/ui/modules/Linphone/Notifications/NotificationReceivedMessage.qml +++ b/linphone-app/ui/modules/Linphone/Notifications/NotificationReceivedMessage.qml @@ -84,7 +84,7 @@ Notification { onClicked: notification._close(function () { AccountSettingsModel.setDefaultAccountFromSipAddress(notification.localAddress) notification.timelineModel.selected = true - console.log("Load conversation from notification") + console.debug("Load conversation from notification") notification.notificationData.window.setView('Conversation', { chatRoomModel:notification.timelineModel.getChatRoomModel() }) diff --git a/linphone-app/ui/modules/Linphone/Presence/PresenceLevel.qml b/linphone-app/ui/modules/Linphone/Presence/PresenceLevel.qml index b55278cc5..a4fbc0730 100644 --- a/linphone-app/ui/modules/Linphone/Presence/PresenceLevel.qml +++ b/linphone-app/ui/modules/Linphone/Presence/PresenceLevel.qml @@ -9,7 +9,6 @@ import Linphone 1.0 Item { property var level: null property bool betterIcon : false - //onLevelChanged: console.log("Level change : "+Presence.getPresenceStatusAsString(level)) Icon { anchors.centerIn: parent @@ -20,6 +19,5 @@ Item { iconSize: parent.height > parent.width ? parent.width : parent.height - //onIconChanged: console.log(Presence.getPresenceStatusAsString(level)+ "//" +icon) } } diff --git a/linphone-app/ui/views/App/Calls/CallsWindow.js b/linphone-app/ui/views/App/Calls/CallsWindow.js index aa78bbabf..f92f96e68 100644 --- a/linphone-app/ui/views/App/Calls/CallsWindow.js +++ b/linphone-app/ui/views/App/Calls/CallsWindow.js @@ -67,26 +67,21 @@ function openWaitingRoom(model){ // ----------------------------------------------------------------------------- // Used to get Component based from Call Status function getContent (call, conferenceInfoModel) { - console.log("Changing contents") if (call == null) { if(conferenceInfoModel) { - console.log("waitingRoom") return waitingRoom } else{ - console.log("null") return null } } var status = call.status if (status == null) { - console.log(calls.conferenceModel.count > 0 ? "conference" : "null") return calls.conferenceModel.count > 0 ? conference : null } var CallModel = Linphone.CallModel if (status === CallModel.CallStatusIncoming) { - console.log("null") return null; } if( window.conferenceInfoModel != call.conferenceInfoModel) { @@ -94,16 +89,11 @@ function getContent (call, conferenceInfoModel) { return middlePane.sourceComponent // unchange. Wait for later decision on conference model (avoid binding loop on sourceComponent) }else{ if(call.isConference){ - console.log("incall") return incall } if (status === CallModel.CallStatusOutgoing || (status === CallModel.CallStatusEnded && call.callError != '' )) { - console.log("waitingRoom. Is conference ? "+call.isConference) return waitingRoom } - - - console.log("incall") return incall } } diff --git a/linphone-app/ui/views/App/Calls/Incall.qml b/linphone-app/ui/views/App/Calls/Incall.qml index 28114fd3d..8b6d05c66 100644 --- a/linphone-app/ui/views/App/Calls/Incall.qml +++ b/linphone-app/ui/views/App/Calls/Incall.qml @@ -316,7 +316,6 @@ Rectangle { isRightReducedLayout: rightMenu.visible isLeftReducedLayout: mainItem.listCallsOpened cameraEnabled: !mainItem.isFullScreen - onCameraEnabledChanged: console.log(cameraEnabled) } } RowLayout{ @@ -332,7 +331,6 @@ Rectangle { ? activeSpeakerComponent : gridComponent : activeSpeakerComponent - onSourceComponentChanged: console.log("conferenceLayout: "+mainItem.callModel.conferenceVideoLayout + " => " +sourceComponent) active: mainItem.callModel && !mainItem.isFullScreen } Rectangle{ diff --git a/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml b/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml index 9ddc525c9..8d6626699 100644 --- a/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml +++ b/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml @@ -29,7 +29,7 @@ Item { property int participantCount: callModel.isConference ? allDevices.count + 1 : 2 // +me. allDevices==0 if !conference - onParticipantCountChanged: {console.log("Conf count: " +participantCount); Qt.callLater(allDevices.updateCurrentDevice)} + onParticipantCountChanged: {Qt.callLater(allDevices.updateCurrentDevice)} property ParticipantDeviceProxyModel participantDevices : ParticipantDeviceProxyModel { id: allDevices @@ -78,13 +78,8 @@ Item { || currentDevice && !currentDevice.videoEnabled isVideoEnabled: !deactivateCamera - onDeactivateCameraChanged: console.log("deactivateCamera? "+deactivateCamera) isPreview: !preview.visible && mainItem.participantCount == 1 onIsPreviewChanged: { - console.log("ispreview ? " +isPreview + "visible?"+preview.visible +", pCount="+mainItem.participantCount - +" / ready?" +mainItem.isConferenceReady - +" / allCount=" +allDevices.count - ) if( isPreview){ currentDevice = allDevices.me cameraView.resetCamera() @@ -93,7 +88,6 @@ Item { cameraView.resetCamera() } isCameraFromDevice: isPreview - onCurrentDeviceChanged: console.log("CurrentDevice: "+currentDevice) isPaused: isPreview && callModel.pausedByUser ? false : callModel.isConference @@ -101,19 +95,12 @@ Item { (currentDevice && currentDevice.isPaused) : callModel && !callModel.pausedByUser && (callModel.status === CallModel.CallStatusPaused) - onIsPausedChanged: console.log("ispaused ? " +isPaused + " = " +callModel.pausedByUser + " / " + (currentDevice ? currentDevice.isPaused : 'noDevice') +" / " +callModel.isConference + " / " +callModel.status ) quickTransition: true showCloseButton: false showActiveSpeakerOverlay: false // This is an active speaker. We don't need to show the indicator. showCustomButton: false avatarStickerBackgroundColor: isPreview ? IncallStyle.container.avatar.stickerPreviewBackgroundColor : IncallStyle.container.avatar.stickerBackgroundColor avatarBackgroundColor: IncallStyle.container.avatar.backgroundColor - Component.onCompleted: console.log("Completed: "+isPaused + " = " +callModel.pausedByUser + " / " + (currentDevice ? currentDevice.isPaused : 'noDevice') - +" isPreview?" +isPreview - +" / Video?" +(currentDevice ? currentDevice.videoEnabled : "NoDevice") + "-"+(callModel ? callModel.videoEnabled : "NoCall") - +" / Camera?" +(currentDevice ? currentDevice.cameraEnabled : "NoDevice") + "-"+(callModel ? callModel.cameraEnabled : "NoCall") - +" / Deactivated?"+deactivateCamera - +" / " +callModel.isConference + " / " +callModel.status) } Item{// Need an item to not override Sticker internal states. States are needed for changing anchors. id: preview @@ -125,14 +112,8 @@ Item { height: visible ? miniViews.cellHeight : 0 width: 16 * height / 9 - //property bool showMe : !(callModel && callModel.pausedByUser) && (callModel.isConference || callModel.localVideoEnabled) - visible: mainItem.isConferenceReady && allDevices.count >= 1 || (!callModel.isConference && mainItem.callModel.cameraEnabled)// use videoEnabled if we want to show the preview sticker - - onVisibleChanged: console.log("visible? "+visible + " / video?" +(callModel ? callModel.videoEnabled : "NoCall") - + " / camera?" +(callModel ? callModel.cameraEnabled : "NoCall") - ) Loader{ anchors.fill: parent @@ -141,11 +122,6 @@ Item { Sticker{ id: previewSticker deactivateCamera: !mainItem.callModel || callModel.pausedByUser || !mainItem.callModel.cameraEnabled - //|| (!callModel.isConference && !mainItem.callModel.videoEnabled) - //|| (callModel.isConference && !mainItem.callModel.cameraEnabled) - - //|| ( (callModel.isConference && !mainItem.callModel.cameraEnabled) || (!callModel.isConference && !mainItem.callModel.localVideoEnabled) ) - onDeactivateCameraChanged: console.log(deactivateCamera + " = " +mainItem.callModel +" / " +mainItem.callModel.localVideoEnabled + " / " +mainItem.callModel.cameraEnabled) currentDevice: allDevices.me isPreview: true callModel: mainItem.callModel @@ -175,10 +151,6 @@ Item { property int cellHeight: 150 anchors.fill: parent model : mainItem.callModel.isConference && mainItem.participantDevices.count > 1 ? mainItem.participantDevices : [] - onModelChanged: { - console.log( mainItem.callModel.isConference+"/"+mainItem.callModel.localVideoEnabled + "/" +mainItem.callModel.cameraEnabled + " / " +count) - - } spacing: 15 verticalLayoutDirection: ListView.BottomToTop fitCacheToContent: false @@ -210,7 +182,6 @@ Item { callModel: modelData.isPreview ? null : mainItem.callModel isCameraFromDevice: mainItem.callModel.isConference isPaused: currentDevice && currentDevice.isPaused - onIsPausedChanged: console.log("paused:"+isPaused) showCloseButton: false showCustomButton: false showAvatarBorder: true diff --git a/linphone-app/ui/views/App/Calls/IncallFullscreen.qml b/linphone-app/ui/views/App/Calls/IncallFullscreen.qml index 9d6b3b093..be64e5069 100644 --- a/linphone-app/ui/views/App/Calls/IncallFullscreen.qml +++ b/linphone-app/ui/views/App/Calls/IncallFullscreen.qml @@ -277,7 +277,6 @@ Window { Layout.leftMargin: window.hideButtons ? 15 : 70 Layout.rightMargin: rightMenu.visible ? 15 : 70 callModel: conference.callModel - onWidthChanged: console.log("Width: "+width) } } Component{ diff --git a/linphone-app/ui/views/App/Main/Contacts.qml b/linphone-app/ui/views/App/Main/Contacts.qml index aa16fa0a0..136f005dd 100644 --- a/linphone-app/ui/views/App/Main/Contacts.qml +++ b/linphone-app/ui/views/App/Main/Contacts.qml @@ -205,7 +205,7 @@ ColumnLayout { Connections{ target: lastChatRoom onStateChanged: if(state === 1) { - console.log("Load conversation from contacts") + console.debug("Load conversation from contacts") window.setView('Conversation', { chatRoomModel: lastChatRoom }) diff --git a/linphone-app/ui/views/App/Main/MainWindow.qml b/linphone-app/ui/views/App/Main/MainWindow.qml index a8d6bb9e5..e84ded5f2 100644 --- a/linphone-app/ui/views/App/Main/MainWindow.qml +++ b/linphone-app/ui/views/App/Main/MainWindow.qml @@ -364,7 +364,7 @@ ApplicationWindow { onEntrySelected:{ if( entry ) { if( entry.selected){ - console.log("Load conversation from entry selected on timeline") + console.debug("Load conversation from entry selected on timeline") window.setView('Conversation', { chatRoomModel:entry.chatRoomModel })