From 5a8684706903f32271a66e3c0ef87e9e8ddacc42 Mon Sep 17 00:00:00 2001 From: Markus Wuebben Date: Fri, 11 Sep 1998 00:29:33 +0000 Subject: [PATCH] //$markus: small fixes svn path=/trunk/kdenetwork/kmail/; revision=10410 --- kmaddrbook.cpp | 2 +- kmcomposewin.cpp | 2 ++ kmfilterdlg.cpp | 1 + kmmessage.cpp | 6 +++--- kmmsgbase.cpp | 4 ++-- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/kmaddrbook.cpp b/kmaddrbook.cpp index dc849b6b6..b874674a4 100644 --- a/kmaddrbook.cpp +++ b/kmaddrbook.cpp @@ -96,7 +96,7 @@ int KMAddrBook::load(const char* aFileName) if (!file.open(IO_ReadOnly)) return file.status(); clear(); - while (file.readLine(line,255)>0 && !file.atEnd()) + while (!file.atEnd() && file.readLine(line,255)>0 ) { if (line[strlen(line)-1] < ' ') line[strlen(line)-1] = '\0'; if (line[0]!='#' && line[0]!='\0') inSort(line); diff --git a/kmcomposewin.cpp b/kmcomposewin.cpp index 8221ac04c..3a9ae2d35 100644 --- a/kmcomposewin.cpp +++ b/kmcomposewin.cpp @@ -1551,6 +1551,8 @@ void KMComposeWin::slotAppendSignature() sigFileName = dlg.selectedFile(); if (sigFileName.isEmpty()) return; sigText = kFileToString(sigFileName, TRUE); + identity->setSignatureFile(sigFileName); + identity->writeConfig(true); } else sigText = identity->signature(); diff --git a/kmfilterdlg.cpp b/kmfilterdlg.cpp index 11a0fec63..cd540b229 100644 --- a/kmfilterdlg.cpp +++ b/kmfilterdlg.cpp @@ -561,6 +561,7 @@ void KMFilterDlg::initLists(void) sFilterFieldList.append("Subject"); sFilterFieldList.append("From"); sFilterFieldList.append("To"); + sFilterFieldList.append("Cc"); sFilterFieldList.append("Reply-To"); sFilterFieldList.append("Organization"); sFilterFieldList.append("Resent-From"); diff --git a/kmmessage.cpp b/kmmessage.cpp index 33cfe01fe..1b8dcd923 100644 --- a/kmmessage.cpp +++ b/kmmessage.cpp @@ -234,14 +234,14 @@ void KMMessage::fromString(const QString aStr, bool aSetStatus) // copy string and throw out obsolete control characters len = aStr.length(); - result.resize(len); + result.resize(len +1); for (i=0,j=0; i=' ' || aStr[i]=='\t' || aStr[i]=='\n') result[j++] = aStr[i]; } - - mMsg->FromString((const char*)aStr); + result[j++] = '\0'; // terminate zero for casting + mMsg->FromString((const char*)result); mMsg->Parse(); if (aSetStatus) diff --git a/kmmsgbase.cpp b/kmmsgbase.cpp index da4c135c0..7ebe847a5 100644 --- a/kmmsgbase.cpp +++ b/kmmsgbase.cpp @@ -9,8 +9,8 @@ #include -#define NUM_STATUSLIST 7 -static KMMsgStatus sStatusList[NUM_STATUSLIST+1] = +#define NUM_STATUSLIST 9 +static KMMsgStatus sStatusList[NUM_STATUSLIST] = { KMMsgStatusDeleted, KMMsgStatusNew, KMMsgStatusUnread, KMMsgStatusOld,