Commit d21c6bfe authored by Ronan Abhamon's avatar Ronan Abhamon

fix(ui/views/App/Main/MainWindow): display correctly auto answer status

parent f514b2d6
...@@ -32,12 +32,12 @@ using namespace std; ...@@ -32,12 +32,12 @@ using namespace std;
const string SettingsModel::UI_SECTION("ui"); const string SettingsModel::UI_SECTION("ui");
SettingsModel::SettingsModel (QObject *parent) : QObject(parent) { SettingsModel::SettingsModel (QObject *parent) : QObject(parent) {
// TODO: Uncomment when `getConfig` will be available. m_config = CoreManager::getInstance()->getCore()->getConfig();
// m_config = CoreManager::getInstance()->getCore()->getConfig();
} }
// -----------------------------------------------------------------------------
bool SettingsModel::getAutoAnswerStatus () const { bool SettingsModel::getAutoAnswerStatus () const {
return true; // TODO: See above.
return !!m_config->getInt(UI_SECTION, "auto_answer", 0); return !!m_config->getInt(UI_SECTION, "auto_answer", 0);
} }
...@@ -46,6 +46,8 @@ void SettingsModel::setAutoAnswerStatus (bool status) { ...@@ -46,6 +46,8 @@ void SettingsModel::setAutoAnswerStatus (bool status) {
emit autoAnswerStatusChanged(status); emit autoAnswerStatusChanged(status);
} }
// -----------------------------------------------------------------------------
QString SettingsModel::getFileTransferUrl () const { QString SettingsModel::getFileTransferUrl () const {
return ::Utils::linphoneStringToQString( return ::Utils::linphoneStringToQString(
CoreManager::getInstance()->getCore()->getFileTransferServer() CoreManager::getInstance()->getCore()->getFileTransferServer()
......
...@@ -183,6 +183,7 @@ Controls1.ApplicationWindow { ...@@ -183,6 +183,7 @@ Controls1.ApplicationWindow {
color: MainWindowStyle.autoAnswerStatus.text.color color: MainWindowStyle.autoAnswerStatus.text.color
font.pointSize: MainWindowStyle.autoAnswerStatus.text.fontSize font.pointSize: MainWindowStyle.autoAnswerStatus.text.fontSize
text: qsTr('autoAnswerStatus') text: qsTr('autoAnswerStatus')
visible: SettingsModel.autoAnswerStatus
width: parent.width width: parent.width
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment