Skip to content
Permalink
Browse files

Fix race condition in stats summary dock

  • Loading branch information
nyalldawson committed Jul 17, 2018
1 parent 367ab20 commit 4012109b0a472b5a79472bd6eaf2e297ec0034cd
Showing with 12 additions and 3 deletions.
  1. +12 −3 src/app/qgsstatisticalsummarydockwidget.cpp
@@ -235,7 +235,10 @@ void QgsStatisticalSummaryDockWidget::gathererFinished()

void QgsStatisticalSummaryDockWidget::updateNumericStatistics()
{
if ( !mGatherer )
QgsStatisticsValueGatherer *gatherer = qobject_cast<QgsStatisticsValueGatherer *>( QObject::sender() );
// this may have been sent from a gathererer which was canceled previously and we don't care
// about it anymore...
if ( gatherer != mGatherer )
return;

QList< QVariant > variantValues = mGatherer->values();
@@ -301,7 +304,10 @@ void QgsStatisticalSummaryDockWidget::updateNumericStatistics()

void QgsStatisticalSummaryDockWidget::updateStringStatistics()
{
if ( !mGatherer )
QgsStatisticsValueGatherer *gatherer = qobject_cast<QgsStatisticsValueGatherer *>( QObject::sender() );
// this may have been sent from a gathererer which was canceled previously and we don't care
// about it anymore...
if ( gatherer != mGatherer )
return;

QVariantList values = mGatherer->values();
@@ -421,7 +427,10 @@ void QgsStatisticalSummaryDockWidget::layerSelectionChanged()

void QgsStatisticalSummaryDockWidget::updateDateTimeStatistics()
{
if ( !mGatherer )
QgsStatisticsValueGatherer *gatherer = qobject_cast<QgsStatisticsValueGatherer *>( QObject::sender() );
// this may have been sent from a gathererer which was canceled previously and we don't care
// about it anymore...
if ( gatherer != mGatherer )
return;

QVariantList values = mGatherer->values();

0 comments on commit 4012109

Please sign in to comment.
You can’t perform that action at this time.