Skip to content

Commit b599a8a

Browse files
author
jef
committed
fix #3615
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15478 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent d58c393 commit b599a8a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/app/qgsnewhttpconnection.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <QSettings>
2121
#include <QMessageBox>
2222
#include <QUrl>
23+
#include <QPushButton>
2324

2425
QgsNewHttpConnection::QgsNewHttpConnection(
2526
QWidget *parent, const QString& baseKey, const QString& connName, Qt::WFlags fl ):
@@ -42,14 +43,20 @@ QgsNewHttpConnection::QgsNewHttpConnection(
4243
txtUrl->setText( settings.value( key + "/url" ).toString() );
4344
txtUserName->setText( settings.value( credentialsKey + "/username" ).toString() );
4445
txtPassword->setText( settings.value( credentialsKey + "/password" ).toString() );
45-
4646
}
47+
48+
on_txtName_textChanged( connName );
4749
}
4850

4951
QgsNewHttpConnection::~QgsNewHttpConnection()
5052
{
5153
}
5254

55+
void QgsNewHttpConnection::on_txtName_textChanged( const QString &text )
56+
{
57+
buttonBox->button( QDialogButtonBox::Ok )->setDisabled( text.isEmpty() );
58+
}
59+
5360
void QgsNewHttpConnection::accept()
5461
{
5562
QSettings settings;

src/app/qgsnewhttpconnection.h

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ class QgsNewHttpConnection : public QDialog, private Ui::QgsNewHttpConnectionBas
3737
//! Saves the connection to ~/.qt/qgisrc
3838
void accept();
3939

40+
void on_txtName_textChanged( const QString & );
41+
4042
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
4143

4244
private:

0 commit comments

Comments
 (0)