Skip to content
Permalink
Browse files
Consider ? in wfs plugin also for release branch. The dialog warning …
…is not removed in this commit because of string freeze

git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_9_1@7748 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Dec 9, 2007
1 parent 856a690 commit 7e7ab3e092ef05b18a8858b76a8678a3314fddc6
Showing with 16 additions and 6 deletions.
  1. +1 −1 src/plugins/wfs/qgswfsplugin.cpp
  2. +14 −4 src/plugins/wfs/qgswfssourceselect.cpp
  3. +1 −1 src/plugins/wfs/qgswfssourceselect.h
@@ -27,7 +27,7 @@

static const QString name_ = QObject::tr("WFS plugin");
static const QString description_ = QObject::tr("Adds WFS layers to the QGIS canvas");
static const QString version_ = QObject::tr("Version 0.0001");
static const QString version_ = QObject::tr("Version 0.1");

QgsWFSPlugin::QgsWFSPlugin(QgisInterface* iface)
: QgisPlugin(name_, description_, version_, QgisPlugin::MAPLAYER),
@@ -133,8 +133,12 @@ int QgsWFSSourceSelect::getCapabilities(const QString& uri, QgsWFSSourceSelect::
return 1;
}

int QgsWFSSourceSelect::getCapabilitiesGET(const QString& uri, std::list<QString>& typenames, std::list< std::list<QString> >& crs, std::list<QString>& titles, std::list<QString>& abstracts)
int QgsWFSSourceSelect::getCapabilitiesGET(QString uri, std::list<QString>& typenames, std::list< std::list<QString> >& crs, std::list<QString>& titles, std::list<QString>& abstracts)
{
if(!(uri.contains("?")))
{
uri.append("?");
}
QString request = uri + "SERVICE=WFS&REQUEST=GetCapabilities&VERSION=1.1.1";
QByteArray result;
QgsHttpTransaction http(request);
@@ -330,7 +334,14 @@ void QgsWFSSourceSelect::addLayer()
return;
}
QString typeName = tItem->text(1);
qWarning(mUri + "SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=" + typeName);

QString uri = mUri;
if(!(uri.contains("?")))
{
uri.append("?");
}

qWarning(uri + "SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=" + typeName);

//get CRS
QString crsString;
@@ -345,8 +356,7 @@ void QgsWFSSourceSelect::addLayer()
//add a wfs layer to the map
if(mIface)
{
qWarning(mUri + "SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=" + typeName + crsString);
mIface->addVectorLayer(mUri + "SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=" + typeName + crsString, typeName, "WFS");
mIface->addVectorLayer(uri + "SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=" + typeName + crsString, typeName, "WFS");
}
accept();
}
@@ -67,7 +67,7 @@ class QgsWFSSourceSelect: public QDialog, private Ui::QgsWFSSourceSelectBase
@return 0 in case of success*/
int getCapabilities(const QString& uri, QgsWFSSourceSelect::REQUEST_ENCODING e, std::list<QString>& typenames, std::list< std::list<QString> >& crs, std::list<QString>& titles, std::list<QString>& abstracts);
//encoding specific methods of getCapabilities
int getCapabilitiesGET(const QString& uri, std::list<QString>& typenames, std::list< std::list<QString> >& crs, std::list<QString>& titles, std::list<QString>& abstracts);
int getCapabilitiesGET(QString uri, std::list<QString>& typenames, std::list< std::list<QString> >& crs, std::list<QString>& titles, std::list<QString>& abstracts);
int getCapabilitiesPOST(const QString& uri, std::list<QString>& typenames, std::list< std::list<QString> >& crs, std::list<QString>& titles, std::list<QString>& abstracts);
int getCapabilitiesSOAP(const QString& uri, std::list<QString>& typenames, std::list< std::list<QString> >& crs, std::list<QString>& titles, std::list<QString>& abstracts);

0 comments on commit 7e7ab3e

Please sign in to comment.