[QGIS Commit] r10052 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Jan 30 10:00:40 EST 2009
Author: mhugent
Date: 2009-01-30 10:00:40 -0500 (Fri, 30 Jan 2009)
New Revision: 10052
Modified:
trunk/qgis/src/app/qgsserversourceselect.cpp
Log:
Add a second PNG in case UMN mapserver offers image/png and image/png; mode=24bit
Modified: trunk/qgis/src/app/qgsserversourceselect.cpp
===================================================================
--- trunk/qgis/src/app/qgsserversourceselect.cpp 2009-01-30 08:38:44 UTC (rev 10051)
+++ trunk/qgis/src/app/qgsserversourceselect.cpp 2009-01-30 15:00:40 UTC (rev 10052)
@@ -70,12 +70,14 @@
// Some wms servers will support tiff, but by default Qt doesn't, but leave
// this in for those versions of Qt that might support tiff
m_PotentialFormats.insert( "image/tiff", qMakePair( QString( "TIFF" ), 6 ) );
+ //MH: UMN mapserver often offers png 24 bit
+ m_PotentialFormats.insert( "image/png; mode=24bit", qMakePair( QString( "PNG" ), 7 ) );
QMap<QString, QPair<QString, int> >::const_iterator iter = m_PotentialFormats.constBegin();
int i = 1;
while ( iter != m_PotentialFormats.end() )
{
- QRadioButton* btn = new QRadioButton( iter.value().first );
+ QRadioButton* btn = new QRadioButton(iter.value().first);
m_imageFormatGroup->addButton( btn, iter.value().second );
m_imageFormatLayout->addWidget( btn );
if ( i == 1 )
@@ -579,7 +581,13 @@
// a value that isn't in the map, hence we don't need to check for the value
// not being found.
- return m_PotentialFormats.key( qMakePair( label, id ) );
+ QString imageEncoding = m_PotentialFormats.key( qMakePair( label, id ) );
+
+ //substitute blanks with %20 (e.g. in "image/png; mode=24bit")
+ imageEncoding.replace(QRegExp(" "), "%20");
+ return imageEncoding;
+
+ //return m_PotentialFormats.key( qMakePair( label, id ) );
}
More information about the QGIS-commit
mailing list