Skip to content

Commit

Permalink
Fix indentation and spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Aug 1, 2018
1 parent 1feb971 commit 906022e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 42 deletions.
9 changes: 5 additions & 4 deletions src/app/qgsprojectlayergroupdialog.cpp
Expand Up @@ -169,7 +169,8 @@ void QgsProjectLayerGroupDialog::changeProjectFile()
}

QDomDocument projectDom;
if ( QgsZipUtils::isZipFile( mProjectFileWidget->filePath() ) ){
if ( QgsZipUtils::isZipFile( mProjectFileWidget->filePath() ) )
{
QgsProjectArchive archive;

// unzip the archive
Expand All @@ -184,7 +185,7 @@ void QgsProjectLayerGroupDialog::changeProjectFile()
return;
}

projectFile.setFileName(archive.projectFile());
projectFile.setFileName( archive.projectFile() );
if ( !projectFile.exists() )
{
return;
Expand All @@ -195,9 +196,9 @@ void QgsProjectLayerGroupDialog::changeProjectFile()
{
return;
}






mRootGroup->removeAllChildren();

Expand Down
13 changes: 7 additions & 6 deletions src/server/services/wms/qgswmsrenderer.cpp
Expand Up @@ -1252,7 +1252,8 @@ namespace QgsWms
{
validLayer = true;
queryableLayer = !mProject->nonIdentifiableLayers().contains( layer->id() ) ;
if (!queryableLayer){
if ( !queryableLayer )
{
break;
}

Expand Down Expand Up @@ -1322,7 +1323,7 @@ namespace QgsWms
QString msg = QObject::tr( "Layer '%1' not found" ).arg( queryLayer );
throw QgsBadRequestException( QStringLiteral( "LayerNotDefined" ), msg );
}
else if ( (validLayer && !queryableLayer) || (!validLayer && mLayerGroups.contains( queryLayer )) )
else if ( ( validLayer && !queryableLayer ) || ( !validLayer && mLayerGroups.contains( queryLayer ) ) )
{
QString msg = QObject::tr( "Layer '%1' is not queryable" ).arg( queryLayer );
throw QgsBadRequestException( QStringLiteral( "LayerNotQueryable" ), msg );
Expand Down Expand Up @@ -2419,14 +2420,14 @@ namespace QgsWms
for ( const QgsLayerTreeNode *child : group->children() )
{
if ( child->nodeType() == QgsLayerTreeNode::NodeGroup )
{
{
QString name = child->customProperty( QStringLiteral( "wmsShortName" ) ).toString();

if ( name.isEmpty() )
name = child->name();

initLayerGroupsRecursive( static_cast<const QgsLayerTreeGroup *>( child ), name );

}
}
}
Expand Down
34 changes: 2 additions & 32 deletions tests/testdata/qgis_server/test_project.qgs
Expand Up @@ -685,22 +685,7 @@
<editforminit/>
<editforminitcodesource>0</editforminitcodesource>
<editforminitfilepath></editforminitfilepath>
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
"""
Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire.

Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires.

Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python".
Voici un exemple à suivre:
"""
from qgis.PyQt.QtWidgets import QWidget

def my_form_open(dialog, layer, feature):
geom = feature.geometry()
control = dialog.findChild(QWidget, "MyLineEdit")

]]></editforminitcode>
<editforminitcode><![CDATA[]]></editforminitcode>
<featformsuppress>0</featformsuppress>
<editorlayout>generatedlayout</editorlayout>
<editable>
Expand Down Expand Up @@ -919,22 +904,7 @@ def my_form_open(dialog, layer, feature):
<editforminit/>
<editforminitcodesource>0</editforminitcodesource>
<editforminitfilepath></editforminitfilepath>
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
"""
Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire.

Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires.

Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python".
Voici un exemple à suivre:
"""
from qgis.PyQt.QtWidgets import QWidget

def my_form_open(dialog, layer, feature):
geom = feature.geometry()
control = dialog.findChild(QWidget, "MyLineEdit")

]]></editforminitcode>
<editforminitcode><![CDATA[]]></editforminitcode>
<featformsuppress>0</featformsuppress>
<editorlayout>generatedlayout</editorlayout>
<editable>
Expand Down

0 comments on commit 906022e

Please sign in to comment.