Skip to content

Commit

Permalink
use static local instead of pointer/global to make windows and possib…
Browse files Browse the repository at this point in the history
…ly valgrind happy (followup 9e6e62d)
  • Loading branch information
jef-n committed Oct 11, 2013
1 parent 9e6e62d commit 572bda8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/gui/editorwidgets/core/qgseditorwidgetregistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion src/gui/editorwidgets/core/qgseditorwidgetregistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ class GUI_EXPORT QgsEditorWidgetRegistry : public QObject

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


Expand Down

0 comments on commit 572bda8

Please sign in to comment.