Skip to content

Commit 8c24e1e

Browse files
committed
Added const to config() method
1 parent 7cc0a21 commit 8c24e1e

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

python/gui/editorwidgets/core/qgseditorwidgetwrapper.sip

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
class QgsEditorWidgetWrapper : QObject
1717
{
1818
%TypeHeaderCode
19-
#include <qgseditorwidgetconfig.h>
2019
#include <qgseditorwidgetwrapper.h>
2120
%End
2221

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

4746
/**
4847
* Returns the whole config

src/gui/editorwidgets/core/qgswidgetwrapper.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void QgsWidgetWrapper::setContext( const QgsAttributeEditorContext &context )
5252
mContext = context;
5353
}
5454

55-
QVariant QgsWidgetWrapper::config( const QString& key, const QVariant& defaultVal )
55+
const QVariant QgsWidgetWrapper::config( const QString& key, const QVariant& defaultVal )
5656
{
5757
if ( mConfig.contains( key ) )
5858
{

src/gui/editorwidgets/core/qgswidgetwrapper.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class GUI_EXPORT QgsWidgetWrapper : public QObject
8787
*
8888
* @return the value assigned to this configuration option
8989
*/
90-
QVariant config( const QString& key, const QVariant& defaultVal = QVariant() );
90+
const QVariant config( const QString& key, const QVariant& defaultVal = QVariant() );
9191

9292
/**
9393
* Returns the whole config

0 commit comments

Comments
 (0)