2 changes: 1 addition & 1 deletion python/core/symbology-ng/qgsrendererv2registry.sip
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class QgsRendererV2AbstractMetadata

/** Return new instance of the renderer given the DOM element. Returns NULL on error.
* Pure virtual function: must be implemented in derived classes. */
virtual QgsFeatureRendererV2* createRenderer( QDomElement& elem ) = 0;
virtual QgsFeatureRendererV2* createRenderer( QDomElement& elem ) = 0 /Factory/;
/** Return new instance of settings widget for the renderer. Returns NULL on error. */
virtual QgsRendererV2Widget* createRendererWidget( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer ) /Factory/;

Expand Down
4 changes: 2 additions & 2 deletions python/core/symbology-ng/qgsrulebasedrendererv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class QgsRuleBasedRendererV2 : QgsFeatureRendererV2
//! take child rule out, set parent as null
void takeChild( QgsRuleBasedRendererV2::Rule* rule );
//! take child rule out, set parent as null
QgsRuleBasedRendererV2::Rule* takeChildAt( int i );
QgsRuleBasedRendererV2::Rule* takeChildAt( int i ) /TransferBack/;

protected:
void initFilter();
Expand Down Expand Up @@ -157,7 +157,7 @@ class QgsRuleBasedRendererV2 : QgsFeatureRendererV2

virtual void toSld( QDomDocument& doc, QDomElement &element ) const;

static QgsFeatureRendererV2* createFromSld( QDomElement& element, QGis::GeometryType geomType );
static QgsFeatureRendererV2* createFromSld( QDomElement& element, QGis::GeometryType geomType ) /Factory/;

virtual QgsSymbolV2List symbols();

Expand Down
2 changes: 1 addition & 1 deletion python/core/symbology-ng/qgssymbollayerv2registry.sip
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class QgsSymbolLayerV2Registry
QgsSymbolLayerV2AbstractMetadata* symbolLayerMetadata( QString name ) const;

//! register a new symbol layer type. Takes ownership of the metadata instance.
bool addSymbolLayerType( QgsSymbolLayerV2AbstractMetadata* metadata );
bool addSymbolLayerType( QgsSymbolLayerV2AbstractMetadata* metadata /Transfer/ );

//! create a new instance of symbol layer given symbol layer name and properties
QgsSymbolLayerV2* createSymbolLayer( QString name, const QgsStringMap& properties = QgsStringMap() ) const /Factory/;
Expand Down
2 changes: 1 addition & 1 deletion python/gui/qgsannotationitem.sip
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class QgsAnnotationItem: QgsMapCanvasItem
QPointF offsetFromReferencePoint() const;

/**Set symbol that is drawn on map position. Takes ownership*/
void setMarkerSymbol( QgsMarkerSymbolV2* symbol );
void setMarkerSymbol( QgsMarkerSymbolV2* symbol /Transfer/ );
const QgsMarkerSymbolV2* markerSymbol() const;

void setFrameBorderWidth( double w );
Expand Down
2 changes: 1 addition & 1 deletion python/gui/qgstextannotationitem.sip
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class QgsTextAnnotationItem: QgsAnnotationItem
~QgsTextAnnotationItem();

