Skip to content

Commit

Permalink
Replace more splitted by split
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ committed Dec 29, 2016
1 parent a56f928 commit 69af2fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/core/qgsvectorlayereditutils.cpp
Expand Up @@ -301,7 +301,7 @@ int QgsVectorLayerEditUtils::splitFeatures( const QList<QgsPoint>& splitLine, bo
QgsRectangle bBox; //bounding box of the split line
int returnCode = 0;
int splitFunctionReturn; //return code of QgsGeometry::splitGeometry
int numberOfSplittedFeatures = 0;
int numberOfSplitFeatures = 0;

QgsFeatureIterator features;
const QgsFeatureIds selectedIds = L->selectedFeatureIds();
Expand Down Expand Up @@ -384,15 +384,15 @@ int QgsVectorLayerEditUtils::splitFeatures( const QList<QgsPoint>& splitLine, bo
addTopologicalPoints( *topol_it );
}
}
++numberOfSplittedFeatures;
++numberOfSplitFeatures;
}
else if ( splitFunctionReturn > 1 ) //1 means no split but also no error
{
returnCode = splitFunctionReturn;
}
}

if ( numberOfSplittedFeatures == 0 && !selectedIds.isEmpty() )
if ( numberOfSplitFeatures == 0 && !selectedIds.isEmpty() )
{
//There is a selection but no feature has been split.
//Maybe user forgot that only the selected features are split
Expand All @@ -411,7 +411,7 @@ int QgsVectorLayerEditUtils::splitParts( const QList<QgsPoint>& splitLine, bool
QgsRectangle bBox; //bounding box of the split line
int returnCode = 0;
int splitFunctionReturn; //return code of QgsGeometry::splitGeometry
int numberOfSplittedParts = 0;
int numberOfSplitParts = 0;

QgsFeatureIterator fit;

Expand Down Expand Up @@ -519,15 +519,15 @@ int QgsVectorLayerEditUtils::splitParts( const QList<QgsPoint>& splitLine, bool
addTopologicalPoints( *topol_it );
}
}
++numberOfSplittedParts;
++numberOfSplitParts;
}
else if ( splitFunctionReturn > 1 ) //1 means no split but also no error
{
returnCode = splitFunctionReturn;
}
}

if ( numberOfSplittedParts == 0 && L->selectedFeatureCount() > 0 && returnCode == 0 )
if ( numberOfSplitParts == 0 && L->selectedFeatureCount() > 0 && returnCode == 0 )
{
//There is a selection but no feature has been split.
//Maybe user forgot that only the selected features are split
Expand Down
12 changes: 6 additions & 6 deletions tests/src/python/test_qgsdelimitedtextprovider.py
Expand Up @@ -88,14 +88,14 @@ def toString(self):


def normalize_query_items_order(s):
splitted_url = s.split('?')
urlstr = splitted_url[0]
if len(splitted_url) == 2:
items_list = splitted_url[1].split('&')
split_url = s.split('?')
urlstr = split_url[0]
if len(split_url) == 2:
items_list = split_url[1].split('&')
items_map = {}
for item in items_list:
splitted_item = item.split('=')
items_map[splitted_item[0]] = splitted_item[1]
split_item = item.split('=')
items_map[split_item[0]] = split_item[1]
first_arg = True
for k in sorted(items_map.keys()):
if first_arg:
Expand Down

0 comments on commit 69af2fa

Please sign in to comment.