mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-31 00:03:42 -04:00
removed second arg from endsWith function to retain compatibility with qt 3.1
git-svn-id: http://svn.osgeo.org/qgis/trunk@751 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
52e0458534
commit
b5f5a25782
@ -493,7 +493,7 @@ void QgisApp::addRasterLayer(QStringList theFileNameQStringList)
|
||||
|
||||
//only allow one copy of a ai grid file to be loaded at a time to
|
||||
//prevent the user selecting all adfs in 1 dir which actually represent 1 coverate,
|
||||
if (myBaseNameQString.endsWith(".adf", FALSE))
|
||||
if (myBaseNameQString.lower().endsWith(".adf"))
|
||||
{
|
||||
|
||||
break;
|
||||
@ -517,15 +517,16 @@ void QgisApp::addRasterLayer(QStringList theFileNameQStringList)
|
||||
/** This helper checks to see whether the filename appears to be a valid raster file name */
|
||||
bool QgisApp::isValidRasterFileName (QString theFileNameQString)
|
||||
{
|
||||
return (theFileNameQString.endsWith(".adf", FALSE) ||
|
||||
theFileNameQString.endsWith(".asc", FALSE) ||
|
||||
theFileNameQString.endsWith(".grd", FALSE) ||
|
||||
theFileNameQString.endsWith(".img", FALSE) ||
|
||||
theFileNameQString.endsWith(".tif", FALSE) ||
|
||||
theFileNameQString.endsWith(".png", FALSE) ||
|
||||
theFileNameQString.endsWith(".jpg", FALSE) ||
|
||||
theFileNameQString.endsWith(".dem", FALSE) ||
|
||||
theFileNameQString.endsWith(".ddf", FALSE)) ;
|
||||
QString name = theFileNameQString.lower();
|
||||
return (name.endsWith(".adf") ||
|
||||
name.endsWith(".asc") ||
|
||||
name.endsWith(".grd") ||
|
||||
name.endsWith(".img") ||
|
||||
name.endsWith(".tif") ||
|
||||
name.endsWith(".png") ||
|
||||
name.endsWith(".jpg") ||
|
||||
name.endsWith(".dem") ||
|
||||
name.endsWith(".ddf")) ;
|
||||
}
|
||||
/** Overloaded of the above function provided for convenience that takes a qstring pointer */
|
||||
bool QgisApp::isValidRasterFileName (QString * theFileNameQString)
|
||||
@ -537,7 +538,7 @@ bool QgisApp::isValidRasterFileName (QString * theFileNameQString)
|
||||
/** This helper checks to see whether the filename appears to be a valid vector file name */
|
||||
bool QgisApp::isValidVectorFileName (QString theFileNameQString)
|
||||
{
|
||||
return (theFileNameQString.endsWith(".shp", FALSE)) ;
|
||||
return (theFileNameQString.lower().endsWith(".shp")) ;
|
||||
}
|
||||
/** Overloaded of the above function provided for convenience that takes a qstring pointer */
|
||||
bool QgisApp::isValidVectorFileName (QString * theFileNameQString)
|
||||
|
Loading…
x
Reference in New Issue
Block a user