From f1de8362165c454e1b66e5c4d6389c7dd0459643 Mon Sep 17 00:00:00 2001 From: Dimitris Kardarakos Date: Sat, 16 Feb 2019 11:08:43 +0200 Subject: [PATCH] Prevent password from being visible When the user enters the PIN of the SIM, the password is displayed in cleartext. This change masks visible characters with password characters. Differential Revision: https://phabricator.kde.org/D19076 --- shell/contents/views/Pin.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shell/contents/views/Pin.qml b/shell/contents/views/Pin.qml index 028d0294..40cfa516 100644 --- a/shell/contents/views/Pin.qml +++ b/shell/contents/views/Pin.qml @@ -20,6 +20,7 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.5 as Controls import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents import MeeGo.QOfono 0.2 @@ -130,12 +131,14 @@ PlasmaCore.ColorScope { RowLayout { Layout.fillWidth: true - PlasmaComponents.Label { + Controls.TextField { id: pinLabel + readOnly: true + echoMode: TextInput.Password + activeFocusOnPress: false Layout.fillWidth: true horizontalAlignment: Qt.AlignRight verticalAlignment: Qt.AlignVCenter - font.pixelSize: one.font.pixelSize } PlasmaComponents.Button { visible: pinLabel.text != ""