| 113 | } |
| 114 | |
| 115 | QString 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 | |
| 143 | bool DUChainItemData::execute(QString& /*filterText*/) |
| 144 | { |
nothing calls this directly
no test coverage detected