From c85c82528f698a3e3350e1753a24f210819a6447 Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sat, 9 Nov 2024 11:25:31 +0700 Subject: [PATCH 1/2] Fix layer login popup getting into the top / bottom system OS margins --- src/qml/qgismobileapp.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qml/qgismobileapp.qml b/src/qml/qgismobileapp.qml index 2561e49ecb..111e84ed68 100644 --- a/src/qml/qgismobileapp.qml +++ b/src/qml/qgismobileapp.qml @@ -3581,10 +3581,10 @@ ApplicationWindow { Popup { id: loginDialogPopup parent: Overlay.overlay - x: 24 - y: 24 - width: parent.width - 48 - height: parent.height - 48 + x: Theme.popupScreenEdgeMargin + y: Theme.popupScreenEdgeMargin + width: parent.width - Theme.popupScreenEdgeMargin * 2 + height: parent.height - Theme.popupScreenEdgeMargin * 2 padding: 0 modal: true closePolicy: Popup.CloseOnEscape From 9af30d140c92e68dc780adfac95ea85c99ef887c Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sat, 9 Nov 2024 17:50:06 +0700 Subject: [PATCH 2/2] Fix untranslatable authentication string, use service name when host is missing --- src/core/qfieldappauthrequesthandler.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/core/qfieldappauthrequesthandler.cpp b/src/core/qfieldappauthrequesthandler.cpp index 6fa4757dc2..d453237e40 100644 --- a/src/core/qfieldappauthrequesthandler.cpp +++ b/src/core/qfieldappauthrequesthandler.cpp @@ -223,5 +223,14 @@ QString QFieldAppAuthRequestHandler::getCredentialTitle( const QString &realm ) if ( uri.database().isEmpty() ) return realm; - return "Please enter credentials for database " + uri.database() + " at host " + uri.host() + "."; + QString title = tr( "Please enter credentials for database" ) + QStringLiteral( " %1 " ).arg( uri.database() ); + if ( !uri.host().isEmpty() ) + { + title += tr( "at host" ) + QStringLiteral( " %1 " ).arg( uri.host() ); + } + else if ( !uri.service().isEmpty() ) + { + title += tr( "at service" ) + QStringLiteral( " %1 " ).arg( uri.service() ); + } + return title; }