Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'release-1_7_0' of github.com:qgis/Quantum-GIS into rele…
…ase-1_7_0
  • Loading branch information
timlinux committed Jul 14, 2011
2 parents e1f6d6e + c79eb9d commit 4e7ee8e
Show file tree
Hide file tree
Showing 9 changed files with 213 additions and 179 deletions.
328 changes: 174 additions & 154 deletions i18n/qgis_de.ts

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions src/app/composer/qgscomposer.cpp
Expand Up @@ -504,7 +504,7 @@ class QgsPaintEngineHack : public QPaintEngine
gccaps |= ( QPaintEngine::PrimitiveTransform
// | QPaintEngine::PatternTransform
| QPaintEngine::PixmapTransform
// | QPaintEngine::PatternBrush
| QPaintEngine::PatternBrush
// | QPaintEngine::LinearGradientFill
// | QPaintEngine::RadialGradientFill
// | QPaintEngine::ConicalGradientFill
Expand Down Expand Up @@ -559,11 +559,10 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
printer.setPaperSize( QSizeF( mComposition->paperWidth(), mComposition->paperHeight() ), QPrinter::Millimeter );

QPaintEngine *engine = printer.paintEngine();
if ( engine && engine->hasFeature( QPaintEngine::PatternTransform ) )
if ( engine )
{
QgsPaintEngineHack *hack = static_cast<QgsPaintEngineHack*>( engine );
hack->fixFlags();
Q_ASSERT( !engine->hasFeature( QPaintEngine::PatternTransform ) );
}

print( printer );
Expand Down
12 changes: 6 additions & 6 deletions src/app/postgres/qgspgsourceselect.cpp
Expand Up @@ -345,15 +345,15 @@ QString QgsPgSourceSelect::layerURI( const QModelIndex &index )

if ( typeName == "POINT" )
{
geomFilter = QString( "geometrytype(\"%1\") IN ('POINT','MULTIPOINT')" ).arg( geomColumnName );
geomFilter = QString( "upper(geometrytype(\"%1\")) IN ('POINT','MULTIPOINT')" ).arg( geomColumnName );
}
else if ( typeName == "LINESTRING" )
{
geomFilter = QString( "geometrytype(\"%1\") IN ('LINESTRING','MULTILINESTRING')" ).arg( geomColumnName );
geomFilter = QString( "upper(geometrytype(\"%1\")) IN ('LINESTRING','MULTILINESTRING')" ).arg( geomColumnName );
}
else if ( typeName == "POLYGON" )
{
geomFilter = QString( "geometrytype(\"%1\") IN ('POLYGON','MULTIPOLYGON')" ).arg( geomColumnName );
geomFilter = QString( "upper(geometrytype(\"%1\")) IN ('POLYGON','MULTIPOLYGON')" ).arg( geomColumnName );
}

if ( !geomFilter.isEmpty() && !sql.contains( geomFilter ) )
Expand Down Expand Up @@ -971,9 +971,9 @@ void QgsGeomColumnTypeThread::getLayerTypes()
{
QString query = QString( "select distinct "
"case"
" when geometrytype(%1) IN ('POINT','MULTIPOINT') THEN 'POINT'"
" when geometrytype(%1) IN ('LINESTRING','MULTILINESTRING') THEN 'LINESTRING'"
" when geometrytype(%1) IN ('POLYGON','MULTIPOLYGON') THEN 'POLYGON'"
" when upper(geometrytype(%1)) IN ('POINT','MULTIPOINT') THEN 'POINT'"
" when upper(geometrytype(%1)) IN ('LINESTRING','MULTILINESTRING') THEN 'LINESTRING'"
" when upper(geometrytype(%1)) IN ('POLYGON','MULTIPOLYGON') THEN 'POLYGON'"
" end "
"from " ).arg( "\"" + columns[i] + "\"" );
if ( mUseEstimatedMetadata )
Expand Down
2 changes: 1 addition & 1 deletion src/core/composer/qgscomposerlegend.cpp
Expand Up @@ -333,7 +333,7 @@ void QgsComposerLegend::drawLayerChildItems( QPainter* p, QStandardItem* layerIt
textAlignCoord = qMax( currentXCoord, textAlignCoord );
}

maxXCoord = textAlignCoord;
maxXCoord = qMax( maxXCoord, textAlignCoord );
for ( int i = 0; i < numChildren; ++i )
{
if ( p )
Expand Down
15 changes: 12 additions & 3 deletions src/mapserver/qgis_map_serv.cpp
Expand Up @@ -126,7 +126,17 @@ QFileInfo defaultAdminSLD()
return QFileInfo( "admin.sld" );
}


int fcgi_accept()
{
#ifdef Q_OS_WIN
if ( FCGX_IsCGI() )
return FCGI_Accept();
else
return FCGX_Accept( &FCGI_stdin->fcgx_stream, &FCGI_stdout->fcgx_stream, &FCGI_stderr->fcgx_stream, &environ );
#else
return FCGI_Accept();
#endif
}

int main( int argc, char * argv[] )
{
Expand Down Expand Up @@ -181,11 +191,10 @@ int main( int argc, char * argv[] )
}
}


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

while ( FCGI_Accept() >= 0 )
while ( fcgi_accept() >= 0 )
{
printRequestInfos(); //print request infos if in debug mode

Expand Down
8 changes: 7 additions & 1 deletion src/mapserver/qgsconfigcache.cpp
Expand Up @@ -73,14 +73,19 @@ QgsConfigParser* QgsConfigCache::insertConfiguration( const QString& filePath )
QFile* configFile = new QFile( filePath );
if ( !configFile->exists() || !configFile->open( QIODevice::ReadOnly ) )
{
QgsMSDebugMsg( "File unreadable: " + filePath );
delete configFile;
return 0;
}

//then create xml document
QDomDocument* configDoc = new QDomDocument();
if ( !configDoc->setContent( configFile, true ) )
QString errorMsg;
int line, column;
if ( !configDoc->setContent( configFile, true, &errorMsg, &line, &column ) )
{
QgsMSDebugMsg( QString( "Parse error %1 at row %2, column %3 in %4 " )
.arg( errorMsg ).arg( line ).arg( column ).arg( filePath ) );
delete configFile;
delete configDoc;
return 0;
Expand All @@ -99,6 +104,7 @@ QgsConfigParser* QgsConfigCache::insertConfiguration( const QString& filePath )
}
else
{
QgsMSDebugMsg( "SLD or qgis expected in " + filePath );
delete configDoc;
return 0;
}
Expand Down
3 changes: 2 additions & 1 deletion src/mapserver/qgsmapserverlogger.cpp
Expand Up @@ -57,7 +57,8 @@ void QgsMapServerLogger::printMessage( const QString& message )
if ( !mLogFile.isOpen() )
{
#ifdef _MSC_VER
::OutputDebugString( message.toLocal8Bit() );
::OutputDebugString( message .toLocal8Bit() );
::OutputDebugString( "\n" );
#endif
return;
}
Expand Down
9 changes: 4 additions & 5 deletions src/mapserver/qgswmsserver.cpp
Expand Up @@ -324,12 +324,12 @@ QDomDocument QgsWMSServer::getStyle()
std::map<QString, QString>::const_iterator style_it = mParameterMap.find( "STYLE" );
if ( style_it == mParameterMap.end() )
{
throw QgsMapServiceException( "StyleNotSpecified", "Style is manadatory for GetStyle operation" );
throw QgsMapServiceException( "StyleNotSpecified", "Style is mandatory for GetStyle operation" );
}
std::map<QString, QString>::const_iterator layer_it = mParameterMap.find( "LAYER" );
if ( layer_it == mParameterMap.end() )
{
throw QgsMapServiceException( "LayerNotSpecified", "Layer is manadatory for GetStyle operation" );
throw QgsMapServiceException( "LayerNotSpecified", "Layer is mandatory for GetStyle operation" );
}

QString styleName = style_it->second;
Expand All @@ -348,7 +348,7 @@ class QgsPaintEngineHack : public QPaintEngine
gccaps |= ( QPaintEngine::PrimitiveTransform
// | QPaintEngine::PatternTransform
| QPaintEngine::PixmapTransform
// | QPaintEngine::PatternBrush
| QPaintEngine::PatternBrush
// | QPaintEngine::LinearGradientFill
// | QPaintEngine::RadialGradientFill
// | QPaintEngine::ConicalGradientFill
Expand Down Expand Up @@ -458,11 +458,10 @@ QByteArray* QgsWMSServer::getPrint( const QString& formatString )
QRectF paperRectPixel = printer.pageRect( QPrinter::DevicePixel );

QPaintEngine *engine = printer.paintEngine();
if ( engine->hasFeature( QPaintEngine::PatternTransform ) )
if ( engine )
{
QgsPaintEngineHack *hack = static_cast<QgsPaintEngineHack*>( engine );
hack->fixFlags();
Q_ASSERT( !engine->hasFeature( QPaintEngine::PatternTransform ) );
}

QPainter p( &printer );
Expand Down
10 changes: 5 additions & 5 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -3160,7 +3160,7 @@ bool QgsPostgresProvider::getGeometryDetails()
}
}

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

0 comments on commit 4e7ee8e

Please sign in to comment.