Skip to content

Commit c39d7e6

Browse files
author
jef
committed
mapserver: semicolon removed from QgsMSDebugMsg macro
git-svn-id: http://svn.osgeo.org/qgis/trunk@15162 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b45f870 commit c39d7e6

15 files changed

+164
-166
lines changed

src/mapserver/qgis_map_serv.cpp

+25-25
Original file line numberDiff line numberDiff line change
@@ -72,36 +72,36 @@ void printRequestInfos()
7272
{
7373
#ifdef QGSMSDEBUG
7474
//print out some infos about the request
75-
QgsMSDebugMsg( "************************new request**********************" )
75+
QgsMSDebugMsg( "************************new request**********************" );
7676
QgsMSDebugMsg( QDateTime::currentDateTime().toString( "yyyy-MM-dd hh:mm:ss" ) );
7777

7878
if ( getenv( "REMOTE_ADDR" ) != NULL )
7979
{
80-
QgsMSDebugMsg( "remote ip: " + QString( getenv( "REMOTE_ADDR" ) ) )
80+
QgsMSDebugMsg( "remote ip: " + QString( getenv( "REMOTE_ADDR" ) ) );
8181
}
8282
if ( getenv( "REMOTE_HOST" ) != NULL )
8383
{
84-
QgsMSDebugMsg( "remote host: " + QString( getenv( "REMOTE_HOST" ) ) )
84+
QgsMSDebugMsg( "remote host: " + QString( getenv( "REMOTE_HOST" ) ) );
8585
}
8686
if ( getenv( "REMOTE_USER" ) != NULL )
8787
{
88-
QgsMSDebugMsg( "remote user: " + QString( getenv( "REMOTE_USER" ) ) )
88+
QgsMSDebugMsg( "remote user: " + QString( getenv( "REMOTE_USER" ) ) );
8989
}
9090
if ( getenv( "REMOTE_IDENT" ) != NULL )
9191
{
92-
QgsMSDebugMsg( "REMOTE_IDENT: " + QString( getenv( "REMOTE_IDENT" ) ) )
92+
QgsMSDebugMsg( "REMOTE_IDENT: " + QString( getenv( "REMOTE_IDENT" ) ) );
9393
}
9494
if ( getenv( "CONTENT_TYPE" ) != NULL )
9595
{
96-
QgsMSDebugMsg( "CONTENT_TYPE: " + QString( getenv( "CONTENT_TYPE" ) ) )
96+
QgsMSDebugMsg( "CONTENT_TYPE: " + QString( getenv( "CONTENT_TYPE" ) ) );
9797
}
9898
if ( getenv( "AUTH_TYPE" ) != NULL )
9999
{
100-
QgsMSDebugMsg( "AUTH_TYPE: " + QString( getenv( "AUTH_TYPE" ) ) )
100+
QgsMSDebugMsg( "AUTH_TYPE: " + QString( getenv( "AUTH_TYPE" ) ) );
101101
}
102102
if ( getenv( "HTTP_USER_AGENT" ) != NULL )
103103
{
104-
QgsMSDebugMsg( "HTTP_USER_AGENT: " + QString( getenv( "HTTP_USER_AGENT" ) ) )
104+
QgsMSDebugMsg( "HTTP_USER_AGENT: " + QString( getenv( "HTTP_USER_AGENT" ) ) );
105105
}
106106
#endif //QGSMSDEBUG
107107
}
@@ -154,12 +154,12 @@ int main( int argc, char * argv[] )
154154
//write to qgis_wms_server.log in application directory
155155
QgsMapServerLogger::instance()->setLogFilePath( qgsapp.applicationDirPath() + "/qgis_wms_server.log" );
156156
#endif
157-
QgsMSDebugMsg( "Prefix PATH: " + QgsApplication::prefixPath() )
158-
QgsMSDebugMsg( "Plugin PATH: " + QgsApplication::pluginPath() )
159-
QgsMSDebugMsg( "PkgData PATH: " + QgsApplication::pkgDataPath() )
160-
QgsMSDebugMsg( "User DB PATH: " + QgsApplication::qgisUserDbFilePath() )
157+
QgsMSDebugMsg( "Prefix PATH: " + QgsApplication::prefixPath() );
158+
QgsMSDebugMsg( "Plugin PATH: " + QgsApplication::pluginPath() );
159+
QgsMSDebugMsg( "PkgData PATH: " + QgsApplication::pkgDataPath() );
160+
QgsMSDebugMsg( "User DB PATH: " + QgsApplication::qgisUserDbFilePath() );
161161

