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

Factorizing

parent cf0a6cb2
......@@ -183,15 +183,13 @@ void KatePluginSymbolViewerView::parsePhpSymbols(void)
}
if (matchClass.hasMatch()) {
if (m_typesOn->isChecked()) {
nameWithTypes = matchClass.captured(3);
if (!matchClass.captured(1).trimmed().isEmpty() && !matchClass.captured(4).trimmed().isEmpty()) {
nameWithTypes = matchClass.captured(3) + QLatin1String(" [") + matchClass.captured(1).trimmed() + QLatin1Char(',')
+ matchClass.captured(4).trimmed() + QLatin1Char(']');
nameWithTypes += QLatin1String(" [") + matchClass.captured(1).trimmed() + QLatin1Char(',') + matchClass.captured(4).trimmed() + QLatin1Char(']');
} else if (!matchClass.captured(1).trimmed().isEmpty()) {
nameWithTypes = matchClass.captured(3) + QLatin1String(" [") + matchClass.captured(1).trimmed() + QLatin1Char(']');
nameWithTypes += QLatin1String(" [") + matchClass.captured(1).trimmed() + QLatin1Char(']');
} else if (!matchClass.captured(4).trimmed().isEmpty()) {
nameWithTypes = matchClass.captured(3) + QLatin1String(" [") + matchClass.captured(4).trimmed() + QLatin1Char(']');
} else {
nameWithTypes = matchClass.captured(3);
nameWithTypes += QLatin1String(" [") + matchClass.captured(4).trimmed() + QLatin1Char(']');
}
node->setText(0, nameWithTypes);
} else {
......
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