Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix warnings in mssql provider
  • Loading branch information
jef-n committed Mar 24, 2012
1 parent 0ee3769 commit 53b9ae2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
2 changes: 0 additions & 2 deletions src/providers/mssql/qgsmssqldataitems.cpp
Expand Up @@ -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();
Expand Down
38 changes: 22 additions & 16 deletions src/providers/mssql/qgsmssqlgeometryparser.cpp
Expand Up @@ -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
}

/************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion src/providers/mssql/qgsmssqlprovider.cpp
Expand Up @@ -459,7 +459,7 @@ void QgsMssqlProvider::select( QgsAttributeList fetchAttributes,
bool fetchGeometry,
bool useIntersect )
{

Q_UNUSED( useIntersect );
// build sql statement
mStatement = QString( "select " );
mFieldCount = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/providers/mssql/qgsmssqlprovider.h
Expand Up @@ -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 );
};


Expand Down

0 comments on commit 53b9ae2

Please sign in to comment.