162-
QgsMSDebugMsg( qgsapp.applicationDirPath() + "/qgis_wms_server.log" )
162+
QgsMSDebugMsg( qgsapp.applicationDirPath() + "/qgis_wms_server.log" );
163163

164164
//create config cache and search for config files in the current directory.
165165
//These configurations are used if no mapfile parameter is present in the request
@@ -194,18 +194,18 @@ int main( int argc, char * argv[] )
194194
{
195195
if ( strcmp( requestMethod, "POST" ) == 0 )
196196
{
197-
QgsMSDebugMsg( "Creating QgsSOAPRequestHandler" )
197+
QgsMSDebugMsg( "Creating QgsSOAPRequestHandler" );
198198
theRequestHandler = new QgsSOAPRequestHandler();
199199
}
200200
else
201201
{
202-
QgsMSDebugMsg( "Creating QgsGetRequestHandler" )
202+
QgsMSDebugMsg( "Creating QgsGetRequestHandler" );
203203
theRequestHandler = new QgsGetRequestHandler();
204204
}
205205
}
206206
else
207207
{
208-
QgsMSDebugMsg( "Creating QgsGetRequestHandler" )
208+
QgsMSDebugMsg( "Creating QgsGetRequestHandler" );
209209
theRequestHandler = new QgsGetRequestHandler();
210210
}
211211

@@ -217,7 +217,7 @@ int main( int argc, char * argv[] )
217217
}
218218
catch ( QgsMapServiceException& e )
219219
{
220-
QgsMSDebugMsg( "An exception was thrown during input parsing" )
220+
QgsMSDebugMsg( "An exception was thrown during input parsing" );
221221
theRequestHandler->sendServiceException( e );
222222
continue;
223223
}
@@ -246,7 +246,7 @@ int main( int argc, char * argv[] )
246246
if ( serviceIt == parameterMap.end() )
247247
{
248248
//tell the user that service parameter is mandatory
249-
QgsMSDebugMsg( "unable to find 'SERVICE' parameter, exiting..." )
249+
QgsMSDebugMsg( "unable to find 'SERVICE' parameter, exiting..." );
250250
theRequestHandler->sendServiceException( QgsMapServiceException( "ServiceNotSpecified", "Service not specified. The SERVICE parameter is mandatory" ) );
251251
delete theRequestHandler;
252252
continue;
@@ -271,7 +271,7 @@ int main( int argc, char * argv[] )
271271
if ( requestIt == parameterMap.end() )
272272
{
273273
//do some error handling
274-
QgsMSDebugMsg( "unable to find 'REQUEST' parameter, exiting..." )
274+
QgsMSDebugMsg( "unable to find 'REQUEST' parameter, exiting..." );
275275
theRequestHandler->sendServiceException( QgsMapServiceException( "OperationNotSupported", "Please check the value of the REQUEST parameter" ) );
276276
delete theRequestHandler;
277277
delete theServer;
@@ -292,7 +292,7 @@ int main( int argc, char * argv[] )
292292
delete theServer;
293293
continue;
294294
}
295-
QgsMSDebugMsg( "sending GetCapabilities response" )
295+
QgsMSDebugMsg( "sending GetCapabilities response" );
296296
theRequestHandler->sendGetCapabilitiesResponse( capabilitiesDocument );
297297
delete theRequestHandler;
298298
delete theServer;
@@ -307,7 +307,7 @@ int main( int argc, char * argv[] )
307307
}
308308
catch ( QgsMapServiceException& ex )
309309
{
310-
QgsMSDebugMsg( "Catched exception during GetMap request" )
310+
QgsMSDebugMsg( "Catched exception during GetMap request" );
311311
theRequestHandler->sendServiceException( ex );
312312
delete theRequestHandler;
313313
delete theServer;
@@ -316,13 +316,13 @@ int main( int argc, char * argv[] )
316316

317317
if ( result )
318318
{
319-
QgsMSDebugMsg( "Sending GetMap response" )
319+
QgsMSDebugMsg( "Sending GetMap response" );
320320
theRequestHandler->sendGetMapResponse( serviceIt->second, result );
321321
}
322322
else
323323
{
324324
//do some error handling
325-
QgsMSDebugMsg( "result image is 0" )
325+
QgsMSDebugMsg( "result image is 0" );
326326
}
327327
delete result;
328328
delete theRequestHandler;
@@ -392,14 +392,14 @@ int main( int argc, char * argv[] )
392392

393393
if ( result )
394394
{
395-
QgsMSDebugMsg( "Sending GetLegendGraphics response" )
395+
QgsMSDebugMsg( "Sending GetLegendGraphics response" );
396396
//sending is the same for GetMap and GetLegendGraphics
397397
theRequestHandler->sendGetMapResponse( serviceIt->second, result );
398398
}
399399
else
400400
{
401401
//do some error handling
402-
QgsMSDebugMsg( "result image is 0" )
402+
QgsMSDebugMsg( "result image is 0" );
403403
}
404404
delete result;
405405
delete theRequestHandler;

src/mapserver/qgsconfigcache.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ QgsConfigParser* QgsConfigCache::searchConfiguration( const QString& filePath )
3838
QMap<QString, QgsConfigParser*>::const_iterator configIt = mCachedConfigurations.find( filePath );
3939
if ( configIt == mCachedConfigurations.constEnd() )
4040
{
41-
QgsMSDebugMsg( "Create new configuration" )
41+
QgsMSDebugMsg( "Create new configuration" );
4242
return insertConfiguration( filePath );
4343
}
4444
else
4545
{
46-
QgsMSDebugMsg( "Return configuration from cash" )
46+
QgsMSDebugMsg( "Return configuration from cache" );
4747
return configIt.value();
4848
}
4949
}

