2 changes: 1 addition & 1 deletion python/core/qgsvectorlayerundocommand.sip
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class QgsVectorLayerUndoCommandChangeAttribute : QgsVectorLayerUndoCommand
};


class QgsVectorLayerUndoCommandAddAttribute : public QgsVectorLayerUndoCommand
class QgsVectorLayerUndoCommandAddAttribute : QgsVectorLayerUndoCommand
{
%TypeHeaderCode
#include "qgsvectorlayerundocommand.h"
Expand Down
7 changes: 4 additions & 3 deletions src/core/qgsexpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2315,13 +2315,14 @@ bool QgsExpression::NodeCondition::prepare( QgsExpression* parent, const QgsFiel

QString QgsExpression::NodeCondition::dump() const
{
QString msg = "CONDITION:\n";
QString msg = QString("CASE ");
foreach ( WhenThen* cond, mConditions )
{
msg += QString( "- WHEN %1 THEN %2\n" ).arg( cond->mWhenExp->dump() ).arg( cond->mThenExp->dump() );
msg += QString( "WHEN %1 THEN %2" ).arg( cond->mWhenExp->dump() ).arg( cond->mThenExp->dump() );
}
if ( mElseExp )
msg += QString( "- ELSE %1" ).arg( mElseExp->dump() );
msg += QString( "ELSE %1" ).arg( mElseExp->dump() );
msg += QString(" END");
return msg;
}

Expand Down
7 changes: 2 additions & 5 deletions src/core/qgsexpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,9 @@ class CORE_EXPORT QgsExpression

int scale() {return mScale; }

//! Return the expression string that was given when created.
const QString expression() const { return mExp; }
const QString expression() const { return dump(); }

//! Return the a debugging string of the expression.
//! This can be used for debugging. Use {@link expression()}
//! if you need the full expression string.
//! Return the expression string that represents this QgsExpression.
QString dump() const;

//! Return calculator used for distance and area calculations
Expand Down
14 changes: 7 additions & 7 deletions src/core/qgsvectorlayerundocommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class QgsGeometryCache;
#include "qgsvectorlayereditbuffer.h"


class QgsVectorLayerUndoCommand : public QUndoCommand
class CORE_EXPORT QgsVectorLayerUndoCommand : public QUndoCommand
{
public:
QgsVectorLayerUndoCommand( QgsVectorLayerEditBuffer *buffer )
Expand All @@ -50,7 +50,7 @@ class QgsVectorLayerUndoCommand : public QUndoCommand
};


class QgsVectorLayerUndoCommandAddFeature : public QgsVectorLayerUndoCommand
class CORE_EXPORT QgsVectorLayerUndoCommandAddFeature : public QgsVectorLayerUndoCommand
{
public:
QgsVectorLayerUndoCommandAddFeature( QgsVectorLayerEditBuffer* buffer, QgsFeature& f );
Expand All @@ -63,7 +63,7 @@ class QgsVectorLayerUndoCommandAddFeature : public QgsVectorLayerUndoCommand
};


class QgsVectorLayerUndoCommandDeleteFeature : public QgsVectorLayerUndoCommand
class CORE_EXPORT QgsVectorLayerUndoCommandDeleteFeature : public QgsVectorLayerUndoCommand
{
public:
QgsVectorLayerUndoCommandDeleteFeature( QgsVectorLayerEditBuffer* buffer, QgsFeatureId fid );
Expand All @@ -77,7 +77,7 @@ class QgsVectorLayerUndoCommandDeleteFeature : public QgsVectorLayerUndoCommand
};


class QgsVectorLayerUndoCommandChangeGeometry : public QgsVectorLayerUndoCommand
class CORE_EXPORT QgsVectorLayerUndoCommandChangeGeometry : public QgsVectorLayerUndoCommand
{
public:
QgsVectorLayerUndoCommandChangeGeometry( QgsVectorLayerEditBuffer* buffer, QgsFeatureId fid, QgsGeometry* newGeom );
Expand All @@ -95,7 +95,7 @@ class QgsVectorLayerUndoCommandChangeGeometry : public QgsVectorLayerUndoCommand
};


class QgsVectorLayerUndoCommandChangeAttribute : public QgsVectorLayerUndoCommand
class CORE_EXPORT QgsVectorLayerUndoCommandChangeAttribute : public QgsVectorLayerUndoCommand
{
public:
QgsVectorLayerUndoCommandChangeAttribute( QgsVectorLayerEditBuffer* buffer, QgsFeatureId fid, int fieldIndex, const QVariant& newValue );
Expand All @@ -111,7 +111,7 @@ class QgsVectorLayerUndoCommandChangeAttribute : public QgsVectorLayerUndoComman
};


class QgsVectorLayerUndoCommandAddAttribute : public QgsVectorLayerUndoCommand
class CORE_EXPORT QgsVectorLayerUndoCommandAddAttribute : public QgsVectorLayerUndoCommand
{
public:
QgsVectorLayerUndoCommandAddAttribute( QgsVectorLayerEditBuffer* buffer, const QgsField& field );
Expand All @@ -125,7 +125,7 @@ class QgsVectorLayerUndoCommandAddAttribute : public QgsVectorLayerUndoCommand
};


class QgsVectorLayerUndoCommandDeleteAttribute : public QgsVectorLayerUndoCommand
class CORE_EXPORT QgsVectorLayerUndoCommandDeleteAttribute : public QgsVectorLayerUndoCommand
{
public:
QgsVectorLayerUndoCommandDeleteAttribute( QgsVectorLayerEditBuffer* buffer, int fieldIndex );
Expand Down
3 changes: 3 additions & 0 deletions src/ui/qgsexpressionbuilder.ui
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QSplitter" name="splitter_2">
<property name="orientation">
Expand Down
7 changes: 5 additions & 2 deletions src/ui/qgsexpressionbuilderdialogbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>625</width>
<height>554</height>
<width>507</width>
<height>539</height>
</rect>
</property>
<property name="windowTitle">
<string>Expression string builder</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>3</number>
</property>
<item row="0" column="0">
<widget class="QgsExpressionBuilderWidget" name="builder" native="true">
<property name="autoFillBackground">
Expand Down
3 changes: 3 additions & 0 deletions src/ui/qgsexpressionselectiondialogbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<string>Select By Expression</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>3</number>
</property>
<item row="1" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
Expand Down