Skip to content

Commit

Permalink
fix ziplayer test for GDAL<1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Apr 23, 2012
1 parent 04abf76 commit 492f1a0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/src/core/testziplayer.cpp
Expand Up @@ -24,6 +24,8 @@
#include <qgsapplication.h>
#include <qgsproviderregistry.h>

#include <gdal.h>

/** \ingroup UnitTests
* This is a unit test to verify that zip vector layers work
*/
Expand All @@ -40,9 +42,12 @@ class TestZipLayer: public QObject
//
//create a point layer that will be used in all tests...
//
QString myDataDir( TEST_DATA_DIR );
myDataDir += QDir::separator();
QString myPointsFileName = myDataDir + "points.zip";
QString myPointsFileName( QString( TEST_DATA_DIR ) + QDir::separator() + "points.zip" );
qDebug() << "GDAL: " << GDAL_RELEASE_NAME;
#if GDAL_VERSION_NUM < 1800
myPointsFileName = "/vsizip/" + myPointsFileName + "/points.shp";
#endif
qDebug() << "FILE: " << myPointsFileName;
QFileInfo myPointFileInfo( myPointsFileName );
QgsVectorLayer * mypPointsLayer = new QgsVectorLayer( myPointFileInfo.filePath(),
myPointFileInfo.completeBaseName(), "ogr" );
Expand Down

0 comments on commit 492f1a0

Please sign in to comment.