Skip to content

Commit

Permalink
address reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
NEDJIMAbelgacem authored and wonder-sk committed Feb 10, 2021
1 parent 5ca432d commit 4e069cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions src/providers/pdal/qgspdalprovider.cpp
Expand Up @@ -35,7 +35,7 @@
#define PROVIDER_KEY QStringLiteral( "pdal" )
#define PROVIDER_DESCRIPTION QStringLiteral( "PDAL point cloud data provider" )

QQueue<QgsPdalProvider *> QgsPdalProvider::mIndexingQueue;
QQueue<QgsPdalProvider *> QgsPdalProvider::sIndexingQueue;

QgsPdalProvider::QgsPdalProvider(
const QString &uri,
Expand Down Expand Up @@ -94,8 +94,7 @@ void QgsPdalProvider::generateIndex()

if ( anyIndexingTaskExists() )
{
QgsMessageLog::logMessage( tr( "EPT generation task is already running" ), QObject::tr( "Point clouds" ), Qgis::Info );
mIndexingQueue.push_back( this );
sIndexingQueue.push_back( this );
return;
}

Expand Down Expand Up @@ -149,8 +148,8 @@ void QgsPdalProvider::onGenerateIndexFinished()
mRunningIndexingTask = nullptr;
emit indexGenerationStateChanged( PointCloudIndexGenerationState::Indexed );
}
if ( !mIndexingQueue.empty() )
mIndexingQueue.takeFirst()->generateIndex();
if ( !sIndexingQueue.empty() )
sIndexingQueue.takeFirst()->generateIndex();
}

void QgsPdalProvider::onGenerateIndexFailed()
Expand All @@ -162,8 +161,8 @@ void QgsPdalProvider::onGenerateIndexFailed()
mRunningIndexingTask = nullptr;
emit indexGenerationStateChanged( PointCloudIndexGenerationState::NotIndexed );
}
if ( !mIndexingQueue.empty() )
mIndexingQueue.takeFirst()->generateIndex();
if ( !sIndexingQueue.empty() )
sIndexingQueue.takeFirst()->generateIndex();
}

bool QgsPdalProvider::anyIndexingTaskExists()
Expand Down
2 changes: 1 addition & 1 deletion src/providers/pdal/qgspdalprovider.h
Expand Up @@ -66,7 +66,7 @@ class QgsPdalProvider: public QgsPointCloudDataProvider
QVariantMap mOriginalMetadata;
std::unique_ptr<QgsEptPointCloudIndex> mIndex;
QgsPdalEptGenerationTask *mRunningIndexingTask = nullptr;
static QQueue<QgsPdalProvider *> mIndexingQueue;
static QQueue<QgsPdalProvider *> sIndexingQueue;
};

class QgsPdalProviderMetadata : public QgsProviderMetadata
Expand Down

0 comments on commit 4e069cc

Please sign in to comment.