Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
ca89f6a0
Commit
ca89f6a0
authored
Nov 27, 2020
by
Ahmad Samir
Committed by
Christoph Cullmann
Nov 29, 2020
Browse files
filetree addon: make methods const where possible
parent
eefe3d25
Changes
2
Hide whitespace changes
Inline
Side-by-side
addons/filetree/katefiletreeplugin.cpp
View file @
ca89f6a0
...
...
@@ -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
();
...
...
addons/filetree/katefiletreeplugin.h
View file @
ca89f6a0
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment