summaryrefslogtreecommitdiff
path: root/kcalutils
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2012-06-27 08:21:18 (GMT)
committerChristian Mollekopf <chrigi_1@fastmail.fm>2012-06-27 08:21:18 (GMT)
commit5ec9165271d4e38e32388b19bd5c6fcae76cc7f7 (patch)
tree7097e724461e5e8a4ec0efaa80aeb9f1aad8ac99 /kcalutils
parentf487d6072aaff084fa80122789752e89d3260094 (diff)
downloadlibcalendaring-5ec9165271d4e38e32388b19bd5c6fcae76cc7f7.tar.gz
compile what we need from kcalutils
Diffstat (limited to 'kcalutils')
-rw-r--r--kcalutils/CMakeLists.txt84
-rw-r--r--kcalutils/incidenceformatter.cpp24
-rw-r--r--kcalutils/incidenceformatter.h15
-rw-r--r--kcalutils/stringify.cpp6
4 files changed, 77 insertions, 52 deletions
diff --git a/kcalutils/CMakeLists.txt b/kcalutils/CMakeLists.txt
index c2ec917..261ac31 100644
--- a/kcalutils/CMakeLists.txt
+++ b/kcalutils/CMakeLists.txt
@@ -1,68 +1,88 @@
project(kcalutils)
-add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5820)
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
+cmake_minimum_required(VERSION 2.6)
+
+# only available from cmake-2.8.0
+if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7)
+ cmake_policy(SET CMP0012 NEW)
+endif()
-if(KDE4_BUILD_TESTS)
- add_definitions(-DCOMPILING_TESTS)
+# only available from cmake-2.8.4
+if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7 AND
+ ${CMAKE_PATCH_VERSION} GREATER 3)
+ cmake_policy(SET CMP0017 NEW)
endif()
+
+
+find_package(Qt4 4.6.0 REQUIRED)
+
+include_directories(${QT_INCLUDES})
+
+add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5820)
+#
+# if(KDE4_BUILD_TESTS)
+# add_definitions(-DCOMPILING_TESTS)
+# endif()
+
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
- ${KDE4_INCLUDE_DIR}
+# ${KDE4_INCLUDE_DIR}
)
########### next target ###############
set(kcalutils_LIB_SRCS
- htmlexport.cpp
- icaldrag.cpp
+# htmlexport.cpp
+# icaldrag.cpp
incidenceformatter.cpp
- recurrenceactions.cpp
+# recurrenceactions.cpp
stringify.cpp
- scheduler.cpp
- vcaldrag.cpp
+# scheduler.cpp
+# vcaldrag.cpp
)
-if(NOT WINCE)
- set(kcalutils_LIB_SRCS ${kcalutils_LIB_SRCS} dndfactory.cpp)
-endif()
-
-kde4_add_kcfg_files(kcalutils_LIB_SRCS htmlexportsettings.kcfgc)
+# if(NOT WINCE)
+# set(kcalutils_LIB_SRCS ${kcalutils_LIB_SRCS} dndfactory.cpp)
+# endif()
-kde4_add_ui_files(kcalutils_LIB_SRCS recurrenceactionsscopewidget.ui)
+# kde4_add_kcfg_files(kcalutils_LIB_SRCS htmlexportsettings.kcfgc)
+#
+# kde4_add_ui_files(kcalutils_LIB_SRCS recurrenceactionsscopewidget.ui)
-kde4_add_library(kcalutils ${LIBRARY_TYPE} ${kcalutils_LIB_SRCS})
+add_library(calendaring-kcalutils ${LIBRARY_TYPE} ${kcalutils_LIB_SRCS})
-target_link_libraries(kcalutils
- ${KDE4_KDECORE_LIBRARY}
- ${KDE4_KDEUI_LIBRARY}
- ${KDE4_KIO_LIBS}
- kcalcore
- kpimutils
+target_link_libraries(calendaring-kcalutils
+# ${KDE4_KDECORE_LIBRARY}
+# ${KDE4_KDEUI_LIBRARY}
+# ${KDE4_KIO_LIBS}
+ calendaring-kcalcore
+ calendaring-kpimutils
${QT_QTGUI_LIBRARY}
)
-set_target_properties(kcalutils PROPERTIES
+set_target_properties(calendaring-kcalutils PROPERTIES
VERSION ${GENERIC_LIB_VERSION}
SOVERSION ${GENERIC_LIB_SOVERSION}
)
-install(TARGETS kcalutils EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
+install(TARGETS calendaring-kcalutils EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
########### next target ###############
-add_subdirectory(tests)
+# add_subdirectory(tests)
########### install files ###############
install(FILES
- dndfactory.h
- htmlexport.h
- icaldrag.h
+# dndfactory.h
+# htmlexport.h
+# icaldrag.h
incidenceformatter.h
kcalutils_export.h
- vcaldrag.h
- recurrenceactions.h
- scheduler.h
+# vcaldrag.h
+# recurrenceactions.h
+# scheduler.h
stringify.h
- ${CMAKE_CURRENT_BINARY_DIR}/htmlexportsettings.h
+# ${CMAKE_CURRENT_BINARY_DIR}/htmlexportsettings.h
DESTINATION ${INCLUDE_INSTALL_DIR}/kcalutils COMPONENT Devel)
diff --git a/kcalutils/incidenceformatter.cpp b/kcalutils/incidenceformatter.cpp
index d5a634a..c2eb7d1 100644
--- a/kcalutils/incidenceformatter.cpp
+++ b/kcalutils/incidenceformatter.cpp
@@ -47,13 +47,13 @@ using namespace KCalCore;
#include <kpimutils/email.h>
-#include <KCalendarSystem>
-#include <KDebug>
-#include <KEMailSettings>
-#include <KIconLoader>
-#include <KLocale>
-#include <KMimeType>
-#include <KSystemTimeZone>
+#include <kcalendarsystem.h>
+#include <kdebug.h>
+#include <kemailsettings.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kmimetype.h>
+#include <ksystemtimezone.h>
#include <QtCore/QBitArray>
#include <QtGui/QApplication>
@@ -66,7 +66,7 @@ using namespace IncidenceFormatter;
/*******************
* General helpers
*******************/
-
+#if 0
//@cond PRIVATE
static QString htmlAddLink( const QString &ref, const QString &text,
bool newline = true )
@@ -3712,6 +3712,7 @@ QString IncidenceFormatter::toolTipStr( const QString &sourceName,
return QString();
}
}
+#endif
/*******************************************************************
* Helper functions for the Incidence tooltips
@@ -3874,7 +3875,7 @@ QString IncidenceFormatter::mailBodyStr( const IncidenceBase::Ptr &incidence,
}
return QString();
}
-
+#if 0
//@cond PRIVATE
static QString recurEnd( const Incidence::Ptr &incidence )
{
@@ -4293,7 +4294,7 @@ QString IncidenceFormatter::recurrenceString( const Incidence::Ptr &incidence )
return recurStr;
}
-
+#endif
QString IncidenceFormatter::timeToString( const KDateTime &date,
bool shortfmt,
const KDateTime::Spec &spec )
@@ -4357,7 +4358,7 @@ QString IncidenceFormatter::dateTimeToString( const KDateTime &date,
( shortfmt ? KLocale::ShortDate : KLocale::LongDate ) );
}
}
-
+#if 0
QString IncidenceFormatter::resourceString( const Calendar::Ptr &calendar,
const Incidence::Ptr &incidence )
{
@@ -4510,3 +4511,4 @@ QStringList IncidenceFormatter::reminderStringList( const Incidence::Ptr &incide
return reminderStringList;
}
+#endif \ No newline at end of file
diff --git a/kcalutils/incidenceformatter.h b/kcalutils/incidenceformatter.h
index 87ec681..3fb9d90 100644
--- a/kcalutils/incidenceformatter.h
+++ b/kcalutils/incidenceformatter.h
@@ -38,7 +38,7 @@
#include <kcalcore/memorycalendar.h>
namespace KCalUtils {
-
+#if 0
class KCALUTILS_EXPORT InvitationFormatterHelper
{
public:
@@ -55,7 +55,7 @@ class KCALUTILS_EXPORT InvitationFormatterHelper
Private *const d;
//@endcond
};
-
+#endif
/**
@brief
Provides methods to format Incidences in various ways for display purposes.
@@ -67,6 +67,7 @@ class KCALUTILS_EXPORT InvitationFormatterHelper
*/
namespace IncidenceFormatter
{
+#if 0
/**
Create a QString representation of an Incidence in a nice format
suitable for using in a tooltip.
@@ -114,7 +115,7 @@ namespace IncidenceFormatter
const KCalCore::IncidenceBase::Ptr &incidence,
const QDate &date=QDate(),
KDateTime::Spec spec=KDateTime::Spec() );
-
+#endif
/**
Create a QString representation of an Incidence in format suitable for
including inside a mail message.
@@ -124,7 +125,7 @@ namespace IncidenceFormatter
*/
KCALUTILS_EXPORT QString mailBodyStr( const KCalCore::IncidenceBase::Ptr &incidence,
KDateTime::Spec spec=KDateTime::Spec() );
-
+#if 0
/**
Deliver an HTML formatted string displaying an invitation.
Use the time zone from mCalendar.
@@ -180,7 +181,7 @@ namespace IncidenceFormatter
*/
KCALUTILS_EXPORT QStringList reminderStringList( const KCalCore::Incidence::Ptr &incidence,
bool shortfmt = true );
-
+#endif
/**
Build a QString time representation of a KDateTime object.
@param date The date to be formatted.
@@ -213,7 +214,7 @@ namespace IncidenceFormatter
bool dateOnly = false,
bool shortfmt = true,
const KDateTime::Spec &spec = KDateTime::Spec() );
-
+#if 0
/**
Returns a Calendar Resource label name for the specified Incidence.
@param calendar is a pointer to the Calendar.
@@ -246,7 +247,9 @@ namespace IncidenceFormatter
class InvitationBodyVisitor;
class IncidenceCompareVisitor;
class ToolTipVisitor;
+#endif
class MailBodyVisitor;
+
}
}
diff --git a/kcalutils/stringify.cpp b/kcalutils/stringify.cpp
index d0a75fa..4d77115 100644
--- a/kcalutils/stringify.cpp
+++ b/kcalutils/stringify.cpp
@@ -38,9 +38,9 @@
#include <kcalcore/exceptions.h>
using namespace KCalCore;
-#include <KLocale>
-#include <KGlobal>
-#include <KSystemTimeZone>
+#include <klocale.h>
+#include <kglobal.h>
+#include <ksystemtimezone.h>
using namespace KCalUtils;
using namespace Stringify;