when a file attachment annotation has no description, show that there's no description available, instead of nothing

svn path=/trunk/KDE/kdegraphics/okular/; revision=799073
remotes/origin/KDE/4.1
Pino Toscano 18 years ago
parent 135c3752f1
commit 4500f491ef
  1. 3
      ui/annotationwidgets.cpp

@ -517,6 +517,7 @@ QWidget * FileAttachmentAnnotationWidget::createExtraWidget()
Okular::EmbeddedFile *ef = m_attachAnn->embeddedFile();
const int size = ef->size();
const QString sizeString = size <= 0 ? i18nc( "Not available size", "N/A" ) : KGlobal::locale()->formatByteSize( size );
const QString descString = ef->description().isEmpty() ? i18n( "No description available." ) : ef->description();
QGridLayout * lay = new QGridLayout( widget );
lay->setMargin( 0 );
@ -530,7 +531,7 @@ QWidget * FileAttachmentAnnotationWidget::createExtraWidget()
tmplabel = new QLabel( i18n( "Description:" ), widget );
lay->addWidget( tmplabel, 2, 0 );
tmplabel = new KSqueezedTextLabel( ef->description(), widget );
tmplabel = new KSqueezedTextLabel( descString, widget );
tmplabel->setTextInteractionFlags( Qt::TextSelectableByMouse );
lay->addWidget( tmplabel, 3, 0, 1, 2 );

Loading…
Cancel
Save