"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/server/services/wms/qgswmsgetcapabilities.cpp" between
QGIS-final-3_10_5.tar.gz and QGIS-final-3_10_6.tar.gz

About: QGIS (Quantum GIS) is a Geographic Information System that supports vector, raster, and database formats. Long-term release (3.10.x series).

qgswmsgetcapabilities.cpp  (QGIS-final-3_10_5):qgswmsgetcapabilities.cpp  (QGIS-final-3_10_6)
skipping to change at line 268 skipping to change at line 268
{ {
//Service element //Service element
QDomElement serviceElem = doc.createElement( QStringLiteral( "Service" ) ); QDomElement serviceElem = doc.createElement( QStringLiteral( "Service" ) );
//Service name //Service name
QDomElement nameElem = doc.createElement( QStringLiteral( "Name" ) ); QDomElement nameElem = doc.createElement( QStringLiteral( "Name" ) );
QDomText nameText = doc.createTextNode( QStringLiteral( "WMS" ) ); QDomText nameText = doc.createTextNode( QStringLiteral( "WMS" ) );
nameElem.appendChild( nameText ); nameElem.appendChild( nameText );
serviceElem.appendChild( nameElem ); serviceElem.appendChild( nameElem );
QDomText titleText;
QString title = QgsServerProjectUtils::owsServiceTitle( *project ); QString title = QgsServerProjectUtils::owsServiceTitle( *project );
QDomElement titleElem = doc.createElement( QStringLiteral( "Title" ) );
if ( !title.isEmpty() ) if ( !title.isEmpty() )
{ {
QDomElement titleElem = doc.createElement( QStringLiteral( "Title" ) ); titleText = doc.createTextNode( title );
QDomText titleText = doc.createTextNode( title );
titleElem.appendChild( titleText );
serviceElem.appendChild( titleElem );
} }
else
{
if ( !project->title().isEmpty() )
{
titleText = doc.createTextNode( project->title() );
}
else
{
titleText = doc.createTextNode( QStringLiteral( "untitled" ) );
}
}
titleElem.appendChild( titleText );
serviceElem.appendChild( titleElem );
QString abstract = QgsServerProjectUtils::owsServiceAbstract( *project ); QString abstract = QgsServerProjectUtils::owsServiceAbstract( *project );
if ( !abstract.isEmpty() ) if ( !abstract.isEmpty() )
{ {
QDomElement abstractElem = doc.createElement( QStringLiteral( "Abstract" ) ); QDomElement abstractElem = doc.createElement( QStringLiteral( "Abstract" ) );
QDomText abstractText = doc.createCDATASection( abstract ); QDomText abstractText = doc.createCDATASection( abstract );
abstractElem.appendChild( abstractText ); abstractElem.appendChild( abstractText );
serviceElem.appendChild( abstractElem ); serviceElem.appendChild( abstractElem );
} }
skipping to change at line 315 skipping to change at line 327
!contactOrganization.isEmpty() || !contactOrganization.isEmpty() ||
!contactPosition.isEmpty() || !contactPosition.isEmpty() ||
!contactMail.isEmpty() || !contactMail.isEmpty() ||
!contactPhone.isEmpty() ) !contactPhone.isEmpty() )
{ {
//Contact information //Contact information
QDomElement contactInfoElem = doc.createElement( QStringLiteral( "ContactI nformation" ) ); QDomElement contactInfoElem = doc.createElement( QStringLiteral( "ContactI nformation" ) );
//Contact person primary //Contact person primary
if ( !contactPerson.isEmpty() || if ( !contactPerson.isEmpty() ||
!contactOrganization.isEmpty() || !contactOrganization.isEmpty() )
!contactPosition.isEmpty() )
{ {
QDomElement contactPersonPrimaryElem = doc.createElement( QStringLiteral ( "ContactPersonPrimary" ) ); QDomElement contactPersonPrimaryElem = doc.createElement( QStringLiteral ( "ContactPersonPrimary" ) );
QDomText contactPersonText;
if ( !contactPerson.isEmpty() ) if ( !contactPerson.isEmpty() )
{ {
QDomElement contactPersonElem = doc.createElement( QStringLiteral( "Co contactPersonText = doc.createTextNode( contactPerson );
ntactPerson" ) ); }
QDomText contactPersonText = doc.createTextNode( contactPerson ); else
contactPersonElem.appendChild( contactPersonText ); {
contactPersonPrimaryElem.appendChild( contactPersonElem ); contactPersonText = doc.createTextNode( QStringLiteral( "unknown" ) );
} }
QDomElement contactPersonElem = doc.createElement( QStringLiteral( "Cont
actPerson" ) );
contactPersonElem.appendChild( contactPersonText );
contactPersonPrimaryElem.appendChild( contactPersonElem );
QDomText contactOrganizationText;
if ( !contactOrganization.isEmpty() ) if ( !contactOrganization.isEmpty() )
{ {
QDomElement contactOrganizationElem = doc.createElement( QStringLitera contactOrganizationText = doc.createTextNode( contactOrganization );
l( "ContactOrganization" ) );
QDomText contactOrganizationText = doc.createTextNode( contactOrganiza
tion );
contactOrganizationElem.appendChild( contactOrganizationText );
contactPersonPrimaryElem.appendChild( contactOrganizationElem );
} }
else
if ( !contactPosition.isEmpty() )
{ {
QDomElement contactPositionElem = doc.createElement( QStringLiteral( " contactOrganizationText = doc.createTextNode( QStringLiteral( "unknown
ContactPosition" ) ); " ) );
QDomText contactPositionText = doc.createTextNode( contactPosition );
contactPositionElem.appendChild( contactPositionText );
contactPersonPrimaryElem.appendChild( contactPositionElem );
} }
QDomElement contactOrganizationElem = doc.createElement( QStringLiteral(
"ContactOrganization" ) );
contactOrganizationElem.appendChild( contactOrganizationText );
contactPersonPrimaryElem.appendChild( contactOrganizationElem );
contactInfoElem.appendChild( contactPersonPrimaryElem ); contactInfoElem.appendChild( contactPersonPrimaryElem );
} }
if ( !contactPosition.isEmpty() )
{
QDomElement contactPositionElem = doc.createElement( QStringLiteral( "Co
ntactPosition" ) );
QDomText contactPositionText = doc.createTextNode( contactPosition );
contactPositionElem.appendChild( contactPositionText );
contactInfoElem.appendChild( contactPositionElem );
}
if ( !contactPhone.isEmpty() ) if ( !contactPhone.isEmpty() )
{ {
QDomElement phoneElem = doc.createElement( QStringLiteral( "ContactVoice Telephone" ) ); QDomElement phoneElem = doc.createElement( QStringLiteral( "ContactVoice Telephone" ) );
QDomText phoneText = doc.createTextNode( contactPhone ); QDomText phoneText = doc.createTextNode( contactPhone );
phoneElem.appendChild( phoneText ); phoneElem.appendChild( phoneText );
contactInfoElem.appendChild( phoneElem ); contactInfoElem.appendChild( phoneElem );
} }
if ( !contactMail.isEmpty() ) if ( !contactMail.isEmpty() )
{ {
skipping to change at line 810 skipping to change at line 831
} }
QDomElement getLayersAndStylesCapabilitiesElement( QDomDocument &doc, QgsServe rInterface *serverIface, QDomElement getLayersAndStylesCapabilitiesElement( QDomDocument &doc, QgsServe rInterface *serverIface,
const QgsProject *project, const QString &version, const QgsProject *project, const QString &version,
const QgsServerRequest &request, bool projectSettings ) const QgsServerRequest &request, bool projectSettings )
{ {
const QgsLayerTree *projectLayerTreeRoot = project->layerTreeRoot(); const QgsLayerTree *projectLayerTreeRoot = project->layerTreeRoot();
QDomElement layerParentElem = doc.createElement( QStringLiteral( "Layer" ) ) ; QDomElement layerParentElem = doc.createElement( QStringLiteral( "Layer" ) ) ;
if ( !project->title().isEmpty() )
{
// Root Layer title
QDomElement layerParentTitleElem = doc.createElement( QStringLiteral( "Tit
le" ) );
QDomText layerParentTitleText = doc.createTextNode( project->title() );
layerParentTitleElem.appendChild( layerParentTitleText );
layerParentElem.appendChild( layerParentTitleElem );
// Root Layer abstract
QDomElement layerParentAbstElem = doc.createElement( QStringLiteral( "Abst
ract" ) );
QDomText layerParentAbstText = doc.createTextNode( project->title() );
layerParentAbstElem.appendChild( layerParentAbstText );
layerParentElem.appendChild( layerParentAbstElem );
}
// Root Layer name // Root Layer name
QString rootLayerName = QgsServerProjectUtils::wmsRootName( *project ); QString rootLayerName = QgsServerProjectUtils::wmsRootName( *project );
if ( rootLayerName.isEmpty() && !project->title().isEmpty() ) if ( rootLayerName.isEmpty() && !project->title().isEmpty() )
{ {
rootLayerName = project->title(); rootLayerName = project->title();
} }
if ( !rootLayerName.isEmpty() ) if ( !rootLayerName.isEmpty() )
{ {
QDomElement layerParentNameElem = doc.createElement( QStringLiteral( "Name " ) ); QDomElement layerParentNameElem = doc.createElement( QStringLiteral( "Name " ) );
QDomText layerParentNameText = doc.createTextNode( rootLayerName ); QDomText layerParentNameText = doc.createTextNode( rootLayerName );
layerParentNameElem.appendChild( layerParentNameText ); layerParentNameElem.appendChild( layerParentNameText );
layerParentElem.appendChild( layerParentNameElem ); layerParentElem.appendChild( layerParentNameElem );
} }
if ( !project->title().isEmpty() )
{
// Root Layer title
QDomElement layerParentTitleElem = doc.createElement( QStringLiteral( "Tit
le" ) );
QDomText layerParentTitleText = doc.createTextNode( project->title() );
layerParentTitleElem.appendChild( layerParentTitleText );
layerParentElem.appendChild( layerParentTitleElem );
// Root Layer abstract
QDomElement layerParentAbstElem = doc.createElement( QStringLiteral( "Abst
ract" ) );
QDomText layerParentAbstText = doc.createTextNode( project->title() );
layerParentAbstElem.appendChild( layerParentAbstText );
layerParentElem.appendChild( layerParentAbstElem );
}
// Keyword list // Keyword list
addKeywordListElement( project, doc, layerParentElem ); addKeywordListElement( project, doc, layerParentElem );
// Root Layer tree name // Root Layer tree name
if ( projectSettings ) if ( projectSettings )
{ {
QDomElement treeNameElem = doc.createElement( QStringLiteral( "TreeName" ) ); QDomElement treeNameElem = doc.createElement( QStringLiteral( "TreeName" ) );
QDomText treeNameText = doc.createTextNode( project->title() ); QDomText treeNameText = doc.createTextNode( project->title() );
treeNameElem.appendChild( treeNameText ); treeNameElem.appendChild( treeNameText );
layerParentElem.appendChild( treeNameElem ); layerParentElem.appendChild( treeNameElem );
skipping to change at line 1375 skipping to change at line 1396
const QStringList &crsList, const QStringList &constrainedCrsList ) const QStringList &crsList, const QStringList &constrainedCrsList )
{ {
if ( layerElement.isNull() ) if ( layerElement.isNull() )
{ {
return; return;
} }
//insert the CRS elements after the title element to be in accordance with the WMS 1.3 specification //insert the CRS elements after the title element to be in accordance with the WMS 1.3 specification
QDomElement titleElement = layerElement.firstChildElement( QStringLiteral( "Title" ) ); QDomElement titleElement = layerElement.firstChildElement( QStringLiteral( "Title" ) );
QDomElement abstractElement = layerElement.firstChildElement( QStringLiter al( "Abstract" ) ); QDomElement abstractElement = layerElement.firstChildElement( QStringLiter al( "Abstract" ) );
QDomElement CRSPrecedingElement = abstractElement.isNull() ? titleElement QDomElement keywordListElement = layerElement.firstChildElement( QStringLi
: abstractElement; //last element before the CRS elements teral( "KeywordList" ) );
QDomElement CRSPrecedingElement = !keywordListElement.isNull() ? keywordLi
stElement : !abstractElement.isNull() ? abstractElement : titleElement;
if ( CRSPrecedingElement.isNull() ) if ( CRSPrecedingElement.isNull() )
{ {
// keyword list element is never empty // keyword list element is never empty
const QDomElement keyElement = layerElement.firstChildElement( QStringLi teral( "KeywordList" ) ); const QDomElement keyElement = layerElement.firstChildElement( QStringLi teral( "KeywordList" ) );
CRSPrecedingElement = keyElement; CRSPrecedingElement = keyElement;
} }
//In case the number of advertised CRS is constrained //In case the number of advertised CRS is constrained
if ( !constrainedCrsList.isEmpty() ) if ( !constrainedCrsList.isEmpty() )
 End of changes. 17 change blocks. 
43 lines changed or deleted 66 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)