Skip to content
Permalink
Browse files

address reviews

  • Loading branch information
NEDJIMAbelgacem authored and wonder-sk committed Feb 10, 2021
1 parent 5ca432d commit 4e069ccd8adf02aac4982ae4ba00c150090bf8b6
Showing with 7 additions and 8 deletions.
  1. +6 −7 src/providers/pdal/qgspdalprovider.cpp
  2. +1 −1 src/providers/pdal/qgspdalprovider.h
@@ -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,
@@ -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;
}

@@ -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()
@@ -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()
@@ -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

0 comments on commit 4e069cc

Please sign in to comment.