Changeset View
Changeset View
Standalone View
Standalone View
language/duchain/problem.cpp
Show First 20 Lines • Show All 207 Lines • ▼ Show 20 Line(s) | 201 | switch(severity()) { | |||
---|---|---|---|---|---|
208 | case IProblem::Hint: | 208 | case IProblem::Hint: | ||
209 | return i18n("Hint"); | 209 | return i18n("Hint"); | ||
210 | } | 210 | } | ||
211 | return QString(); | 211 | return QString(); | ||
212 | } | 212 | } | ||
213 | 213 | | |||
214 | QString Problem::sourceString() const | 214 | QString Problem::sourceString() const | ||
215 | { | 215 | { | ||
216 | switch (source()) { | 216 | switch (source()) { | ||
mwolff: this should check if the source has been set explicitly, and if so, return that directly | |||||
217 | case IProblem::Disk: | 217 | case IProblem::Disk: | ||
218 | return i18n("Disk"); | 218 | return i18n("Disk"); | ||
219 | case IProblem::Preprocessor: | 219 | case IProblem::Preprocessor: | ||
220 | return i18n("Preprocessor"); | 220 | return i18n("Preprocessor"); | ||
221 | case IProblem::Lexer: | 221 | case IProblem::Lexer: | ||
222 | return i18n("Lexer"); | 222 | return i18n("Lexer"); | ||
223 | case IProblem::Parser: | 223 | case IProblem::Parser: | ||
224 | return i18n("Parser"); | 224 | return i18n("Parser"); | ||
225 | case IProblem::DUChainBuilder: | 225 | case IProblem::DUChainBuilder: | ||
226 | return i18n("Definition-Use Chain"); | 226 | return i18n("Definition-Use Chain"); | ||
227 | case IProblem::SemanticAnalysis: | 227 | case IProblem::SemanticAnalysis: | ||
228 | return i18n("Semantic analysis"); | 228 | return i18n("Semantic analysis"); | ||
229 | case IProblem::ToDo: | 229 | case IProblem::ToDo: | ||
230 | return i18n("To-do"); | 230 | return i18n("To-do"); | ||
231 | case IProblem::Unknown: | 231 | case IProblem::Unknown: | ||
232 | default: | 232 | default: | ||
233 | return i18n("Unknown"); | 233 | return i18n("Unknown"); | ||
234 | } | 234 | } | ||
235 | } | 235 | } | ||
236 | 236 | | |||
237 | void Problem::setPluginName(const QString& name) | ||||
238 | { | ||||
mwolff: this should do something | |||||
239 | } | ||||
240 | | ||||
237 | QString Problem::toString() const | 241 | QString Problem::toString() const | ||
238 | { | 242 | { | ||
239 | return i18nc("<severity>: <description> in <url>:[<range>]: <explanation> (found by <source>)", | 243 | return i18nc("<severity>: <description> in <url>:[<range>]: <explanation> (found by <source>)", | ||
240 | "%1: %2 in %3:[(%4,%5),(%6,%7)]: %8 (found by %9)" | 244 | "%1: %2 in %3:[(%4,%5),(%6,%7)]: %8 (found by %9)" | ||
241 | , severityString() | 245 | , severityString() | ||
242 | , description() | 246 | , description() | ||
243 | , url().str() | 247 | , url().str() | ||
244 | , range().start.line | 248 | , range().start.line | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |
this should check if the source has been set explicitly, and if so, return that directly