diff --git a/kmail/CMakeLists.txt b/kmail/CMakeLists.txt index daa365ec..9d503d31 100644 --- a/kmail/CMakeLists.txt +++ b/kmail/CMakeLists.txt @@ -212,8 +212,8 @@ add_custom_target( kmail_settings_base tde_add_library( ${target} SHARED AUTOMOC SOURCES ${${target}_SRCS} LINK - emailfunctions-static kmime-shared kpgp-shared tdepim-shared kpimidentities-shared - mimelib-shared ksieve-shared tdehtml-shared ${INDEX_LIBRARY} + kmime-shared kpgp-shared tdepim-shared kpimidentities-shared + mimelib-shared ksieve-shared tdecore-shared tdehtml-shared ${INDEX_LIBRARY} DESTINATION ${LIB_INSTALL_DIR} DEPENDENCIES kmail_settings_base ) diff --git a/kmail/antispamconfig.cpp b/kmail/antispamconfig.cpp index 75959a12..e0dbb5bf 100644 --- a/kmail/antispamconfig.cpp +++ b/kmail/antispamconfig.cpp @@ -33,8 +33,6 @@ #include "antispamconfig.h" -#include - #include #include diff --git a/kmail/bodypartformatter.cpp b/kmail/bodypartformatter.cpp index 75360883..3ee62d97 100644 --- a/kmail/bodypartformatter.cpp +++ b/kmail/bodypartformatter.cpp @@ -46,7 +46,6 @@ #include #include -#include namespace { class AnyTypeBodyPartFormatter diff --git a/kmail/configuredialog.cpp b/kmail/configuredialog.cpp index c0beb0fd..2c5830ab 100644 --- a/kmail/configuredialog.cpp +++ b/kmail/configuredialog.cpp @@ -85,7 +85,6 @@ using KMime::DateFormatter; #include #include #include -#include #include #include #include @@ -117,6 +116,7 @@ using KMime::DateFormatter; #include #include #include +#include // other headers: #include @@ -3327,7 +3327,7 @@ void ComposerPage::CharsetTab::doLoadOther() { it != charsets.end() ; ++it ) if ( (*it) == TQString::fromLatin1("locale") ) { TQCString cset = kmkernel->networkCodec()->mimeName(); - KPIM::kAsciiToLower( cset.data() ); + kasciitolower( cset.data() ); (*it) = TQString("%1 (locale)").arg( TQString(cset) ); } diff --git a/kmail/kmmessage.cpp b/kmail/kmmessage.cpp index 70ba72c2..b12ae65c 100644 --- a/kmail/kmmessage.cpp +++ b/kmail/kmmessage.cpp @@ -28,8 +28,6 @@ using KMail::HeaderStrategy; #include #include -#include - #include #include @@ -4083,7 +4081,7 @@ TQCString KMMessage::defaultCharset() if (retval.isEmpty() || (retval == "locale")) { retval = TQCString(kmkernel->networkCodec()->mimeName()); - KPIM::kAsciiToLower( retval.data() ); + kasciitolower( retval.data() ); } if (retval == "jisx0208.1983-0") retval = "iso-2022-jp"; @@ -4145,7 +4143,7 @@ void KMMessage::setCharset( const TQCString &charset, DwEntity *entity ) mType.SetModified(); TQCString lowerCharset = charset; - KPIM::kAsciiToLower( lowerCharset.data() ); + kasciitolower( lowerCharset.data() ); param->SetValue( DwString( lowerCharset ) ); mType.Assemble(); } diff --git a/kmail/kmmsgbase.cpp b/kmail/kmmsgbase.cpp index abf1ade7..61952a00 100644 --- a/kmail/kmmsgbase.cpp +++ b/kmail/kmmsgbase.cpp @@ -15,13 +15,13 @@ using KMail::MessageProperty; #include #include #include -#include #include #include #include #include +#include #include #include #include @@ -575,7 +575,7 @@ const TQTextCodec* KMMsgBase::codecForName(const TQCString& _str) { if (_str.isEmpty()) return 0; TQCString codec = _str; - KPIM::kAsciiToLower(codec.data()); + kasciitolower(codec.data()); return TDEGlobal::charsets()->codecForName(codec); } @@ -790,7 +790,7 @@ TQCString KMMsgBase::encodeRFC2047String(const TQString& _str, if (charset.isEmpty()) { cset = kmkernel->networkCodec()->mimeName(); - KPIM::kAsciiToLower(cset.data()); + kasciitolower(cset.data()); } else cset = charset; @@ -881,7 +881,7 @@ TQCString KMMsgBase::encodeRFC2231String( const TQString& _str, if ( charset.isEmpty() ) { cset = kmkernel->networkCodec()->mimeName(); - KPIM::kAsciiToLower( cset.data() ); + kasciitolower( cset.data() ); } else cset = charset; @@ -1049,7 +1049,7 @@ TQCString KMMsgBase::autoDetectCharset(const TQCString &_encoding, const TQStrin if (encoding == "locale") { encoding = kmkernel->networkCodec()->mimeName(); - KPIM::kAsciiToLower(encoding.data()); + kasciitolower(encoding.data()); } if (text.isEmpty()) return encoding; diff --git a/kmail/kmmsgpart.cpp b/kmail/kmmsgpart.cpp index 596828e2..c7fa30d8 100644 --- a/kmail/kmmsgpart.cpp +++ b/kmail/kmmsgpart.cpp @@ -12,7 +12,6 @@ #include "globalsettings.h" #include "util.h" -#include #include #include #include @@ -21,6 +20,7 @@ #include #include +#include #include @@ -41,8 +41,8 @@ KMMessagePart::KMMessagePart( TQDataStream & stream ) stream >> mOriginalContentTypeStr >> mName >> mContentDescription >> mContentDisposition >> mCte >> size >> mPartSpecifier; - KPIM::kAsciiToLower( mContentDisposition.data() ); - KPIM::kAsciiToUpper( mOriginalContentTypeStr.data() ); + kasciitolower( mContentDisposition.data() ); + kasciitoupper( mOriginalContentTypeStr.data() ); // set the type int sep = mOriginalContentTypeStr.find('/'); @@ -435,7 +435,7 @@ void KMMessagePart::magicSetType(bool aAutoDecode) TQString KMMessagePart::iconName( int size ) const { TQCString mimeType( mType + "/" + mSubtype ); - KPIM::kAsciiToLower( mimeType.data() ); + kasciitolower( mimeType.data() ); TQString fileName = KMimeType::mimeType( mimeType )->icon( TQString(), false ); diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp index 52717348..566298b9 100644 --- a/kmail/kmreaderwin.cpp +++ b/kmail/kmreaderwin.cpp @@ -64,7 +64,6 @@ using KMail::FileHtmlWriter; using KMail::TeeHtmlWriter; #endif -#include #include #include @@ -2350,7 +2349,7 @@ void KMReaderWin::openAttachment( int id, const TQString & name ) } TQCString contentTypeStr( msgPart.typeStr() + '/' + msgPart.subtypeStr() ); - KPIM::kAsciiToLower( contentTypeStr.data() ); + kasciitolower( contentTypeStr.data() ); if ( qstrcmp( contentTypeStr, "text/x-vcard" ) == 0 ) { showVCard( &msgPart ); diff --git a/kmail/partNode.cpp b/kmail/partNode.cpp index 6d4dfe62..31b94d68 100644 --- a/kmail/partNode.cpp +++ b/kmail/partNode.cpp @@ -39,7 +39,6 @@ #include "kmmimeparttree.h" #include #include -#include #include "util.h" /* diff --git a/knode/CMakeLists.txt b/knode/CMakeLists.txt index a21deffb..ae3c46c9 100644 --- a/knode/CMakeLists.txt +++ b/knode/CMakeLists.txt @@ -84,7 +84,7 @@ tde_add_library( knodecommon SHARED AUTOMOC kncollectionview.cpp articlewidget.cpp csshelper.cpp smtpaccountwidget_base.ui VERSION 3.0.0 - LINK emailfunctions-static tdepim-shared kpgp-shared tdehtml-shared + LINK tdecore-shared tdepim-shared kpgp-shared tdehtml-shared DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/knode/articlewidget.cpp b/knode/articlewidget.cpp index faf4b4e8..9e91d090 100644 --- a/knode/articlewidget.cpp +++ b/knode/articlewidget.cpp @@ -43,9 +43,9 @@ #include #include #include +#include #include -#include #include #include @@ -881,7 +881,7 @@ void ArticleWidget::displayAttachment( KMime::Content *att, int partNum ) } } else { // icon TQCString mimetype = ct->mimeType(); - KPIM::kAsciiToLower( mimetype.data() ); + kasciitolower( mimetype.data() ); TQString iconName = KMimeType::mimeType( mimetype )->icon( TQString(), false ); TQString iconFile = TDEGlobal::instance()->iconLoader()->iconPath( iconName, TDEIcon::Desktop ); html += "
- - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kasciistringtools.h" - -namespace KPIM { - -static unsigned char ASCIIToLower( unsigned char ch ) -{ - if ( ch >= 'A' && ch <= 'Z' ) - return ch - 'A' + 'a'; - else - return ch; -} - -char * kAsciiToLower( char *s ) -{ - if ( !s ) - return 0; - for ( unsigned char *p = (unsigned char *) s; *p; ++p ) - *p = ASCIIToLower( *p ); - return s; -} - -static unsigned char ASCIIToUpper( unsigned char ch ) -{ - if ( ch >= 'a' && ch <= 'z' ) - return ch - 'a' + 'A'; - else - return ch; -} - -char * kAsciiToUpper( char *s ) -{ - if ( !s ) - return 0; - for ( unsigned char *p = (unsigned char *) s; *p; ++p ) - *p = ASCIIToUpper( *p ); - return s; -} - -} // namespace KPIM diff --git a/libemailfunctions/kasciistringtools.h b/libemailfunctions/kasciistringtools.h deleted file mode 100644 index c67e5c31..00000000 --- a/libemailfunctions/kasciistringtools.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - kasciistringtools.h - - This file is part of libtdepim. - - Copyright (c) 2005 Ingo Kloecker - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KPIM_KASCIISTRINGTOOLS_H -#define KPIM_KASCIISTRINGTOOLS_H - -namespace KPIM { - -/** - Locale-independent function to convert ASCII strings to lower case ASCII - strings. This means that it affects @em only the ASCII characters A-Z. - - @param str pointer to the string which should be converted to lower case - @return pointer to the converted string (same as @a str) -*/ -char * kAsciiToLower( char *str ); - -/** - Locale-independent function to convert ASCII strings to upper case ASCII - strings. This means that it affects @em only the ASCII characters a-z. - - @param str pointer to the string which should be converted to upper case - @return pointer to the converted string (same as @a str) -*/ -char * kAsciiToUpper( char *str ); - -} // namespace KPIM - -#endif diff --git a/tdeioslave/imap4/CMakeLists.txt b/tdeioslave/imap4/CMakeLists.txt index 041aeffc..b62d61dc 100644 --- a/tdeioslave/imap4/CMakeLists.txt +++ b/tdeioslave/imap4/CMakeLists.txt @@ -41,6 +41,6 @@ tde_add_kpart( tdeio_imap4 imapcommand.cpp imaplist.cpp mailaddress.cpp mimeheader.cpp rfcdecoder.cpp imap4.cpp imapinfo.cpp imapparser.cpp mailheader.cpp mimehdrline.cpp mimeio.cpp - LINK emailfunctions-static kmime-shared tdeio-shared ${SASL_LIBRARY} + LINK kmime-shared tdecore-shared tdeio-shared ${SASL_LIBRARY} DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/tdeioslave/imap4/imapparser.cpp b/tdeioslave/imap4/imapparser.cpp index 993c5c62..bffe88d0 100644 --- a/tdeioslave/imap4/imapparser.cpp +++ b/tdeioslave/imap4/imapparser.cpp @@ -57,7 +57,6 @@ extern "C" { #include #include -#include #ifdef HAVE_LIBSASL2 static sasl_callback_t callbacks[] = { @@ -679,7 +678,7 @@ imapParser::parseResult (TQByteArray & result, parseString & rest, void imapParser::parseCapability (parseString & result) { TQCString temp( result.cstr() ); - imapCapabilities = TQStringList::split ( ' ', KPIM::kAsciiToLower( temp.data() ) ); + imapCapabilities = TQStringList::split ( ' ', kasciitolower( temp.data() ) ); } void imapParser::parseFlags (parseString & result)