/**Returns document (caller takes ownership)*/
QTextDocument* document() const;
QTextDocument* document() const /Factory/;
/**Sets document (does not take ownership)*/
void setDocument( const QTextDocument* doc );

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsrasterprojector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void QgsRasterProjector::calc()
}
// What is the maximum reasonable size of transformatio matrix?
// TODO: consider better when to break - ratio
if ( mCPRows * mCPCols > 0.0625 * mDestRows * mDestCols )
if ( mCPRows * mCPCols > 0.25 * mDestRows * mDestCols )
{
QgsDebugMsg( "Too large CP matrix" );
mApproximate = false;
Expand Down
6 changes: 3 additions & 3 deletions src/core/raster/qgsrasterrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
#include <QPainter>

QgsRasterRenderer::QgsRasterRenderer( QgsRasterInterface* input, const QString& type )
: QgsRasterInterface( input ),
mType( type ), mOpacity( 1.0 ), mRasterTransparency( 0 ),
mAlphaBand( -1 ), mInvertColor( false ), mMaxOversampling( 2.0 )
: QgsRasterInterface( input )
, mType( type ), mOpacity( 1.0 ), mRasterTransparency( 0 )
, mAlphaBand( -1 ), mInvertColor( false ), mMaxOversampling( 2.0 )
{
}

Expand Down
25 changes: 24 additions & 1 deletion tests/src/providers/testqgswcspublicservers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ void TestQgsWcsPublicServers::init()
Server server( serverUrl );
server.description = serverValue.property( "description" ).toString();

QScriptValueIterator paramsIt( serverValue.property( "params" ) );
while ( paramsIt.hasNext() )
{
paramsIt.next();
QgsDebugMsg( QString( "params value: %1" ).arg( paramsIt.value().toString() ) );
server.params.insert( paramsIt.name(), paramsIt.value().toString() );
}

QScriptValue issuesValue = serverValue.property( "issues" );

QScriptValueIterator issuesIt( issuesValue );
Expand Down Expand Up @@ -267,6 +275,7 @@ void TestQgsWcsPublicServers::test( )

foreach ( QString serverUrl, serverUrls )
{
Server myServer = getServer( serverUrl );
QStringList myServerLog;
myServerLog << "server:" + serverUrl;
QString myServerDirName = serverUrl;
Expand Down Expand Up @@ -308,6 +317,11 @@ void TestQgsWcsPublicServers::test( )
myServerUri.setParam( "version", version );
}

foreach ( QString key, myServer.params.keys() )
{
myServerUri.setParam( key, myServer.params.value( key ) );
}

QgsWcsCapabilities myCapabilities;
myCapabilities.setUri( myServerUri );

Expand Down Expand Up @@ -573,7 +587,16 @@ void TestQgsWcsPublicServers::report()
Server myServer = getServer( myServerLog.value( "server" ) );
if ( !myServer.description.isEmpty() )
{
myReport += myServer.description + "<br>";
myReport += myServer.description + "<br>\n";
}
if ( myServer.params.size() > 0 )
{
myReport += "<br>Additional params: ";
foreach ( QString key, myServer.params.keys() )
{
myReport += key + "=" + myServer.params.value( key ) + " ";
}
myReport += "<br>\n";
}

QString myServerReport;
Expand Down
2 changes: 2 additions & 0 deletions tests/src/providers/testqgswcspublicservers.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class TestQgsWcsPublicServers: public QObject
QString url; // URL
QString description; // notes
QList<TestQgsWcsPublicServers::Issue> issues;
// additional params to be set on URI, e.g. IgnoreGetMapUrl
QMap<QString, QString> params;
};

enum OffenderType
Expand Down
4 changes: 3 additions & 1 deletion tests/src/providers/wcs-servers.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@
}, {
url: 'http://motherlode.ucar.edu:8080/thredds/wcs/fmrc/NCEP/DGEX/Alaska_12km/NCEP-DGEX-Alaska_12km_best.ncd'
}, {
url: 'http://navigator.state.or.us/ArcGIS/services/Framework/Imagery_Mosaic2009/ImageServer/WCSServer'
url: 'http://navigator.state.or.us/ArcGIS/services/Framework/Imagery_Mosaic2009/ImageServer/WCSServer',
description: "GetCapabilities gives wrong URL for all requests (server does not exists). Additional parameter IgnoreGetMapUrl must be used",
params: { 'IgnoreGetMapUrl': '1' }
}, {
url: 'http://nsidc.org/cgi-bin/atlas_north'
/*
Expand Down
4 changes: 2 additions & 2 deletions tests/src/python/test_qgscomposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
print "You need to install unittest2 to run the salt tests"
sys.exit(1)
else:
from unittest import expectedFailure
from unittest import TestCase, expectedFailure

QGISAPP, CANVAS, IFACE, PARENT = getQgisTestApp()
TEST_DATA_DIR = unitTestDataPath()


class TestQgsComposition(unittest.TestCase):
class TestQgsComposition(TestCase):

def setUp(self):
"""Run before each test."""
Expand Down