Fix tdmtheme crash

This resolves Bug 1544
pull/1/head
Francois Andriot 12 years ago committed by Timothy Pearson
parent 8cd17f9262
commit 37dd210d31

@ -268,16 +268,22 @@ void TDMThemeWidget::insertTheme( const TQString &_theme )
void TDMThemeWidget::updateInfoView( ThemeData *theme )
{
info->setText(
((theme->copyright.length() > 0) ?
i18n("<qt><strong>Copyright:</strong> %1<br/></qt>",
theme->copyright) : "") +
((theme->description.length() > 0) ?
i18n("<qt><strong>Description:</strong> %1</qt>",
theme->description) : "") );
preview->setPixmap( theme->path + '/' + theme->screenShot );
preview->setText( theme->screenShot.isEmpty() ?
"Screenshot not available" : TQString() );
if(theme) {
info->setText(
((theme->copyright.length() > 0) ?
i18n("<qt><strong>Copyright:</strong> %1<br/></qt>",
theme->copyright) : "") +
((theme->description.length() > 0) ?
i18n("<qt><strong>Description:</strong> %1</qt>",
theme->description) : "") );
preview->setPixmap( theme->path + '/' + theme->screenShot );
preview->setText( theme->screenShot.isEmpty() ?
i18n("Screenshot not available") : TQString() );
} else {
info->setText(i18n("No theme selected."));
preview->setPixmap(NULL);
preview->setText(i18n("Screenshot not available"));
}
}
void TDMThemeWidget::installNewTheme()

Loading…
Cancel
Save