Commit ca89f6a0 authored by Ahmad Samir's avatar Ahmad Samir Committed by Christoph Cullmann
Browse files

filetree addon: make methods const where possible

parent eefe3d25
......@@ -267,17 +267,17 @@ void KateFileTreePluginView::setupActions()
m_toolbar->addAction(aSaveAs);
}
KateFileTreeModel *KateFileTreePluginView::model()
KateFileTreeModel *KateFileTreePluginView::model() const
{
return m_documentModel;
}
KateFileTreeProxyModel *KateFileTreePluginView::proxy()
KateFileTreeProxyModel *KateFileTreePluginView::proxy() const
{
return m_proxyModel;
}
KateFileTree *KateFileTreePluginView::tree()
KateFileTree *KateFileTreePluginView::tree() const
{
return m_fileTree;
}
......@@ -374,7 +374,7 @@ void KateFileTreePluginView::showActiveDocument()
showToolView();
}
bool KateFileTreePluginView::hasLocalPrefs()
bool KateFileTreePluginView::hasLocalPrefs() const
{
return m_hasLocalPrefs;
}
......@@ -429,14 +429,14 @@ void KateFileTreePluginView::slotDocumentsCreated(const QList<KTextEditor::Docum
viewChanged();
}
void KateFileTreePluginView::slotDocumentSave()
void KateFileTreePluginView::slotDocumentSave() const
{
if (auto view = m_mainWindow->activeView()) {
view->document()->documentSave();
}
}
void KateFileTreePluginView::slotDocumentSaveAs()
void KateFileTreePluginView::slotDocumentSaveAs() const
{
if (auto view = m_mainWindow->activeView()) {
view->document()->documentSaveAs();
......
......@@ -80,21 +80,21 @@ public:
* The file tree model.
* @return the file tree model
*/
KateFileTreeModel *model();
KateFileTreeModel *model() const;
/**
* The file tree proxy model.
* @return the file tree proxy model
*/
KateFileTreeProxyModel *proxy();
KateFileTreeProxyModel *proxy() const;
/**
* The file tree.
* @return the file tree
*/
KateFileTree *tree();
KateFileTree *tree() const;
void setListMode(bool listMode);
bool hasLocalPrefs();
bool hasLocalPrefs() const;
void setHasLocalPrefs(bool);
protected:
......@@ -124,8 +124,8 @@ private Q_SLOTS:
void sortRoleChanged(int);
void slotAboutToCreateDocuments();
void slotDocumentsCreated(const QList<KTextEditor::Document *> &);
void slotDocumentSave();
void slotDocumentSaveAs();
void slotDocumentSave() const;
void slotDocumentSaveAs() const;
};
#endif // KATE_FILETREE_PLUGIN_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment