Commit cf547ff6 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/Main/AuthenticationRequest): display realm

parent fc9fcc19
...@@ -170,6 +170,10 @@ ...@@ -170,6 +170,10 @@
<source>userIdLabel</source> <source>userIdLabel</source>
<translation>User ID (optional)</translation> <translation>User ID (optional)</translation>
</message> </message>
<message>
<source>realmLabel</source>
<translation>Realm</translation>
</message>
</context> </context>
<context> <context>
<name>Calls</name> <name>Calls</name>
......
...@@ -170,6 +170,10 @@ ...@@ -170,6 +170,10 @@
<source>userIdLabel</source> <source>userIdLabel</source>
<translation>ID utilisateur (optionnel)</translation> <translation>ID utilisateur (optionnel)</translation>
</message> </message>
<message>
<source>realmLabel</source>
<translation>Realm</translation>
</message>
</context> </context>
<context> <context>
<name>Calls</name> <name>Calls</name>
......
...@@ -39,6 +39,7 @@ Authentication::Authentication (QObject *parent) : QObject(parent) { ...@@ -39,6 +39,7 @@ Authentication::Authentication (QObject *parent) : QObject(parent) {
void Authentication::handleAuthenticationRequested (const shared_ptr<linphone::AuthInfo> &authInfo) { void Authentication::handleAuthenticationRequested (const shared_ptr<linphone::AuthInfo> &authInfo) {
emit authenticationRequested( emit authenticationRequested(
QVariant::fromValue(authInfo), QVariant::fromValue(authInfo),
::Utils::linphoneStringToQString(authInfo->getRealm()),
QStringLiteral("%1@%2").arg( QStringLiteral("%1@%2").arg(
::Utils::linphoneStringToQString(authInfo->getUsername()) ::Utils::linphoneStringToQString(authInfo->getUsername())
).arg( ).arg(
......
...@@ -37,7 +37,7 @@ public: ...@@ -37,7 +37,7 @@ public:
~Authentication () = default; ~Authentication () = default;
signals: signals:
void authenticationRequested (const QVariant &authInfo, const QString &sipAddress, const QString &userId); void authenticationRequested (const QVariant &authInfo, const QString &realm, const QString &sipAddress, const QString &userId);
private: private:
void handleAuthenticationRequested (const std::shared_ptr<linphone::AuthInfo> &authInfo); void handleAuthenticationRequested (const std::shared_ptr<linphone::AuthInfo> &authInfo);
......
...@@ -11,6 +11,7 @@ import 'AuthenticationRequest.js' as Logic ...@@ -11,6 +11,7 @@ import 'AuthenticationRequest.js' as Logic
DialogPlus { DialogPlus {
id: dialog id: dialog
property alias realm: realm.text
property alias sipAddress: identity.text property alias sipAddress: identity.text
property alias userId: userId.text property alias userId: userId.text
...@@ -63,6 +64,18 @@ DialogPlus { ...@@ -63,6 +64,18 @@ DialogPlus {
} }
} }
FormLine {
FormGroup {
label: qsTr('realmLabel')
TextField {
id: realm
readOnly: true
}
}
}
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('userIdLabel') label: qsTr('userIdLabel')
......
...@@ -88,9 +88,10 @@ function updateSelectedEntry (view, props) { ...@@ -88,9 +88,10 @@ function updateSelectedEntry (view, props) {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
function handleAuthenticationRequested (authInfo, sipAddress, userId) { function handleAuthenticationRequested (authInfo, realm, sipAddress, userId) {
window.attachVirtualWindow(Qt.resolvedUrl('AuthenticationRequest.qml'), { window.attachVirtualWindow(Qt.resolvedUrl('AuthenticationRequest.qml'), {
authInfo: authInfo, authInfo: authInfo,
realm: realm,
sipAddress: sipAddress, sipAddress: sipAddress,
userId: userId userId: userId
}) })
......
...@@ -87,7 +87,7 @@ ApplicationWindow { ...@@ -87,7 +87,7 @@ ApplicationWindow {
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
Authentication { Authentication {
onAuthenticationRequested: Logic.handleAuthenticationRequested(authInfo, sipAddress, userId) onAuthenticationRequested: Logic.handleAuthenticationRequested(authInfo, realm, sipAddress, userId)
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
......
...@@ -4,7 +4,7 @@ import QtQuick 2.7 ...@@ -4,7 +4,7 @@ import QtQuick 2.7
// ============================================================================= // =============================================================================
QtObject { QtObject {
property int height: 366 property int height: 416
property int leftMargin: 35 property int leftMargin: 35
property int rightMargin: 35 property int rightMargin: 35
property int width: 480 property int width: 480
......
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