- Fix display of icon in attachment properties dialog.

- remove unused parameter
- deprecated--

svn path=/trunk/KDE/kdepim/; revision=652549
wilder-work
Thomas McGuire 19 years ago
parent 0a2d65513a
commit a2cbf7ddf5
  1. 14
      kmmsgpartdlg.cpp
  2. 2
      kmmsgpartdlg.h

@ -48,7 +48,7 @@ static const int numEncodingTypes =
sizeof encodingTypes / sizeof *encodingTypes; sizeof encodingTypes / sizeof *encodingTypes;
KMMsgPartDialog::KMMsgPartDialog( const QString & caption, KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
QWidget * parent, const char * name ) QWidget * parent )
: KDialog( parent ) : KDialog( parent )
{ {
setCaption( caption.isEmpty() ? i18n("Message Part Properties") : caption ); setCaption( caption.isEmpty() ? i18n("Message Part Properties") : caption );
@ -212,6 +212,7 @@ void KMMsgPartDialog::setMimeType( const QString & mimeType ) {
for ( int i = 0 ; i < mMimeType->count() ; ++i ) for ( int i = 0 ; i < mMimeType->count() ; ++i )
if ( mMimeType->itemText( i ) == mimeType ) { if ( mMimeType->itemText( i ) == mimeType ) {
mMimeType->setCurrentIndex( i ); mMimeType->setCurrentIndex( i );
slotMimeTypeChanged( mimeType );
return; return;
} }
mMimeType->insertItem( 0, mimeType ); mMimeType->insertItem( 0, mimeType );
@ -330,11 +331,10 @@ void KMMsgPartDialog::slotMimeTypeChanged( const QString & mimeType ) {
} }
#endif #endif
// find a mimetype icon: // find a mimetype icon:
int dummy = 0; KMimeType::Ptr mt = KMimeType::mimeType( mimeType );
QString tmp = mimeType; // get rid of const'ness if ( !mt.isNull() )
if ( mMimeType->validator() && mMimeType->validator()->validate( tmp, dummy ) mIcon->setPixmap( KIconLoader::global()->loadMimeTypeIcon( mt->iconName(),
== QValidator::Acceptable ) K3Icon::Desktop ) );
mIcon->setPixmap( KIconLoader::global()->loadMimeTypeIcon( KMimeType::mimeType( mimeType )->iconName(), K3Icon::Desktop ) );
else else
mIcon->setPixmap( DesktopIcon("unknown") ); mIcon->setPixmap( DesktopIcon("unknown") );
} }
@ -444,7 +444,7 @@ void KMMsgPartDialogCompat::applyChanges()
case QuotedPrintable: cte = "quoted-printable"; break; case QuotedPrintable: cte = "quoted-printable"; break;
case Base64: default: cte = "base64"; break; case Base64: default: cte = "base64"; break;
} }
if ( cte != mMsgPart->cteStr().lower() ) { if ( cte != mMsgPart->cteStr().toLower() ) {
QByteArray body = mMsgPart->bodyDecodedBinary(); QByteArray body = mMsgPart->bodyDecodedBinary();
mMsgPart->setCteStr( cte ); mMsgPart->setCteStr( cte );
mMsgPart->setBodyEncodedBinary( body ); mMsgPart->setBodyEncodedBinary( body );

@ -44,7 +44,7 @@ class KMMsgPartDialog: public KDialog
public: public:
KMMsgPartDialog( const QString & caption=QString(), KMMsgPartDialog( const QString & caption=QString(),
QWidget * parent=0, const char * name=0 ); QWidget * parent=0 );
virtual ~KMMsgPartDialog(); virtual ~KMMsgPartDialog();
/** Get the currently selected mimetype */ /** Get the currently selected mimetype */

Loading…
Cancel
Save