Skip to content

Commit

Permalink
use QgsPasswordLineEdit in the master password dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Apr 17, 2017
1 parent e73a52b commit ec5a891
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
7 changes: 0 additions & 7 deletions src/gui/qgscredentialdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ void QgsCredentialDialog::requestCredentialsMasterPassword( QString *password, b

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

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

void QgsCredentialDialog::on_chkMasterPassShow_stateChanged( int state )
{
leMasterPass->setEchoMode( ( state > 0 ) ? QLineEdit::Normal : QLineEdit::Password );
leMasterPassVerify->setEchoMode( ( state > 0 ) ? QLineEdit::Normal : QLineEdit::Password );
}

void QgsCredentialDialog::on_leMasterPass_textChanged( const QString &pass )
{
leMasterPass->setStyleSheet( QLatin1String( "" ) );
Expand Down
1 change: 0 additions & 1 deletion src/gui/qgscredentialdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class GUI_EXPORT QgsCredentialDialog : public QDialog, public QgsCredentials, pr

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

void on_chkMasterPassShow_stateChanged( int state );
void on_leMasterPass_textChanged( const QString &pass );
void on_leMasterPassVerify_textChanged( const QString &pass );
void on_chkbxEraseAuthDb_toggled( bool checked );
Expand Down
24 changes: 5 additions & 19 deletions src/ui/qgscredentialdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -121,29 +121,16 @@
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLineEdit" name="leMasterPass">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QgsPasswordLineEdit" name="leMasterPass">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="chkMasterPassShow">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Show</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="leMasterPassVerify">
<item>
<widget class="QgsPasswordLineEdit" name="leMasterPassVerify">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
Expand Down Expand Up @@ -239,7 +226,6 @@ font-style: italic;
<tabstop>lePassword</tabstop>
<tabstop>leMasterPass</tabstop>
<tabstop>leMasterPassVerify</tabstop>
<tabstop>chkMasterPassShow</tabstop>
<tabstop>chkbxEraseAuthDb</tabstop>
</tabstops>
<resources/>
Expand Down

0 comments on commit ec5a891

Please sign in to comment.