summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp2
-rw-r--r--kaddressbook/views/cardview.cpp10
-rw-r--r--kmicromail/koprefsdialog.cpp7
-rw-r--r--kmicromail/libmailwrapper/generatemail.cpp16
-rw-r--r--kmicromail/libmailwrapper/generatemail.h1
-rw-r--r--kmicromail/libmailwrapper/genericwrapper.cpp3
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp4
-rw-r--r--kmicromail/libmailwrapper/mailwrapper.h2
-rw-r--r--kmicromail/mainwindow.cpp3
-rw-r--r--microkde/kdecore/klocale.cpp27
-rw-r--r--microkde/kidmanager.cpp2
-rw-r--r--microkde/kresources/managerimpl.cpp4
12 files changed, 46 insertions, 35 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index d651224..c339244 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2742,9 +2742,9 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
//inL.setResource( 0 );
//inR.setResource( 0 );
if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars
if ( !inL.resource() || inL.resource()->includeInSync() ) {
- if ( take = takeAddressee( &inL, &inR, mode, fullDateRange ) ) {
+ if ( (take = takeAddressee( &inL, &inR, mode, fullDateRange )) ) {
//qDebug("take %d %s ", take, inL.summary().latin1());
if ( take == 3 )
return false;
if ( take == 1 ) {// take local **********************
diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp
index da552c3..03df444 100644
--- a/kaddressbook/views/cardview.cpp
+++ b/kaddressbook/views/cardview.cpp
@@ -153,11 +153,11 @@ class CardViewPrivate
mItemWidth( 200 ),
mMaxFieldLines( INT_MAX ),
mCurrentItem( 0L ),
mLastClickPos( QPoint(0, 0) ),
+ mResizeAnchor(0),
mRubberBandAnchor( 0 ),
- mCompText( QString::null ),
- mResizeAnchor(0)
+ mCompText( QString::null )
{};
CardViewItemList mItemList;
QPtrList<CardViewSeparator> mSeparatorList;
@@ -200,11 +200,11 @@ class CardViewPrivate
class CardViewItemPrivate
{
public:
CardViewItemPrivate() :
- x( 0 ),
- y( 0 ),
- mSelected( false ){};
+ mSelected( false ),
+ x( 0 ),
+ y( 0 ){};
QString mCaption;
QPtrList< CardViewItem::Field > mFieldList;
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 4abf859..13d6681 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -146,13 +146,14 @@ void KOPrefsDialog::setupMailTab()
ttt = addWidBool(i18n("Send mails later"),
&(KOPrefs::instance()->mSendLater),topFrame);
topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1);
+ /*
mCodecEdit = new QLineEdit(topFrame);
topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1);
topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1);
topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1);
-
+ */
}
void KOPrefsDialog::setupFontsTab()
{
@@ -197,16 +198,16 @@ void KOPrefsDialog::usrReadConfig()
{
mNameEdit->setText(KOPrefs::instance()->mName);
mEmailEdit->setText(KOPrefs::instance()->mEmail);
- mCodecEdit->setText(KOPrefs::instance()->mSendCodec);
+ //mCodecEdit->setText(KOPrefs::instance()->mSendCodec);
kdelibcfg->readConfig();
}
void KOPrefsDialog::usrWriteConfig()
{
KOPrefs::instance()->mName = mNameEdit->text();
KOPrefs::instance()->mEmail = mEmailEdit->text();
- KOPrefs::instance()->mSendCodec = mCodecEdit->text();
+ //KOPrefs::instance()->mSendCodec = mCodecEdit->text();
kdelibcfg->writeConfig();
}
diff --git a/kmicromail/libmailwrapper/generatemail.cpp b/kmicromail/libmailwrapper/generatemail.cpp
index 32311d7..2d213fe 100644
--- a/kmicromail/libmailwrapper/generatemail.cpp
+++ b/kmicromail/libmailwrapper/generatemail.cpp
@@ -12,8 +12,9 @@ using namespace Opie::Core;
const char* Generatemail::USER_AGENT="KOpieMail 33 1/3";
Generatemail::Generatemail()
{
+ mCharset = "iso-8859-1";
}
Generatemail::~Generatemail()
{
@@ -144,9 +145,9 @@ mailmime *Generatemail::buildFilePart(const QString&filename,const QString&mimet
int mechanism = MAILMIME_MECHANISM_BASE64;
if ( mimetype.startsWith( "text/" ) ) {
param = mailmime_parameter_new( strdup( "charset" ),
- strdup( "iso-8859-1" ) );
+ strdup( mCharset.latin1() ) );
mechanism = MAILMIME_MECHANISM_QUOTED_PRINTABLE;
}
fields = mailmime_fields_new_filename(
@@ -169,9 +170,10 @@ mailmime *Generatemail::buildFilePart(const QString&filename,const QString&mimet
if (filePart) {
if (filename.length()>0) {
err = mailmime_set_body_file( filePart, file );
} else {
- err = mailmime_set_body_text(filePart,strdup( TextContent.utf8()),TextContent.utf8().length());
+ err = mailmime_set_body_text(filePart,strdup( TextContent.utf8().data()),TextContent.utf8().length());
+ //err = mailmime_set_body_text(filePart,strdup( TextContent.latin1()),TextContent.length());
}
if (err != MAILIMF_NO_ERROR) {
qDebug("Error setting body with file ");
mailmime_free( filePart );
@@ -226,10 +228,11 @@ mailmime *Generatemail::buildTxtPart(const QString&str ) {
mailmime_content *content;
mailmime_parameter *param;
int err;
QCString __str;
+ //qDebug(" Generatemail::buildTxtPart %s", str.latin1());
param = mailmime_parameter_new( strdup( "charset" ),
- strdup( "iso-8859-1" ) );
+ strdup( mCharset.latin1() ) );
if ( param == NULL )
goto err_free;
content = mailmime_content_new_with_str( "text/plain" );
@@ -247,10 +250,11 @@ mailmime *Generatemail::buildTxtPart(const QString&str ) {
txtPart = mailmime_new_empty( content, fields );
if ( txtPart == NULL )
goto err_free_fields;
{
- __str = str.utf8();
- err = mailmime_set_body_text( txtPart, __str.data(), __str.length() );
+ //__str = str.utf8();
+ __str = QCString (str.latin1());
+ err = mailmime_set_body_text( txtPart, strdup(__str.data()), __str.length() );
}
if ( err != MAILIMF_NO_ERROR )
goto err_free_txtPart;
@@ -397,8 +401,10 @@ mailmime *Generatemail::createMimeMail(const Opie::Core::OSmartPointer<Mail> &ma
mailmime *message, *txtPart;
mailimf_fields *fields;
int err;
+ //LR disabled for now
+ //mCharset = mail->getCharset().lower();
fields = createImfFields( mail );
if ( fields == NULL )
goto err_free;
diff --git a/kmicromail/libmailwrapper/generatemail.h b/kmicromail/libmailwrapper/generatemail.h
index b9f8285..a9fb648 100644
--- a/kmicromail/libmailwrapper/generatemail.h
+++ b/kmicromail/libmailwrapper/generatemail.h
@@ -41,7 +41,8 @@ protected:
mailmime *createMimeMail(const Opie::Core::OSmartPointer<Mail>&mail );
clist *createRcptList( mailimf_fields *fields );
static const char* USER_AGENT;
+ QString mCharset;
};
#endif
diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp
index 28d45ce..eac05e5 100644
--- a/kmicromail/libmailwrapper/genericwrapper.cpp
+++ b/kmicromail/libmailwrapper/genericwrapper.cpp
@@ -224,9 +224,10 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m
char*resu = 0;
int err = MAILIMF_NO_ERROR;
QString charset = part->searchParamter( "charset");
qDebug("CHARSET %s ",charset.latin1() );
- if ( !charset.isEmpty() ) {
+ if (false ) {
+ //if ( !charset.isEmpty() ) {
target->setCharset( charset );
err = mailmime_encoded_phrase_parse(charset.latin1(),
b.latin1(), b.length(),&index, "utf-8",&resu);
if (err == MAILIMF_NO_ERROR && resu && strlen(resu)) {
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp
index 2a54381..da7065f 100644
--- a/kmicromail/libmailwrapper/imapwrapper.cpp
+++ b/kmicromail/libmailwrapper/imapwrapper.cpp
@@ -758,10 +758,10 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t
int err = MAILIMF_NO_ERROR;
QString charset = currentPart->searchParamter( "charset");
qDebug("CHARSET %s ",charset.latin1() );
- //if ( false ) {
- if ( !charset.isEmpty() ) {
+ if ( false ) {
+ //if ( !charset.isEmpty() ) {
target_body->setCharset( charset );
//err = mailmime_encoded_phrase_parse("iso-8859-1",
// text, strlen(text),&index, "iso-8859-1",&res);
err = mailmime_encoded_phrase_parse(charset.latin1(),
diff --git a/kmicromail/libmailwrapper/mailwrapper.h b/kmicromail/libmailwrapper/mailwrapper.h
index ea6bf36..3e8b51f 100644
--- a/kmicromail/libmailwrapper/mailwrapper.h
+++ b/kmicromail/libmailwrapper/mailwrapper.h
@@ -82,9 +82,9 @@ public:
void setInreply(const QStringList&list){m_in_reply_to = list;}
const QStringList&Inreply()const{return m_in_reply_to;}
void setCharset( const QString&a ) { charset= a; }
- const QString& getCharset() { return charset; }
+ const QString& getCharset() const { return charset; }
private:
QList<Attachment> attList;
QString name, mail, to, cc, bcc, reply, subject, message, charset;
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 3013931..8c0a4cb 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -106,9 +106,10 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
codecMenu->insertItem( "Western (iso-8859-15)",2,2);
codecMenu->insertItem( "Chinese (big-5)",3,3);
codecMenu->insertItem( "Unicode (utf-8)",4,4);
codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5);
- settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu);
+ //disabled
+ //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu);
//setCentralWidget( view );
QVBox* wrapperBox = new QVBox( this );
setCentralWidget( wrapperBox );
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp
index 1da1e99..d7e384c 100644
--- a/microkde/kdecore/klocale.cpp
+++ b/microkde/kdecore/klocale.cpp
@@ -867,25 +867,26 @@ QString KLocale::timeFormat(IntDateFormat intIntTimeFormat) const
{
const IntDateFormat tformat = (intIntTimeFormat == Undefined)?mIntTimeFormat:intIntTimeFormat;
if ( tformat == Default )
- if ( mHourF24Format)
- return "%H:%M:%S";
- else
- return "%I:%M:%S%p";
+ if ( mHourF24Format)
+ return "%H:%M:%S";
+ else
+ return "%I:%M:%S%p";
else if ( tformat == Format1 )
- if ( mHourF24Format)
- return "%H:%M:%S";
- else
- return "%I:%M:%S%p";
+ if ( mHourF24Format)
+ return "%H:%M:%S";
+ else
+ return "%I:%M:%S%p";
else if ( tformat == ISODate ) // = Qt::ISODate
- if ( mHourF24Format)
- return "%H:%M:%S";
- else
- return "%I:%M:%S%p";
-
+ if ( mHourF24Format)
+ return "%H:%M:%S";
+ else
+ return "%I:%M:%S%p";
+ // to satisfy the compiler
+ return "%H:%M:%S";
}
void KLocale::insertCatalogue ( const QString & )
{
diff --git a/microkde/kidmanager.cpp b/microkde/kidmanager.cpp
index 8cf486a..e687e5d 100644
--- a/microkde/kidmanager.cpp
+++ b/microkde/kidmanager.cpp
@@ -120,9 +120,9 @@ bool KIdManager::getNumbers (const QString& idString,const QString& prof, int &s
}
lenCsum = endall-startCsum+1;
}
else {
- qDebug("Error getNumbers:length is no number:*%s* ", idString.mid ( startIDnum,startIDnumlen).toInt( &ok ));
+ qDebug("Error getNumbers:length is no number:*%s* ", idString.mid ( startIDnum,startIDnumlen).latin1());
return false;
}
} else {
qDebug("Error in KIdManager::getNumbers.startIDnum <= 0");
diff --git a/microkde/kresources/managerimpl.cpp b/microkde/kresources/managerimpl.cpp
index 5bd9eb7..566b8f4 100644
--- a/microkde/kresources/managerimpl.cpp
+++ b/microkde/kresources/managerimpl.cpp
@@ -156,9 +156,9 @@ void ManagerImpl::writeConfig( KConfig *cfg )
}
void ManagerImpl::add( Resource *resource, bool useDCOP )
{
-qDebug("ManagerImpl::add begin this= %ul resource=%ul", this, resource);
+ //qDebug("ManagerImpl::add begin this= %ul resource=%ul", this, resource);
resource->setActive( true );
if ( mResources.isEmpty() ) {
@@ -168,9 +168,9 @@ qDebug("ManagerImpl::add begin this= %ul resource=%ul", this, resource);
mResources.append( resource );
writeResourceConfig( resource, true );
- qDebug("ManagerImpl::add end this= %ul resource=%ul", this, resource);
+ //qDebug("ManagerImpl::add end this= %ul resource=%ul", this, resource);
}
void ManagerImpl::remove( Resource *resource, bool useDCOP )