summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/mailwrapper.cpp
Unidiff
Diffstat (limited to 'kmicromail/libmailwrapper/mailwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/mailwrapper.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/kmicromail/libmailwrapper/mailwrapper.cpp b/kmicromail/libmailwrapper/mailwrapper.cpp
index 2ee1ab3..9c299e8 100644
--- a/kmicromail/libmailwrapper/mailwrapper.cpp
+++ b/kmicromail/libmailwrapper/mailwrapper.cpp
@@ -5,6 +5,8 @@
5#include <fcntl.h> 5#include <fcntl.h>
6#include <string.h> 6#include <string.h>
7#include <qdir.h> 7#include <qdir.h>
8//Added by qt3to4:
9#include <Q3CString>
8 10
9#include "mailwrapper.h" 11#include "mailwrapper.h"
10//#include "logindialog.h" 12//#include "logindialog.h"
@@ -81,8 +83,8 @@ QString IMAPFolder::decodeFolderName( const QString &name )
81 unsigned long ucs4, utf16, bitbuf; 83 unsigned long ucs4, utf16, bitbuf;
82 unsigned char base64[256], utf8[6]; 84 unsigned char base64[256], utf8[6];
83 unsigned long srcPtr = 0; 85 unsigned long srcPtr = 0;
84 QCString dst = ""; 86 Q3CString dst = "";
85 QCString src = name.ascii(); 87 Q3CString src = name.ascii();
86 88
87 /* initialize modified base64 decoding table */ 89 /* initialize modified base64 decoding table */
88 memset(base64, UNDEFINED, sizeof(base64)); 90 memset(base64, UNDEFINED, sizeof(base64));
@@ -92,9 +94,9 @@ QString IMAPFolder::decodeFolderName( const QString &name )
92 94
93 /* loop until end of string */ 95 /* loop until end of string */
94 while (srcPtr < src.length ()) { 96 while (srcPtr < src.length ()) {
95 c = src[srcPtr++]; 97 c = src.at(srcPtr++);
96 /* deal with literal characters and &- */ 98 /* deal with literal characters and &- */
97 if (c != '&' || src[srcPtr] == '-') { 99 if (c != '&' || src.at(srcPtr) == '-') {
98 /* encode literally */ 100 /* encode literally */
99 dst += c; 101 dst += c;
100 /* skip over the '-' if this is an &- sequence */ 102 /* skip over the '-' if this is an &- sequence */
@@ -105,7 +107,7 @@ QString IMAPFolder::decodeFolderName( const QString &name )
105 bitbuf = 0; 107 bitbuf = 0;
106 bitcount = 0; 108 bitcount = 0;
107 ucs4 = 0; 109 ucs4 = 0;
108 while ((c = base64[(unsigned char) src[srcPtr]]) != UNDEFINED) { 110 while ((c = base64[(unsigned char) src.at(srcPtr)]) != UNDEFINED) {
109 ++srcPtr; 111 ++srcPtr;
110 bitbuf = (bitbuf << 6) | c; 112 bitbuf = (bitbuf << 6) | c;
111 bitcount += 6; 113 bitcount += 6;
@@ -149,7 +151,7 @@ QString IMAPFolder::decodeFolderName( const QString &name )
149 } 151 }
150 } 152 }
151 /* skip over trailing '-' in modified UTF-7 encoding */ 153 /* skip over trailing '-' in modified UTF-7 encoding */
152 if (src[srcPtr] == '-') 154 if (src.at(srcPtr) == '-')
153 ++srcPtr; 155 ++srcPtr;
154 } 156 }
155 } 157 }