Skip to content
Permalink
Browse files
use QgsPasswordLineEdit in the master password dialog
  • Loading branch information
alexbruy committed Apr 17, 2017
1 parent e73a52b commit ec5a8911a80054f2e329588701b43f71024f6edb
Showing with 5 additions and 27 deletions.
  1. +0 −7 src/gui/qgscredentialdialog.cpp
  2. +0 −1 src/gui/qgscredentialdialog.h
  3. +5 −19 src/ui/qgscredentialdialog.ui
@@ -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 );
@@ -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( "" ) );
@@ -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 );
@@ -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>
@@ -239,7 +226,6 @@ font-style: italic;
<tabstop>lePassword</tabstop>
<tabstop>leMasterPass</tabstop>
<tabstop>leMasterPassVerify</tabstop>
<tabstop>chkMasterPassShow</tabstop>
<tabstop>chkbxEraseAuthDb</tabstop>
</tabstops>
<resources/>

0 comments on commit ec5a891

Please sign in to comment.