aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2014-01-24 11:17:17 (GMT)
committerChristoph Cullmann <cullmann@kde.org>2014-01-24 11:17:17 (GMT)
commitff4c8b11415ad88302eb59cf9c3d0a20539742a6 (patch)
tree8956c3783ecf985f99d3789301ea8f12c13043cf
parentcaf582f34c6348226e1aa45151b4af32396602fa (diff)
deleteDoc itself shall not be ever called, else hell breaks loose ;)
-rw-r--r--kate/src/katedocmanager.cpp31
-rw-r--r--kate/src/katedocmanager.h2
2 files changed, 14 insertions, 19 deletions
diff --git a/kate/src/katedocmanager.cpp b/kate/src/katedocmanager.cpp
index 1de05ad..5836e86 100644
--- a/kate/src/katedocmanager.cpp
+++ b/kate/src/katedocmanager.cpp
@@ -122,22 +122,6 @@ KTextEditor::Document *KateDocManager::createDoc(const KateDocumentInfo &docInfo
return doc;
}
-void KateDocManager::deleteDoc(KTextEditor::Document *doc)
-{
- KateApp::self()->emitDocumentClosed(QString::number((qptrdiff)doc));
- qCDebug(LOG_KATE) << "deleting document with name:" << doc->documentName();
-
- // document will be deleted, soon
- emit documentWillBeDeleted(doc);
-
- // really delete the document and its infos
- delete m_docInfos.take(doc);
- delete m_docList.takeAt(m_docList.indexOf(doc));
-
- // document is gone, emit our signals
- emit documentDeleted(doc);
-}
-
KateDocumentInfo *KateDocManager::documentInfo(KTextEditor::Document *doc)
{
return m_docInfos.contains(doc) ? m_docInfos[doc] : 0;
@@ -264,7 +248,20 @@ bool KateDocManager::closeDocuments(const QList<KTextEditor::Document *> documen
}
}
- deleteDoc(doc);
+ qCDebug(LOG_KATE) << "deleting document with name:" << doc->documentName();
+
+ KateApp::self()->emitDocumentClosed(QString::number((qptrdiff)doc));
+
+ // document will be deleted, soon
+ emit documentWillBeDeleted(doc);
+
+ // really delete the document and its infos
+ delete m_docInfos.take(doc);
+ delete m_docList.takeAt(m_docList.indexOf(doc));
+
+ // document is gone, emit our signals
+ emit documentDeleted(doc);
+
last++;
}
diff --git a/kate/src/katedocmanager.h b/kate/src/katedocmanager.h
index 45a9b07..451ca4a 100644
--- a/kate/src/katedocmanager.h
+++ b/kate/src/katedocmanager.h
@@ -65,8 +65,6 @@ public:
KTextEditor::Document *createDoc(const KateDocumentInfo &docInfo = KateDocumentInfo());
- void deleteDoc(KTextEditor::Document *doc);
-
KateDocumentInfo *documentInfo(KTextEditor::Document *doc);
/** Returns the documentNumber of the doc with url URL or -1 if no such doc is found */