Skip to content
Permalink
Browse files
fix some warnings and myriads of global QString objects
  • Loading branch information
jef-n committed Jan 9, 2013
1 parent d00bc7a commit 7de5ad9238f79364915ca9bdac169d2d65d232d4
@@ -45,11 +45,32 @@ const int QGis::QGIS_VERSION_INT = VERSION_INT;
const char* QGis::QGIS_RELEASE_NAME = RELEASE_NAME;

#if GDAL_VERSION_NUM >= 1800
const QString GEOPROJ4 = "+proj=longlat +datum=WGS84 +no_defs";
const CORE_EXPORT QString GEOPROJ4 = "+proj=longlat +datum=WGS84 +no_defs";
#else
const QString GEOPROJ4 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
const CORE_EXPORT QString GEOPROJ4 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
#endif

const CORE_EXPORT QString GEOWKT =
"GEOGCS[\"WGS 84\", "
" DATUM[\"WGS_1984\", "
" SPHEROID[\"WGS 84\",6378137,298.257223563, "
" AUTHORITY[\"EPSG\",7030]], "
" TOWGS84[0,0,0,0,0,0,0], "
" AUTHORITY[\"EPSG\",6326]], "
" PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",8901]], "
" UNIT[\"DMSH\",0.0174532925199433,AUTHORITY[\"EPSG\",9108]], "
" AXIS[\"Lat\",NORTH], "
" AXIS[\"Long\",EAST], "
" AUTHORITY[\"EPSG\",4326]]";

const CORE_EXPORT QString PROJECT_SCALES =
"1:1000000,1:500000,1:250000,1:100000,1:50000,1:25000,"
"1:10000,1:5000,1:2500,1:1000,1:500";

const CORE_EXPORT QString GEO_EPSG_CRS_AUTHID = "EPSG:4326";

const CORE_EXPORT QString GEO_NONE = "NONE";

const double QGis::DEFAULT_IDENTIFY_RADIUS = 0.5;

// description strings for units
@@ -296,22 +296,8 @@ void CORE_EXPORT QgsFree( void *ptr );
/** Wkt string that represents a geographic coord sys
* @note added in 1.8 to replace GEOWkt
*/
const QString GEOWKT =
"GEOGCS[\"WGS 84\", "
" DATUM[\"WGS_1984\", "
" SPHEROID[\"WGS 84\",6378137,298.257223563, "
" AUTHORITY[\"EPSG\",7030]], "
" TOWGS84[0,0,0,0,0,0,0], "
" AUTHORITY[\"EPSG\",6326]], "
" PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",8901]], "
" UNIT[\"DMSH\",0.0174532925199433,AUTHORITY[\"EPSG\",9108]], "
" AXIS[\"Lat\",NORTH], "
" AXIS[\"Long\",EAST], "
" AUTHORITY[\"EPSG\",4326]]";

const QString PROJECT_SCALES =
"1:1000000,1:500000,1:250000,1:100000,1:50000,1:25000,"
"1:10000,1:5000,1:2500,1:1000,1:500";
extern CORE_EXPORT const QString GEOWKT;
extern CORE_EXPORT const QString PROJECT_SCALES;

/** PROJ4 string that represents a geographic coord sys */
extern CORE_EXPORT const QString GEOPROJ4;
@@ -322,7 +308,7 @@ const long GEOCRS_ID = 3452;
/** Magic number for a geographic coord sys in EpsgCrsId ID format */
const long GEO_EPSG_CRS_ID = 4326;
/** Geographic coord sys from EPSG authority */
const QString GEO_EPSG_CRS_AUTHID = "EPSG:4326";
extern CORE_EXPORT const QString GEO_EPSG_CRS_AUTHID;
/** The length of the string "+proj=" */
const int PROJ_PREFIX_LEN = 6;
/** The length of the string "+ellps=" */
@@ -335,7 +321,7 @@ const int USER_CRS_START_ID = 100000;

//! Constant that holds the string representation for "No ellips/No CRS"
// Added in version 2.0
const QString GEO_NONE = "NONE";
extern CORE_EXPORT const QString GEO_NONE;

//
// Constants for point symbols
@@ -582,7 +582,6 @@ QgsGeometry* QgsGeometry::fromGML2( const QDomNode& geometryNode )
{
return 0;
}
return 0;
}

bool QgsGeometry::setFromGML2Point( const QDomElement& geometryElement )
@@ -411,7 +411,7 @@ QgsGrassModuleStandardOptions::QgsGrassModuleStandardOptions(
bool ok = false;
QDomDocument gDoc( "task" );
QString err;
int line, column;
int line = -1, column = -1;

if ( codec )
{
@@ -3621,7 +3621,7 @@ void QgsGrassModuleField::updateFields()

std::vector<QgsField> fields = mLayerInput->currentFields();

for ( int i = 0; i < fields.size(); i++ )
for ( unsigned int i = 0; i < fields.size(); i++ )
{
if ( mType.contains( fields[i].typeName() ) )
{
@@ -59,7 +59,6 @@ class QgsGrassModule: public QDialog, private Ui::QgsGrassModuleBase
Description(): direct( true ) {}
Description( QString lab, bool dir = false ): label( lab ), direct( dir ) { }
Description( const Description & desc ) { label = desc.label; direct = desc.direct; }
Description( Description & desc ) { label = desc.label; direct = desc.direct; }
};

//! Constructor
@@ -309,7 +309,7 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
for ( int i = 0; i < 3; i++ )
{
QString sql, tableName, schemaName, columnName, typeName, sridName, gtableName;
QgsPostgresGeometryColumnType columnType;
QgsPostgresGeometryColumnType columnType = sctGeometry;

if ( i == 0 )
{
@@ -3191,7 +3191,6 @@ bool QgsWmsProvider::calculateExtent()
QgsDebugMsg( "exiting with '" + mLayerExtent.toString() + "'." );
return true;
}
return false; // should not be reached
}


0 comments on commit 7de5ad9

Please sign in to comment.