File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ Implicit sharing was added in 2.14
9898%End
9999
100100
101+
101102 QgsExpression();
102103%Docstring
103104 Create an empty expression.
Original file line number Diff line number Diff line change @@ -218,6 +218,11 @@ QgsExpression &QgsExpression::operator=( const QgsExpression &other )
218218 return *this ;
219219}
220220
221+ QgsExpression::operator QString () const
222+ {
223+ return d->mExp ;
224+ }
225+
221226QgsExpression::QgsExpression ()
222227 : d( new QgsExpressionPrivate )
223228{
Original file line number Diff line number Diff line change @@ -137,6 +137,13 @@ class CORE_EXPORT QgsExpression
137137 */
138138 QgsExpression &operator =( const QgsExpression &other );
139139
140+ /* *
141+ * Automatically convert this expression to a string where requested.
142+ *
143+ * \since QGIS 3.0
144+ */
145+ operator QString () const SIP_SKIP;
146+
140147 /* *
141148 * Create an empty expression.
142149 *
You can’t perform that action at this time.
0 commit comments