make QgsMapLayerRegistry ctor private (it's a singleton)

This commit is contained in:
Juergen E. Fischer 2014-08-18 11:47:08 +02:00
parent 4ade943937
commit 621edef24e
2 changed files with 5 additions and 7 deletions

View File

@ -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

View File

@ -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;