mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
make QgsMapLayerRegistry ctor private (it's a singleton)
This commit is contained in:
parent
4ade943937
commit
621edef24e
@ -213,10 +213,8 @@ class QgsMapLayerRegistry : QObject
|
|||||||
*/
|
*/
|
||||||
void legendLayersAdded( QList<QgsMapLayer*> theMapLayers );
|
void legendLayersAdded( QList<QgsMapLayer*> theMapLayers );
|
||||||
|
|
||||||
protected:
|
|
||||||
//! protected constructor
|
|
||||||
QgsMapLayerRegistry( QObject * parent = 0 );
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
QgsMapLayerRegistry(); // private 'cause it's a singleton
|
||||||
|
|
||||||
void connectNotify( const char * signal );
|
void connectNotify( const char * signal );
|
||||||
}; // class QgsMapLayerRegistry
|
}; // class QgsMapLayerRegistry
|
||||||
|
@ -239,15 +239,15 @@ class CORE_EXPORT QgsMapLayerRegistry : public QObject
|
|||||||
void legendLayersAdded( QList<QgsMapLayer*> theMapLayers );
|
void legendLayersAdded( QList<QgsMapLayer*> theMapLayers );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! protected constructor
|
|
||||||
QgsMapLayerRegistry( QObject * parent = 0 );
|
|
||||||
|
|
||||||
/** debugging member
|
/** debugging member
|
||||||
invoked when a connect() is made to this object
|
invoked when a connect() is made to this object
|
||||||
*/
|
*/
|
||||||
void connectNotify( const char * signal );
|
void connectNotify( const char * signal );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
//! private singleton constructor
|
||||||
|
QgsMapLayerRegistry( QObject * parent = 0 );
|
||||||
|
|
||||||
static QgsMapLayerRegistry *mInstance;
|
static QgsMapLayerRegistry *mInstance;
|
||||||
QMap<QString, QgsMapLayer*> mMapLayers;
|
QMap<QString, QgsMapLayer*> mMapLayers;
|
||||||
QSet<QgsMapLayer*> mOwnedLayers;
|
QSet<QgsMapLayer*> mOwnedLayers;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user