Skip to content
Permalink
Browse files

Added const to config() method

  • Loading branch information
elpaso committed Nov 20, 2015
1 parent 7cc0a21 commit 8c24e1e2d402edf166be67fcf206fe9dea3b6f5a
@@ -16,7 +16,6 @@
class QgsEditorWidgetWrapper : QObject
{
%TypeHeaderCode
#include <qgseditorwidgetconfig.h>
#include <qgseditorwidgetwrapper.h>
%End

@@ -42,7 +41,7 @@ class QgsEditorWidgetWrapper : QObject
*
* @return the value assigned to this configuration option
*/
QVariant config( const QString& key, const QVariant& defaultVal = QVariant() );
const QVariant config( const QString& key, const QVariant& defaultVal = QVariant() );

This comment has been minimized.

Copy link
@m-kuhn

m-kuhn Nov 20, 2015

Member

The method should be const, not the return value.

This comment has been minimized.

Copy link
@elpaso

elpaso Nov 20, 2015

Author Contributor

you meant
QVariant config( const QString& key, const QVariant& defaultVal = QVariant() ) const;
?

This comment has been minimized.

Copy link
@m-kuhn

m-kuhn Nov 20, 2015

Member

Yeah, fixed as part of 182dd8a


/**
* Returns the whole config
@@ -52,7 +52,7 @@ void QgsWidgetWrapper::setContext( const QgsAttributeEditorContext &context )
mContext = context;
}

QVariant QgsWidgetWrapper::config( const QString& key, const QVariant& defaultVal )
const QVariant QgsWidgetWrapper::config( const QString& key, const QVariant& defaultVal )
{
if ( mConfig.contains( key ) )
{
@@ -87,7 +87,7 @@ class GUI_EXPORT QgsWidgetWrapper : public QObject
*
* @return the value assigned to this configuration option
*/
QVariant config( const QString& key, const QVariant& defaultVal = QVariant() );
const QVariant config( const QString& key, const QVariant& defaultVal = QVariant() );

/**
* Returns the whole config

0 comments on commit 8c24e1e

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