Skip to content

Commit 2752107

Browse files
committed
#9254: avoid break compatibility with the 2.0 api
1 parent a8c2d23 commit 2752107

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

python/core/symbology-ng/qgssymbollayerv2utils.sip

+11-1
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,22 @@ class QgsSymbolLayerV2Utils
111111
QString &path, QString &mime,
112112
QColor &color, double &size );
113113

114+
/** @deprecated Use wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element, QString name, QColor color, QColor borderColor, Qt::PenStyle borderStyle, double borderWidth, double size ) instead */
114115
static void wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
115-
QString name, QColor color, QColor borderColor = QColor(), Qt::PenStyle borderStyle = Qt::SolidLine,
116+
QString name, QColor color, QColor borderColor = QColor(),
117+
double borderWidth = -1, double size = -1 ) /Deprecated/ ;
118+
static void wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
119+
QString name, QColor color, QColor borderColor, Qt::PenStyle borderStyle,
116120
double borderWidth = -1, double size = -1 );
121+
/** @deprecated Use wellKnownMarkerFromSld( QDomElement &element, QString &name, QColor &color, QColor &borderColor, Qt::PenStyle &borderStyle, double &borderWidth, double &size ) instead */
122+
static bool wellKnownMarkerFromSld( QDomElement &element,
123+
QString &name, QColor &color, QColor &borderColor,
124+
double &borderWidth, double &size ) /Deprecated/ ;
125+
/** TODO: Enable to override deprecated wellKnownMarkerFromSld function
117126
static bool wellKnownMarkerFromSld( QDomElement &element,
118127
QString &name, QColor &color, QColor &borderColor, Qt::PenStyle &borderStyle,
119128
double &borderWidth, double &size );
129+
*/
120130

121131
static void externalMarkerToSld( QDomDocument &doc, QDomElement &element,
122132
QString path, QString format, int *markIndex = 0,

src/core/symbology-ng/qgssymbollayerv2utils.cpp

+15
Original file line numberDiff line numberDiff line change
@@ -1905,6 +1905,13 @@ bool QgsSymbolLayerV2Utils::externalMarkerFromSld( QDomElement &element,
19051905
return true;
19061906
}
19071907

1908+
void QgsSymbolLayerV2Utils::wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
1909+
QString name, QColor color, QColor borderColor,
1910+
double borderWidth, double size )
1911+
{
1912+
wellKnownMarkerToSld( doc, element, name, color, borderColor, Qt::SolidLine, borderWidth, size );
1913+
}
1914+
19081915
void QgsSymbolLayerV2Utils::wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
19091916
QString name, QColor color, QColor borderColor, Qt::PenStyle borderStyle,
19101917
double borderWidth, double size )
@@ -1941,6 +1948,14 @@ void QgsSymbolLayerV2Utils::wellKnownMarkerToSld( QDomDocument &doc, QDomElement
19411948
}
19421949
}
19431950

1951+
bool QgsSymbolLayerV2Utils::wellKnownMarkerFromSld( QDomElement &element,
1952+
QString &name, QColor &color, QColor &borderColor,
1953+
double &borderWidth, double &size )
1954+
{
1955+
Qt::PenStyle borderStyle;
1956+
return wellKnownMarkerFromSld( element, name, color, borderColor, borderStyle, borderWidth, size );
1957+
}
1958+
19441959
bool QgsSymbolLayerV2Utils::wellKnownMarkerFromSld( QDomElement &element,
19451960
QString &name, QColor &color, QColor &borderColor, Qt::PenStyle &borderStyle,
19461961
double &borderWidth, double &size )

src/core/symbology-ng/qgssymbollayerv2utils.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,17 @@ class CORE_EXPORT QgsSymbolLayerV2Utils
146146
QString &path, QString &mime,
147147
QColor &color, double &size );
148148

149+
/** @deprecated Use wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element, QString name, QColor color, QColor borderColor, Qt::PenStyle borderStyle, double borderWidth, double size ) instead */
149150
static void wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
150-
QString name, QColor color, QColor borderColor = QColor(), Qt::PenStyle borderStyle = Qt::SolidLine,
151+
QString name, QColor color, QColor borderColor = QColor(),
151152
double borderWidth = -1, double size = -1 );
153+
static void wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
154+
QString name, QColor color, QColor borderColor, Qt::PenStyle borderStyle,
155+
double borderWidth = -1, double size = -1 );
156+
/** @deprecated Use wellKnownMarkerFromSld( QDomElement &element, QString &name, QColor &color, QColor &borderColor, Qt::PenStyle &borderStyle, double &borderWidth, double &size ) instead */
157+
static bool wellKnownMarkerFromSld( QDomElement &element,
158+
QString &name, QColor &color, QColor &borderColor,
159+
double &borderWidth, double &size );
152160
static bool wellKnownMarkerFromSld( QDomElement &element,
153161
QString &name, QColor &color, QColor &borderColor, Qt::PenStyle &borderStyle,
154162
double &borderWidth, double &size );

0 commit comments

Comments
 (0)