Skip to content
Permalink
Browse files

ziplayertest fix

  • Loading branch information
blazek committed Dec 12, 2014
1 parent 40e0d78 commit 69b27f04be9a95a16301649578d64c31188e9547
Showing with 10 additions and 1 deletion.
  1. +10 −1 tests/src/core/testziplayer.cpp
@@ -148,13 +148,22 @@ bool TestZipLayer::testZipItem( QString myFileName, QString myChildName, QString
QFileInfo myFileInfo( myFileName );
QgsZipItem *myZipItem = new QgsZipItem( NULL, myFileInfo.fileName(), myFileName );
myZipItem->populate();
// wait until populated in separate thread
QTime time;
time.start();
while ( myZipItem->state() != QgsDataItem::Populated && time.elapsed() < 5000 )
{
QTest::qSleep ( 100 );
QCoreApplication::processEvents();
}
QgsDebugMsg( QString( "time.elapsed() = %1 ms" ).arg ( time.elapsed() ) );
bool ok = false;
QString driverName;
QVector<QgsDataItem*> myChildren = myZipItem->children();

QgsDebugMsg( QString( "has %1 items" ).arg( myChildren.size() ) );
if ( myChildren.size() > 0 )
{
QgsDebugMsg( QString( "has %1 items" ).arg( myChildren.size() ) );
foreach ( QgsDataItem* item, myChildren )
{
QgsDebugMsg( QString( "child name=%1" ).arg( item->name() ) );

0 comments on commit 69b27f0

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