Skip to content
Permalink
Browse files
fix warnings in mssql provider
  • Loading branch information
jef-n committed Mar 24, 2012
1 parent 0ee3769 commit 53b9ae2421bf36cdbda16e884e7486f09229571a
@@ -42,8 +42,6 @@ QgsMssqlConnectionItem::QgsMssqlConnectionItem( QgsDataItem* parent, QString nam
mService = settings.value( key + "/service" ).toString();
mHost = settings.value( key + "/host" ).toString();
mDatabase = settings.value( key + "/database" ).toString();
mUsername;
mPassword;
if ( settings.value( key + "/saveUsername" ).toString() == "true" )
{
mUsername = settings.value( key + "/username" ).toString();
@@ -69,31 +69,37 @@ QgsMssqlGeometryParser::QgsMssqlGeometryParser()
{
}

void QgsMssqlGeometryParser::DumpMemoryToLog( char* pszMsg, unsigned char* pszInput, int nLen )
void QgsMssqlGeometryParser::DumpMemoryToLog( const char* pszMsg, unsigned char* pszInput, int nLen )
{
/*char buf[55];
#if 0
char buf[55];
int len = 0;
QFile file( "qgsmssql.log" );
file.open( QIODevice::Append );
file.write( pszMsg, strlen(pszMsg) );
file.write( pszMsg, strlen( pszMsg ) );
file.write( "\n" );
sprintf(buf + len, "%05d ", 0);
sprintf( buf + len, "%05d ", 0 );
len += 6;
for ( int i = 0; i < nLen; i++)
for ( int i = 0; i < nLen; i++ )
{
sprintf(buf + len, "%02x ", pszInput[i]);
len += 3;
if (len == 54)
{
file.write( buf, len );
len = 0;
file.write( "\n" );
sprintf(buf + len, "%05d ", i + 1);
len = 6;
}
sprintf( buf + len, "%02x ", pszInput[i] );
len += 3;
if ( len == 54 )
{
file.write( buf, len );
len = 0;
file.write( "\n" );
sprintf( buf + len, "%05d ", i + 1 );
len = 6;
}
}
file.write( "\n" );
file.close();*/
file.close();
#else
Q_UNUSED( pszMsg );
Q_UNUSED( pszInput );
Q_UNUSED( nLen );
#endif
}

/************************************************************************/
@@ -459,7 +459,7 @@ void QgsMssqlProvider::select( QgsAttributeList fetchAttributes,
bool fetchGeometry,
bool useIntersect )
{

Q_UNUSED( useIntersect );
// build sql statement
mStatement = QString( "select " );
mFieldCount = 0;
@@ -81,7 +81,7 @@ class QgsMssqlGeometryParser
unsigned char* ParseSqlGeometry( unsigned char* pszInput, int nLen );
int GetSRSId() { return nSRSId; };
int GetWkbLen() { return nWkbLen; };
void DumpMemoryToLog( char* pszMsg, unsigned char* pszInput, int nLen );
void DumpMemoryToLog( const char* pszMsg, unsigned char* pszInput, int nLen );
};


0 comments on commit 53b9ae2

Please sign in to comment.