Skip to content

Commit f09e5b1

Browse files
committedOct 2, 2017
[auth] Renamed setters to better follow Qt5 conventions
1 parent 6378042 commit f09e5b1

File tree

6 files changed

+16
-17
lines changed

6 files changed

+16
-17
lines changed
 

‎python/gui/auth/qgsauthsettingswidget.sip

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,16 @@ class QgsAuthSettingsWidget : QWidget
117117
\param enabled
118118
%End
119119

120-
void setStoreUsername( bool checked );
120+
void setStoreUsernameChecked( bool checked );
121121
%Docstring
122-
setStoreUsername check the "Store" checkbox for the username
122+
setStoreUsernameChecked check the "Store" checkbox for the username
123123
\param checked
124124
.. seealso:: showStoreCheckboxes
125125
%End
126126

127-
void setStorePassword( bool checked );
127+
void setStorePasswordChecked( bool checked );
128128
%Docstring
129-
updateStorePasswordcheck the "Store" checkbox for the password
129+
setStorePasswordCheched check the "Store" checkbox for the password
130130
\param checked
131131
.. seealso:: showStoreCheckboxes
132132
%End

‎src/gui/auth/qgsauthsettingswidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ void QgsAuthSettingsWidget::showStoreCheckboxes( bool enabled )
120120
}
121121
}
122122

123-
void QgsAuthSettingsWidget::setStoreUsername( bool checked )
123+
void QgsAuthSettingsWidget::setStoreUsernameChecked( bool checked )
124124
{
125125
cbStoreUsername->setChecked( checked );
126126
}
127127

128-
void QgsAuthSettingsWidget::setStorePassword( bool checked )
128+
void QgsAuthSettingsWidget::setStorePasswordChecked( bool checked )
129129
{
130130
cbStorePassword->setChecked( checked );
131131
}

‎src/gui/auth/qgsauthsettingswidget.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,18 +126,18 @@ class GUI_EXPORT QgsAuthSettingsWidget : public QWidget, private Ui::QgsAuthSett
126126
void showStoreCheckboxes( bool enabled );
127127

128128
/**
129-
* \brief setStoreUsername check the "Store" checkbox for the username
129+
* \brief setStoreUsernameChecked check the "Store" checkbox for the username
130130
* \param checked
131131
* \see showStoreCheckboxes
132132
*/
133-
void setStoreUsername( bool checked );
133+
void setStoreUsernameChecked( bool checked );
134134

135135
/**
136-
* \brief updateStorePasswordcheck the "Store" checkbox for the password
136+
* \brief setStorePasswordCheched check the "Store" checkbox for the password
137137
* \param checked
138138
* \see showStoreCheckboxes
139139
*/
140-
void setStorePassword( bool checked );
140+
void setStorePasswordChecked( bool checked );
141141

142142
/**
143143
* \brief storePassword

‎src/providers/db2/qgsdb2newconnection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ QgsDb2NewConnection::QgsDb2NewConnection( QWidget *parent, const QString &connNa
5353
if ( settings.value( key + "/saveUsername" ).toString() == QLatin1String( "true" ) )
5454
{
5555
mAuthSettings->setUsername( settings.value( key + "/username" ).toString() );
56-
mAuthSettings->setStoreUsername( true );
56+
mAuthSettings->setStoreUsernameChecked( true );
5757
}
5858

5959
if ( settings.value( key + "/savePassword" ).toString() == QLatin1String( "true" ) )
6060
{
6161
mAuthSettings->setPassword( settings.value( key + "/password" ).toString() );
62-
mAuthSettings->setStorePassword( true );
62+
mAuthSettings->setStorePasswordChecked( true );
6363
}
6464

6565
QString authcfg = settings.value( key + "/authcfg" ).toString();

‎src/providers/db2/qgsdb2newconnection.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "ui_qgsdb2newconnectionbase.h"
2121
#include "qgsguiutils.h"
2222
#include "qgshelp.h"
23-
#include "qgsauthconfigselect.h"
2423

2524
/** \class QgsDb2NewConnection
2625
* \brief Dialog to allow the user to configure and save connection

‎tests/src/python/test_authsettingswidget.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,18 +178,18 @@ def test_storeCheckBoxes(self):
178178
self.assertFalse(w.storeUsernameIsChecked())
179179

180180
w = QgsAuthSettingsWidget()
181-
w.setStorePassword(True)
181+
w.setStorePasswordChecked(True)
182182
self.assertTrue(w.storePasswordIsChecked())
183183
self.assertFalse(w.storeUsernameIsChecked())
184184

185185
w = QgsAuthSettingsWidget()
186-
w.setStoreUsername(True)
186+
w.setStoreUsernameChecked(True)
187187
self.assertFalse(w.storePasswordIsChecked())
188188
self.assertTrue(w.storeUsernameIsChecked())
189189

190190
w = QgsAuthSettingsWidget()
191-
w.setStoreUsername(True)
192-
w.setStorePassword(True)
191+
w.setStoreUsernameChecked(True)
192+
w.setStorePasswordChecked(True)
193193
self.assertTrue(w.storePasswordIsChecked())
194194
self.assertTrue(w.storeUsernameIsChecked())
195195

0 commit comments

Comments
 (0)
Please sign in to comment.