From e94e6249acf413338c3651124f632db74111caca Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 25 Mar 2010 16:53:07 +0100 Subject: [PATCH] QmlDesigner: avoid warnings (connections) --- src/plugins/qmldesigner/designmodewidget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp index 24731567e8f..708860db70e 100644 --- a/src/plugins/qmldesigner/designmodewidget.cpp +++ b/src/plugins/qmldesigner/designmodewidget.cpp @@ -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) {