Skip to content

Commit

Permalink
Test for relationreference field formatter deps
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Dec 13, 2019
1 parent 4ad62aa commit a977343
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
Expand Up @@ -39,7 +39,7 @@ Default constructor of field formatter for a relation reference field.
virtual QVariant createCache( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config ) const;


virtual QList<QgsVectorLayerRef> layerDependencies( const QVariantMap &config ) const;


};

Expand Down
Expand Up @@ -128,8 +128,6 @@ Returns the (possibly NULL) layer from the widget's ``config`` and ``project``
.. versionadded:: 3.8
%End

virtual QList<QgsVectorLayerRef> layerDependencies( const QVariantMap &config ) const;

};


Expand Down
5 changes: 4 additions & 1 deletion src/core/fieldformatter/qgsrelationreferencefieldformatter.h
Expand Up @@ -44,7 +44,10 @@ class CORE_EXPORT QgsRelationReferenceFieldFormatter : public QgsFieldFormatter

QVariant createCache( QgsVectorLayer *layer, int fieldIndex, const QVariantMap &config ) const override;

QList<QgsVectorLayerRef> layerDependencies( const QVariantMap &config ) const override;
QList<QgsVectorLayerRef> layerDependencies( const QVariantMap &config ) const override SIP_SKIP;

//friend class TestQgsRelationReferenceFieldFormatter;

};

#endif // QGSRELATIONREFERENCEFIELDKIT_H
2 changes: 1 addition & 1 deletion src/core/fieldformatter/qgsvaluerelationfieldformatter.h
Expand Up @@ -125,7 +125,7 @@ class CORE_EXPORT QgsValueRelationFieldFormatter : public QgsFieldFormatter
*/
static QgsVectorLayer *resolveLayer( const QVariantMap &config, const QgsProject *project );

QList<QgsVectorLayerRef> layerDependencies( const QVariantMap &config ) const override;
QList<QgsVectorLayerRef> layerDependencies( const QVariantMap &config ) const override SIP_SKIP;
};

Q_DECLARE_METATYPE( QgsValueRelationFieldFormatter::ValueRelationCache )
Expand Down
3 changes: 0 additions & 3 deletions src/gui/editorwidgets/qgsrelationreferencewidgetwrapper.h
Expand Up @@ -19,7 +19,6 @@
#include "qgseditorwidgetwrapper.h"
#include "qgis_sip.h"
#include "qgis_gui.h"
#include "qgsvectorlayerref.h"

class QgsRelationReferenceWidget;
class QgsMapCanvas;
Expand Down Expand Up @@ -79,8 +78,6 @@ class GUI_EXPORT QgsRelationReferenceWidgetWrapper : public QgsEditorWidgetWrapp
QgsMessageBar *mMessageBar = nullptr;
bool mIndeterminateState;

friend class TestQgsRelationReferenceWidget;

};

#endif // QGSRELATIONREFERENCEWIDGETWRAPPER_H
1 change: 1 addition & 0 deletions tests/src/core/CMakeLists.txt
Expand Up @@ -201,6 +201,7 @@ SET(TESTS
testqgsrasterlayer.cpp
testqgsrastersublayer.cpp
testqgsrectangle.cpp
testqgsrelationreferencefieldformatter.cpp
testqgsrenderers.cpp
testqgsrulebasedrenderer.cpp
testqgssettings.cpp
Expand Down

0 comments on commit a977343

Please sign in to comment.