Skip to content

Commit ec5a891

Browse files
committedApr 17, 2017
use QgsPasswordLineEdit in the master password dialog
1 parent e73a52b commit ec5a891

File tree

3 files changed

+5
-27
lines changed

3 files changed

+5
-27
lines changed
 

‎src/gui/qgscredentialdialog.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ void QgsCredentialDialog::requestCredentialsMasterPassword( QString *password, b
208208

209209
// don't leave master password in singleton's text field, or the ability to show it
210210
leMasterPass->clear();
211-
chkMasterPassShow->setChecked( false );
212211
leMasterPassVerify->clear();
213212

214213
chkbxEraseAuthDb->setChecked( false );
@@ -226,12 +225,6 @@ void QgsCredentialDialog::requestCredentialsMasterPassword( QString *password, b
226225
}
227226
}
228227

229-
void QgsCredentialDialog::on_chkMasterPassShow_stateChanged( int state )
230-
{
231-
leMasterPass->setEchoMode( ( state > 0 ) ? QLineEdit::Normal : QLineEdit::Password );
232-
leMasterPassVerify->setEchoMode( ( state > 0 ) ? QLineEdit::Normal : QLineEdit::Password );
233-
}
234-
235228
void QgsCredentialDialog::on_leMasterPass_textChanged( const QString &pass )
236229
{
237230
leMasterPass->setStyleSheet( QLatin1String( "" ) );

‎src/gui/qgscredentialdialog.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class GUI_EXPORT QgsCredentialDialog : public QDialog, public QgsCredentials, pr
4848

4949
void requestCredentialsMasterPassword( QString *password, bool stored, bool *ok );
5050

51-
void on_chkMasterPassShow_stateChanged( int state );
5251
void on_leMasterPass_textChanged( const QString &pass );
5352
void on_leMasterPassVerify_textChanged( const QString &pass );
5453
void on_chkbxEraseAuthDb_toggled( bool checked );

‎src/ui/qgscredentialdialog.ui

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -121,29 +121,16 @@
121121
</widget>
122122
</item>
123123
<item>
124-
<layout class="QGridLayout" name="gridLayout">
125-
<item row="0" column="0">
126-
<widget class="QLineEdit" name="leMasterPass">
124+
<layout class="QVBoxLayout" name="verticalLayout_2">
125+
<item>
126+
<widget class="QgsPasswordLineEdit" name="leMasterPass">
127127
<property name="echoMode">
128128
<enum>QLineEdit::Password</enum>
129129
</property>
130130
</widget>
131131
</item>
132-
<item row="0" column="1">
133-
<widget class="QCheckBox" name="chkMasterPassShow">
134-
<property name="sizePolicy">
135-
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
136-
<horstretch>0</horstretch>
137-
<verstretch>0</verstretch>
138-
</sizepolicy>
139-
</property>
140-
<property name="text">
141-
<string>Show</string>
142-
</property>
143-
</widget>
144-
</item>
145-
<item row="1" column="0">
146-
<widget class="QLineEdit" name="leMasterPassVerify">
132+
<item>
133+
<widget class="QgsPasswordLineEdit" name="leMasterPassVerify">
147134
<property name="echoMode">
148135
<enum>QLineEdit::Password</enum>
149136
</property>
@@ -239,7 +226,6 @@ font-style: italic;
239226
<tabstop>lePassword</tabstop>
240227
<tabstop>leMasterPass</tabstop>
241228
<tabstop>leMasterPassVerify</tabstop>
242-
<tabstop>chkMasterPassShow</tabstop>
243229
<tabstop>chkbxEraseAuthDb</tabstop>
244230
</tabstops>
245231
<resources/>

0 commit comments

Comments
 (0)
Please sign in to comment.