Skip to content
Permalink
Browse files

update dialogs to use new password lineedit widget

  • Loading branch information
alexbruy committed Mar 14, 2017
1 parent f6e4c2b commit ff2d1ad154a5b8e8fdd953de0c92c1e8d3e468a5
@@ -80,16 +80,6 @@ void QgsMasterPasswordResetDialog::on_leMasterPassNew_textChanged( const QString
validatePasswords();
}

void QgsMasterPasswordResetDialog::on_chkPassShowCurrent_stateChanged( int state )
{
leMasterPassCurrent->setEchoMode( ( state > 0 ) ? QLineEdit::Normal : QLineEdit::Password );
}

void QgsMasterPasswordResetDialog::on_chkPassShowNew_stateChanged( int state )
{
leMasterPassNew->setEchoMode( ( state > 0 ) ? QLineEdit::Normal : QLineEdit::Password );
}

void QgsMasterPasswordResetDialog::validatePasswords()
{
QString ss1 = mPassCurOk ? QgsAuthGuiUtils::greenTextStyleSheet( QStringLiteral( "QLineEdit" ) )
@@ -45,9 +45,6 @@ class GUI_EXPORT QgsMasterPasswordResetDialog : public QDialog, private Ui::QgsM
void on_leMasterPassCurrent_textChanged( const QString &pass );
void on_leMasterPassNew_textChanged( const QString &pass );

void on_chkPassShowCurrent_stateChanged( int state );
void on_chkPassShowNew_stateChanged( int state );

private:
void validatePasswords();

@@ -29,34 +29,14 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>6</number>
<widget class="QgsPasswordLineEdit" name="leMasterPassCurrent">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
<item>
<widget class="QLineEdit" name="leMasterPassCurrent">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
<property name="placeholderText">
<string>Required</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkPassShowCurrent">
<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>
</layout>
<property name="placeholderText">
<string>Required</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_7">
@@ -73,34 +53,14 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>6</number>
<widget class="QgsPasswordLineEdit" name="leMasterPassNew">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
<item>
<widget class="QLineEdit" name="leMasterPassNew">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
<property name="placeholderText">
<string>Required</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkPassShowNew">
<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>
</layout>
<property name="placeholderText">
<string>Required</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
@@ -170,11 +130,16 @@ and re-encrypted using new password</string>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsPasswordLineEdit</class>
<extends>QLineEdit</extends>
<header>qgspasswordlineedit.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>leMasterPassCurrent</tabstop>
<tabstop>chkPassShowCurrent</tabstop>
<tabstop>leMasterPassNew</tabstop>
<tabstop>chkPassShowNew</tabstop>
<tabstop>chkKeepBackup</tabstop>
</tabstops>
<resources/>
@@ -81,7 +81,7 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lePassword">
<widget class="QgsPasswordLineEdit" name="lePassword">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
@@ -220,6 +220,13 @@ font-style: italic;
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsPasswordLineEdit</class>
<extends>QLineEdit</extends>
<header>qgspasswordlineedit.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>leUsername</tabstop>
<tabstop>lePassword</tabstop>
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>445</width>
<height>386</height>
<height>399</height>
</rect>
</property>
<property name="windowTitle">
@@ -120,7 +120,16 @@
<string>Authentication</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item row="0" column="0">
@@ -134,7 +143,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="txtPassword">
<widget class="QgsPasswordLineEdit" name="txtPassword">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
@@ -189,6 +198,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsPasswordLineEdit</class>
<extends>QLineEdit</extends>
<header>qgspasswordlineedit.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>txtName</tabstop>
<tabstop>txtService</tabstop>
@@ -154,7 +154,7 @@
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="txtPassword">
<widget class="QgsPasswordLineEdit" name="txtPassword">
<property name="enabled">
<bool>false</bool>
</property>
@@ -270,6 +270,11 @@ Untick save if you don't wish to be the case.</string>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QgsPasswordLineEdit</class>
<extends>QLineEdit</extends>
<header>qgspasswordlineedit.h</header>
</customwidget>
<customwidget>
<class>QgsMessageBar</class>
<extends>QWidget</extends>
@@ -92,7 +92,7 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="txtPassword">
<widget class="QgsPasswordLineEdit" name="txtPassword">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
@@ -262,6 +262,13 @@
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QgsPasswordLineEdit</class>
<extends>QLineEdit</extends>
<header>qgspasswordlineedit.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>txtName</tabstop>
<tabstop>txtUrl</tabstop>
@@ -26,7 +26,16 @@
<bool>true</bool>
</property>
<layout class="QGridLayout">
<property name="margin">
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<property name="spacing">
@@ -135,7 +144,7 @@
</widget>
</item>
<item row="6" column="1" colspan="2">
<widget class="QLineEdit" name="txtPassword">
<widget class="QgsPasswordLineEdit" name="txtPassword">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
@@ -168,6 +177,13 @@
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QgsPasswordLineEdit</class>
<extends>QLineEdit</extends>
<header>qgspasswordlineedit.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>cmbDatabaseTypes</tabstop>
<tabstop>txtName</tabstop>

0 comments on commit ff2d1ad

Please sign in to comment.
You can’t perform that action at this time.