MCPcopy Create free account
hub / github.com/KDE/kdevelop / htmlDescription

Method htmlDescription

plugins/quickopen/duchainitemquickopen.cpp:115–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115QString DUChainItemData::htmlDescription() const
116{
117 if (m_item.m_noHtmlDestription) {
118 return QString();
119 }
120
121 DUChainReadLocker lock;
122 Declaration* decl = m_item.m_item.data();
123 if (!decl) {
124 return i18n("Not available any more");
125 }
126
127 TypePtr<FunctionType> function = decl->type<FunctionType>();
128
129 QString text;
130
131 if (function && function->returnType()) {
132 text = i18nc("%1: function signature", "Return: %1",
133 function->partToString(FunctionType::SignatureReturn)) + QLatin1Char(' ');
134 }
135
136 text += i18nc("%1: file path", "File: %1", ICore::self()->projectController()->prettyFileName(decl->url().toUrl()));
137
138 QString ret = QLatin1String("<small><small>") + text + QLatin1String("</small></small>");
139
140 return ret;
141}
142
143bool DUChainItemData::execute(QString& /*filterText*/)
144{

Callers

nothing calls this directly

Calls 8

partToStringMethod · 0.80
projectControllerMethod · 0.80
QStringClass · 0.50
dataMethod · 0.45
returnTypeMethod · 0.45
prettyFileNameMethod · 0.45
toUrlMethod · 0.45
urlMethod · 0.45

Tested by

no test coverage detected