Commit 318b6c9d authored by Tobias Hunger's avatar Tobias Hunger
Browse files

JSON Wizards: Add "isPassword" property to LineEdits

Change-Id: I5539c66c162345bda052546fa02cc69d4bd55f9a
Reviewed-by: Riitta-Leena Miettinen's avatarLeena Miettinen <>
parent 0b6c2422
......@@ -824,6 +824,9 @@
For example, to turn the first character in the line edit to upper
\li \c isPassword is a boolean value that specifies that the line edit
contains a password, which will be masked.
\section2 Path Chooser
......@@ -404,6 +404,7 @@ bool LineEditField::parseData(const QVariant &data, QString *errorMessage)
QVariantMap tmp = data.toMap();
m_isPassword = tmp.value("isPassword", false).toBool();
m_defaultText = JsonWizardFactory::localizedString(tmp.value(QLatin1String("trText")).toString());
m_disabledText = JsonWizardFactory::localizedString(tmp.value(QLatin1String("trDisabledText")).toString());
m_placeholderText = JsonWizardFactory::localizedString(tmp.value(QLatin1String("trPlaceholder")).toString());
......@@ -439,6 +440,8 @@ QWidget *LineEditField::createWidget(const QString &displayName, JsonFieldPage *
if (!m_historyId.isEmpty())
w->setHistoryCompleter(m_historyId, m_restoreLastHistoryItem);
w->setEchoMode(m_isPassword ? QLineEdit::Password : QLineEdit::Normal);
return w;
......@@ -105,6 +105,7 @@ private:
bool m_isModified;
bool m_isValidating;
bool m_restoreLastHistoryItem;
bool m_isPassword;
QString m_placeholderText;
QString m_defaultText;
QString m_disabledText;
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