Changeset View
Changeset View
Standalone View
Standalone View
ui/annotationmodel.cpp
Show First 20 Lines • Show All 333 Lines • ▼ Show 20 Line(s) | 329 | { | |||
---|---|---|---|---|---|
334 | else if ( role == PageRole ) | 334 | else if ( role == PageRole ) | ||
335 | return item->page; | 335 | return item->page; | ||
336 | 336 | | |||
337 | return QVariant(); | 337 | return QVariant(); | ||
338 | } | 338 | } | ||
339 | switch ( role ) | 339 | switch ( role ) | ||
340 | { | 340 | { | ||
341 | case Qt::DisplayRole: | 341 | case Qt::DisplayRole: | ||
342 | return GuiUtils::captionForAnnotation( item->annotation ); | 342 | { | ||
343 | QString caption = GuiUtils::captionForAnnotation( item->annotation ); | ||||
344 | if ( !item->annotation->contents().isEmpty() ) | ||||
345 | { | ||||
346 | caption.append("*"); | ||||
aacid: i'm not sure this is LTR friendly, basically you always put the work on the translators side so… | |||||
347 | } | ||||
348 | return caption; | ||||
349 | } | ||||
343 | break; | 350 | break; | ||
344 | case Qt::DecorationRole: | 351 | case Qt::DecorationRole: | ||
345 | return QIcon::fromTheme( QStringLiteral("okular") ); | 352 | return QIcon::fromTheme( QStringLiteral("okular") ); | ||
346 | break; | 353 | break; | ||
347 | case Qt::ToolTipRole: | 354 | case Qt::ToolTipRole: | ||
348 | return GuiUtils::prettyToolTip( item->annotation ); | 355 | return GuiUtils::prettyToolTip( item->annotation ); | ||
349 | break; | 356 | break; | ||
350 | case AuthorRole: | 357 | case AuthorRole: | ||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |
i'm not sure this is LTR friendly, basically you always put the work on the translators side so it's them that can do it correctly, so you'd do
i18nc("This annotation contains text, %1 is the caption of the annotation", "%1 *", caption);
or similar