Changeset View
Changeset View
Standalone View
Standalone View
addons/symbolviewer/cpp_parser.cpp
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | |||||
47 | if(m_treeOn->isChecked()) | 47 | if(m_treeOn->isChecked()) | ||
48 | { | 48 | { | ||
49 | mcrNode = new QTreeWidgetItem(m_symbols, QStringList( i18n("Macros") ) ); | 49 | mcrNode = new QTreeWidgetItem(m_symbols, QStringList( i18n("Macros") ) ); | ||
50 | sctNode = new QTreeWidgetItem(m_symbols, QStringList( i18n("Structures") ) ); | 50 | sctNode = new QTreeWidgetItem(m_symbols, QStringList( i18n("Structures") ) ); | ||
51 | clsNode = new QTreeWidgetItem(m_symbols, QStringList( i18n("Functions") ) ); | 51 | clsNode = new QTreeWidgetItem(m_symbols, QStringList( i18n("Functions") ) ); | ||
52 | mcrNode->setIcon(0, QIcon(mcr)); | 52 | mcrNode->setIcon(0, QIcon(mcr)); | ||
53 | sctNode->setIcon(0, QIcon(sct)); | 53 | sctNode->setIcon(0, QIcon(sct)); | ||
54 | clsNode->setIcon(0, QIcon(cls)); | 54 | clsNode->setIcon(0, QIcon(cls)); | ||
55 | if (m_plugin->expandedOn) | 55 | if (m_expandOn->isChecked()) | ||
56 | { | 56 | { | ||
57 | m_symbols->expandItem(mcrNode); | 57 | m_symbols->expandItem(mcrNode); | ||
58 | m_symbols->expandItem(sctNode); | 58 | m_symbols->expandItem(sctNode); | ||
59 | m_symbols->expandItem(clsNode); | 59 | m_symbols->expandItem(clsNode); | ||
60 | } | 60 | } | ||
61 | lastMcrNode = mcrNode; | 61 | lastMcrNode = mcrNode; | ||
62 | lastSctNode = sctNode; | 62 | lastSctNode = sctNode; | ||
63 | lastClsNode = clsNode; | 63 | lastClsNode = clsNode; | ||
▲ Show 20 Lines • Show All 82 Lines • ▼ Show 20 Line(s) | 144 | { | |||
146 | if(cl.at(j)==QLatin1Char('{')) { mclass = 4; break;} | 146 | if(cl.at(j)==QLatin1Char('{')) { mclass = 4; break;} | ||
147 | stripped += cl.at(j); | 147 | stripped += cl.at(j); | ||
148 | } | 148 | } | ||
149 | if(m_func->isChecked()) | 149 | if(m_func->isChecked()) | ||
150 | { | 150 | { | ||
151 | if (m_treeOn->isChecked()) | 151 | if (m_treeOn->isChecked()) | ||
152 | { | 152 | { | ||
153 | node = new QTreeWidgetItem(clsNode, lastClsNode); | 153 | node = new QTreeWidgetItem(clsNode, lastClsNode); | ||
154 | if (m_plugin->expandedOn) m_symbols->expandItem(node); | 154 | if (m_expandOn->isChecked()) m_symbols->expandItem(node); | ||
155 | lastClsNode = node; | 155 | lastClsNode = node; | ||
156 | mtdNode = lastClsNode; | 156 | mtdNode = lastClsNode; | ||
157 | lastMtdNode = lastClsNode; | 157 | lastMtdNode = lastClsNode; | ||
158 | } | 158 | } | ||
159 | else node = new QTreeWidgetItem(m_symbols); | 159 | else node = new QTreeWidgetItem(m_symbols); | ||
160 | node->setText(0, stripped); | 160 | node->setText(0, stripped); | ||
161 | node->setIcon(0, QIcon(cls)); | 161 | node->setIcon(0, QIcon(cls)); | ||
162 | node->setText(1, QString::number( i, 10)); | 162 | node->setText(1, QString::number( i, 10)); | ||
▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | 226 | if(block == 2 && graph == 0) | |||
238 | 238 | | |||
239 | if((cl.at(j)==QLatin1Char('{') && structure == false && cl.indexOf(QLatin1Char(';')) < 0) || | 239 | if((cl.at(j)==QLatin1Char('{') && structure == false && cl.indexOf(QLatin1Char(';')) < 0) || | ||
240 | (cl.at(j)==QLatin1Char('{') && structure == false && cl.indexOf(QLatin1Char('}')) > (int)j)) | 240 | (cl.at(j)==QLatin1Char('{') && structure == false && cl.indexOf(QLatin1Char('}')) > (int)j)) | ||
241 | { | 241 | { | ||
242 | stripped.replace(0x9, QLatin1String(" ")); | 242 | stripped.replace(0x9, QLatin1String(" ")); | ||
243 | if(m_func->isChecked()) | 243 | if(m_func->isChecked()) | ||
244 | { | 244 | { | ||
245 | QString strippedWithTypes = stripped; | 245 | QString strippedWithTypes = stripped; | ||
246 | if (m_plugin->typesOn == false) | 246 | if (!m_typesOn->isChecked()) | ||
247 | { | 247 | { | ||
248 | while (stripped.indexOf(QLatin1Char('(')) >= 0) | 248 | while (stripped.indexOf(QLatin1Char('(')) >= 0) | ||
249 | stripped = stripped.left(stripped.indexOf(QLatin1Char('('))); | 249 | stripped = stripped.left(stripped.indexOf(QLatin1Char('('))); | ||
250 | while (stripped.indexOf(QLatin1String("::")) >= 0) | 250 | while (stripped.indexOf(QLatin1String("::")) >= 0) | ||
251 | stripped = stripped.mid(stripped.indexOf(QLatin1String("::")) + 2); | 251 | stripped = stripped.mid(stripped.indexOf(QLatin1String("::")) + 2); | ||
252 | stripped = stripped.trimmed(); | 252 | stripped = stripped.trimmed(); | ||
253 | while (stripped.indexOf(0x20) >= 0) | 253 | while (stripped.indexOf(0x20) >= 0) | ||
254 | stripped = stripped.mid(stripped.indexOf(0x20, 0) + 1); | 254 | stripped = stripped.mid(stripped.indexOf(0x20, 0) + 1); | ||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |