Skip to content

Commit feeec8e

Browse files
committedOct 2, 2017
[auth] Use explicit signal connections
1 parent 11eb9cf commit feeec8e

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed
 

‎python/gui/auth/qgsauthsettingswidget.sip

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,10 @@ class QgsAuthSettingsWidget : QWidget
8686

8787
public slots:
8888

89-
bool on_btnConvertToEncrypted_clicked( );
89+
bool convertToEncrypted( );
9090
%Docstring
91-
on_btnConvertToEncrypted_clicked create a Basic authentication configuration from
91+
convertToEncrypted is called when the convert to encrypted button is
92+
clicked and it creates a Basic authentication configuration from
9293
username and password specified in the Basic tab
9394
:return: return true on success
9495
:rtype: bool

‎src/gui/auth/qgsauthsettingswidget.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ QgsAuthSettingsWidget::QgsAuthSettingsWidget( QWidget *parent,
4242
{
4343
tabAuth->setCurrentIndex( tabAuth->indexOf( tabBasic ) );
4444
}
45+
connect( btnConvertToEncrypted, &QPushButton::clicked, this, &QgsAuthSettingsWidget::convertToEncrypted );
4546
updateConvertBtnState();
4647
}
4748

@@ -80,7 +81,7 @@ bool QgsAuthSettingsWidget::btnConvertToEncryptedIsEnabled() const
8081
return btnConvertToEncrypted->isEnabled( );
8182
}
8283

83-
bool QgsAuthSettingsWidget::on_btnConvertToEncrypted_clicked()
84+
bool QgsAuthSettingsWidget::convertToEncrypted( )
8485
{
8586
tabAuth->setCurrentIndex( tabAuth->indexOf( tabConfigurations ) );
8687
QgsAuthMethodConfig config( QStringLiteral( "Basic" ) );

‎src/gui/auth/qgsauthsettingswidget.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,12 @@ class GUI_EXPORT QgsAuthSettingsWidget : public QWidget, private Ui::QgsAuthSett
9595
public slots:
9696

9797
/**
98-
* \brief on_btnConvertToEncrypted_clicked create a Basic authentication configuration from
98+
* \brief convertToEncrypted is called when the convert to encrypted button is
99+
* clicked and it creates a Basic authentication configuration from
99100
* username and password specified in the Basic tab
100101
* \return return true on success
101102
*/
102-
bool on_btnConvertToEncrypted_clicked( );
103+
bool convertToEncrypted( );
103104

104105
/**
105106
* \brief on_txtUserName_textChanged set convert button state

‎tests/src/python/test_authsettingswidget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def testConvertToEncrypted(self):
132132
self.assertEqual(w.configId(), '')
133133
self.assertEqual(w.currentTabIndex(), 1)
134134
self.assertTrue(w.btnConvertToEncryptedIsEnabled())
135-
self.assertTrue(w.on_btnConvertToEncrypted_clicked())
135+
self.assertTrue(w.convertToEncrypted())
136136
self.assertNotEqual(w.configId(), '')
137137
self.assertEqual(w.username(), '')
138138
self.assertEqual(w.password(), '')

0 commit comments

Comments
 (0)
Please sign in to comment.