author | zautrix <zautrix> | 2004-10-31 12:28:03 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-31 12:28:03 (UTC) |
commit | bed831cc1a38d38a4c5b9329bf37b1c663142c23 (patch) (side-by-side diff) | |
tree | db12b81ea6cee0cac347c801798d759dfe24acfb /kmicromail/composemail.cpp | |
parent | 553bd9acf9879a77c5fa925155f73afbe8a9af41 (diff) | |
download | kdepimpi-bed831cc1a38d38a4c5b9329bf37b1c663142c23.zip kdepimpi-bed831cc1a38d38a4c5b9329bf37b1c663142c23.tar.gz kdepimpi-bed831cc1a38d38a4c5b9329bf37b1c663142c23.tar.bz2 |
ompi utf8 fixes
-rw-r--r-- | kmicromail/composemail.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp index 5945b7f..2dcbc75 100644 --- a/kmicromail/composemail.cpp +++ b/kmicromail/composemail.cpp @@ -36,31 +36,31 @@ #include <qcheckbox.h> #include <qiconset.h> #include <qtimer.h> #include <qmessagebox.h> #include <qpushbutton.h> #include <qmultilineedit.h> #include <qlabel.h> #include <qtabwidget.h> #include <qlistview.h> //using namespace Opie::Core; //using namespace Opie::Ui; -ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal ) +ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, bool modal ) : ComposeMailUI( parent, name, modal ) { mPickLineEdit = 0; connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); - settings = s; + settings = sett; m_replyid = ""; if ( KOPrefs::instance()->mUseKapi) { KConfig config( locateLocal("config", "kabcrc") ); config.setGroup( "General" ); QString whoami_uid = config.readEntry( "WhoAmI" ); if ( whoami_uid.isEmpty() ) { QMessageBox::information( 0, i18n( "Hint" ), i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), i18n( "Ok" ) ); @@ -156,37 +156,37 @@ void ComposeMail::fillSettings() int pref = 0; for (;sit!=mailList.end();++sit) { fromBox->insertItem((*sit)); } senderNameEdit->setText(KOPrefs::instance()->mName); } void ComposeMail::saveAsDraft() { Opie::Core::OSmartPointer<Mail> mail= new Mail(); - mail->setMail(fromBox->currentText()); - mail->setTo( toLine->text() ); - mail->setName(senderNameEdit->text()); - mail->setCC( ccLine->text() ); - mail->setBCC( bccLine->text() ); - mail->setReply( replyLine->text() ); - mail->setSubject( subjectLine->text() ); + mail->setMail(fromBox->currentText().utf8 ()); + mail->setTo( toLine->text().utf8 () ); + mail->setName(senderNameEdit->text().utf8 ()); + mail->setCC( ccLine->text().utf8 () ); + mail->setBCC( bccLine->text().utf8 () ); + mail->setReply( replyLine->text().utf8 () ); + mail->setSubject( subjectLine->text().utf8 () ); if (!m_replyid.isEmpty()) { QStringList ids; ids.append(m_replyid); mail->setInreply(ids); } - QString txt = message->text(); + QString txt = message->text().utf8 (); if ( !sigMultiLine->text().isEmpty() ) { txt.append( "\n--\n" ); txt.append( sigMultiLine->text() ); } mail->setMessage( txt ); /* only use the default drafts folder name! */ Storemail wrapper(AbstractMail::draftFolder()); wrapper.storeMail(mail); AttachViewItem *it = (AttachViewItem *) attList->firstChild(); /* attachments we will ignore! */ @@ -399,48 +399,48 @@ void ComposeMail::accept() if (yesno == 1) { return; } } #if 0 odebug << "Sending Mail with " << smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() << oendl; #endif Opie::Core::OSmartPointer<Mail> mail=new Mail; SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); - mail->setMail(fromBox->currentText()); + mail->setMail(fromBox->currentText().utf8 ()); if ( !toLine->text().isEmpty() ) { - mail->setTo( toLine->text() ); + mail->setTo( toLine->text().utf8 () ); } else { QMessageBox::warning(0,i18n("Sending mail"), i18n("No Receiver spezified" ) ); return; } - mail->setName(senderNameEdit->text()); - mail->setCC( ccLine->text() ); - mail->setBCC( bccLine->text() ); - mail->setReply( replyLine->text() ); - mail->setSubject( subjectLine->text() ); + mail->setName(senderNameEdit->text().utf8 ()); + mail->setCC( ccLine->text().utf8 () ); + mail->setBCC( bccLine->text().utf8 () ); + mail->setReply( replyLine->text().utf8 () ); + mail->setSubject( subjectLine->text().utf8 () ); if (!m_replyid.isEmpty()) { QStringList ids; - ids.append(m_replyid); + ids.append(m_replyid.utf8 ()); mail->setInreply(ids); } - QString txt = message->text(); + QString txt = message->text().utf8 (); if ( !sigMultiLine->text().isEmpty() ) { txt.append( "\n--\n" ); - txt.append( sigMultiLine->text() ); + txt.append( sigMultiLine->text().utf8 () ); } mail->setMessage( txt ); AttachViewItem *it = (AttachViewItem *) attList->firstChild(); while ( it != 0 ) { mail->addAttachment( it->getAttachment() ); it = (AttachViewItem *) it->nextSibling(); } SMTPwrapper wrapper( smtp ); if ( wrapper.sendMail( mail,checkBoxLater->isChecked() ) ) setStatus( tr ("Mail sent")); else { @@ -474,30 +474,30 @@ void ComposeMail::reject() return; } QDialog::reject(); } ComposeMail::~ComposeMail() { } void ComposeMail::reEditMail(const RecMailP¤t) { RecMailP data = current; - message->setText(data->Wrapper()->fetchBody(current)->Bodytext()); - subjectLine->setText( data->getSubject()); - toLine->setText(data->To().join(",")); - ccLine->setText(data->CC().join(",")); - bccLine->setText(data->Bcc().join(",")); - replyLine->setText(data->Replyto()); + message->setText(QString::fromUtf8( data->Wrapper()->fetchBody(current)->Bodytext().latin1() )); + subjectLine->setText( QString::fromUtf8( data->getSubject().latin1() )); + toLine->setText(QString::fromUtf8( data->To().join(",").latin1() )); + ccLine->setText(QString::fromUtf8( data->CC().join(",").latin1() )); + bccLine->setText(QString::fromUtf8( data->Bcc().join(",").latin1() )); + replyLine->setText(QString::fromUtf8( data->Replyto().latin1() )); } AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) : QListViewItem( parent ) { attachment = att; if ( !attachment->getPixmap().isNull() ) setPixmap( 0,attachment->getPixmap() ); setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); setText( 1, QString::number( att->getSize() ) ); } |