Skip to content
Permalink
Browse files

Followup 722fdef: fix grass plugin build

  • Loading branch information
m-kuhn committed Oct 5, 2016
1 parent 9242d22 commit 3b0486cc6e62c46114b4320cb46d3bcd3223cdb5
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/plugins/grass/qgsgrasseditrenderer.cpp
  2. +1 −1 src/plugins/grass/qgsgrasseditrenderer.h
@@ -173,7 +173,7 @@ void QgsGrassEditRenderer::stopRender( QgsRenderContext& context )
mMarkerRenderer->stopRender( context );
}

QList<QString> QgsGrassEditRenderer::usedAttributes()
QSet<QString> QgsGrassEditRenderer::usedAttributes()
{
return mLineRenderer->usedAttributes();
}
@@ -38,7 +38,7 @@ class QgsGrassEditRenderer : public QgsFeatureRenderer

virtual void stopRender( QgsRenderContext& context ) override;

virtual QList<QString> usedAttributes() override;
virtual QSet<QString> usedAttributes() override;

virtual QgsFeatureRenderer* clone() const override;

3 comments on commit 3b0486c

@nirvn

This comment has been minimized.

Copy link
Contributor

@nirvn nirvn replied Oct 6, 2016

@m-kuhn , I ge the following error while attempting to build master:

In file included from /home/webmaster/dev/cpp/QGIS/src/plugins/grass/qgsgrassplugin.cpp:23:0:
/home/webmaster/dev/cpp/QGIS/src/plugins/grass/qgsgrasseditrenderer.h:41:27: error: ‘virtual QSet<QString> QgsGrassEditRenderer::usedAttributes()’ marked ‘override’, but does not override
     virtual QSet<QString> usedAttributes() override;
                           ^~~~~~~~~~~~~~
In file included from /home/webmaster/dev/cpp/QGIS/src/plugins/grass/qgsgrasseditrenderer.cpp:30:0:
/home/webmaster/dev/cpp/QGIS/src/plugins/grass/qgsgrasseditrenderer.h:41:27: error: ‘virtual QSet<QString> QgsGrassEditRenderer::usedAttributes()’ marked ‘override’, but does not override
     virtual QSet<QString> usedAttributes() override;
                           ^~~~~~~~~~~~~~
/home/webmaster/dev/cpp/QGIS/src/plugins/grass/qgsgrasseditrenderer.cpp: In member function ‘virtual QgsFeatureRenderer* QgsGrassEditRenderer::clone() const’:
/home/webmaster/dev/cpp/QGIS/src/plugins/grass/qgsgrasseditrenderer.cpp:183:54: error: invalid new-expression of abstract class type ‘QgsGrassEditRenderer’
   QgsGrassEditRenderer* r = new QgsGrassEditRenderer();
                                                      ^
@m-kuhn

This comment has been minimized.

Copy link
Member Author

@m-kuhn m-kuhn replied Oct 6, 2016

Does it help if you change it to

virtual QSet<QString> usedAttributes() const override;

I was working on plain text files since I don't use grass.

@nirvn

This comment has been minimized.

Copy link
Contributor

@nirvn nirvn replied Oct 6, 2016

@m-kuhn , it not only helps, it actually works :)

Please sign in to comment.
You can’t perform that action at this time.