1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-07-13 20:15:23 +02:00

settings: only receive debug log when enabled

Change-Id: I2f44f543e893507be205e6cf1efb0219b76d5418
This commit is contained in:
Ming Rui Zhang 2021-05-31 15:50:48 -04:00
parent 0a946c767d
commit 24518cd91d
4 changed files with 15 additions and 9 deletions

View file

@ -339,7 +339,7 @@ Item {
property string logsViewCancel: qsTr("Cancel")
property string logsViewCopied: qsTr("Copied to clipboard!")
property string logsViewDisplay: qsTr("Receive Logs")
// ImportFromBackupPage
property string archive: qsTr("Archive")
property string openFile: qsTr("Open file")

View file

@ -26,13 +26,7 @@ SettingsAdapter::SettingsAdapter(AppSettingsManager* settingsManager,
QObject* parent)
: QmlAdapterBase(instance, parent)
, settingsManager_(settingsManager)
{
QObject::connect(&lrcInstance_->behaviorController(),
&lrc::api::BehaviorController::debugMessageReceived,
this,
&SettingsAdapter::debugMessageReceived,
Qt::ConnectionType::UniqueConnection);
}
{}
QString
SettingsAdapter::getDir_Document()
@ -1110,5 +1104,14 @@ SettingsAdapter::isAllModeratorsEnabled(const QString& accountId)
void
SettingsAdapter::monitor(const bool& continuous)
{
if (continuous)
debugMessageReceivedConnection_
= QObject::connect(&lrcInstance_->behaviorController(),
&lrc::api::BehaviorController::debugMessageReceived,
this,
&SettingsAdapter::debugMessageReceived,
Qt::ConnectionType::UniqueConnection);
else
disconnect(debugMessageReceivedConnection_);
lrcInstance_->monitor(continuous);
}

View file

@ -235,5 +235,7 @@ Q_SIGNALS:
private:
AppSettingsManager* settingsManager_;
QMetaObject::Connection debugMessageReceivedConnection_;
};
Q_DECLARE_METATYPE(SettingsAdapter*)

View file

@ -84,6 +84,7 @@ Rectangle {
Layout.rightMargin: JamiTheme.preferredMarginSize
Layout.bottomMargin: JamiTheme.preferredMarginSize
itemWidth: preferredColumnWidth
visible: Qt.platform.os == "windows" ? false : true
}
// update setting panel
@ -92,7 +93,7 @@ Rectangle {
Layout.leftMargin: JamiTheme.preferredMarginSize
Layout.rightMargin: JamiTheme.preferredMarginSize
Layout.bottomMargin: JamiTheme.preferredMarginSize
visible: Qt.platform.os == "windows"? true : false
visible: Qt.platform.os == "windows" ? true : false
}
}
}