Fix tdmtheme crash

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

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

Loading…
Cancel
Save