aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2014-01-24 11:27:53 (GMT)
committerChristoph Cullmann <cullmann@kde.org>2014-01-24 11:27:53 (GMT)
commitaada429e1f6824cd30644135f3034ea88ab47cba (patch)
tree346cc9ea3f5c0739ea01b63b2eb103143162e334
parentff4c8b11415ad88302eb59cf9c3d0a20539742a6 (diff)
less public API
-rw-r--r--kate/src/kateappcommands.cpp4
-rw-r--r--kate/src/katedocmanager.cpp5
-rw-r--r--kate/src/katedocmanager.h2
-rw-r--r--kate/src/katemainwindow.cpp8
-rw-r--r--kate/src/kateviewmanager.cpp2
5 files changed, 7 insertions, 14 deletions
diff --git a/kate/src/kateappcommands.cpp b/kate/src/kateappcommands.cpp
index 45378b6..e5c6ea3 100644
--- a/kate/src/kateappcommands.cpp
+++ b/kate/src/kateappcommands.cpp
@@ -124,7 +124,7 @@ bool KateAppCommands::exec(KTextEditor::View *view, const QString &cmd, QString
if (mainWin->viewManager()->count() > 1) {
QTimer::singleShot(0, mainWin->viewManager(), SLOT(slotCloseCurrentViewSpace()));
} else {
- if (KateApp::self()->documentManager()->documents() > 1) {
+ if (KateApp::self()->documentManager()->documentList().size() > 1) {
QTimer::singleShot(0, mainWin, SLOT(slotFileClose()));
} else {
QTimer::singleShot(0, mainWin, SLOT(slotFileQuit()));
@@ -140,7 +140,7 @@ bool KateAppCommands::exec(KTextEditor::View *view, const QString &cmd, QString
view->document()->documentSave();
}
- if (KateApp::self()->documentManager()->documents() > 1) {
+ if (KateApp::self()->documentManager()->documentList().size() > 1) {
QTimer::singleShot(0, mainWin, SLOT(slotFileClose()));
} else {
QTimer::singleShot(0, mainWin, SLOT(slotFileQuit()));
diff --git a/kate/src/katedocmanager.cpp b/kate/src/katedocmanager.cpp
index 5836e86..ec6e92e 100644
--- a/kate/src/katedocmanager.cpp
+++ b/kate/src/katedocmanager.cpp
@@ -127,11 +127,6 @@ KateDocumentInfo *KateDocManager::documentInfo(KTextEditor::Document *doc)
return m_docInfos.contains(doc) ? m_docInfos[doc] : 0;
}
-uint KateDocManager::documents()
-{
- return m_docList.count();
-}
-
KTextEditor::Document *KateDocManager::findDocument(const QUrl &url) const
{
QUrl u(url.adjusted(QUrl::NormalizePathSegments));
diff --git a/kate/src/katedocmanager.h b/kate/src/katedocmanager.h
index 451ca4a..3ec7177 100644
--- a/kate/src/katedocmanager.h
+++ b/kate/src/katedocmanager.h
@@ -70,8 +70,6 @@ public:
/** Returns the documentNumber of the doc with url URL or -1 if no such doc is found */
KTextEditor::Document *findDocument(const QUrl &url) const;
- uint documents();
-
const QList<KTextEditor::Document *> &documentList() const {
return m_docList;
}
diff --git a/kate/src/katemainwindow.cpp b/kate/src/katemainwindow.cpp
index 2b45bc2..69ae673 100644
--- a/kate/src/katemainwindow.cpp
+++ b/kate/src/katemainwindow.cpp
@@ -404,7 +404,7 @@ void KateMainWindow::setupActions()
void KateMainWindow::slotDocumentCloseAll()
{
- if (KateApp::self()->documentManager()->documents() >= 1 && KMessageBox::warningContinueCancel(this,
+ if (KateApp::self()->documentManager()->documentList().size() >= 1 && KMessageBox::warningContinueCancel(this,
i18n("This will close all open documents. Are you sure you want to continue?"),
i18n("Close all documents"),
KStandardGuiItem::cont(),
@@ -444,7 +444,7 @@ void KateMainWindow::slotDocumentCloseOther()
bool KateMainWindow::queryClose_internal(KTextEditor::Document *doc)
{
- uint documentCount = KateApp::self()->documentManager()->documents();
+ int documentCount = KateApp::self()->documentManager()->documentList().size();
if (! showModOnDiskPrompt()) {
return false;
@@ -458,7 +458,7 @@ bool KateMainWindow::queryClose_internal(KTextEditor::Document *doc)
shutdown = KateSaveModifiedDialog::queryClose(this, modifiedDocuments);
}
- if (KateApp::self()->documentManager()->documents() > documentCount) {
+ if (KateApp::self()->documentManager()->documentList().size() > documentCount) {
KMessageBox::information(this,
i18n("New file opened while trying to close Kate, closing aborted."),
i18n("Closing Aborted"));
@@ -836,7 +836,7 @@ bool KateMainWindow::showModOnDiskPrompt()
KTextEditor::Document *doc;
DocVector list;
- list.reserve(KateApp::self()->documentManager()->documents());
+ list.reserve(KateApp::self()->documentManager()->documentList().size());
foreach(doc, KateApp::self()->documentManager()->documentList()) {
if (KateApp::self()->documentManager()->documentInfo(doc)->modifiedOnDisc) {
list.append(doc);
diff --git a/kate/src/kateviewmanager.cpp b/kate/src/kateviewmanager.cpp
index 2b747ea..bfd6476 100644
--- a/kate/src/kateviewmanager.cpp
+++ b/kate/src/kateviewmanager.cpp
@@ -272,7 +272,7 @@ void KateViewManager::slotDocumentClose(KTextEditor::Document *document)
{
// prevent close document if only one view alive and the document of
// it is not modified and empty !!!
- if ((KateApp::self()->documentManager()->documents() == 1)
+ if ((KateApp::self()->documentManager()->documentList().size() == 1)
&& !document->isModified()
&& document->url().isEmpty()
&& document->documentEnd() == KTextEditor::Cursor::start()) {