@@ -34,6 +34,7 @@ QgsNewOgrConnection::QgsNewOgrConnection( QWidget *parent, const QString& connTy
34
34
: QDialog( parent, fl )
35
35
{
36
36
setupUi ( this );
37
+ connect ( buttonBox, SIGNAL ( helpRequested () ),this ,SLOT ( help () ) );
37
38
// add database drivers
38
39
QStringList dbDrivers = QgsProviderRegistry::instance ()->databaseDrivers ().split ( " ;" );
39
40
for ( int i = 0 ;i < dbDrivers.count ();i++ )
@@ -105,21 +106,16 @@ void QgsNewOgrConnection::saveConnection()
105
106
settings.setValue ( baseKey + " /username" , txtUsername->text () );
106
107
settings.setValue ( baseKey + " /password" , chkStorePassword->isChecked () ? txtPassword->text () : " " );
107
108
settings.setValue ( baseKey + " /save" , chkStorePassword->isChecked () ? " true" : " false" );
108
- accept ();
109
- }
110
-
111
- void QgsNewOgrConnection::helpInfo ()
112
- {
113
- QgsContextHelp::run ( context_id );
114
109
}
115
110
116
111
/* * Autoconnected SLOTS **/
117
- void QgsNewOgrConnection::on_btnOk_clicked ()
112
+ void QgsNewOgrConnection::accept ()
118
113
{
119
114
saveConnection ();
115
+ QDialog::accept ();
120
116
}
121
117
122
- void QgsNewOgrConnection::on_btnHelp_clicked ()
118
+ void QgsNewOgrConnection::help ()
123
119
{
124
120
helpInfo ();
125
121
}
@@ -129,10 +125,11 @@ void QgsNewOgrConnection::on_btnConnect_clicked()
129
125
testConnection ();
130
126
}
131
127
132
- void QgsNewOgrConnection::on_btnCancel_clicked ()
128
+ void QgsNewOgrConnection::helpInfo ()
133
129
{
134
- reject ( );
130
+ QgsContextHelp::run ( context_id );
135
131
}
132
+
136
133
/* * end Autoconnected SLOTS **/
137
134
138
135
0 commit comments