Skip to content
Permalink
Browse files

Add cacheSize as a QSettings

  • Loading branch information
pblottiere committed Dec 13, 2017
1 parent 5d52066 commit fd7fc94cc73a8348053413172101fee69501e5bd
Showing with 4 additions and 2 deletions.
  1. +2 −1 src/app/qgsoptions.cpp
  2. +2 −1 src/gui/editorwidgets/qgsrelationreferencewidget.cpp
@@ -928,7 +928,8 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl )
mVariableEditor->reloadContext();
mVariableEditor->setEditableScopeIndex( 0 );


const QString key = "/QgsRelationReferenceWidget/cacheSize";
mSettings->setValue( key, mSettings->value( key, 200000 ) );

mAdvancedSettingsEditor->setSettingsObject( mSettings );

@@ -479,7 +479,8 @@ void QgsRelationReferenceWidget::init()

QSet<QString> requestedAttrs;

QgsVectorLayerCache* layerCache = new QgsVectorLayerCache( mReferencedLayer, 200000, this );
const int cacheSize = QSettings().value( "/QgsRelationReferenceWidget/cacheSize" ).toInt();
QgsVectorLayerCache* layerCache = new QgsVectorLayerCache( mReferencedLayer, cacheSize, this );

if ( !mFilterFields.isEmpty() )
{

0 comments on commit fd7fc94

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