Skip to content

Commit 7ae80b1

Browse files
committedMay 10, 2016
Fix sip bindings for QgsStringStatisticalSummary
1 parent daabda8 commit 7ae80b1

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed
 

‎python/core/qgsstringstatisticalsummary.sip

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,16 @@ class QgsStringStatisticalSummary
5959

6060
/** Calculates summary statistics for a list of strings.
6161
* @param values list of strings
62+
* @see calculateFromVariants()
6263
*/
6364
void calculate( const QStringList& values );
6465

6566
/** Calculates summary statistics for a list of variants. Any non-string variants will be
6667
* ignored.
6768
* @param values list of variants
69+
* @see calculate()
6870
*/
69-
void calculate( const QVariantList& values );
71+
void calculateFromVariants( const QVariantList& values );
7072

7173
/** Returns the value of a specified statistic
7274
* @param stat statistic to return

‎src/core/qgsstringstatisticalsummary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void QgsStringStatisticalSummary::calculate( const QStringList& values )
5454
}
5555
}
5656

57-
void QgsStringStatisticalSummary::calculate( const QVariantList& values )
57+
void QgsStringStatisticalSummary::calculateFromVariants( const QVariantList& values )
5858
{
5959
reset();
6060

‎src/core/qgsstringstatisticalsummary.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,16 @@ class CORE_EXPORT QgsStringStatisticalSummary
7979

8080
/** Calculates summary statistics for a list of strings.
8181
* @param values list of strings
82+
* @see calculateFromVariants()
8283
*/
8384
void calculate( const QStringList& values );
8485

8586
/** Calculates summary statistics for a list of variants. Any non-string variants will be
8687
* ignored.
8788
* @param values list of variants
89+
* @see calculate()
8890
*/
89-
void calculate( const QVariantList& values );
91+
void calculateFromVariants( const QVariantList& values );
9092

9193
/** Returns the value of a specified statistic
9294
* @param stat statistic to return

‎tests/src/python/test_qgsstringstatisticalsummary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def testIndividualStats(self):
6767
def testVariantStats(self):
6868
s = QgsStringStatisticalSummary()
6969
self.assertEqual(s.statistics(), QgsStringStatisticalSummary.All)
70-
s.calculate(['cc', 5, 'bbbb', 'aaaa', 'eeee', 6, 9, '9', ''])
70+
s.calculateFromVariants(['cc', 5, 'bbbb', 'aaaa', 'eeee', 6, 9, '9', ''])
7171
self.assertEqual(s.count(), 6)
7272
self.assertEqual(set(s.distinctValues()), set(['cc', 'aaaa', 'bbbb', 'eeee', '', '9']))
7373
self.assertEqual(s.countMissing(), 1)

0 commit comments

Comments
 (0)
Please sign in to comment.