Diffstat (limited to 'noncore/net/mail/libmailwrapper/mailwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailwrapper.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/noncore/net/mail/libmailwrapper/mailwrapper.cpp b/noncore/net/mail/libmailwrapper/mailwrapper.cpp index 75b9343..ebdbf4b 100644 --- a/noncore/net/mail/libmailwrapper/mailwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mailwrapper.cpp @@ -23,37 +23,39 @@ Attachment::Attachment( DocLnk lnk ) { doc = lnk; size = QFileInfo( doc.file() ).size(); } Folder::Folder(const QString&tmp_name, const QString&sep ) { name = tmp_name; nameDisplay = name; separator = sep; + prefix = ""; } const QString& Folder::Separator()const { return separator; } -IMAPFolder::IMAPFolder(const QString&name,const QString&sep, bool select,bool no_inf, const QString&prefix ) +IMAPFolder::IMAPFolder(const QString&name,const QString&sep, bool select,bool no_inf, const QString&aprefix ) : Folder( name,sep ),m_MaySelect(select),m_NoInferior(no_inf) { // Decode IMAP foldername nameDisplay = IMAPFolder::decodeFolderName( name ); qDebug( "folder " + name + " - displayed as " + nameDisplay ); + prefix = aprefix; if (prefix.length()>0) { if (nameDisplay.startsWith(prefix) && nameDisplay.length()>prefix.length()) { nameDisplay=nameDisplay.right(nameDisplay.length()-prefix.length()); } } } static unsigned char base64chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,"; /** @@ -137,12 +139,26 @@ QString IMAPFolder::decodeFolderName( const QString &name ) if (src[srcPtr] == '-') ++srcPtr; } } return QString::fromUtf8( dst.data() ); } Mail::Mail() :name(""), mail(""), to(""), cc(""), bcc(""), reply(""), subject(""), message("") { } + +MHFolder::MHFolder(const QString&disp_name,const QString&mbox) + : Folder( disp_name,"/" ) +{ + separator = "/"; + name = mbox; + if (!disp_name.startsWith("/") && disp_name.length()>0) + name+="/"; + name+=disp_name; + if (disp_name.length()==0) { + nameDisplay = separator; + } + prefix = mbox; +} |