[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/kate/app
From: Anders Lund <anders () alweb ! dk>
Date: 2007-02-04 17:06:56
Message-ID: 1170608816.834312.19887.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 630183 by alund:
A bit of clarity: rename m_pM to m_documentModelo
M +13 -13 katemainwindow.cpp
M +4 -4 katemainwindow.h
--- trunk/KDE/kdebase/kate/app/katemainwindow.cpp #630182:630183
@@ -237,10 +237,10 @@
KateMDI::ToolView *ft = createToolView("kate_filelist", KMultiTabBar::Left, \
SmallIcon("kmultiple"), i18n("Documents")); m_fileList = new KateFileList(ft, \
actionCollection());
- m_pM = new KateViewDocumentProxyModel(this);
- m_pM->setSourceModel(KateDocManager::self());
- m_fileList->setModel(m_pM);
- m_fileList->setSelectionModel(m_pM->selection());
+ m_documentModel = new KateViewDocumentProxyModel(this);
+ m_documentModel->setSourceModel(KateDocManager::self());
+ m_fileList->setModel(m_documentModel);
+ m_fileList->setSelectionModel(m_documentModel->selection());
m_fileList->setDragEnabled(true);
m_fileList->setDragDropMode(QAbstractItemView::InternalMove);
m_fileList->setDropIndicatorShown(true);
@@ -250,10 +250,10 @@
if (!style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick, 0, \
m_fileList)) {
kDebug() << "HACK:***********************CONNECTING \
CLICKED***************************" << endl;
- connect(m_fileList, SIGNAL(clicked(const QModelIndex&)), m_pM, SLOT(opened(const \
QModelIndex&))); + connect(m_fileList, SIGNAL(clicked(const QModelIndex&)), \
m_documentModel, SLOT(opened(const QModelIndex&)));
connect(m_fileList, SIGNAL(clicked(const QModelIndex&)), m_viewManager, \
SLOT(activateDocument(const QModelIndex &))); }
- connect(m_fileList, SIGNAL(activated(const QModelIndex&)), m_pM, SLOT(opened(const \
QModelIndex&))); + connect(m_fileList, SIGNAL(activated(const QModelIndex&)), \
m_documentModel, SLOT(opened(const QModelIndex&))); connect(m_fileList, \
SIGNAL(activated(const QModelIndex&)), m_viewManager, SLOT(activateDocument(const \
QModelIndex &))); connect(m_fileList, SIGNAL(customContextMenuRequested(const QPoint \
&)), this, SLOT(showFileListPopup(const QPoint&))); \
m_fileList->setContextMenuPolicy(Qt::CustomContextMenu); @@ -532,7 +532,7 @@
{
if (m_viewManager->activeView())
{
- m_pM->opened(modelIndexForDocument(m_viewManager->activeView()->document()));
+ m_documentModel->opened(modelIndexForDocument(m_viewManager->activeView()->document()));
updateCaption (m_viewManager->activeView()->document());
}
@@ -604,13 +604,13 @@
{
KateRowColumn rowCol = action->data().value<KateRowColumn>();
if (!rowCol.isValid()) return;
- QModelIndex index = m_pM->index(rowCol.row(), rowCol.column());
+ QModelIndex index = m_documentModel->index(rowCol.row(), rowCol.column());
if (index.isValid())
{
KTextEditor::Document *doc = \
index.data(KateDocManager::DocumentRole).value<KTextEditor::Document*>(); if (doc)
m_viewManager->activateView (doc);
- m_pM->opened(index);
+ m_documentModel->opened(index);
}
}
@@ -925,15 +925,15 @@
QModelIndex KateMainWindow::modelIndexForDocument(KTextEditor::Document *document)
{
- KTextEditor::Document *tmp = \
m_pM->selection()->currentIndex().data(KateDocManager::DocumentRole).value<KTextEditor::Document*>();
- if (tmp == document) return m_pM->selection()->currentIndex();
- else return modelIndexForDocumentRec(KateDocManager::self()->indexForDocument(document), \
m_pM); + KTextEditor::Document *tmp = \
m_documentModel->selection()->currentIndex().data(KateDocManager::DocumentRole).value<KTextEditor::Document*>();
+ if (tmp == document) return m_documentModel->selection()->currentIndex();
+ else return modelIndexForDocumentRec(KateDocManager::self()->indexForDocument(document), \
m_documentModel); }
void KateMainWindow::slotDocModified(KTextEditor::Document *document)
{
- if (document->isModified()) m_pM->modified(modelIndexForDocument(document));
+ if (document->isModified()) \
m_documentModel->modified(modelIndexForDocument(document)); }
// kate: space-indent on; indent-width 2; replace-tabs on;
--- trunk/KDE/kdebase/kate/app/katemainwindow.h #630182:630183
@@ -2,16 +2,16 @@
Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
Copyright (C) 2001 Anders Lund <anders.lund@lund.tdcadsl.dk>
-
+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
-
+
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
-
+
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
@@ -246,7 +246,7 @@
KateTabWidget *m_tabWidget;
QString m_dbusObjectPath;
- KateViewDocumentProxyModel *m_pM;
+ KateViewDocumentProxyModel *m_documentModel;
// all plugin views for this mainwindow, used by the pluginmanager
QHash<Kate::Plugin*, Kate::PluginView*> m_pluginViews;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic