Skip to content
Snippets Groups Projects
Commit 24518cd9 authored by Ming Rui Zhang's avatar Ming Rui Zhang
Browse files

settings: only receive debug log when enabled

Change-Id: I2f44f543e893507be205e6cf1efb0219b76d5418
parent 0a946c76
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......@@ -235,5 +235,7 @@ Q_SIGNALS:
private:
AppSettingsManager* settingsManager_;
QMetaObject::Connection debugMessageReceivedConnection_;
};
Q_DECLARE_METATYPE(SettingsAdapter*)
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment