[PATCH 2/8] SymbolView: Reduce redundant code
loh.tar
loh.tar at googlemail.com
Sun Jul 22 14:03:41 BST 2018
---
addons/symbolviewer/plugin_katesymbolviewer.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/addons/symbolviewer/plugin_katesymbolviewer.cpp b/addons/symbolviewer/plugin_katesymbolviewer.cpp
index 309086486..adead662b 100644
--- a/addons/symbolviewer/plugin_katesymbolviewer.cpp
+++ b/addons/symbolviewer/plugin_katesymbolviewer.cpp
@@ -190,7 +190,6 @@ void KatePluginSymbolViewerView::slotRefreshSymbol()
return slotEnableSorting();
}
- m_symbols->clear();
parseSymbols();
updateCurrTreeItem();
}
@@ -198,14 +197,12 @@ void KatePluginSymbolViewerView::slotRefreshSymbol()
void KatePluginSymbolViewerView::slotChangeMode()
{
m_plugin->treeOn = !m_plugin->treeOn;
- m_symbols->clear();
parseSymbols();
}
void KatePluginSymbolViewerView::slotEnableSorting()
{
m_plugin->sortOn = m_sort->isChecked();
- m_symbols->clear();
m_symbols->setSortingEnabled(m_sort->isChecked());
parseSymbols();
@@ -307,6 +304,8 @@ void KatePluginSymbolViewerView::slotShowContextMenu(const QPoint &p)
void KatePluginSymbolViewerView::parseSymbols(void)
{
+ m_symbols->clear();
+
if (!m_mainWindow->activeView())
return;
--
2.18.0
More information about the KWrite-Devel
mailing list