QmlDesigner: avoid warnings (connections)

This commit is contained in:
Thomas Hartmann
2010-03-25 16:53:07 +01:00
parent f816f173a3
commit e94e6249ac

View File

@@ -451,16 +451,16 @@ void DesignModeWidget::setCurrentDocument(DesignDocumentController *newDesignDoc
this, SLOT(undoAvailable(bool)));
disconnect(currentDesignDocumentController(), SIGNAL(redoAvailable(bool)),
this, SLOT(redoAvailable(bool)));
disconnect(currentDesignDocumentController(), SIGNAL(deleteAvailable(bool)),
this, SLOT(deleteAvailable(bool)));
}
m_currentDesignDocumentController = newDesignDocumentController;
connect(currentDesignDocumentController(), SIGNAL(undoAvailable(bool)),
if (currentDesignDocumentController()) {
connect(currentDesignDocumentController(), SIGNAL(undoAvailable(bool)),
this, SLOT(undoAvailable(bool)));
connect(currentDesignDocumentController(), SIGNAL(redoAvailable(bool)),
connect(currentDesignDocumentController(), SIGNAL(redoAvailable(bool)),
this, SLOT(redoAvailable(bool)));
}
if (m_currentDesignDocumentController) {