Skip to content
Permalink
Browse files

make QgsMapLayerRegistry ctor private (it's a singleton)

  • Loading branch information
jef-n committed Aug 18, 2014
1 parent 4ade943 commit 621edef24eb2bf4312f9e8e5766eb45a0ec3005f
Showing with 5 additions and 7 deletions.
  1. +2 −4 python/core/qgsmaplayerregistry.sip
  2. +3 −3 src/core/qgsmaplayerregistry.h
@@ -213,10 +213,8 @@ class QgsMapLayerRegistry : QObject
*/
void legendLayersAdded( QList<QgsMapLayer*> theMapLayers );

protected:
//! protected constructor
QgsMapLayerRegistry( QObject * parent = 0 );

private:
QgsMapLayerRegistry(); // private 'cause it's a singleton

void connectNotify( const char * signal );
}; // class QgsMapLayerRegistry
@@ -239,15 +239,15 @@ class CORE_EXPORT QgsMapLayerRegistry : public QObject
void legendLayersAdded( QList<QgsMapLayer*> theMapLayers );

protected:
//! protected constructor
QgsMapLayerRegistry( QObject * parent = 0 );

/** debugging member
invoked when a connect() is made to this object
*/
void connectNotify( const char * signal );

private:
//! private singleton constructor
QgsMapLayerRegistry( QObject * parent = 0 );

static QgsMapLayerRegistry *mInstance;
QMap<QString, QgsMapLayer*> mMapLayers;
QSet<QgsMapLayer*> mOwnedLayers;

0 comments on commit 621edef

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