Commit 3b02449c authored by Alain Laporte's avatar Alain Laporte Committed by Christoph Cullmann
Browse files

Symbol viewer: replace XPM icons with icons from theme

BUG: 431999
parent 80b8571a
......@@ -26,14 +26,12 @@ void KatePluginSymbolViewerView::parseBashSymbols(void)
QTreeWidgetItem *funcNode = nullptr;
QTreeWidgetItem *lastFuncNode = nullptr;
QPixmap func(class_xpm);
// It is necessary to change names
m_func->setText(i18n("Show Functions"));
if (m_treeOn->isChecked()) {
funcNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Functions")));
funcNode->setIcon(0, QIcon(func));
funcNode->setIcon(0, m_icon_function);
if (m_expandOn->isChecked()) {
m_symbols->expandItem(funcNode);
......@@ -89,7 +87,7 @@ void KatePluginSymbolViewerView::parseBashSymbols(void)
}
node->setText(0, funcName);
node->setIcon(0, QIcon(func));
node->setIcon(0, m_icon_function);
node->setText(1, QString::number(i, 10));
}
} // for i loop
......
......@@ -25,10 +25,6 @@ void KatePluginSymbolViewerView::parseCppSymbols(void)
char mclass = 0, block = 0, comment = 0; // comment: 0-no comment 1-inline comment 2-multiline comment 3-string
char macro = 0 /*, macro_pos = 0*/, func_close = 0;
bool structure = false;
QPixmap cls(class_xpm);
QPixmap sct(struct_xpm);
QPixmap mcr(macro_xpm);
QPixmap mtd(method_xpm);
// It is necessary to change names to defaults
m_macro->setText(i18n("Show Macros"));
......@@ -46,9 +42,9 @@ void KatePluginSymbolViewerView::parseCppSymbols(void)
mcrNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Macros")));
sctNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Structures")));
clsNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Functions")));
mcrNode->setIcon(0, QIcon(mcr));
sctNode->setIcon(0, QIcon(sct));
clsNode->setIcon(0, QIcon(cls));
mcrNode->setIcon(0, m_icon_context);
sctNode->setIcon(0, m_icon_typedef);
clsNode->setIcon(0, m_icon_class);
if (m_expandOn->isChecked()) {
m_symbols->expandItem(mcrNode);
m_symbols->expandItem(sctNode);
......@@ -125,7 +121,7 @@ void KatePluginSymbolViewerView::parseCppSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, stripped);
node->setIcon(0, QIcon(mcr));
node->setIcon(0, m_icon_context);
node->setText(1, QString::number(i, 10));
}
macro = 0;
......@@ -173,7 +169,7 @@ void KatePluginSymbolViewerView::parseCppSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, stripped);
node->setIcon(0, QIcon(cls));
node->setIcon(0, m_icon_class);
node->setText(1, QString::number(i, 10));
stripped.clear();
if (mclass == 1) {
......@@ -314,9 +310,9 @@ void KatePluginSymbolViewerView::parseCppSymbols(void)
}
node->setText(0, stripped);
if (mclass == 4) {
node->setIcon(0, QIcon(mtd));
node->setIcon(0, m_icon_function);
} else {
node->setIcon(0, QIcon(cls));
node->setIcon(0, m_icon_class);
}
node->setText(1, QString::number(tmpPos, 10));
node->setToolTip(0, strippedWithTypes);
......@@ -375,7 +371,7 @@ void KatePluginSymbolViewerView::parseCppSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, stripped);
node->setIcon(0, QIcon(sct));
node->setIcon(0, m_icon_typedef);
node->setText(1, QString::number(tmpPos, 10));
}
// qDebug(13000)<<"Structure -- Inserted : "<<stripped<<" at row : "<<i;
......
......@@ -38,8 +38,6 @@ void KatePluginSymbolViewerView::parseEcmaSymbols(void)
// a list of inserted nodes with the index being the brace depth at insertion
QList<QTreeWidgetItem *> nodes;
QPixmap cls(class_xpm);
QPixmap mtd(method_xpm);
QTreeWidgetItem *node = nullptr;
if (m_treeOn->isChecked()) {
......@@ -139,7 +137,7 @@ void KatePluginSymbolViewerView::parseEcmaSymbols(void)
}
// add an entry for the class
node->setText(0, identifier);
node->setIcon(0, QIcon(cls));
node->setIcon(0, m_icon_class);
node->setText(1, QString::number(line, 10));
if (m_expandOn->isChecked()) {
m_symbols->expandItem(node);
......@@ -219,13 +217,13 @@ void KatePluginSymbolViewerView::parseEcmaSymbols(void)
}
// mark the parent as a class (if it's not the root level)
if (parent != nullptr) {
parent->setIcon(0, QIcon(cls));
parent->setIcon(0, m_icon_class);
// mark this function as a method of the parent
node->setIcon(0, QIcon(mtd));
node->setIcon(0, m_icon_function);
}
// mark root-level functions as classes
else {
node->setIcon(0, QIcon(cls));
node->setIcon(0, m_icon_class);
}
// add the function
node->setText(0, identifier);
......@@ -267,7 +265,7 @@ void KatePluginSymbolViewerView::parseEcmaSymbols(void)
}
// mark the node as a class
node->setIcon(0, QIcon(cls));
node->setIcon(0, m_icon_class);
// add the id
node->setText(0, identifier);
......
......@@ -33,10 +33,6 @@ void KatePluginSymbolViewerView::parseFortranSymbols(void)
QTreeWidgetItem *subrNode = nullptr, *funcNode = nullptr, *modNode = nullptr;
QTreeWidgetItem *lastSubrNode = nullptr, *lastFuncNode = nullptr, *lastModNode = nullptr;
QPixmap func(class_xpm);
QPixmap subr(macro_xpm);
QPixmap mod(struct_xpm);
// It is necessary to change names
m_macro->setText(i18n("Show Subroutines"));
m_struct->setText(i18n("Show Modules"));
......@@ -46,9 +42,9 @@ void KatePluginSymbolViewerView::parseFortranSymbols(void)
funcNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Functions")));
subrNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Subroutines")));
modNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Modules")));
funcNode->setIcon(0, QIcon(func));
modNode->setIcon(0, QIcon(mod));
subrNode->setIcon(0, QIcon(subr));
funcNode->setIcon(0, m_icon_function);
modNode->setIcon(0, m_icon_block);
subrNode->setIcon(0, m_icon_context);
if (m_expandOn->isChecked()) {
m_symbols->expandItem(funcNode);
......@@ -144,7 +140,7 @@ void KatePluginSymbolViewerView::parseFortranSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, stripped);
node->setIcon(0, QIcon(subr));
node->setIcon(0, m_icon_context);
node->setText(1, QString::number(i, 10));
}
stripped.clear();
......@@ -178,7 +174,7 @@ void KatePluginSymbolViewerView::parseFortranSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, stripped);
node->setIcon(0, QIcon(mod));
node->setIcon(0, m_icon_context);
node->setText(1, QString::number(i, 10));
}
stripped.clear();
......@@ -214,7 +210,7 @@ void KatePluginSymbolViewerView::parseFortranSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, stripped);
node->setIcon(0, QIcon(func));
node->setIcon(0, m_icon_function);
node->setText(1, QString::number(i, 10));
stripped.clear();
block = 0;
......
/* XPM */
static const char *const class_xpm[] = {"16 16 10 1", " c None", ". c #000000", "+ c #A4E8FC", "@ c #24D0FC", "# c #001CD0", "$ c #0080E8", "% c #C0FFFF", "& c #00FFFF",
"* c #008080", "= c #00C0C0", " .. ", " .++.. ", " .+++@@. ", " .@@@@@#... ", " .$$@@##.%%.. ", " .$$$##.%%%&&. ", " .$$$#.&&&&&*. ",
" ...#.==&&**. ", " .++..===***. ", " .+++@@.==**. ", " .@@@@@#..=*. ", " .$$@@##. .. ", " .$$$###. ", " .$$$##. ", " ..$#. ", " .. "};
static const char *const class_int_xpm[] = {"16 16 10 1", " c None", ". c #000000", "+ c #B8B8B8", "@ c #8A8A8A", "# c #212121", "$ c #575757", "% c #CCCCCC", "& c #9A9A9A",
"* c #4D4D4D", "= c #747474", " .. ", " .++.. ", " .+++@@. ", " .@@@@@#... ", " .$$@@##.%%.. ", " .$$$##.%%%&&. ", " .$$$#.&&&&&*. ",
" ...#.==&&**. ", " .++..===***. ", " .+++@@.==**. ", " .@@@@@#..=*. ", " .$$@@##. .. ", " .$$$###. ", " .$$$##. ", " ..$#. ", " .. "};
static const char *const struct_xpm[] = {"16 16 14 1", " c None", ". c #000000", "+ c #C0FFC0", "@ c #00FF00", "# c #008000", "$ c #00C000", "% c #C0FFFF",
"& c #00FFFF", "* c #008080", "= c #00C0C0", "- c #FFFFC0", "; c #FFFF00", "> c #808000", ", c #C0C000", " .. ",
" .++.. ", " .+++@@. ", " .@@@@@#... ", " .$$@@##.%%.. ", " .$$$##.%%%&&. ", " .$$$#.&&&&&*. ", " ...#.==&&**. ", " .--..===***. ",
" .---;;.==**. ", " .;;;;;>..=*. ", " .,,;;>>. .. ", " .,,,>>>. ", " .,,,>>. ", " ..,>. ", " .. "};
static const char *const macro_xpm[] = {"16 16 14 1", " c None", ". c #000000", "+ c #FF7FE5", "@ c #FF00C7", "# c #7F0066", "$ c #BC0096", "% c #C0FFFF",
"& c #00FFFF", "* c #008080", "= c #00C0C0", "- c #D493FF", "; c #A100FF", "> c #470082", ", c #6B00B7", " .. ",
" .++.. ", " .+++@@. ", " .@@@@@#... ", " .$$@@##.%%.. ", " .$$$##.%%%&&. ", " .$$$#.&&&&&*. ", " ...#.==&&**. ", " .--..===***. ",
" .---;;.==**. ", " .;;;;;>..=*. ", " .,,;;>>. .. ", " .,,,>>>. ", " .,,,>>. ", " ..,>. ", " .. "};
static const char *const method_xpm[] = {"16 16 5 1", " c None", ". c #000000", "+ c #FCFC80", "@ c #E0BC38", "# c #F0DC5C", " ", " ",
" ", " .. ", " .++.. ", " .+++++. ", " .+++++@. ", " .. .##++@@. ", " .++..###@@@. ", " .+++++.##@@. ",
" .+++++@..#@. ", " .##++@@. .. ", " .###@@@. ", " .###@@. ", " ..#@. ", " .. "};
......@@ -23,10 +23,6 @@ void KatePluginSymbolViewerView::parsePerlSymbols(void)
m_func->setText(i18n("Show Subroutines"));
QString cl; // Current Line
char comment = 0;
QPixmap cls(class_xpm);
QPixmap sct(struct_xpm);
QPixmap mcr(macro_xpm);
QPixmap cls_int(class_int_xpm);
QTreeWidgetItem *node = nullptr;
QTreeWidgetItem *mcrNode = nullptr, *sctNode = nullptr, *clsNode = nullptr;
QTreeWidgetItem *lastMcrNode = nullptr, *lastSctNode = nullptr, *lastClsNode = nullptr;
......@@ -38,9 +34,9 @@ void KatePluginSymbolViewerView::parsePerlSymbols(void)
mcrNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Uses")));
sctNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Pragmas")));
clsNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Subroutines")));
mcrNode->setIcon(0, QIcon(mcr));
sctNode->setIcon(0, QIcon(sct));
clsNode->setIcon(0, QIcon(cls));
mcrNode->setIcon(0, m_icon_block);
sctNode->setIcon(0, m_icon_context);
clsNode->setIcon(0, m_icon_class);
if (m_expandOn->isChecked()) {
m_symbols->expandItem(mcrNode);
......@@ -88,7 +84,7 @@ void KatePluginSymbolViewerView::parsePerlSymbols(void)
}
node->setText(0, stripped);
node->setIcon(0, QIcon(mcr));
node->setIcon(0, m_icon_block);
node->setText(1, QString::number(i, 10));
}
#if 1
......@@ -103,7 +99,7 @@ void KatePluginSymbolViewerView::parsePerlSymbols(void)
}
node->setText(0, stripped);
node->setIcon(0, QIcon(sct));
node->setIcon(0, m_icon_context);
node->setText(1, QString::number(i, 10));
}
#endif
......@@ -120,9 +116,9 @@ void KatePluginSymbolViewerView::parsePerlSymbols(void)
node->setText(0, stripped);
if (!stripped.isEmpty() && stripped.at(0) == QLatin1Char('_')) {
node->setIcon(0, QIcon(cls_int));
node->setIcon(0, m_icon_function);
} else {
node->setIcon(0, QIcon(cls));
node->setIcon(0, m_icon_class);
}
node->setText(1, QString::number(i, 10));
......
......@@ -19,12 +19,7 @@ void KatePluginSymbolViewerView::parsePhpSymbols(void)
{
if (m_mainWindow->activeView()) {
QString line, lineWithliterals, realLine;
QPixmap namespacePix(class_int_xpm);
QPixmap definePix(macro_xpm);
QPixmap varPix(struct_xpm);
QPixmap classPix(class_xpm);
QPixmap constPix(macro_xpm);
QPixmap functionPix(method_xpm);
QTreeWidgetItem *node = nullptr;
QTreeWidgetItem *namespaceNode = nullptr, *defineNode = nullptr, *classNode = nullptr, *functionNode = nullptr;
QTreeWidgetItem *lastNamespaceNode = nullptr, *lastDefineNode = nullptr, *lastClassNode = nullptr, *lastFunctionNode = nullptr;
......@@ -37,10 +32,10 @@ void KatePluginSymbolViewerView::parsePhpSymbols(void)
classNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Classes")));
functionNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Functions")));
namespaceNode->setIcon(0, QIcon(namespacePix));
defineNode->setIcon(0, QIcon(definePix));
classNode->setIcon(0, QIcon(classPix));
functionNode->setIcon(0, QIcon(functionPix));
namespaceNode->setIcon(0, m_icon_context);
defineNode->setIcon(0, m_icon_typedef);
classNode->setIcon(0, m_icon_class);
functionNode->setIcon(0, m_icon_function);
if (m_expandOn->isChecked()) {
m_symbols->expandItem(namespaceNode);
......@@ -154,7 +149,7 @@ void KatePluginSymbolViewerView::parsePhpSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, match.captured(1));
node->setIcon(0, QIcon(namespacePix));
node->setIcon(0, m_icon_context);
node->setText(1, QString::number(i, 10));
}
......@@ -168,7 +163,7 @@ void KatePluginSymbolViewerView::parsePhpSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, match.captured(2));
node->setIcon(0, QIcon(definePix));
node->setIcon(0, m_icon_typedef);
node->setText(1, QString::number(i, 10));
}
......@@ -207,7 +202,7 @@ void KatePluginSymbolViewerView::parsePhpSymbols(void)
node->setText(0, matchInterface.captured(1));
}
}
node->setIcon(0, QIcon(classPix));
node->setIcon(0, m_icon_class);
node->setText(1, QString::number(i, 10));
node->setToolTip(0, nameWithTypes);
inClass = true;
......@@ -223,7 +218,7 @@ void KatePluginSymbolViewerView::parsePhpSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, match.captured(1));
node->setIcon(0, QIcon(constPix));
node->setIcon(0, m_icon_typedef);
node->setText(1, QString::number(i, 10));
}
......@@ -237,7 +232,7 @@ void KatePluginSymbolViewerView::parsePhpSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, match.captured(4));
node->setIcon(0, QIcon(varPix));
node->setIcon(0, m_icon_variable);
node->setText(1, QString::number(i, 10));
}
}
......@@ -267,7 +262,7 @@ void KatePluginSymbolViewerView::parsePhpSymbols(void)
node->setText(0, match.captured(5));
}
node->setIcon(0, QIcon(functionPix));
node->setIcon(0, m_icon_function);
node->setText(1, QString::number(i, 10));
node->setToolTip(0, nameWithTypes);
......
......@@ -513,7 +513,7 @@ QString KatePluginSymbolViewerConfigPage::fullName() const
}
QIcon KatePluginSymbolViewerConfigPage::icon() const
{
return QPixmap(class_xpm);
return QIcon::fromTheme(QLatin1String("code-class"));
}
void KatePluginSymbolViewerConfigPage::apply()
......
......@@ -134,6 +134,13 @@ private:
QAction *m_typesOn;
QAction *m_expandOn;
const QIcon m_icon_block = QIcon::fromTheme(QStringLiteral("code-block"));
const QIcon m_icon_class = QIcon::fromTheme(QStringLiteral("code-class"));
const QIcon m_icon_context = QIcon::fromTheme(QStringLiteral("code-context"));
const QIcon m_icon_function = QIcon::fromTheme(QStringLiteral("code-function"));
const QIcon m_icon_typedef = QIcon::fromTheme(QStringLiteral("code-typedef"));
const QIcon m_icon_variable = QIcon::fromTheme(QStringLiteral("code-variable"));
QTimer m_updateTimer;
QTimer m_currItemTimer;
int m_oldCursorLine = 0;
......@@ -179,7 +186,4 @@ private:
QSet<KatePluginSymbolViewerView *> m_views;
};
// icons
#include "icons.xpm"
#endif
......@@ -23,9 +23,6 @@ void KatePluginSymbolViewerView::parsePythonSymbols(void)
m_func->setText(i18n("Show Classes"));
QString cl; // Current Line
QPixmap cls(class_xpm);
QPixmap mtd(method_xpm);
QPixmap mcr(macro_xpm);
Symbol type;
QString name;
......@@ -42,8 +39,8 @@ void KatePluginSymbolViewerView::parsePythonSymbols(void)
if (m_treeOn->isChecked()) {
clsNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Classes")));
mcrNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Globals")));
mcrNode->setIcon(0, QIcon(mcr));
clsNode->setIcon(0, QIcon(cls));
mcrNode->setIcon(0, m_icon_function);
clsNode->setIcon(0, m_icon_class);
if (m_expandOn->isChecked()) {
m_symbols->expandItem(mcrNode);
......@@ -122,7 +119,7 @@ void KatePluginSymbolViewerView::parsePythonSymbols(void)
}
node->setText(0, name);
node->setIcon(0, QIcon(cls));
node->setIcon(0, m_icon_class);
node->setText(1, QString::number(line, 10));
}
......@@ -135,7 +132,7 @@ void KatePluginSymbolViewerView::parsePythonSymbols(void)
}
node->setText(0, name);
node->setIcon(0, QIcon(mtd));
node->setIcon(0, m_icon_function);
node->setText(1, QString::number(line, 10));
}
......@@ -148,7 +145,7 @@ void KatePluginSymbolViewerView::parsePythonSymbols(void)
}
node->setText(0, name);
node->setIcon(0, QIcon(mcr));
node->setIcon(0, m_icon_function);
node->setText(1, QString::number(line, 10));
}
......
......@@ -23,8 +23,6 @@ void KatePluginSymbolViewerView::parseRubySymbols(void)
m_func->setText(i18n("Show Classes"));
QString cl; // Current Line
QPixmap cls(class_xpm);
QPixmap mtd(method_xpm);
int i;
QString name;
......@@ -39,7 +37,7 @@ void KatePluginSymbolViewerView::parseRubySymbols(void)
if (m_treeOn->isChecked()) {
clsNode = new QTreeWidgetItem(m_symbols);
clsNode->setText(0, i18n("Classes"));
clsNode->setIcon(0, QIcon(cls));
clsNode->setIcon(0, m_icon_class);
if (m_expandOn->isChecked()) {
m_symbols->expandItem(clsNode);
}
......@@ -69,7 +67,7 @@ void KatePluginSymbolViewerView::parseRubySymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, cl.mid(6));
node->setIcon(0, QIcon(cls));
node->setIcon(0, m_icon_class);
node->setText(1, QString::number(i, 10));
}
}
......@@ -88,7 +86,7 @@ void KatePluginSymbolViewerView::parseRubySymbols(void)
name = name.left(name.indexOf(QLatin1Char('(')));
}
node->setText(0, name);
node->setIcon(0, QIcon(mtd));
node->setIcon(0, m_icon_function);
node->setText(1, QString::number(i, 10));
}
}
......
......@@ -32,14 +32,11 @@ void KatePluginSymbolViewerView::parseTclSymbols(void)
QTreeWidgetItem *mcrNode = nullptr, *clsNode = nullptr;
QTreeWidgetItem *lastMcrNode = nullptr, *lastClsNode = nullptr;
QPixmap mcr(macro_xpm);
QPixmap cls(class_xpm);
if (m_treeOn->isChecked()) {
clsNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Functions")));
mcrNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Globals")));
clsNode->setIcon(0, QIcon(cls));
mcrNode->setIcon(0, QIcon(mcr));
clsNode->setIcon(0, m_icon_function);
mcrNode->setIcon(0, m_icon_variable);
lastMcrNode = mcrNode;
lastClsNode = clsNode;
......@@ -97,7 +94,7 @@ void KatePluginSymbolViewerView::parseTclSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, stripped);
node->setIcon(0, QIcon(mcr));
node->setIcon(0, m_icon_function);
node->setText(1, QString::number(i, 10));
stripped.clear();
} // macro
......@@ -139,7 +136,7 @@ void KatePluginSymbolViewerView::parseTclSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, stripped);
node->setIcon(0, QIcon(cls));
node->setIcon(0, m_icon_variable);
node->setText(1, QString::number(i, 10));
}
stripped.clear();
......
......@@ -29,9 +29,6 @@ void KatePluginSymbolViewerView::parseXMLSymbols(void)
char comment = 0;
int i;
QPixmap cls(class_xpm);
QPixmap sct(struct_xpm);
QTreeWidgetItem *node = nullptr;
QTreeWidgetItem *topNode = nullptr;
......@@ -74,7 +71,7 @@ void KatePluginSymbolViewerView::parseXMLSymbols(void)
QList<QTreeWidgetItem *> reslist = m_symbols->findItems(type, Qt::MatchExactly);
if (reslist.isEmpty()) {
topNode = new QTreeWidgetItem(m_symbols, QStringList(type));
topNode->setIcon(0, QIcon(cls));
topNode->setIcon(0, m_icon_class);
if (m_expandOn->isChecked()) {
m_symbols->expandItem(topNode);
}
......@@ -86,7 +83,7 @@ void KatePluginSymbolViewerView::parseXMLSymbols(void)
} else {
node = new QTreeWidgetItem(m_symbols);
}
node->setIcon(0, QIcon(sct));
node->setIcon(0, m_icon_variable);
node->setText(0, stripped);
node->setText(1, QString::number(i, 10));
}
......
......@@ -29,11 +29,6 @@ void KatePluginSymbolViewerView::parseXsltSymbols(void)
char templ = 0;
int i;
QPixmap cls(class_xpm);
QPixmap sct(struct_xpm);
QPixmap mcr(macro_xpm);
QPixmap cls_int(class_int_xpm);
QTreeWidgetItem *node = nullptr;
QTreeWidgetItem *mcrNode = nullptr, *sctNode = nullptr, *clsNode = nullptr;
QTreeWidgetItem *lastMcrNode = nullptr, *lastSctNode = nullptr, *lastClsNode = nullptr;
......@@ -45,9 +40,9 @@ void KatePluginSymbolViewerView::parseXsltSymbols(void)
mcrNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Params")));
sctNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Variables")));
clsNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Templates")));
mcrNode->setIcon(0, QIcon(mcr));
sctNode->setIcon(0, QIcon(sct));
clsNode->setIcon(0, QIcon(cls));
mcrNode->setIcon(0, m_icon_typedef);
sctNode->setIcon(0, m_icon_variable);
clsNode->setIcon(0, m_icon_class);
if (m_expandOn->isChecked()) {
m_symbols->expandItem(mcrNode);
......@@ -99,7 +94,7 @@ void KatePluginSymbolViewerView::parseXsltSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, stripped);
node->setIcon(0, QIcon(mcr));
node->setIcon(0, m_icon_typedef);
node->setText(1, QString::number(i, 10));
}
......@@ -114,7 +109,7 @@ void KatePluginSymbolViewerView::parseXsltSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, stripped);
node->setIcon(0, QIcon(sct));
node->setIcon(0, m_icon_variable);
node->setText(1, QString::number(i, 10));
}
......@@ -129,7 +124,7 @@ void KatePluginSymbolViewerView::parseXsltSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, stripped);
node->setIcon(0, QIcon(cls_int));
node->setIcon(0, m_icon_context);
node->setText(1, QString::number(i, 10));
}
......@@ -144,7 +139,7 @@ void KatePluginSymbolViewerView::parseXsltSymbols(void)
node = new QTreeWidgetItem(m_symbols);
}
node->setText(0, stripped);
node->setIcon(0, QIcon(cls));
node->setIcon(0, m_icon_class);
node->setText(1, QString::number(i, 10));
}
......
Supports Markdown
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