forked from qt-creator/qt-creator
EditorManager: Close documents instead of editors where appropriate
This is the first step in actually making "closeEditor(s)" close editors instead of documents. Change-Id: I02761e0cef950b8fc093f65a90df04a9a7550681 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -340,15 +340,15 @@ QmlEngine::QmlEngine(const DebuggerStartParameters &startParameters, DebuggerEng
|
||||
|
||||
QmlEngine::~QmlEngine()
|
||||
{
|
||||
QList<Core::IEditor *> editorsToClose;
|
||||
QSet<Core::IDocument *> documentsToClose;
|
||||
|
||||
QHash<QString, QWeakPointer<TextEditor::BaseTextEditor> >::iterator iter;
|
||||
for (iter = m_sourceEditors.begin(); iter != m_sourceEditors.end(); ++iter) {
|
||||
QWeakPointer<TextEditor::BaseTextEditor> textEditPtr = iter.value();
|
||||
if (textEditPtr)
|
||||
editorsToClose << textEditPtr.data();
|
||||
documentsToClose << textEditPtr.data()->document();
|
||||
}
|
||||
Core::EditorManager::closeEditors(editorsToClose);
|
||||
Core::EditorManager::closeDocuments(documentsToClose.toList());
|
||||
}
|
||||
|
||||
void QmlEngine::notifyInferiorSetupOk()
|
||||
|
||||
Reference in New Issue
Block a user