src/mapserver/qgsgetrequesthandler.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ std::map<QString, QString> QgsGetRequestHandler::parseInput()
2424
if ( qs )
2525
{
2626
queryString = QString( qs );
27-
QgsMSDebugMsg( "query string is: " + queryString )
27+
QgsMSDebugMsg( "query string is: " + queryString );
2828
}
2929
else
3030
{
31-
QgsMSDebugMsg( "error, no query string found" )
31+
QgsMSDebugMsg( "error, no query string found" );
3232
return parameters; //no query string? something must be wrong...
3333
}
3434

@@ -80,7 +80,7 @@ std::map<QString, QString> QgsGetRequestHandler::parseInput()
8080

8181
}
8282
parameters.insert( std::make_pair( key.toUpper(), value ) );
83-
QgsMSDebugMsg( "inserting pair " + key.toUpper() + " // " + value + " into the parameter map" )
83+
QgsMSDebugMsg( "inserting pair " + key.toUpper() + " // " + value + " into the parameter map" );
8484
}
8585

8686
//feature info format?
@@ -160,7 +160,7 @@ void QgsGetRequestHandler::sendGetStyleResponse( const QDomDocument& doc ) const
160160
void QgsGetRequestHandler::sendGetFeatureInfoResponse( const QDomDocument& infoDoc, const QString& infoFormat ) const
161161
{
162162
QByteArray ba;
163-
QgsMSDebugMsg( "Info format is:" + infoFormat )
163+
QgsMSDebugMsg( "Info format is:" + infoFormat );
164164

165165
if ( infoFormat == "text/xml" )
166166
{

src/mapserver/qgshostedrdsbuilder.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ QgsHostedRDSBuilder::~QgsHostedRDSBuilder()
3535

3636
QgsMapLayer* QgsHostedRDSBuilder::createMapLayer( const QDomElement& elem, const QString& layerName, QList<QTemporaryFile*>& filesToRemove, QList<QgsMapLayer*>& layersToRemove, bool allowCaching ) const
3737
{
38-
QgsMSDebugMsg( "entering." )
38+
QgsMSDebugMsg( "entering." );
3939

4040
if ( elem.isNull() )
4141
{
@@ -45,20 +45,20 @@ QgsMapLayer* QgsHostedRDSBuilder::createMapLayer( const QDomElement& elem, const
4545
QString uri = elem.attribute( "uri", "not found" );
4646
if ( uri == "not found" )
4747
{
48-
QgsMSDebugMsg( "Uri not found" )
48+
QgsMSDebugMsg( "Uri not found" );
4949
return 0;
5050
}
5151
else
5252
{
53-
QgsMSDebugMsg( "Trying to get hostedrds layer from cache with uri: " + uri )
53+
QgsMSDebugMsg( "Trying to get hostedrds layer from cache with uri: " + uri );
5454
QgsRasterLayer* rl = 0;
5555
if ( allowCaching )
5656
{
5757
rl = dynamic_cast<QgsRasterLayer*>( QgsMSLayerCache::instance()->searchLayer( uri, layerName ) );
5858
}
5959
if ( !rl )
6060
{
61-
QgsMSDebugMsg( "hostedrds layer not in cache, so create and insert it" )
61+
QgsMSDebugMsg( "hostedrds layer not in cache, so create and insert it" );
6262
rl = new QgsRasterLayer( uri, layerNameFromUri( uri ) );
6363
if ( allowCaching )
6464
{

src/mapserver/qgshostedvdsbuilder.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ QgsMapLayer* QgsHostedVDSBuilder::createMapLayer( const QDomElement& elem, const
4444

4545
if ( providerType == "not found" || uri == "not found" )
4646
{
47-
QgsMSDebugMsg( "error, provider type not found" )
47+
QgsMSDebugMsg( "error, provider type not found" );
4848
return 0;
4949
}
5050

@@ -58,12 +58,12 @@ QgsMapLayer* QgsHostedVDSBuilder::createMapLayer( const QDomElement& elem, const
5858

5959
if ( !ml )
6060
{
61-
QgsMSDebugMsg( "hostedvds layer not in cash, so create and insert it" )
61+
QgsMSDebugMsg( "hostedvds layer not in cash, so create and insert it" );
6262
ml = new QgsVectorLayer( uri, layerNameFromUri( uri ), providerType );
6363

6464
if ( !ml || !ml->isValid() )
6565
{
66-
QgsMSDebugMsg( "error, VectorLayer is 0 or invalid" )
66+
QgsMSDebugMsg( "error, VectorLayer is 0 or invalid" );
6767
delete ml;
6868
return 0;
6969
}

src/mapserver/qgsmapserverlogger.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ void QgsMapServerLogger::printChar( QChar c )
6868
void QgsMapServerLogger::printMessage( const char *file, const char *function, int line, const QString& message )
6969
{
7070
#if defined(_MSC_VER)
71-
printMessage( QString( "%1(%2): (%3) %4" ).arg( file ).arg( line ).arg( function ).arg( line ).arg( message ) );
71+
printMessage( QString( "%1(%2): (%3) %4" ).arg( file ).arg( line ).arg( function ).arg( message ) );
7272
#else
73-
printMessage( QString( "%1: %2: (%3) %4" ).arg( file ).arg( line ).arg( function ).arg( line ).arg( message ) );
73+
printMessage( QString( "%1: %2: (%3) %4" ).arg( file ).arg( line ).arg( function ).arg( message ) );
7474
#endif
7575
}
7676
#endif

src/mapserver/qgsmapserverlogger.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <QTextStream>
2323

2424
#ifdef QGSMSDEBUG
25-
#define QgsMSDebugMsg(str) QgsMapServerLogger::instance()->printMessage(__FILE__, __FUNCTION__, __LINE__, str);
25+
#define QgsMSDebugMsg(str) QgsMapServerLogger::instance()->printMessage(__FILE__, __FUNCTION__, __LINE__, str)
2626
#else
2727
#define QgsMSDebugMsg(str)
2828
#endif

src/mapserver/qgsmslayercache.cpp

+8-10
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ QgsMSLayerCache::QgsMSLayerCache()
3939

4040
QgsMSLayerCache::~QgsMSLayerCache()
4141
{
42-
QgsMSDebugMsg( "removing all entries" )
42+
QgsMSDebugMsg( "removing all entries" );
4343
QMap<QPair<QString, QString>, QgsMSLayerCacheEntry>::iterator it;
4444
for ( it = mEntries.begin(); it != mEntries.end(); ++it )
4545
{
@@ -50,7 +50,7 @@ QgsMSLayerCache::~QgsMSLayerCache()
5050

5151
void QgsMSLayerCache::insertLayer( const QString& url, const QString& layerName, QgsMapLayer* layer, const QList<QString>& tempFiles )
5252
{
53-
QgsMSDebugMsg( "inserting layer" )
53+
QgsMSDebugMsg( "inserting layer" );
5454
if ( mEntries.size() > MAX_N_LAYERS ) //force cache layer examination after 10 inserted layers
5555
{
5656
updateEntries();
@@ -79,7 +79,7 @@ QgsMapLayer* QgsMSLayerCache::searchLayer( const QString& url, const QString& la
7979
QMap<QPair<QString, QString>, QgsMSLayerCacheEntry>::iterator it = mEntries.find( urlNamePair );
8080
if ( it == mEntries.end() )
8181
{
82-
QgsMSDebugMsg( "Layer not found in cache" )
82+
QgsMSDebugMsg( "Layer not found in cache" );
8383
return 0;
8484
}
8585
else
@@ -93,14 +93,14 @@ QgsMapLayer* QgsMSLayerCache::searchLayer( const QString& url, const QString& la
9393
vl->removeOverlay( "diagram" );
9494
}
9595
#endif //DIAGRAMSERVER
96-
QgsMSDebugMsg( "Layer found in cache" )
96+
QgsMSDebugMsg( "Layer found in cache" );
9797
return it->layerPointer;
9898
}
9999
}
100100

101101
void QgsMSLayerCache::updateEntries()
102102
{
103-
QgsMSDebugMsg( "updateEntries" )
103+
QgsMSDebugMsg( "updateEntries" );
104104
int entriesToDelete = mEntries.size() - MAX_N_LAYERS;
105105
if ( entriesToDelete < 1 )
106106
{
@@ -120,7 +120,7 @@ void QgsMSLayerCache::removeLeastUsedEntry()
120120
{
121121
return;
122122
}
123-
QgsMSDebugMsg( "removeLeastUsedEntry" )
123+
QgsMSDebugMsg( "removeLeastUsedEntry" );
124124
QMap<QPair<QString, QString>, QgsMSLayerCacheEntry>::iterator it = mEntries.begin();
125125
QMap<QPair<QString, QString>, QgsMSLayerCacheEntry>::iterator lowest_it = it;
126126
time_t lowest_time = it->lastUsedTime;
@@ -149,10 +149,8 @@ void QgsMSLayerCache::freeEntryRessources( QgsMSLayerCacheEntry& entry )
149149
QFile removeFile( *it );
150150
if ( !removeFile.remove() )
151151
{
152-
QgsMSDebugMsg( "could not remove file: " + *it )
153-
QgsMSDebugMsg( removeFile.errorString() )
152+
QgsMSDebugMsg( "could not remove file: " + *it );
153+
QgsMSDebugMsg( removeFile.errorString() );
154154
}
155155
}
156156
}
157-
158-

src/mapserver/qgsremotedatasourcebuilder.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ int QgsRemoteDataSourceBuilder::loadData( const QString& url, QByteArray& data )
155155
QgsHttpTransaction http( url );
156156
if ( !http.getSynchronously( data ) )
157157
{
158-
QgsMSDebugMsg( "Error, loading from http failed" )
158+
QgsMSDebugMsg( "Error, loading from http failed" );
159159
return 1; //no success
160160
}
161161
}

0 commit comments

Comments
 (0)