Skip to content

Commit 4e7ee8e

Browse files
committed
Merge branch 'release-1_7_0' of github.com:qgis/Quantum-GIS into release-1_7_0
2 parents e1f6d6e + c79eb9d commit 4e7ee8e

File tree

9 files changed

+213
-179
lines changed

9 files changed

+213
-179
lines changed

i18n/qgis_de.ts

+174-154
Large diffs are not rendered by default.

src/app/composer/qgscomposer.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ class QgsPaintEngineHack : public QPaintEngine
504504
gccaps |= ( QPaintEngine::PrimitiveTransform
505505
// | QPaintEngine::PatternTransform
506506
| QPaintEngine::PixmapTransform
507-
// | QPaintEngine::PatternBrush
507+
| QPaintEngine::PatternBrush
508508
// | QPaintEngine::LinearGradientFill
509509
// | QPaintEngine::RadialGradientFill
510510
// | QPaintEngine::ConicalGradientFill
@@ -559,11 +559,10 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
559559
printer.setPaperSize( QSizeF( mComposition->paperWidth(), mComposition->paperHeight() ), QPrinter::Millimeter );
560560

561561
QPaintEngine *engine = printer.paintEngine();
562-
if ( engine && engine->hasFeature( QPaintEngine::PatternTransform ) )
562+
if ( engine )
563563
{
564564
QgsPaintEngineHack *hack = static_cast<QgsPaintEngineHack*>( engine );
565565
hack->fixFlags();
566-
Q_ASSERT( !engine->hasFeature( QPaintEngine::PatternTransform ) );
567566
}
568567

569568
print( printer );

src/app/postgres/qgspgsourceselect.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,15 @@ QString QgsPgSourceSelect::layerURI( const QModelIndex &index )
345345

346346
if ( typeName == "POINT" )
347347
{
348-
geomFilter = QString( "geometrytype(\"%1\") IN ('POINT','MULTIPOINT')" ).arg( geomColumnName );
348+
geomFilter = QString( "upper(geometrytype(\"%1\")) IN ('POINT','MULTIPOINT')" ).arg( geomColumnName );
349349
}
350350
else if ( typeName == "LINESTRING" )
351351
{
352-
geomFilter = QString( "geometrytype(\"%1\") IN ('LINESTRING','MULTILINESTRING')" ).arg( geomColumnName );
352+
geomFilter = QString( "upper(geometrytype(\"%1\")) IN ('LINESTRING','MULTILINESTRING')" ).arg( geomColumnName );
353353
}
354354
else if ( typeName == "POLYGON" )
355355
{
356-
geomFilter = QString( "geometrytype(\"%1\") IN ('POLYGON','MULTIPOLYGON')" ).arg( geomColumnName );
356+
geomFilter = QString( "upper(geometrytype(\"%1\")) IN ('POLYGON','MULTIPOLYGON')" ).arg( geomColumnName );
357357
}
358358

359359
if ( !geomFilter.isEmpty() && !sql.contains( geomFilter ) )
@@ -971,9 +971,9 @@ void QgsGeomColumnTypeThread::getLayerTypes()
971971
{
972972
QString query = QString( "select distinct "
973973
"case"
974-
" when geometrytype(%1) IN ('POINT','MULTIPOINT') THEN 'POINT'"
975-
" when geometrytype(%1) IN ('LINESTRING','MULTILINESTRING') THEN 'LINESTRING'"
976-
" when geometrytype(%1) IN ('POLYGON','MULTIPOLYGON') THEN 'POLYGON'"
974+
" when upper(geometrytype(%1)) IN ('POINT','MULTIPOINT') THEN 'POINT'"
975+
" when upper(geometrytype(%1)) IN ('LINESTRING','MULTILINESTRING') THEN 'LINESTRING'"
976+
" when upper(geometrytype(%1)) IN ('POLYGON','MULTIPOLYGON') THEN 'POLYGON'"
977977
" end "
978978
"from " ).arg( "\"" + columns[i] + "\"" );
979979
if ( mUseEstimatedMetadata )

src/core/composer/qgscomposerlegend.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ void QgsComposerLegend::drawLayerChildItems( QPainter* p, QStandardItem* layerIt
333333
textAlignCoord = qMax( currentXCoord, textAlignCoord );
334334
}
335335

336-
maxXCoord = textAlignCoord;
336+
maxXCoord = qMax( maxXCoord, textAlignCoord );
337337
for ( int i = 0; i < numChildren; ++i )
338338
{
339339
if ( p )

src/mapserver/qgis_map_serv.cpp

+12-3
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,17 @@ QFileInfo defaultAdminSLD()
126126
return QFileInfo( "admin.sld" );
127127
}
128128

129-
129+
int fcgi_accept()
130+
{
131+
#ifdef Q_OS_WIN
132+
if ( FCGX_IsCGI() )
133+
return FCGI_Accept();
134+
else
135+
return FCGX_Accept( &FCGI_stdin->fcgx_stream, &FCGI_stdout->fcgx_stream, &FCGI_stderr->fcgx_stream, &environ );
136+
#else
137+
return FCGI_Accept();
138+
#endif
139+
}
130140

131141
int main( int argc, char * argv[] )
132142
{
@@ -181,11 +191,10 @@ int main( int argc, char * argv[] )
181191
}
182192
}
183193

184-
185194
//creating QgsMapRenderer is expensive (access to srs.db), so we do it here before the fcgi loop
186195
QgsMapRenderer* theMapRenderer = new QgsMapRenderer();
187196

188-
while ( FCGI_Accept() >= 0 )
197+
while ( fcgi_accept() >= 0 )
189198
{
190199
printRequestInfos(); //print request infos if in debug mode
191200

src/mapserver/qgsconfigcache.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,19 @@ QgsConfigParser* QgsConfigCache::insertConfiguration( const QString& filePath )
7373
QFile* configFile = new QFile( filePath );
7474
if ( !configFile->exists() || !configFile->open( QIODevice::ReadOnly ) )
7575
{
76+
QgsMSDebugMsg( "File unreadable: " + filePath );
7677
delete configFile;
7778
return 0;
7879
}
7980

8081
//then create xml document
8182
QDomDocument* configDoc = new QDomDocument();
82-
if ( !configDoc->setContent( configFile, true ) )
83+
QString errorMsg;
84+
int line, column;
85+
if ( !configDoc->setContent( configFile, true, &errorMsg, &line, &column ) )
8386
{
87+
QgsMSDebugMsg( QString( "Parse error %1 at row %2, column %3 in %4 " )
88+
.arg( errorMsg ).arg( line ).arg( column ).arg( filePath ) );
8489
delete configFile;
8590
delete configDoc;
8691
return 0;
@@ -99,6 +104,7 @@ QgsConfigParser* QgsConfigCache::insertConfiguration( const QString& filePath )
99104
}
100105
else
101106
{
107+
QgsMSDebugMsg( "SLD or qgis expected in " + filePath );
102108
delete configDoc;
103109
return 0;
104110
}

src/mapserver/qgsmapserverlogger.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ void QgsMapServerLogger::printMessage( const QString& message )
5757
if ( !mLogFile.isOpen() )
5858
{
5959
#ifdef _MSC_VER
60-
::OutputDebugString( message.toLocal8Bit() );
60+
::OutputDebugString( message .toLocal8Bit() );
61+
::OutputDebugString( "\n" );
6162
#endif
6263
return;
6364
}

src/mapserver/qgswmsserver.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,12 @@ QDomDocument QgsWMSServer::getStyle()
324324
std::map<QString, QString>::const_iterator style_it = mParameterMap.find( "STYLE" );
325325
if ( style_it == mParameterMap.end() )
326326
{
327-
throw QgsMapServiceException( "StyleNotSpecified", "Style is manadatory for GetStyle operation" );
327+
throw QgsMapServiceException( "StyleNotSpecified", "Style is mandatory for GetStyle operation" );
328328
}
329329
std::map<QString, QString>::const_iterator layer_it = mParameterMap.find( "LAYER" );
330330
if ( layer_it == mParameterMap.end() )
331331
{
332-
throw QgsMapServiceException( "LayerNotSpecified", "Layer is manadatory for GetStyle operation" );
332+
throw QgsMapServiceException( "LayerNotSpecified", "Layer is mandatory for GetStyle operation" );
333333
}
334334

335335
QString styleName = style_it->second;
@@ -348,7 +348,7 @@ class QgsPaintEngineHack : public QPaintEngine
348348
gccaps |= ( QPaintEngine::PrimitiveTransform
349349
// | QPaintEngine::PatternTransform
350350
| QPaintEngine::PixmapTransform
351-
// | QPaintEngine::PatternBrush
351+
| QPaintEngine::PatternBrush
352352
// | QPaintEngine::LinearGradientFill
353353
// | QPaintEngine::RadialGradientFill
354354
// | QPaintEngine::ConicalGradientFill
@@ -458,11 +458,10 @@ QByteArray* QgsWMSServer::getPrint( const QString& formatString )
458458
QRectF paperRectPixel = printer.pageRect( QPrinter::DevicePixel );
459459

460460
QPaintEngine *engine = printer.paintEngine();
461-
if ( engine->hasFeature( QPaintEngine::PatternTransform ) )
461+
if ( engine )
462462
{
463463
QgsPaintEngineHack *hack = static_cast<QgsPaintEngineHack*>( engine );
464464
hack->fixFlags();
465-
Q_ASSERT( !engine->hasFeature( QPaintEngine::PatternTransform ) );
466465
}
467466

468467
QPainter p( &printer );

src/providers/postgres/qgspostgresprovider.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -3160,7 +3160,7 @@ bool QgsPostgresProvider::getGeometryDetails()
31603160
}
31613161
}
31623162

3163-
sql = QString( "select type,srid from geometry_columns"
3163+
sql = QString( "select upper(type),srid from geometry_columns"
31643164
" where f_table_name=%1 and f_geometry_column=%2 and f_table_schema=%3" )
31653165
.arg( quotedValue( tableName ) )
31663166
.arg( quotedValue( geomCol ) )
@@ -3204,7 +3204,7 @@ bool QgsPostgresProvider::getGeometryDetails()
32043204
// Didn't find what we need in the geometry_columns table, so
32053205
// get stuff from the relevant column instead. This may (will?)
32063206
// fail if there is no data in the relevant table.
3207-
sql = QString( "select %1(%2),geometrytype(%2) from %3" )
3207+
sql = QString( "select %1(%2),upper(geometrytype(%2)) from %3" )
32083208
.arg( connectionRO->majorVersion() < 2 ? "srid" : "st_srid" )
32093209
.arg( quotedIdentifier( geometryColumn ) )
32103210
.arg( mQuery );
@@ -3234,9 +3234,9 @@ bool QgsPostgresProvider::getGeometryDetails()
32343234
// check to see if there is a unique geometry type
32353235
sql = QString( "select distinct "
32363236
"case"
3237-
" when geometrytype(%1) IN ('POINT','MULTIPOINT') THEN 'POINT'"
3238-
" when geometrytype(%1) IN ('LINESTRING','MULTILINESTRING') THEN 'LINESTRING'"
3239-
" when geometrytype(%1) IN ('POLYGON','MULTIPOLYGON') THEN 'POLYGON'"
3237+
" when upper(geometrytype(%1)) IN ('POINT','MULTIPOINT') THEN 'POINT'"
3238+
" when upper(geometrytype(%1)) IN ('LINESTRING','MULTILINESTRING') THEN 'LINESTRING'"
3239+
" when upper(geometrytype(%1)) IN ('POLYGON','MULTIPOLYGON') THEN 'POLYGON'"
32403240
" end "
32413241
"from " ).arg( quotedIdentifier( geometryColumn ) );
32423242
if ( mUseEstimatedMetadata )

0 commit comments

Comments
 (0)