summaryrefslogtreecommitdiffabout
path: root/kmicromail/composemail.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/composemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/composemail.cpp52
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
@@ -40,23 +40,23 @@
#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" ),
@@ -160,29 +160,29 @@ void ComposeMail::fillSettings()
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());
@@ -403,40 +403,40 @@ void ComposeMail::accept()
}
#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();
}
@@ -478,22 +478,22 @@ void ComposeMail::reject()
ComposeMail::~ComposeMail()
{
}
void ComposeMail::reEditMail(const RecMailP&current)
{
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() );