From a988b9514744d3e777ff7151a4f29044cf3020bb Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 27 Jun 2012 10:43:48 +0200 Subject: compile what we need from kpimutils --- kpimutils/CMakeLists.txt | 50 ++++++++++++++++++++++++------------------------ kpimutils/email.cpp | 21 ++++++++++---------- kpimutils/email.h | 11 ++++++----- 3 files changed, 42 insertions(+), 40 deletions(-) diff --git a/kpimutils/CMakeLists.txt b/kpimutils/CMakeLists.txt index c2901e0..f321be2 100644 --- a/kpimutils/CMakeLists.txt +++ b/kpimutils/CMakeLists.txt @@ -2,51 +2,51 @@ project(kpimutils) add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5321) -add_subdirectory(tests) +# add_subdirectory(tests) include_directories(../kmime) set(kpimutils_LIB_SRCS email.cpp - emailvalidator.cpp - linklocator.cpp - spellingfilter.cpp - kfileio.cpp - processes.cpp +# emailvalidator.cpp +# linklocator.cpp +# spellingfilter.cpp +# kfileio.cpp +# processes.cpp ) # network access helper -if(WINCE) - set(kpimutils_LIB_SRCS ${kpimutils_LIB_SRCS} networkaccesshelper_wince.cpp) -else() - set(kpimutils_LIB_SRCS ${kpimutils_LIB_SRCS} networkaccesshelper_fake.cpp) -endif() +# if(WINCE) +# set(kpimutils_LIB_SRCS ${kpimutils_LIB_SRCS} networkaccesshelper_wince.cpp) +# else() +# set(kpimutils_LIB_SRCS ${kpimutils_LIB_SRCS} networkaccesshelper_fake.cpp) +# endif() -kde4_add_library(kpimutils ${LIBRARY_TYPE} ${kpimutils_LIB_SRCS}) +add_library(calendaring-kpimutils ${LIBRARY_TYPE} ${kpimutils_LIB_SRCS}) -target_link_libraries(kpimutils ${KDE4_KDEUI_LIBS} ${KDE4_KEMOTICONS_LIBS} kmime) +target_link_libraries(calendaring-kpimutils ${KDE4_KDEUI_LIBS} ${KDE4_KEMOTICONS_LIBS} calendaring-kmime) -if(WINCE) - target_link_libraries(kpimutils ${WCECOMPAT_LIBRARIES} ${KDE4_SOLID_LIBS} toolhelp) -endif() +# if(WINCE) +# target_link_libraries(calendaring-kpimutils ${WCECOMPAT_LIBRARIES} ${KDE4_SOLID_LIBS} toolhelp) +# endif() -set_target_properties(kpimutils PROPERTIES +set_target_properties(calendaring-kpimutils PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} ) -install(TARGETS kpimutils EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) +install(TARGETS calendaring-kpimutils EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) ########### install files ############### install(FILES kpimutils_export.h email.h - emailvalidator.h - linklocator.h - spellingfilter.h - kfileio.h - supertrait.h - processes.h - networkaccesshelper.h +# emailvalidator.h +# linklocator.h +# spellingfilter.h +# kfileio.h +# supertrait.h +# processes.h +# networkaccesshelper.h DESTINATION ${INCLUDE_INSTALL_DIR}/kpimutils COMPONENT Devel) diff --git a/kpimutils/email.cpp b/kpimutils/email.cpp index e2de775..5b088a3 100644 --- a/kpimutils/email.cpp +++ b/kpimutils/email.cpp @@ -28,19 +28,19 @@ #include -#include -#include -#include +// #include +// #include +// #include #include #include -#include +// #include -static const KCatalogLoader loader( "libkpimutils" ); +// static const KCatalogLoader loader( "libkpimutils" ); using namespace KPIMUtils; - +#if 0 //----------------------------------------------------------------------------- QStringList KPIMUtils::splitAddressList( const QString &aStr ) { @@ -697,7 +697,7 @@ QString KPIMUtils::firstEmailAddress( const QString &addresses ) { return QString::fromUtf8( firstEmailAddress( addresses.toUtf8() ) ); } - +#endif //----------------------------------------------------------------------------- bool KPIMUtils::extractEmailAddressAndName( const QString &aStr, QString &mail, QString &name ) @@ -891,7 +891,7 @@ bool KPIMUtils::extractEmailAddressAndName( const QString &aStr, return ! ( name.isEmpty() || mail.isEmpty() ); } - +#if 0 //----------------------------------------------------------------------------- bool KPIMUtils::compareEmail( const QString &email1, const QString &email2, bool matchName ) @@ -1031,7 +1031,7 @@ QString KPIMUtils::normalizeAddressesAndEncodeIdn( const QString &str ) */ return normalizedAddressList.join( ", " ); } - +#endif //----------------------------------------------------------------------------- // Escapes unescaped doublequotes in str. static QString escapeQuotes( const QString &str ) @@ -1077,7 +1077,7 @@ QString KPIMUtils::quoteNameIfNecessary( const QString &str ) return quoted; } - +#if 0 KUrl KPIMUtils::encodeMailtoUrl( const QString &mailbox ) { const QByteArray encodedPath = KMime::encodeRFC2047String( mailbox, "utf-8" ); @@ -1092,3 +1092,4 @@ QString KPIMUtils::decodeMailtoUrl( const KUrl &mailtoUrl ) Q_ASSERT( mailtoUrl.protocol().toLower() == "mailto" ); return KMime::decodeRFC2047String( mailtoUrl.path().toUtf8() ); } +#endif \ No newline at end of file diff --git a/kpimutils/email.h b/kpimutils/email.h index bd48ed8..e492c55 100644 --- a/kpimutils/email.h +++ b/kpimutils/email.h @@ -40,7 +40,7 @@ #include "kpimutils_export.h" namespace KPIMUtils { - +#if 0 /** @defgroup emailvalidation Email Validation Functions @@ -268,7 +268,7 @@ namespace KPIMUtils { */ KPIMUTILS_EXPORT QString firstEmailAddress( const QString & addresses ); - +#endif /** Return email address and name from string. Examples: @@ -290,7 +290,7 @@ namespace KPIMUtils { KPIMUTILS_EXPORT bool extractEmailAddressAndName( const QString &aStr, QString &mail, QString &name ); - +#if 0 /** Compare two email addresses. If matchName is false, it just checks the email address, and returns true if this matches. If matchName @@ -369,7 +369,7 @@ namespace KPIMUtils { QString normalizeAddressesAndEncodeIdn( const QString &str ); /** @} */ - +#endif /** @ingroup emailextraction Add quote characters around the given string if it contains a @@ -380,7 +380,7 @@ namespace KPIMUtils { */ KPIMUTILS_EXPORT QString quoteNameIfNecessary( const QString &str ); - +#if 0 /** * Creates a valid mailto: URL from the given mailbox. * @param mailbox The mailbox, which means the display name and the address specification, for @@ -399,6 +399,7 @@ namespace KPIMUtils { */ KPIMUTILS_EXPORT QString decodeMailtoUrl( const KUrl &mailtoUrl ); +#endif } // namespace -- cgit v0.12