[QGIS Commit] r15478 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Mar 14 15:49:53 EDT 2011
Author: jef
Date: 2011-03-14 12:49:53 -0700 (Mon, 14 Mar 2011)
New Revision: 15478
Modified:
trunk/qgis/src/app/qgsnewhttpconnection.cpp
trunk/qgis/src/app/qgsnewhttpconnection.h
Log:
fix #3615
Modified: trunk/qgis/src/app/qgsnewhttpconnection.cpp
===================================================================
--- trunk/qgis/src/app/qgsnewhttpconnection.cpp 2011-03-14 19:35:23 UTC (rev 15477)
+++ trunk/qgis/src/app/qgsnewhttpconnection.cpp 2011-03-14 19:49:53 UTC (rev 15478)
@@ -20,6 +20,7 @@
#include <QSettings>
#include <QMessageBox>
#include <QUrl>
+#include <QPushButton>
QgsNewHttpConnection::QgsNewHttpConnection(
QWidget *parent, const QString& baseKey, const QString& connName, Qt::WFlags fl ):
@@ -42,14 +43,20 @@
txtUrl->setText( settings.value( key + "/url" ).toString() );
txtUserName->setText( settings.value( credentialsKey + "/username" ).toString() );
txtPassword->setText( settings.value( credentialsKey + "/password" ).toString() );
+ }
- }
+ on_txtName_textChanged( connName );
}
QgsNewHttpConnection::~QgsNewHttpConnection()
{
}
+void QgsNewHttpConnection::on_txtName_textChanged( const QString &text )
+{
+ buttonBox->button( QDialogButtonBox::Ok )->setDisabled( text.isEmpty() );
+}
+
void QgsNewHttpConnection::accept()
{
QSettings settings;
Modified: trunk/qgis/src/app/qgsnewhttpconnection.h
===================================================================
--- trunk/qgis/src/app/qgsnewhttpconnection.h 2011-03-14 19:35:23 UTC (rev 15477)
+++ trunk/qgis/src/app/qgsnewhttpconnection.h 2011-03-14 19:49:53 UTC (rev 15478)
@@ -37,6 +37,8 @@
//! Saves the connection to ~/.qt/qgisrc
void accept();
+ void on_txtName_textChanged( const QString & );
+
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
private:
More information about the QGIS-commit
mailing list