[Qgis-developer] Broken code after upgrade to QGIS 1.4
Matthew Denno
mgdenno at gmail.com
Mon Jan 18 23:16:36 EST 2010
Hello List,
Quick question. The following piece of code seemed to always work
before upgrading to 1.4, but now it seems to fail with this message:
The program has unexpectedly finished.
/home/matt/Programming/DelaunayIntersection/DelaunayIntersection
exited with code 0
Any ideas with what the cause might be? Any help or direction would
be greatly appreciated.
Matt
CODE:
bool is_valid_shapefile(QString myLayerPath,
QString myLayerBaseName = 0,
QString myProviderName = "ogr",
QString myPluginsDir = "/usr/lib/qgis")
{
// Instantiate Provider Registry
QgsProviderRegistry::instance(myPluginsDir);
//Open the shapefile vector layer from file
//fails here
QgsVectorLayer * mypVectorLayer = new QgsVectorLayer(myLayerPath,
myLayerBaseName, myProviderName);
return mypVectorLayer->isValid();
}
More information about the Qgis-developer
mailing list