[Marble-commits] KDE/kdeedu/marble/src/lib
Thibaut Gridel
tgridel at free.fr
Sat Jul 17 11:09:39 CEST 2010
SVN commit 1150966 by tgridel:
FileManager: setting a fileManager should first disconnect from previous one
M +2 -0 FileViewModel.cpp
M +4 -0 GeoDataTreeModel.cpp
M +2 -0 PlacemarkManager.cpp
--- trunk/KDE/kdeedu/marble/src/lib/FileViewModel.cpp #1150965:1150966
@@ -115,6 +115,8 @@
}
void FileViewModel::setFileManager( FileManager *fileManager)
{
+ disconnect( this, SLOT(append(int)) );
+ disconnect( this, SLOT(remove(int)) );
m_manager = fileManager;
connect (m_manager, SIGNAL(fileAdded(int)),
this, SLOT(append(int)));
--- trunk/KDE/kdeedu/marble/src/lib/GeoDataTreeModel.cpp #1150965:1150966
@@ -33,6 +33,8 @@
class GeoDataTreeModel::Private {
public:
Private() : m_rootDocument( new GeoDataDocument ) {}
+ ~Private() { delete m_rootDocument; }
+
GeoDataDocument* m_rootDocument;
FileManager *m_fileManager;
};
@@ -352,6 +354,8 @@
void GeoDataTreeModel::setFileManager( FileManager *fileManager )
{
+ disconnect( this, SLOT(addDocument(int)) );
+ disconnect( this, SLOT(removeDocument(int)) );
d->m_fileManager = fileManager;
connect( d->m_fileManager, SIGNAL( fileAdded(int)),
this, SLOT(addDocument(int)) );
--- trunk/KDE/kdeedu/marble/src/lib/PlacemarkManager.cpp #1150965:1150966
@@ -75,6 +75,8 @@
void PlacemarkManager::setFileManager( FileManager *fileManager )
{
+ disconnect( this, SLOT(addGeoDataDocument(int)) );
+ disconnect( this, SLOT(removeGeoDataDocument(int)) );
d->m_fileManager = fileManager;
connect( d->m_fileManager, SIGNAL( fileAdded(int)),
this, SLOT(addGeoDataDocument(int)) );
More information about the Marble-commits
mailing list