Skip to content
Permalink
Browse files

use static local instead of pointer/global to make windows and possib…

…ly valgrind happy (followup 9e6e62d)
  • Loading branch information
jef-n committed Oct 11, 2013
1 parent 9e6e62d commit 572bda85ab459214cfc14560fe4f6092201b1af4
@@ -20,14 +20,10 @@
#include "qgsvectorlayer.h"
#include "qgsmessagelog.h"


QgsEditorWidgetRegistry *QgsEditorWidgetRegistry::sInstance = 0;

QgsEditorWidgetRegistry* QgsEditorWidgetRegistry::instance()
{
if ( !sInstance )
sInstance = new QgsEditorWidgetRegistry();
return sInstance;
static QgsEditorWidgetRegistry sInstance;
return &sInstance;
}

QgsEditorWidgetRegistry::QgsEditorWidgetRegistry()
@@ -112,7 +112,6 @@ class GUI_EXPORT QgsEditorWidgetRegistry : public QObject

private:
QMap<QString, QgsEditorWidgetFactory*> mWidgetFactories;
static QgsEditorWidgetRegistry *sInstance;
};


0 comments on commit 572bda8

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