summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2012-06-26 11:00:21 (GMT)
committerChristian Mollekopf <chrigi_1@fastmail.fm>2012-06-26 11:00:21 (GMT)
commit4744a3b71c936ca714cf417b51881174f565ab62 (patch)
tree8497b4e1ca6a2f42c87cfb1cd3f2192ddcd68a28
parentfce7890292ba8ffb868db104ecc49e7e91b7cddd (diff)
downloadlibcalendaring-4744a3b71c936ca714cf417b51881174f565ab62.tar.gz
make kcalcore build
-rw-r--r--kcalcore/CMakeLists.txt146
-rw-r--r--kcalcore/alarm.cpp20
-rw-r--r--kcalcore/calendar.cpp18
-rw-r--r--kcalcore/cmake/CMakeLists.txt3
-rw-r--r--kcalcore/cmake/modules/CMakeLists.txt8
-rw-r--r--kcalcore/cmake/modules/CheckTimezone.cmake35
-rw-r--r--kcalcore/cmake/modules/FindGpgme.cmake412
-rw-r--r--kcalcore/cmake/modules/FindLdap.cmake46
-rw-r--r--kcalcore/cmake/modules/FindLibical.cmake95
-rw-r--r--kcalcore/cmake/modules/FindQGpgme.cmake46
-rw-r--r--kcalcore/compat.cpp6
-rw-r--r--kcalcore/duration.cpp2
-rw-r--r--kcalcore/event.cpp4
-rw-r--r--kcalcore/filestorage.cpp12
-rw-r--r--kcalcore/freebusy.cpp10
-rw-r--r--kcalcore/freebusyurlstore.cpp6
-rw-r--r--kcalcore/icalformat.cpp38
-rw-r--r--kcalcore/icalformat_p.cpp76
-rw-r--r--kcalcore/icalformat_p.h2
-rw-r--r--kcalcore/icaltimezones.cpp32
-rw-r--r--kcalcore/incidence.cpp8
-rw-r--r--kcalcore/incidencebase.cpp9
-rw-r--r--kcalcore/incidencebase.h4
-rw-r--r--kcalcore/journal.cpp4
-rw-r--r--kcalcore/kcalcore_export.h69
-rw-r--r--kcalcore/memorycalendar.cpp14
-rw-r--r--kcalcore/period.cpp4
-rw-r--r--kcalcore/recurrence.cpp32
-rw-r--r--kcalcore/recurrencerule.cpp34
-rw-r--r--kcalcore/sorting.cpp2
-rw-r--r--kcalcore/tests/incidencestest.cpp16
-rw-r--r--kcalcore/tests/loadcalendar.cpp8
-rw-r--r--kcalcore/tests/readandwrite.cpp6
-rw-r--r--kcalcore/tests/testfb.cpp6
-rw-r--r--kcalcore/tests/testfilestorage.cpp2
-rw-r--r--kcalcore/tests/testicalformat.cpp6
-rw-r--r--kcalcore/tests/testmemorycalendar.cpp4
-rw-r--r--kcalcore/tests/testrecurprevious.cpp22
-rw-r--r--kcalcore/tests/testrecurrence.cpp14
-rw-r--r--kcalcore/tests/testrecurrencetype.cpp14
-rw-r--r--kcalcore/tests/testrecurson.cpp10
-rw-r--r--kcalcore/tests/testrecurtodo.cpp2
-rw-r--r--kcalcore/tests/testtostring.cpp8
-rw-r--r--kcalcore/tests/testvcalexport.cpp4
-rw-r--r--kcalcore/todo.cpp4
-rw-r--r--kcalcore/vcalformat.cpp40
-rw-r--r--kdecore/CMakeLists.txt20
47 files changed, 1066 insertions, 317 deletions
diff --git a/kcalcore/CMakeLists.txt b/kcalcore/CMakeLists.txt
index 2fb8bac..905d82f 100644
--- a/kcalcore/CMakeLists.txt
+++ b/kcalcore/CMakeLists.txt
@@ -1,5 +1,26 @@
project(kcalcore)
+
+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()
+
+# 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})
+
include(GenerateExportHeader)
############### Build Options ###############
@@ -8,23 +29,32 @@ include(GenerateExportHeader)
# For example, cmake -DKCALCORE_FOR_MEEGO=true
# KCALCORE_FOR_MEEGO - builds KCalCore with some special features for the MeeGo platform.
-option(KCALCORE_FOR_MEEGO "Build KCalCore especially for the MeeGo." FALSE)
+# option(KCALCORE_FOR_MEEGO "Build KCalCore especially for the MeeGo." FALSE)
# KCALCORE_FOR_SYMBIAN - builds KCalCore with some special features for the Symbian platform.
-option(KCALCORE_FOR_SYMBIAN "Build KCalCore especially for the Symbian." FALSE)
+# option(KCALCORE_FOR_SYMBIAN "Build KCalCore especially for the Symbian." FALSE)
# add C++ macro definitions for options passed to CMake
-if(KCALCORE_FOR_MEEGO)
- add_definitions(-DKCALCORE_FOR_MEEGO)
-endif()
-if(KCALCORE_FOR_SYMBIAN)
- add_definitions(-DKCALCORE_FOR_SYMBIAN)
-endif()
+# if(KCALCORE_FOR_MEEGO)
+# add_definitions(-DKCALCORE_FOR_MEEGO)
+# endif()
+# if(KCALCORE_FOR_SYMBIAN)
+# add_definitions(-DKCALCORE_FOR_SYMBIAN)
+# endif()
############### Find packages ###############
# FIXME KDE5PORT needed: kdatetime which belongs to kdecore
-find_package(kcoreaddons REQUIRED)
-include_directories(${kcoreaddons_INCLUDE_DIR} ${kcoreaddons_INCLUDE_DIR}/KDE)
+# find_package(kcoreaddons REQUIRED)
+# include_directories(${kcoreaddons_INCLUDE_DIR} ${kcoreaddons_INCLUDE_DIR}/KDE)
+
+
+find_package(Libical "0.42" REQUIRED)
+
+
+include_directories( ../kdecore )
+
+
+
###########################################################
@@ -42,6 +72,7 @@ include_directories(
${LIBICAL_INCLUDE_DIRS}/libical
${CMAKE_CURRENT_SOURCE_DIR}/versit
${KDE4_INCLUDE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
)
########### next target ###############
@@ -87,21 +118,24 @@ set(kcalcore_LIB_SRCS ${libversit_SRCS}
visitor.cpp
)
-add_library(kcalcore ${LIBRARY_TYPE} ${kcalcore_LIB_SRCS})
-generate_export_header(kcalcore)
+add_library(calendaring-kcalcore ${LIBRARY_TYPE} ${kcalcore_LIB_SRCS})
+# generate_export_header(kcalcore)
-target_link_libraries(kcalcore ${KDE4_KDECORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${LIBICAL_LIBRARIES})
+#${KDE4_KDECORE_LIBRARY}
+target_link_libraries(calendaring-kcalcore calendaring-kdecore ${QT_QTGUI_LIBRARY} ${LIBICAL_LIBRARIES})
if(HAVE_UUID_LIBRARY)
- target_link_libraries(kcalcore uuid)
+ target_link_libraries(calendaring-kcalcore uuid)
endif()
-set_target_properties(kcalcore PROPERTIES
- VERSION ${ECM_VERSION_STRING}
- SOVERSION ${ECM_SOVERSION}
-)
+# set(libcalendaring-kcalcore ${libcalendaring-kcalcore} PARENT_SCOPE)
+# message("${libcalendaring-kcalcore}")
+# set_target_properties(libcalendaring-kcalcore PROPERTIES
+# VERSION ${ECM_VERSION_STRING}
+# SOVERSION ${ECM_SOVERSION}
+# )
-install(TARGETS kcalcore EXPORT kdepimlibsLibraryTargets ${ECM_TARGET_DEFAULT_ARGS})
+# install(TARGETS kcalcore EXPORT kdepimlibsLibraryTargets ${ECM_TARGET_DEFAULT_ARGS})
########### next target ###############
@@ -109,40 +143,40 @@ install(TARGETS kcalcore EXPORT kdepimlibsLibraryTargets ${ECM_TARGET_DEFAULT_AR
########### install files ###############
-install(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/kcalcore_export.h
- alarm.h
- attachment.h
- attendee.h
- calendar.h
- calfilter.h
- calformat.h
- calstorage.h
- compat.h
- customproperties.h
- duration.h
- event.h
- exceptions.h
- filestorage.h
- freebusy.h
- freebusycache.h
- freebusyperiod.h
- freebusyurlstore.h
- icalformat.h
- icaltimezones.h
- incidence.h
- incidencebase.h
- journal.h
- memorycalendar.h
- period.h
- person.h
- recurrence.h
- recurrencerule.h
- schedulemessage.h
- sortablelist.h
- sorting.h
- supertrait.h
- todo.h
- vcalformat.h
- visitor.h
- DESTINATION ${INCLUDE_INSTALL_DIR}/kcalcore COMPONENT Devel)
+# install(FILES
+# ${CMAKE_CURRENT_BINARY_DIR}/kcalcore_export.h
+# alarm.h
+# attachment.h
+# attendee.h
+# calendar.h
+# calfilter.h
+# calformat.h
+# calstorage.h
+# compat.h
+# customproperties.h
+# duration.h
+# event.h
+# exceptions.h
+# filestorage.h
+# freebusy.h
+# freebusycache.h
+# freebusyperiod.h
+# freebusyurlstore.h
+# icalformat.h
+# icaltimezones.h
+# incidence.h
+# incidencebase.h
+# journal.h
+# memorycalendar.h
+# period.h
+# person.h
+# recurrence.h
+# recurrencerule.h
+# schedulemessage.h
+# sortablelist.h
+# sorting.h
+# supertrait.h
+# todo.h
+# vcalformat.h
+# visitor.h
+# DESTINATION ${INCLUDE_INSTALL_DIR}/kcalcore COMPONENT Devel)
diff --git a/kcalcore/alarm.cpp b/kcalcore/alarm.cpp
index 8b1aeea..b23af98 100644
--- a/kcalcore/alarm.cpp
+++ b/kcalcore/alarm.cpp
@@ -528,11 +528,11 @@ KDateTime Alarm::nextTime( const KDateTime &preTime, bool ignoreRepetitions ) co
// offset from the recurrence time.
Duration alarmOffset( dtStart, alarmStart );
/*
- kDebug() << "dtStart " << dtStart;
- kDebug() << "dtEnd " << dtEnd;
- kDebug() << "alarmStart " << alarmStart;
- kDebug() << "alarmOffset " << alarmOffset.value();
- kDebug() << "preTime " << preTime;
+ qDebug() << "dtStart " << dtStart;
+ qDebug() << "dtEnd " << dtEnd;
+ qDebug() << "alarmStart " << alarmStart;
+ qDebug() << "alarmOffset " << alarmOffset.value();
+ qDebug() << "preTime " << preTime;
*/
if ( alarmStart > preTime ) {
// No need to go further.
@@ -544,12 +544,12 @@ KDateTime Alarm::nextTime( const KDateTime &preTime, bool ignoreRepetitions ) co
KDateTime prevRecurrence = d->mParent->recurrence()->getPreviousDateTime( preTime );
if ( prevRecurrence.isValid() ) {
KDateTime prevLastRepeat = alarmOffset.end( duration().end( prevRecurrence ) );
- // kDebug() << "prevRecurrence" << prevRecurrence;
- // kDebug() << "prevLastRepeat" << prevLastRepeat;
+ // qDebug() << "prevRecurrence" << prevRecurrence;
+ // qDebug() << "prevLastRepeat" << prevLastRepeat;
if ( prevLastRepeat > preTime ) {
// Yes they did, return alarm offset to previous recurrence.
KDateTime prevAlarm = alarmOffset.end( prevRecurrence );
- // kDebug() << "prevAlarm " << prevAlarm;
+ // qDebug() << "prevAlarm " << prevAlarm;
return prevAlarm;
}
}
@@ -559,8 +559,8 @@ KDateTime Alarm::nextTime( const KDateTime &preTime, bool ignoreRepetitions ) co
if ( nextRecurrence.isValid() ) {
KDateTime nextAlarm = alarmOffset.end( nextRecurrence );
/*
- kDebug() << "nextRecurrence" << nextRecurrence;
- kDebug() << "nextAlarm " << nextAlarm;
+ qDebug() << "nextRecurrence" << nextRecurrence;
+ qDebug() << "nextAlarm " << nextAlarm;
*/
if ( nextAlarm > preTime ) {
// It's first alarm takes place after given time.
diff --git a/kcalcore/calendar.cpp b/kcalcore/calendar.cpp
index 676d2f3..85b097f 100644
--- a/kcalcore/calendar.cpp
+++ b/kcalcore/calendar.cpp
@@ -40,7 +40,7 @@
#include "sorting.h"
#include "visitor.h"
-#include <KDebug>
+#include <QtCore/QDebug>
extern "C" {
#include <icaltimezone.h>
@@ -527,7 +527,7 @@ bool Calendar::setNotebook( const Incidence::Ptr &inc, const QString &notebook )
if ( !notebook.isEmpty() &&
!incidence( inc->uid(), inc->recurrenceId() ) ) {
- kWarning() << "cannot set notebook until incidence has been added";
+ qWarning() << "cannot set notebook until incidence has been added";
return false;
}
@@ -535,7 +535,7 @@ bool Calendar::setNotebook( const Incidence::Ptr &inc, const QString &notebook )
QString old = d->mUidToNotebook.value( inc->uid() );
if ( !old.isEmpty() && notebook != old ) {
if ( inc->hasRecurrenceId() ) {
- kWarning() << "cannot set notebook for child incidences";
+ qWarning() << "cannot set notebook for child incidences";
return false;
}
// Move all possible children also.
@@ -553,7 +553,7 @@ bool Calendar::setNotebook( const Incidence::Ptr &inc, const QString &notebook )
if ( !notebook.isEmpty() ) {
d->mUidToNotebook.insert( inc->uid(), notebook );
d->mNotebookIncidences.insert( notebook, inc );
- kDebug() << "setting notebook" << notebook << "for" << inc->uid();
+ qDebug() << "setting notebook" << notebook << "for" << inc->uid();
notifyIncidenceChanged( inc ); // for inserting into new notebook
}
@@ -726,7 +726,7 @@ Incidence::Ptr Calendar::dissociateOccurrence( const Incidence::Ptr &incidence,
if ( duration > 0 ) {
int doneduration = recur->durationTo( date.addDays( -1 ) );
if ( doneduration >= duration ) {
- kDebug() << "The dissociated event already occurred more often"
+ qDebug() << "The dissociated event already occurred more often"
<< "than it was supposed to ever occur. ERROR!";
recur->clear();
} else {
@@ -1008,7 +1008,7 @@ void Calendar::setupRelations( const Incidence::Ptr &forincidence )
// look for hierarchy loops
if ( isAncestorOf( forincidence, parent ) ) {
forincidence->setRelatedTo( QString() );
- kWarning() << "hierarchy loop beetween " << forincidence->uid() << " and " << parent->uid();
+ qWarning() << "hierarchy loop beetween " << forincidence->uid() << " and " << parent->uid();
} else {
d->mIncidenceRelations[parent->uid()].append( forincidence );
}
@@ -1027,7 +1027,7 @@ void Calendar::setupRelations( const Incidence::Ptr &forincidence )
void Calendar::removeRelations( const Incidence::Ptr &incidence )
{
if ( !incidence ) {
- kDebug() << "Warning: incidence is 0";
+ qDebug() << "Warning: incidence is 0";
return;
}
@@ -1357,7 +1357,7 @@ void Calendar::appendAlarms( Alarm::List &alarms, const Incidence::Ptr &incidenc
if ( alarmlist[i]->enabled() ) {
KDateTime dt = alarmlist[i]->nextRepetition( preTime );
if ( dt.isValid() && dt <= to ) {
- kDebug() << incidence->summary() << "':" << dt.toString();
+ qDebug() << incidence->summary() << "':" << dt.toString();
alarms.append( alarmlist[i] );
}
}
@@ -1472,7 +1472,7 @@ void Calendar::appendRecurringAlarms( Alarm::List &alarms,
}
}
}
- kDebug() << incidence->summary() << "':" << dt.toString();
+ qDebug() << incidence->summary() << "':" << dt.toString();
alarms.append( a );
}
}
diff --git a/kcalcore/cmake/CMakeLists.txt b/kcalcore/cmake/CMakeLists.txt
new file mode 100644
index 0000000..38a9971
--- /dev/null
+++ b/kcalcore/cmake/CMakeLists.txt
@@ -0,0 +1,3 @@
+
+add_subdirectory(modules)
+
diff --git a/kcalcore/cmake/modules/CMakeLists.txt b/kcalcore/cmake/modules/CMakeLists.txt
new file mode 100644
index 0000000..e0152e6
--- /dev/null
+++ b/kcalcore/cmake/modules/CMakeLists.txt
@@ -0,0 +1,8 @@
+# install the cmake files
+
+file(GLOB cmakeFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.cmake")
+
+set(module_install_dir ${DATA_INSTALL_DIR}/cmake/modules )
+
+install( FILES ${cmakeFiles} DESTINATION ${module_install_dir} )
+
diff --git a/kcalcore/cmake/modules/CheckTimezone.cmake b/kcalcore/cmake/modules/CheckTimezone.cmake
new file mode 100644
index 0000000..88d3104
--- /dev/null
+++ b/kcalcore/cmake/modules/CheckTimezone.cmake
@@ -0,0 +1,35 @@
+# Discover the type of the timezone variable,
+# set HAVE_TIMEZONE if found for config.h
+
+INCLUDE (CheckCXXSourceCompiles)
+
+CHECK_CXX_SOURCE_COMPILES("
+#include <stdlib.h>
+#include <ctype.h>
+#include <time.h>
+#include <unistd.h>
+int main() { timezone = 1; return 0;}
+"
+ HAVE_TIMEZONE)
+
+IF (NOT HAVE_TIMEZONE)
+ # Then it's probably this variant, just to be sure
+ CHECK_CXX_SOURCE_COMPILES("
+#include <stdlib.h>
+#include <ctype.h>
+#include <time.h>
+#include <unistd.h>
+int main() { const char *p = timezone(0,0); return 0;}
+"
+ HAVE_BSD_TIMEZONE)
+endif()
+
+CHECK_CXX_SOURCE_COMPILES("
+#include <stdlib.h>
+#include <ctype.h>
+#include <time.h>
+#include <unistd.h>
+int main() { struct tm tm; tm.tm_gmtoff=1; return 0; }
+"
+ HAVE_TM_GMTOFF)
+
diff --git a/kcalcore/cmake/modules/FindGpgme.cmake b/kcalcore/cmake/modules/FindGpgme.cmake
new file mode 100644
index 0000000..872c045
--- /dev/null
+++ b/kcalcore/cmake/modules/FindGpgme.cmake
@@ -0,0 +1,412 @@
+# - Try to find the gpgme library
+#
+# Algorithm:
+# - Windows:
+# On Windows, there's three gpgme variants: gpgme{,-glib,-qt}.
+# - The variant used determines the event loop integration possible:
+# - gpgme: no event loop integration possible, only synchronous operations supported
+# - gpgme-glib: glib event loop integration possible, only asynchronous operations supported
+# - gpgme-qt: qt event loop integration possible, only asynchronous operations supported
+# - GPGME_{VANILLA,GLIB,QT}_{FOUND,LIBRARIES} will be set for each of the above
+# - GPGME_INCLUDES is the same for all of the above
+# - GPGME_FOUND is set if any of the above was found
+# - *nix:
+# There's also three variants: gpgme{,-pthread,-pth}.
+# - The variant used determines the multithreaded use possible:
+# - gpgme: no multithreading support available
+# - gpgme-pthread: multithreading available using POSIX threads
+# - gpgme-pth: multithreading available using GNU PTH (cooperative multithreading)
+# - GPGME_{VANILLA,PTH,PTHREAD}_{FOUND,LIBRARIES} will be set for each of the above
+# - GPGME_INCLUDES is the same for all of the above
+# - GPGME_FOUND is set if any of the above was found
+#
+# GPGME_LIBRARY_DIR - the directory where the libraries are located
+
+#
+# THIS IS ALMOST A 1:1 COPY OF FindAssuan.cmake in kdepim.
+# Any changes here likely apply there, too.
+#
+
+# do away with crappy condition repetition on else/endfoo
+set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS_gpgme_saved ${CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS} )
+set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true )
+
+#if this is built-in, please replace, if it isn't, export into a MacroToBool.cmake of it's own
+macro( macro_bool_to_bool FOUND_VAR )
+ foreach( _current_VAR ${ARGN} )
+ if ( ${FOUND_VAR} )
+ set( ${_current_VAR} TRUE )
+ else()
+ set( ${_current_VAR} FALSE )
+ endif()
+ endforeach()
+endmacro()
+
+#HACK: local copy...
+MACRO(MACRO_BOOL_TO_01 FOUND_VAR )
+ FOREACH (_current_VAR ${ARGN})
+ IF(${FOUND_VAR})
+ SET(${_current_VAR} 1)
+ ELSE(${FOUND_VAR})
+ SET(${_current_VAR} 0)
+ ENDIF(${FOUND_VAR})
+ ENDFOREACH(_current_VAR)
+ENDMACRO(MACRO_BOOL_TO_01)
+
+
+if ( WIN32 )
+
+ # On Windows, we don't have a gpgme-config script, so we need to
+ # look for the stuff ourselves:
+
+ # in cmake, AND and OR have the same precedence, there's no
+ # subexpressions, and expressions are evaluated short-circuit'ed
+ # IOW: CMake if() suxx.
+ # Starting with CMake 2.6.3 you can group if expressions with (), but we
+ # don't require 2.6.3 but 2.6.2, we can't use it. Alex
+ set( _seem_to_have_cached_gpgme false )
+ if ( GPGME_INCLUDES )
+ if ( GPGME_VANILLA_LIBRARIES OR GPGME_QT_LIBRARIES OR GPGME_GLIB_LIBRARIES )
+ set( _seem_to_have_cached_gpgme true )
+ endif()
+ endif()
+
+ if ( _seem_to_have_cached_gpgme )
+
+ macro_bool_to_bool( GPGME_VANILLA_LIBRARIES GPGME_VANILLA_FOUND )
+ macro_bool_to_bool( GPGME_GLIB_LIBRARIES GPGME_GLIB_FOUND )
+ macro_bool_to_bool( GPGME_QT_LIBRARIES GPGME_QT_FOUND )
+ # this would have been preferred:
+ #set( GPGME_*_FOUND macro_bool_to_bool(GPGME_*_LIBRARIES) )
+
+ if ( GPGME_VANILLA_FOUND OR GPGME_GLIB_FOUND OR GPGME_QT_FOUND )
+ set( GPGME_FOUND true )
+ else()
+ set( GPGME_FOUND false )
+ endif()
+
+ else()
+
+ # is this needed, of just unreflected cut'n'paste?
+ # this isn't a KDE library, after all!
+ if( NOT KDEWIN_FOUND )
+ find_package( KDEWIN REQUIRED )
+ endif()
+
+ set( GPGME_FOUND false )
+ set( GPGME_VANILLA_FOUND false )
+ set( GPGME_GLIB_FOUND false )
+ set( GPGME_QT_FOUND false )
+
+ find_path( GPGME_INCLUDES gpgme.h
+ ${CMAKE_INCLUDE_PATH}
+ ${CMAKE_INSTALL_PREFIX}/include
+ )
+
+ if (NOT WINCE)
+ find_library( _gpgme_vanilla_library NAMES gpgme libgpgme gpgme-11 libgpgme-11
+ PATHS
+ ${CMAKE_LIBRARY_PATH}
+ ${CMAKE_INSTALL_PREFIX}/lib
+ )
+ else (NOT WINCE)
+ find_library( _gpgme_vanilla_library NAMES libgpgme-11-msc
+ PATHS
+ ${CMAKE_LIBRARY_PATH}
+ ${CMAKE_INSTALL_PREFIX}/lib
+ )
+ endif()
+
+ find_library( _gpgme_glib_library NAMES gpgme-glib libgpgme-glib gpgme-glib-11 libgpgme-glib-11
+ PATHS
+ ${CMAKE_LIBRARY_PATH}
+ ${CMAKE_INSTALL_PREFIX}/lib
+ )
+
+ find_library( _gpgme_qt_library NAMES gpgme-qt libgpgme-qt gpgme-qt-11 libgpgme-qt-11
+ PATHS
+ ${CMAKE_LIBRARY_PATH}
+ ${CMAKE_INSTALL_PREFIX}/lib
+ )
+
+ if ( WINCE )
+ set( _gpg_error_library )
+ else()
+ find_library( _gpg_error_library NAMES gpg-error libgpg-error gpg-error-0 libgpg-error-0
+ PATHS
+ ${CMAKE_LIBRARY_PATH}
+ ${CMAKE_INSTALL_PREFIX}/lib
+ )
+ endif()
+
+ set( GPGME_INCLUDES ${GPGME_INCLUDES} )
+
+ if ( _gpgme_vanilla_library AND ( _gpg_error_library OR WINCE ) )
+ set( GPGME_VANILLA_LIBRARIES ${_gpgme_vanilla_library} ${_gpg_error_library} )
+ set( GPGME_VANILLA_FOUND true )
+ set( GPGME_FOUND true )
+ endif()
+
+ if ( _gpgme_glib_library AND ( _gpg_error_library OR WINCE ) )
+ set( GPGME_GLIB_LIBRARIES ${_gpgme_glib_library} ${_gpg_error_library} )
+ set( GPGME_GLIB_FOUND true )
+ set( GPGME_FOUND true )
+ endif()
+
+ if ( _gpgme_qt_library AND ( _gpg_error_library OR WINCE ) )
+ set( GPGME_QT_LIBRARIES ${_gpgme_qt_library} ${_gpg_error_library} )
+ set( GPGME_QT_FOUND true )
+ set( GPGME_FOUND true )
+ endif()
+
+ endif()
+
+ # these are Unix-only:
+ set( GPGME_PTHREAD_FOUND false )
+ set( GPGME_PTH_FOUND false )
+ set( HAVE_GPGME_PTHREAD 0 )
+ set( HAVE_GPGME_PTH 0 )
+
+ macro_bool_to_01( GPGME_FOUND HAVE_GPGME )
+ macro_bool_to_01( GPGME_VANILLA_FOUND HAVE_GPGME_VANILLA )
+ macro_bool_to_01( GPGME_GLIB_FOUND HAVE_GPGME_GLIB )
+ macro_bool_to_01( GPGME_QT_FOUND HAVE_GPGME_QT )
+
+else() # not WIN32
+
+ # On *nix, we have the gpgme-config script which can tell us all we
+ # need to know:
+
+ # see WIN32 case for an explanation of what this does:
+ set( _seem_to_have_cached_gpgme false )
+ if ( GPGME_INCLUDES )
+ if ( GPGME_VANILLA_LIBRARIES OR GPGME_PTHREAD_LIBRARIES OR GPGME_PTH_LIBRARIES )
+ set( _seem_to_have_cached_gpgme true )
+ endif()
+ endif()
+
+ if ( _seem_to_have_cached_gpgme )
+
+ macro_bool_to_bool( GPGME_VANILLA_LIBRARIES GPGME_VANILLA_FOUND )
+ macro_bool_to_bool( GPGME_PTHREAD_LIBRARIES GPGME_PTHREAD_FOUND )
+ macro_bool_to_bool( GPGME_PTH_LIBRARIES GPGME_PTH_FOUND )
+
+ if ( GPGME_VANILLA_FOUND OR GPGME_PTHREAD_FOUND OR GPGME_PTH_FOUND )
+ set( GPGME_FOUND true )
+ else()
+ set( GPGME_FOUND false )
+ endif()
+
+ else()
+
+ set( GPGME_FOUND false )
+ set( GPGME_VANILLA_FOUND false )
+ set( GPGME_PTHREAD_FOUND false )
+ set( GPGME_PTH_FOUND false )
+
+ find_program( _GPGMECONFIG_EXECUTABLE NAMES gpgme-config )
+
+ # if gpgme-config has been found
+ if ( _GPGMECONFIG_EXECUTABLE )
+
+ message( STATUS "Found gpgme-config at ${_GPGMECONFIG_EXECUTABLE}" )
+
+ exec_program( ${_GPGMECONFIG_EXECUTABLE} ARGS --version OUTPUT_VARIABLE GPGME_VERSION )
+
+ set( _GPGME_MIN_VERSION "1.1.7" )
+
+ if ( ${GPGME_VERSION} VERSION_LESS ${_GPGME_MIN_VERSION} )
+
+ message( STATUS "The installed version of gpgme is too old: ${GPGME_VERSION} (required: >= ${_GPGME_MIN_VERSION})" )
+
+ else()
+
+ message( STATUS "Found gpgme v${GPGME_VERSION}, checking for flavours..." )
+
+ exec_program( ${_GPGMECONFIG_EXECUTABLE} ARGS --libs OUTPUT_VARIABLE _gpgme_config_vanilla_libs RETURN_VALUE _ret )
+ if ( _ret )
+ set( _gpgme_config_vanilla_libs )
+ endif()
+
+ exec_program( ${_GPGMECONFIG_EXECUTABLE} ARGS --thread=pthread --libs OUTPUT_VARIABLE _gpgme_config_pthread_libs RETURN_VALUE _ret )
+ if ( _ret )
+ set( _gpgme_config_pthread_libs )
+ endif()
+
+ exec_program( ${_GPGMECONFIG_EXECUTABLE} ARGS --thread=pth --libs OUTPUT_VARIABLE _gpgme_config_pth_libs RETURN_VALUE _ret )
+ if ( _ret )
+ set( _gpgme_config_pth_libs )
+ endif()
+
+ # append -lgpg-error to the list of libraries, if necessary
+ foreach ( _flavour vanilla pthread pth )
+ if ( _gpgme_config_${_flavour}_libs AND NOT _gpgme_config_${_flavour}_libs MATCHES "lgpg-error" )
+ set( _gpgme_config_${_flavour}_libs "${_gpgme_config_${_flavour}_libs} -lgpg-error" )
+ endif()
+ endforeach()
+
+ if ( _gpgme_config_vanilla_libs OR _gpgme_config_pthread_libs OR _gpgme_config_pth_libs )
+
+ exec_program( ${_GPGMECONFIG_EXECUTABLE} ARGS --cflags OUTPUT_VARIABLE _GPGME_CFLAGS )
+
+ if ( _GPGME_CFLAGS )
+ string( REGEX REPLACE "(\r?\n)+$" " " _GPGME_CFLAGS "${_GPGME_CFLAGS}" )
+ string( REGEX REPLACE " *-I" ";" GPGME_INCLUDES "${_GPGME_CFLAGS}" )
+ endif()
+
+ foreach ( _flavour vanilla pthread pth )
+ if ( _gpgme_config_${_flavour}_libs )
+
+ set( _gpgme_library_dirs )
+ set( _gpgme_library_names )
+ string( TOUPPER "${_flavour}" _FLAVOUR )
+
+ string( REGEX REPLACE " +" ";" _gpgme_config_${_flavour}_libs "${_gpgme_config_${_flavour}_libs}" )
+
+ foreach( _flag ${_gpgme_config_${_flavour}_libs} )
+ if ( "${_flag}" MATCHES "^-L" )
+ string( REGEX REPLACE "^-L" "" _dir "${_flag}" )
+ file( TO_CMAKE_PATH "${_dir}" _dir )
+ set( _gpgme_library_dirs ${_gpgme_library_dirs} "${_dir}" )
+ elseif( "${_flag}" MATCHES "^-l" )
+ string( REGEX REPLACE "^-l" "" _name "${_flag}" )
+ set( _gpgme_library_names ${_gpgme_library_names} "${_name}" )
+ endif()
+ endforeach()
+
+ set( GPGME_${_FLAVOUR}_FOUND true )
+
+ foreach( _name ${_gpgme_library_names} )
+ set( _gpgme_${_name}_lib )
+
+ # if -L options were given, look only there
+ if ( _gpgme_library_dirs )
+ find_library( _gpgme_${_name}_lib NAMES ${_name} PATHS ${_gpgme_library_dirs} NO_DEFAULT_PATH )
+ endif()
+
+ # if not found there, look in system directories
+ if ( NOT _gpgme_${_name}_lib )
+ find_library( _gpgme_${_name}_lib NAMES ${_name} )
+ endif()
+
+ # if still not found, then the whole flavour isn't found
+ if ( NOT _gpgme_${_name}_lib )
+ if ( GPGME_${_FLAVOUR}_FOUND )
+ set( GPGME_${_FLAVOUR}_FOUND false )
+ set( _not_found_reason "dependant library ${_name} wasn't found" )
+ endif()
+ endif()
+
+ set( GPGME_${_FLAVOUR}_LIBRARIES ${GPGME_${_FLAVOUR}_LIBRARIES} "${_gpgme_${_name}_lib}" )
+ endforeach()
+
+ #check_c_library_exists_explicit( gpgme gpgme_check_version "${_GPGME_CFLAGS}" "${GPGME_LIBRARIES}" GPGME_FOUND )
+ if ( GPGME_${_FLAVOUR}_FOUND )
+ message( STATUS " Found flavour '${_flavour}', checking whether it's usable...yes" )
+ else()
+ message( STATUS " Found flavour '${_flavour}', checking whether it's usable...no" )
+ message( STATUS " (${_not_found_reason})" )
+ endif()
+ endif()
+
+ endforeach( _flavour )
+
+ # ensure that they are cached
+ # This comment above doesn't make sense, the four following lines seem to do nothing. Alex
+ set( GPGME_INCLUDES ${GPGME_INCLUDES} )
+ set( GPGME_VANILLA_LIBRARIES ${GPGME_VANILLA_LIBRARIES} )
+ set( GPGME_PTHREAD_LIBRARIES ${GPGME_PTHREAD_LIBRARIES} )
+ set( GPGME_PTH_LIBRARIES ${GPGME_PTH_LIBRARIES} )
+
+ if ( GPGME_VANILLA_FOUND OR GPGME_PTHREAD_FOUND OR GPGME_PTH_FOUND )
+ set( GPGME_FOUND true )
+ else()
+ set( GPGME_FOUND false )
+ endif()
+
+ endif()
+
+ endif()
+
+ endif()
+
+ endif()
+
+ # these are Windows-only:
+ set( GPGME_GLIB_FOUND false )
+ set( GPGME_QT_FOUND false )
+ set( HAVE_GPGME_GLIB 0 )
+ set( HAVE_GPGME_QT 0 )
+
+ macro_bool_to_01( GPGME_FOUND HAVE_GPGME )
+ macro_bool_to_01( GPGME_VANILLA_FOUND HAVE_GPGME_VANILLA )
+ macro_bool_to_01( GPGME_PTHREAD_FOUND HAVE_GPGME_PTHREAD )
+ macro_bool_to_01( GPGME_PTH_FOUND HAVE_GPGME_PTH )
+
+endif() # WIN32 | Unix
+
+
+set( _gpgme_flavours "" )
+
+if ( GPGME_VANILLA_FOUND )
+ set( _gpgme_flavours "${_gpgme_flavours} vanilla" )
+endif()
+
+if ( GPGME_GLIB_FOUND )
+ set( _gpgme_flavours "${_gpgme_flavours} Glib" )
+endif()
+
+if ( GPGME_QT_FOUND )
+ set( _gpgme_flavours "${_gpgme_flavours} Qt" )
+endif()
+
+if ( GPGME_PTHREAD_FOUND )
+ set( _gpgme_flavours "${_gpgme_flavours} pthread" )
+endif()
+
+if ( GPGME_PTH_FOUND )
+ set( _gpgme_flavours "${_gpgme_flavours} pth" )
+endif()
+
+# determine the library in one of the found flavours, can be reused e.g. by FindQgpgme.cmake, Alex
+foreach(_currentFlavour vanilla glib qt pth pthread)
+ if(NOT GPGME_LIBRARY_DIR)
+ get_filename_component(GPGME_LIBRARY_DIR "${_gpgme_${_currentFlavour}_lib}" PATH)
+ endif()
+endforeach()
+
+if ( NOT Gpgme_FIND_QUIETLY )
+
+ if ( GPGME_FOUND )
+ message( STATUS "Usable gpgme flavours found: ${_gpgme_flavours}" )
+ else()
+ message( STATUS "No usable gpgme flavours found." )
+ endif()
+
+ macro_bool_to_bool( Gpgme_FIND_REQUIRED _req )
+
+ if ( WIN32 )
+ set( _gpgme_homepage "http://www.gpg4win.org" )
+ else()
+ set( _gpgme_homepage "http://www.gnupg.org/related_software/gpgme" )
+ endif()
+
+ #macro_log_feature(
+ # GPGME_FOUND
+ # "gpgme"
+ # "GNU Privacy Guard (GPG/PGP) support"
+ # ${_gpgme_homepage}
+ # ${_req}
+ # "${_GPGME_MIN_VERSION} or greater"
+ # "Necessary to compile many PIM applications, including KMail"
+ #)
+
+else()
+
+ if ( Gpgme_FIND_REQUIRED AND NOT GPGME_FOUND )
+ message( FATAL_ERROR "Did not find GPGME" )
+ endif()
+
+endif()
+
+set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS_gpgme_saved )
diff --git a/kcalcore/cmake/modules/FindLdap.cmake b/kcalcore/cmake/modules/FindLdap.cmake
new file mode 100644
index 0000000..b5428e1
--- /dev/null
+++ b/kcalcore/cmake/modules/FindLdap.cmake
@@ -0,0 +1,46 @@
+# - Try to find the LDAP client libraries
+# Once done this will define
+#
+# LDAP_FOUND - system has libldap
+# LDAP_INCLUDE_DIR - the ldap include directory
+# LDAP_LIBRARIES - libldap + liblber (if found) library
+# LBER_LIBRARIES - liblber library
+
+if(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES)
+ # Already in cache, be silent
+ set(Ldap_FIND_QUIETLY TRUE)
+endif()
+
+
+FIND_PATH(LDAP_INCLUDE_DIR ldap.h)
+
+if(APPLE)
+ FIND_LIBRARY(LDAP_LIBRARIES NAMES LDAP
+ PATHS
+ /System/Library/Frameworks
+ /Library/Frameworks
+ )
+else(APPLE)
+ FIND_LIBRARY(LDAP_LIBRARIES NAMES ldap)
+
+ FIND_LIBRARY(LBER_LIBRARIES NAMES lber)
+endif()
+
+if(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES)
+ set(LDAP_FOUND TRUE)
+ if(LBER_LIBRARIES)
+ set(LDAP_LIBRARIES ${LDAP_LIBRARIES} ${LBER_LIBRARIES})
+ endif()
+endif()
+
+if(LDAP_FOUND)
+ if(NOT Ldap_FIND_QUIETLY)
+ message(STATUS "Found ldap: ${LDAP_LIBRARIES}")
+ endif()
+else(LDAP_FOUND)
+ if (Ldap_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find ldap")
+ endif()
+endif()
+
+MARK_AS_ADVANCED(LDAP_INCLUDE_DIR LDAP_LIBRARIES LBER_LIBRARIES)
diff --git a/kcalcore/cmake/modules/FindLibical.cmake b/kcalcore/cmake/modules/FindLibical.cmake
new file mode 100644
index 0000000..85074cb
--- /dev/null
+++ b/kcalcore/cmake/modules/FindLibical.cmake
@@ -0,0 +1,95 @@
+# Find Libical
+#
+# LIBICAL_FOUND - system has Libical with the minimum version needed
+# LIBICAL_INCLUDE_DIRS - the Libical include directories
+# LIBICAL_LIBRARIES - The libraries needed to use Libical
+# LIBICAL_VERSION = The value of ICAL_VERSION defined in ical.h
+# LIBICAL_MAJOR_VERSION = The library major version number
+# LIBICAL_MINOR_VERSION = The library minor version number
+
+# Copyright (c) 2008,2010 Allen Winter <winter@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+if(NOT LIBICAL_MIN_VERSION)
+ set(LIBICAL_MIN_VERSION "0.33")
+endif()
+
+if (WIN32)
+ file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _program_FILES_DIR)
+endif()
+
+set(LIBICAL_FIND_REQUIRED ${Libical_FIND_REQUIRED})
+if(LIBICAL_INCLUDE_DIRS AND LIBICAL_LIBRARIES)
+
+ # Already in cache, be silent
+ set(LIBICAL_FIND_QUIETLY TRUE)
+
+endif()
+
+#set the root from the LIBICAL_BASE environment
+file(TO_CMAKE_PATH "$ENV{LIBICAL_BASE}" libical_root )
+#override the root from LIBICAL_BASE defined to cmake
+if(DEFINED LIBICAL_BASE)
+ file(TO_CMAKE_PATH "${LIBICAL_BASE}" libical_root )
+endif()
+
+find_path(LIBICAL_INCLUDE_DIRS NAMES libical/ical.h
+ HINTS ${libical_root}/include ${_program_FILES_DIR}/libical/include ${KDE4_INCLUDE_DIR}
+)
+
+find_library(LIBICAL_LIBRARY NAMES ical libical
+ HINTS ${libical_root}/lib ${_program_FILES_DIR}/libical/lib ${KDE4_LIB_DIR}
+)
+find_library(LIBICALSS_LIBRARY NAMES icalss libicalss
+ HINTS ${libical_root}/lib ${_program_FILES_DIR}/libical/lib ${KDE4_LIB_DIR}
+)
+set(LIBICAL_LIBRARIES ${LIBICAL_LIBRARY} ${LIBICALSS_LIBRARY})
+
+if(LIBICAL_INCLUDE_DIRS AND LIBICAL_LIBRARIES)
+ set(FIND_LIBICAL_VERSION_SOURCE
+ "#include <libical/ical.h>\n int main()\n {\n printf(\"%s\",ICAL_VERSION);return 1;\n }\n")
+ set(FIND_LIBICAL_VERSION_SOURCE_FILE ${CMAKE_BINARY_DIR}/CMakeTmp/FindLIBICAL.cxx)
+ file(WRITE "${FIND_LIBICAL_VERSION_SOURCE_FILE}" "${FIND_LIBICAL_VERSION_SOURCE}")
+
+ set(FIND_LIBICAL_VERSION_ADD_INCLUDES
+ "-DINCLUDE_DIRECTORIES:STRING=${LIBICAL_INCLUDE_DIRS}")
+
+ if(NOT CMAKE_CROSSCOMPILING)
+ try_run(RUN_RESULT COMPILE_RESULT
+ ${CMAKE_BINARY_DIR}
+ ${FIND_LIBICAL_VERSION_SOURCE_FILE}
+ CMAKE_FLAGS "${FIND_LIBICAL_VERSION_ADD_INCLUDES}"
+ RUN_OUTPUT_VARIABLE LIBICAL_VERSION)
+ endif()
+
+ if(COMPILE_RESULT AND RUN_RESULT EQUAL 1 AND NOT CMAKE_CROSSCOMPILING)
+ message(STATUS "Found Libical version ${LIBICAL_VERSION}")
+ if(${LIBICAL_VERSION} VERSION_LESS ${LIBICAL_MIN_VERSION})
+ message(STATUS "Libcal version ${LIBICAL_VERSION} is too old. At least version ${LIBICAL_MIN_VERSION} is needed.")
+ set(LIBICAL_INCLUDE_DIRS "")
+ set(LIBICAL_LIBRARIES "")
+ endif()
+ if((LIBICAL_VERSION VERSION_EQUAL 0.46) OR (LIBICAL_VERSION VERSION_GREATER 0.46))
+ set(USE_ICAL_0_46 TRUE)
+ endif()
+ else(COMPILE_RESULT AND RUN_RESULT EQUAL 1 AND NOT CMAKE_CROSSCOMPILING)
+ if(NOT CMAKE_CROSSCOMPILING)
+ message(FATAL_ERROR "Unable to compile or run the libical version detection program.")
+ endif()
+ endif()
+
+ #compute the major and minor version numbers
+ if(NOT CMAKE_CROSSCOMPILING)
+ string(REGEX REPLACE "\\..*$" "" LIBICAL_MAJOR_VERSION ${LIBICAL_VERSION})
+ string(REGEX REPLACE "^.*\\." "" LIBICAL_MINOR_VERSION ${LIBICAL_VERSION})
+ endif()
+
+endif()
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBICAL DEFAULT_MSG LIBICAL_LIBRARIES LIBICAL_INCLUDE_DIRS)
+
+mark_as_advanced(LIBICAL_INCLUDE_DIRS LIBICAL_LIBRARIES)
+
diff --git a/kcalcore/cmake/modules/FindQGpgme.cmake b/kcalcore/cmake/modules/FindQGpgme.cmake
new file mode 100644
index 0000000..0355ebe
--- /dev/null
+++ b/kcalcore/cmake/modules/FindQGpgme.cmake
@@ -0,0 +1,46 @@
+# - Try to find the QGpgME library
+# Once done this will define
+#
+# QGPGME_FOUND
+# QGPGME_LIBRARIES
+# QGPGME_INCLUDE_DIR
+
+# What we do here is a bit simplictic, but it's no worse than what
+# people were using in kdepim up to now...
+
+find_package(Gpgme)
+
+if(GPGME_FOUND)
+
+ if ( WIN32 )
+ find_library(_QGPGME_EXTRA_LIBRARY gpgme++
+ HINTS ${GPGME_LIBRARY_DIR})
+ else ( WIN32 )
+ find_library(_QGPGME_EXTRA_LIBRARY gpgme++-pthread
+ HINTS ${GPGME_LIBRARY_DIR})
+ endif()
+
+ find_library(QGPGME_LIBRARY qgpgme
+ HINTS ${GPGME_LIBRARY_DIR})
+
+ if (QGPGME_LIBRARY)
+ # get the libdirectory and then go one up
+ get_filename_component(_QGPGME_PREFIX "${QGPGME_LIBRARY}" PATH)
+ get_filename_component(_QGPGME_PREFIX "${_QGPGME_PREFIX}" PATH)
+ find_path(QGPGME_INCLUDE_DIR qgpgme/qgpgme_export.h
+ HINTS "${_QGPGME_PREFIX}/include" )
+ endif()
+
+ if ( WIN32 )
+ set(QGPGME_LIBRARIES ${QGPGME_LIBRARY} ${_QGPGME_EXTRA_LIBRARY} ${GPGME_VANILLA_LIBRARIES} ${GPGME_QT_LIBRARIES})
+ else ( WIN32 )
+ set(QGPGME_LIBRARIES ${QGPGME_LIBRARY} ${_QGPGME_EXTRA_LIBRARY} ${GPGME_PTHREAD_LIBRARIES})
+ endif()
+
+endif()
+
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(QGpgme DEFAULT_MSG QGPGME_LIBRARY QGPGME_INCLUDE_DIR _QGPGME_EXTRA_LIBRARY)
+
+mark_as_advanced(QGPGME_LIBRARY _QGPGME_EXTRA_LIBRARY QGPGME_INCLUDE_DIR)
diff --git a/kcalcore/compat.cpp b/kcalcore/compat.cpp
index 9447fff..733e99d 100644
--- a/kcalcore/compat.cpp
+++ b/kcalcore/compat.cpp
@@ -34,7 +34,7 @@
#include "compat.h"
#include "incidence.h"
-#include <KDebug>
+#include <QtCore/QDebug>
#include <QtCore/QRegExp>
#include <QtCore/QString>
@@ -70,7 +70,7 @@ Compat *CompatFactory::createCompat( const QString &productId )
} else if ( versionNum < 30200 ) {
compat = new CompatPre32;
} else if ( versionNum == 30200 && release == "pre" ) {
- kDebug() << "Generating compat for KOrganizer 3.2 pre";
+ qDebug() << "Generating compat for KOrganizer 3.2 pre";
compat = new Compat32PrereleaseVersions;
} else if ( versionNum < 30400 ) {
compat = new CompatPre34;
@@ -80,7 +80,7 @@ Compat *CompatFactory::createCompat( const QString &productId )
}
}
} else if ( outl9 >= 0 ) {
- kDebug() << "Generating compat for Outlook < 2000 (Outlook 9.0)";
+ qDebug() << "Generating compat for Outlook < 2000 (Outlook 9.0)";
compat = new CompatOutlook9;
}
diff --git a/kcalcore/duration.cpp b/kcalcore/duration.cpp
index c08e440..bab21d0 100644
--- a/kcalcore/duration.cpp
+++ b/kcalcore/duration.cpp
@@ -31,7 +31,7 @@
@author David Jarvie \<software@astrojar.org.uk\>
*/
#include "duration.h"
-#include <KDateTime>
+#include <kdatetime.h>
using namespace KCalCore;
diff --git a/kcalcore/event.cpp b/kcalcore/event.cpp
index f0900f6..07e6d65 100644
--- a/kcalcore/event.cpp
+++ b/kcalcore/event.cpp
@@ -32,7 +32,7 @@
#include "event.h"
#include "visitor.h"
-#include <KDebug>
+#include <QtCore/QDebug>
using namespace KCalCore;
@@ -308,7 +308,7 @@ void Event::setDateTime( const KDateTime &dateTime, DateTimeRole role )
break;
}
default:
- kDebug() << "Unhandled role" << role;
+ qDebug() << "Unhandled role" << role;
}
}
diff --git a/kcalcore/filestorage.cpp b/kcalcore/filestorage.cpp
index 13b7c6e..9d8e076 100644
--- a/kcalcore/filestorage.cpp
+++ b/kcalcore/filestorage.cpp
@@ -34,7 +34,7 @@
#include "memorycalendar.h"
#include "vcalformat.h"
-#include <KDebug>
+#include <QtCore/QDebug>
using namespace KCalCore;
@@ -122,7 +122,7 @@ bool FileStorage::load()
if ( iCal.exception() ) {
if ( iCal.exception()->code() == Exception::CalVersion1 ) {
// Expected non vCalendar file, but detected vCalendar
- kDebug() << "Fallback to VCalFormat";
+ qDebug() << "Fallback to VCalFormat";
VCalFormat vCal;
success = vCal.load( calendar(), d->mFileName );
productId = vCal.loadedProductId();
@@ -130,7 +130,7 @@ bool FileStorage::load()
return false;
}
} else {
- kDebug() << "Warning! There should be an exception set.";
+ qDebug() << "Warning! There should be an exception set.";
return false;
}
}
@@ -144,7 +144,7 @@ bool FileStorage::load()
bool FileStorage::save()
{
- kDebug();
+ qDebug();
if ( d->mFileName.isEmpty() ) {
return false;
}
@@ -157,9 +157,9 @@ bool FileStorage::save()
calendar()->setModified( false );
} else {
if ( !format->exception() ) {
- kDebug() << "Error. There should be an expection set.";
+ qDebug() << "Error. There should be an expection set.";
} else {
- kDebug() << int( format->exception()->code() );
+ qDebug() << int( format->exception()->code() );
}
}
diff --git a/kcalcore/freebusy.cpp b/kcalcore/freebusy.cpp
index 9e37773..e7d9a21 100644
--- a/kcalcore/freebusy.cpp
+++ b/kcalcore/freebusy.cpp
@@ -35,7 +35,7 @@
#include "icalformat.h"
-#include <KDebug>
+#include <QtCore/QDebug>
using namespace KCalCore;
@@ -128,7 +128,7 @@ void FreeBusy::Private::init( const Event::List &eventList,
Event::Ptr allDayEvent;
if ( event->allDay() ) {
// addDay event. Do the hack
- kDebug() << "All-day event";
+ qDebug() << "All-day event";
allDayEvent = Event::Ptr( new Event( *event ) );
// Set the start and end times to be on midnight
@@ -140,7 +140,7 @@ void FreeBusy::Private::init( const Event::List &eventList,
allDayEvent->setDtStart( st );
allDayEvent->setDtEnd( nd );
- kDebug() << "Use:" << st.toString() << "to" << nd.toString();
+ qDebug() << "Use:" << st.toString() << "to" << nd.toString();
// Finally, use this event for the setting below
event = allDayEvent;
}
@@ -419,8 +419,8 @@ QDataStream &KCalCore::operator>>( QDataStream &stream, KCalCore::FreeBusy::Ptr
freebusy = format.parseFreeBusy( freeBusyVCal );
if ( !freebusy ) {
- kDebug() << "Error parsing free/busy";
- kDebug() << freeBusyVCal;
+ qDebug() << "Error parsing free/busy";
+ qDebug() << freeBusyVCal;
}
return stream;
diff --git a/kcalcore/freebusyurlstore.cpp b/kcalcore/freebusyurlstore.cpp
index 7c4c10b..1e71bd3 100644
--- a/kcalcore/freebusyurlstore.cpp
+++ b/kcalcore/freebusyurlstore.cpp
@@ -27,9 +27,9 @@
*/
#include "freebusyurlstore.h"
-#include <KConfig>
-#include <KConfigGroup>
-#include <KStandardDirs>
+#include <kconfig.h>
+#include <kconfiggroup.h>
+#include <kstandarddirs.h>
#include <QtCore/QCoreApplication>
diff --git a/kcalcore/icalformat.cpp b/kcalcore/icalformat.cpp
index 452ba9f..65cb1f0 100644
--- a/kcalcore/icalformat.cpp
+++ b/kcalcore/icalformat.cpp
@@ -34,8 +34,8 @@
#include "freebusy.h"
#include "memorycalendar.h"
-#include <KDebug>
-#include <KSaveFile>
+#include <QtCore/QDebug>
+#include <ksavefile.h>
#include <QtCore/QFile>
@@ -76,13 +76,13 @@ ICalFormat::~ICalFormat()
bool ICalFormat::load( const Calendar::Ptr &calendar, const QString &fileName )
{
- kDebug() << fileName;
+ qDebug() << fileName;
clearException();
QFile file( fileName );
if ( !file.open( QIODevice::ReadOnly ) ) {
- kDebug() << "load error";
+ qDebug() << "load error";
setException( new Exception( Exception::LoadError ) );
return false;
}
@@ -101,7 +101,7 @@ bool ICalFormat::load( const Calendar::Ptr &calendar, const QString &fileName )
bool ICalFormat::save( const Calendar::Ptr &calendar, const QString &fileName )
{
- kDebug() << fileName;
+ qDebug() << fileName;
clearException();
@@ -115,7 +115,7 @@ bool ICalFormat::save( const Calendar::Ptr &calendar, const QString &fileName )
KSaveFile file( fileName );
if ( !file.open() ) {
- kDebug() << "file open error:" << file.errorString();
+ qDebug() << "file open error:" << file.errorString();
setException( new Exception( Exception::SaveErrorOpenFile,
QStringList( fileName ) ) );
@@ -127,7 +127,7 @@ bool ICalFormat::save( const Calendar::Ptr &calendar, const QString &fileName )
file.write( textUtf8.data(), textUtf8.size() );
if ( !file.finalize() ) {
- kDebug() << "file finalize error:" << file.errorString();
+ qDebug() << "file finalize error:" << file.errorString();
setException( new Exception( Exception::SaveErrorSaveFile,
QStringList( fileName ) ) );
@@ -154,7 +154,7 @@ bool ICalFormat::fromRawString( const Calendar::Ptr &cal, const QByteArray &stri
// Let's defend const correctness until the very gates of hell^Wlibical
calendar = icalcomponent_new_from_string( const_cast<char*>( ( const char * )string ) );
if ( !calendar ) {
- kDebug() << "parse error";
+ qDebug() << "parse error";
setException( new Exception( Exception::ParseErrorIcal ) );
return false;
}
@@ -167,7 +167,7 @@ bool ICalFormat::fromRawString( const Calendar::Ptr &cal, const QByteArray &stri
comp; comp = icalcomponent_get_next_component( calendar, ICAL_VCALENDAR_COMPONENT ) ) {
// put all objects into their proper places
if ( !d->mImpl->populate( cal, comp, deleted ) ) {
- kDebug() << "Could not populate calendar";
+ qDebug() << "Could not populate calendar";
if ( !exception() ) {
setException( new Exception( Exception::ParseErrorKcal ) );
}
@@ -177,13 +177,13 @@ bool ICalFormat::fromRawString( const Calendar::Ptr &cal, const QByteArray &stri
}
}
} else if ( icalcomponent_isa( calendar ) != ICAL_VCALENDAR_COMPONENT ) {
- kDebug() << "No VCALENDAR component found";
+ qDebug() << "No VCALENDAR component found";
setException( new Exception( Exception::NoCalendar ) );
success = false;
} else {
// put all objects into their proper places
if ( !d->mImpl->populate( cal, calendar, deleted ) ) {
- kDebug() << "Could not populate calendar";
+ qDebug() << "Could not populate calendar";
if ( !exception() ) {
setException( new Exception( Exception::ParseErrorKcal ) );
}
@@ -284,7 +284,7 @@ QString ICalFormat::toString( const Calendar::Ptr &cal,
it != zones.constEnd(); ++it ) {
icaltimezone *tz = (*it).icalTimezone();
if ( !tz ) {
- kError() << "bad time zone";
+ qWarning() << "bad time zone";
} else {
component = icalcomponent_new_clone( icaltimezone_get_component( tz ) );
icalcomponent_add_component( calendar, component );
@@ -334,7 +334,7 @@ QByteArray ICalFormat::toRawString( const Incidence::Ptr &incidence )
it != zones.constEnd(); ++it ) {
icaltimezone *tz = (*it).icalTimezone();
if ( !tz ) {
- kError() << "bad time zone";
+ qWarning() << "bad time zone";
} else {
icalcomponent *tzcomponent = icaltimezone_get_component( tz );
icalcomponent_add_component( component, component );
@@ -366,7 +366,7 @@ bool ICalFormat::fromString( RecurrenceRule *recurrence, const QString &rrule )
icalerror_clear_errno();
struct icalrecurrencetype recur = icalrecurrencetype_from_string( rrule.toLatin1() );
if ( icalerrno != ICAL_NO_ERROR ) {
- kDebug() << "Recurrence parsing error:" << icalerror_strerror( icalerrno );
+ qDebug() << "Recurrence parsing error:" << icalerror_strerror( icalerrno );
success = false;
}
@@ -452,7 +452,7 @@ FreeBusy::Ptr ICalFormat::parseFreeBusy( const QString &str )
}
if ( !freeBusy ) {
- kDebug() << "object is not a freebusy.";
+ qDebug() << "object is not a freebusy.";
}
icalcomponent_free( message );
@@ -526,7 +526,7 @@ ScheduleMessage::Ptr ICalFormat::parseScheduleMessage( const Calendar::Ptr &cal,
}
if ( !incidence ) {
- kDebug() << "object is not a freebusy, event, todo or journal";
+ qDebug() << "object is not a freebusy, event, todo or journal";
setException( new Exception( Exception::ParseErrorNotIncidence ) );
return ScheduleMessage::Ptr();
@@ -562,14 +562,14 @@ ScheduleMessage::Ptr ICalFormat::parseScheduleMessage( const Calendar::Ptr &cal,
break;
default:
method = iTIPNoMethod;
- kDebug() << "Unknown method";
+ qDebug() << "Unknown method";
break;
}
if ( !icalrestriction_check( message ) ) {
- kWarning() << endl
+ qWarning() << endl
<< "kcalcore library reported a problem while parsing:";
- kWarning() << ScheduleMessage::methodName( method ) << ":" //krazy:exclude=kdebug
+ qWarning() << ScheduleMessage::methodName( method ) << ":" //krazy:exclude=kdebug
<< d->mImpl->extractErrorProperty( c );
}
diff --git a/kcalcore/icalformat_p.cpp b/kcalcore/icalformat_p.cpp
index 92f60f4..dc864cc 100644
--- a/kcalcore/icalformat_p.cpp
+++ b/kcalcore/icalformat_p.cpp
@@ -46,8 +46,8 @@
#include "todo.h"
#include "visitor.h"
-#include <KCodecs>
-#include <KDebug>
+#include <kcodecs.h>
+#include <QtCore/QDebug>
#include <QtCore/QFile>
@@ -60,10 +60,10 @@ static const char ENABLED_ALARM_XPROPERTY[] = "ENABLED";
/*
static void _dumpIcaltime( const icaltimetype& t)
{
- kDebug() << "--- Y:" << t.year << "M:" << t.month << "D:" << t.day;
- kDebug() << "--- H:" << t.hour << "M:" << t.minute << "S:" << t.second;
- kDebug() << "--- isUtc:" << icaltime_is_utc( t );
- kDebug() << "--- zoneId:" << icaltimezone_get_tzid( const_cast<icaltimezone*>( t.zone ) );
+ qDebug() << "--- Y:" << t.year << "M:" << t.month << "D:" << t.day;
+ qDebug() << "--- H:" << t.hour << "M:" << t.minute << "S:" << t.second;
+ qDebug() << "--- isUtc:" << icaltime_is_utc( t );
+ qDebug() << "--- zoneId:" << icaltimezone_get_tzid( const_cast<icaltimezone*>( t.zone ) );
}
*/
@@ -891,7 +891,7 @@ icalrecurrencetype ICalFormatImpl::writeRecurrenceRule( RecurrenceRule *recur )
break;
default:
r.freq = ICAL_NO_RECURRENCE;
- kDebug() << "no recurrence";
+ qDebug() << "no recurrence";
break;
}
@@ -1058,7 +1058,7 @@ icalcomponent *ICalFormatImpl::writeAlarm( const Alarm::Ptr &alarm )
break;
case Alarm::Invalid:
default:
- kDebug() << "Unknown type of alarm";
+ qDebug() << "Unknown type of alarm";
action = ICAL_ACTION_NONE;
break;
}
@@ -1152,7 +1152,7 @@ Todo::Ptr ICalFormatImpl::readTodo( icalcomponent *vtodo, ICalTimeZones *tzlist
if ( dateTime.isValid() ) {
todo->setDtRecurrence( dateTime );
} else {
- kDebug() << "Invalid dateTime";
+ qDebug() << "Invalid dateTime";
}
}
break;
@@ -1831,7 +1831,7 @@ void ICalFormatImpl::Private::readIncidenceBase( icalcomponent *parent,
}
if ( !uidProcessed ) {
- kWarning() << "The incidence didn't have any UID! Report a bug "
+ qWarning() << "The incidence didn't have any UID! Report a bug "
<< "to the application that generated this file."
<< endl;
@@ -2034,7 +2034,7 @@ void ICalFormatImpl::readAlarm( icalcomponent *alarm,
Alarm::Type type = Alarm::Display;
icalproperty_action action = ICAL_ACTION_DISPLAY;
if ( !p ) {
- kDebug() << "Unknown type of alarm, using default";
+ qDebug() << "Unknown type of alarm, using default";
// TODO: do something about unknown alarm type?
} else {
@@ -2154,7 +2154,7 @@ void ICalFormatImpl::readAlarm( icalcomponent *alarm,
break;
}
} else {
- kDebug() << "Alarm attachments currently only support URIs,"
+ qDebug() << "Alarm attachments currently only support URIs,"
<< "but no binary data";
}
break;
@@ -2328,7 +2328,7 @@ KDateTime ICalFormatImpl::readICalDateTime( icalproperty *p,
ICalTimeZones *tzlist,
bool utc )
{
-// kDebug();
+// qDebug();
// _dumpIcaltime( t );
KDateTime::Spec timeSpec;
@@ -2559,13 +2559,13 @@ bool ICalFormatImpl::populate( const Calendar::Ptr &cal, icalcomponent *calendar
{
Q_UNUSED(notebook);
- // kDebug()<<"Populate called";
+ // qDebug()<<"Populate called";
// this function will populate the caldict dictionary and other event
// lists. It turns vevents into Events and then inserts them.
if ( !calendar ) {
- kDebug() << "Populate called with empty calendar";
+ qDebug() << "Populate called with empty calendar";
return false;
}
@@ -2575,7 +2575,7 @@ bool ICalFormatImpl::populate( const Calendar::Ptr &cal, icalcomponent *calendar
p = icalcomponent_get_first_property( calendar, ICAL_PRODID_PROPERTY );
if ( !p ) {
- kDebug() << "No PRODID property found";
+ qDebug() << "No PRODID property found";
d->mLoadedProductId = "";
} else {
d->mLoadedProductId = QString::fromUtf8( icalproperty_get_prodid( p ) );
@@ -2586,23 +2586,23 @@ bool ICalFormatImpl::populate( const Calendar::Ptr &cal, icalcomponent *calendar
p = icalcomponent_get_first_property( calendar, ICAL_VERSION_PROPERTY );
if ( !p ) {
- kDebug() << "No VERSION property found";
+ qDebug() << "No VERSION property found";
d->mParent->setException( new Exception( Exception::CalVersionUnknown ) );
return false;
} else {
const char *version = icalproperty_get_version( p );
if ( !version ) {
- kDebug() << "No VERSION property found";
+ qDebug() << "No VERSION property found";
d->mParent->setException( new Exception( Exception::VersionPropertyMissing ) );
return false;
}
if ( strcmp( version, "1.0" ) == 0 ) {
- kDebug() << "Expected iCalendar, got vCalendar";
+ qDebug() << "Expected iCalendar, got vCalendar";
d->mParent->setException( new Exception( Exception::CalVersion1 ) );
return false;
} else if ( strcmp( version, "2.0" ) != 0 ) {
- kDebug() << "Expected iCalendar, got unknown format";
+ qDebug() << "Expected iCalendar, got unknown format";
d->mParent->setException( new Exception(
Exception::CalVersionUnknown ) );
return false;
@@ -2628,29 +2628,29 @@ bool ICalFormatImpl::populate( const Calendar::Ptr &cal, icalcomponent *calendar
while ( c ) {
Todo::Ptr todo = readTodo( c, tzlist );
if ( todo ) {
- // kDebug() << "todo is no zero and deleted is " << deleted;
+ // qDebug() << "todo is no zero and deleted is " << deleted;
Todo::Ptr old = cal->todo( todo->uid(), todo->recurrenceId() );
if ( old ) {
- // kDebug() << "Found an old todo with uid " << old->uid();;
+ // qDebug() << "Found an old todo with uid " << old->uid();;
if ( deleted ) {
- // kDebug()<<"Todo " << todo->uid() << " already deleted2";
+ // qDebug()<<"Todo " << todo->uid() << " already deleted2";
cal->deleteTodo( old ); // move old to deleted
removeAllICal( d->mTodosRelate, old );
} else if ( todo->revision() > old->revision() ) {
- // kDebug() << "Replacing old todo " << old.data() << " with this one " << todo.data();
+ // qDebug() << "Replacing old todo " << old.data() << " with this one " << todo.data();
cal->deleteTodo( old ); // move old to deleted
removeAllICal( d->mTodosRelate, old );
cal->addTodo( todo ); // and replace it with this one
}
} else if ( deleted ) {
- // kDebug()<<"Todo " << todo->uid() << " already deleted";
+ // qDebug()<<"Todo " << todo->uid() << " already deleted";
old = cal->deletedTodo( todo->uid(), todo->recurrenceId() );
if ( !old ) {
cal->addTodo( todo ); // add this one
cal->deleteTodo( todo ); // and move it to deleted
}
} else {
- // kDebug() << "Adding todo " << todo.data() << todo->uid();
+ // qDebug() << "Adding todo " << todo.data() << todo->uid();
cal->addTodo( todo ); // just add this one
}
}
@@ -2744,16 +2744,16 @@ void ICalFormatImpl::dumpIcalRecurrence( const icalrecurrencetype &r )
{
int i;
- kDebug() << " Freq:" << int( r.freq );
- kDebug() << " Until:" << icaltime_as_ical_string( r.until );
- kDebug() << " Count:" << r.count;
+ qDebug() << " Freq:" << int( r.freq );
+ qDebug() << " Until:" << icaltime_as_ical_string( r.until );
+ qDebug() << " Count:" << r.count;
if ( r.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX ) {
int index = 0;
QString out = " By Day: ";
while ( ( i = r.by_day[index++] ) != ICAL_RECURRENCE_ARRAY_MAX ) {
out.append( QString::number( i ) + ' ' );
}
- kDebug() << out;
+ qDebug() << out;
}
if ( r.by_month_day[0] != ICAL_RECURRENCE_ARRAY_MAX ) {
int index = 0;
@@ -2761,7 +2761,7 @@ void ICalFormatImpl::dumpIcalRecurrence( const icalrecurrencetype &r )
while ( ( i = r.by_month_day[index++] ) != ICAL_RECURRENCE_ARRAY_MAX ) {
out.append( QString::number( i ) + ' ' );
}
- kDebug() << out;
+ qDebug() << out;
}
if ( r.by_year_day[0] != ICAL_RECURRENCE_ARRAY_MAX ) {
int index = 0;
@@ -2769,7 +2769,7 @@ void ICalFormatImpl::dumpIcalRecurrence( const icalrecurrencetype &r )
while ( ( i = r.by_year_day[index++] ) != ICAL_RECURRENCE_ARRAY_MAX ) {
out.append( QString::number( i ) + ' ' );
}
- kDebug() << out;
+ qDebug() << out;
}
if ( r.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX ) {
int index = 0;
@@ -2777,16 +2777,16 @@ void ICalFormatImpl::dumpIcalRecurrence( const icalrecurrencetype &r )
while ( ( i = r.by_month[index++] ) != ICAL_RECURRENCE_ARRAY_MAX ) {
out.append( QString::number( i ) + ' ' );
}
- kDebug() << out;
+ qDebug() << out;
}
if ( r.by_set_pos[0] != ICAL_RECURRENCE_ARRAY_MAX ) {
int index = 0;
QString out = " By Set Pos: ";
while ( ( i = r.by_set_pos[index++] ) != ICAL_RECURRENCE_ARRAY_MAX ) {
- kDebug() << "=========" << i;
+ qDebug() << "=========" << i;
out.append( QString::number( i ) + ' ' );
}
- kDebug() << out;
+ qDebug() << out;
}
}
*/
@@ -2815,7 +2815,7 @@ icalcomponent *ICalFormatImpl::createScheduleComponent( const IncidenceBase::Ptr
it != zmaps.constEnd(); ++it ) {
icaltimezone *icaltz = (*it).icalTimezone();
if ( !icaltz ) {
- kError() << "bad time zone";
+ qWarning() << "bad time zone";
} else {
icalcomponent *tz = icalcomponent_new_clone( icaltimezone_get_component( icaltz ) );
icalcomponent_add_component( message, tz );
@@ -2823,7 +2823,7 @@ icalcomponent *ICalFormatImpl::createScheduleComponent( const IncidenceBase::Ptr
}
}
} else {
- kDebug() << "No incidence";
+ qDebug() << "No incidence";
return message;
}
@@ -2855,7 +2855,7 @@ icalcomponent *ICalFormatImpl::createScheduleComponent( const IncidenceBase::Ptr
icalmethod = ICAL_METHOD_DECLINECOUNTER;
break;
default:
- kDebug() << "Unknown method";
+ qDebug() << "Unknown method";
return message;
}
diff --git a/kcalcore/icalformat_p.h b/kcalcore/icalformat_p.h
index 128ff7e..5278615 100644
--- a/kcalcore/icalformat_p.h
+++ b/kcalcore/icalformat_p.h
@@ -41,7 +41,7 @@
#include "calendar.h"
#include "schedulemessage.h"
-#include <KDateTime>
+#include <kdatetime.h>
#include <ical.h>
diff --git a/kcalcore/icaltimezones.cpp b/kcalcore/icaltimezones.cpp
index 88a183e..00974e6 100644
--- a/kcalcore/icaltimezones.cpp
+++ b/kcalcore/icaltimezones.cpp
@@ -26,9 +26,9 @@
#include "recurrence.h"
#include "recurrencerule.h"
-#include <KDebug>
-#include <KDateTime>
-#include <KSystemTimeZone>
+#include <QtCore/QDebug>
+#include <kdatetime.h>
+#include <ksystemtimezone.h>
#include <QtCore/QDateTime>
#include <QtCore/QFile>
@@ -496,7 +496,7 @@ ICalTimeZoneData::ICalTimeZoneData( const KTimeZoneData &rhs,
TIME_ZONE_INFORMATION currentTimeZone;
GetTimeZoneInformation( &currentTimeZone );
if ( QString::fromWCharArray( currentTimeZone.StandardName ) != tz.name() ) {
- kDebug() << "VTIMEZONE entry will be invalid for: " << tz.name();
+ qDebug() << "VTIMEZONE entry will be invalid for: " << tz.name();
} else {
const SYSTEMTIME std = currentTimeZone.StandardDate;
const SYSTEMTIME dlt = currentTimeZone.DaylightDate;
@@ -531,7 +531,7 @@ ICalTimeZoneData::ICalTimeZoneData( const KTimeZoneData &rhs,
}
#endif // Q_OS_WINCE
if ( transits.isEmpty() ) {
- kDebug() << "No transition information available VTIMEZONE will be invalid.";
+ qDebug() << "No transition information available VTIMEZONE will be invalid.";
}
}
if ( earliest.isValid() ) {
@@ -940,7 +940,7 @@ ICalTimeZone ICalTimeZoneSource::parse( icalcomponent *vtimezone )
if ( t.is_utc ) {
data->d->lastModified = toQDateTime( t );
} else {
- kDebug() << "LAST-MODIFIED not UTC";
+ qDebug() << "LAST-MODIFIED not UTC";
}
break;
}
@@ -951,7 +951,7 @@ ICalTimeZone ICalTimeZoneSource::parse( icalcomponent *vtimezone )
}
if ( name.isEmpty() ) {
- kDebug() << "TZID missing";
+ qDebug() << "TZID missing";
delete data;
return ICalTimeZone();
}
@@ -966,7 +966,7 @@ ICalTimeZone ICalTimeZoneSource::parse( icalcomponent *vtimezone )
name = name.mid( i + 1 );
}
}
- //kDebug() << "---zoneId: \"" << name << '"';
+ //qDebug() << "---zoneId: \"" << name << '"';
/*
* Iterate through all time zone rules for this VTIMEZONE,
@@ -986,17 +986,17 @@ ICalTimeZone ICalTimeZoneSource::parse( icalcomponent *vtimezone )
switch ( kind ) {
case ICAL_XSTANDARD_COMPONENT:
- //kDebug() << "---standard phase: found";
+ //qDebug() << "---standard phase: found";
times = ICalTimeZoneSourcePrivate::parsePhase( c, false, prevoff, phase );
break;
case ICAL_XDAYLIGHT_COMPONENT:
- //kDebug() << "---daylight phase: found";
+ //qDebug() << "---daylight phase: found";
times = ICalTimeZoneSourcePrivate::parsePhase( c, true, prevoff, phase );
break;
default:
- kDebug() << "Unknown component:" << int( kind );
+ qDebug() << "Unknown component:" << int( kind );
break;
}
const int tcount = times.count();
@@ -1026,7 +1026,7 @@ ICalTimeZone ICalTimeZoneSource::parse( icalcomponent *vtimezone )
data->setTransitions( transitions );
data->d->setComponent( icalcomponent_new_clone( vtimezone ) );
- kDebug() << "VTIMEZONE" << name;
+ qDebug() << "VTIMEZONE" << name;
return ICalTimeZone( this, name, data );
}
@@ -1287,7 +1287,7 @@ QList<QDateTime> ICalTimeZoneSourcePrivate::parsePhase( icalcomponent *c,
break;
default:
- kDebug() << "Unknown property:" << int( kind );
+ qDebug() << "Unknown property:" << int( kind );
break;
}
p = icalcomponent_get_next_property( c, ICAL_ANY_PROPERTY );
@@ -1295,7 +1295,7 @@ QList<QDateTime> ICalTimeZoneSourcePrivate::parsePhase( icalcomponent *c,
// Validate the phase data
if ( !found_dtstart || !found_tzoffsetfrom || !found_tzoffsetto ) {
- kDebug() << "DTSTART/TZOFFSETFROM/TZOFFSETTO missing";
+ qDebug() << "DTSTART/TZOFFSETFROM/TZOFFSETTO missing";
return transitions;
}
@@ -1396,7 +1396,7 @@ ICalTimeZone ICalTimeZoneSource::standardZone( const QString &zone, bool icalBui
if ( ktz.isValid() ) {
if ( ktz.data( true ) ) {
const ICalTimeZone icaltz( ktz );
- //kDebug() << zone << " read from system database";
+ //qDebug() << zone << " read from system database";
return icaltz;
}
}
@@ -1427,7 +1427,7 @@ QByteArray ICalTimeZoneSource::icalTzidPrefix()
return ICalTimeZoneSourcePrivate::icalTzidPrefix;
}
}
- kError() << "failed to get libical TZID prefix";
+ qWarning() << "failed to get libical TZID prefix";
}
return ICalTimeZoneSourcePrivate::icalTzidPrefix;
}
diff --git a/kcalcore/incidence.cpp b/kcalcore/incidence.cpp
index 47207a2..7b143e6 100644
--- a/kcalcore/incidence.cpp
+++ b/kcalcore/incidence.cpp
@@ -34,9 +34,9 @@
#include "incidence.h"
#include "calformat.h"
+#include <QtCore/qtemporaryfile.h>
-#include <KMimeType>
-#include <KTemporaryFile>
+#include <kmimetype.h>
#include <QTextDocument> // for Qt::escape() and Qt::mightBeRichText()
@@ -739,12 +739,12 @@ QString Incidence::writeAttachmentToTempFile( const Attachment::Ptr &attachment
if ( d->mTempFiles.contains( attachment ) ) {
return d->mTempFiles.value( attachment );
}
- KTemporaryFile *file = new KTemporaryFile();
+ QTemporaryFile *file = new QTemporaryFile();
QStringList patterns = KMimeType::mimeType( attachment->mimeType() )->patterns();
if ( !patterns.empty() ) {
- file->setSuffix( QString( patterns.first() ).remove( '*' ) );
+ file->setFileTemplate(QLatin1String("XXXXXX.")+QString( patterns.first() ).remove( '*' ));
}
file->setAutoRemove( true );
file->open();
diff --git a/kcalcore/incidencebase.cpp b/kcalcore/incidencebase.cpp
index 846e845..9dd3a4e 100644
--- a/kcalcore/incidencebase.cpp
+++ b/kcalcore/incidencebase.cpp
@@ -38,11 +38,12 @@
#include "calformat.h"
#include "visitor.h"
-#include <QDebug>
+#include <QtCore/QDebug>
-#include <KUrl>
+// #include <KUrl>
#include <QtCore/QStringList>
+#include <QUrl>
using namespace KCalCore;
@@ -627,9 +628,9 @@ void IncidenceBase::setFieldDirty( IncidenceBase::Field field )
d->mDirtyFields.insert( field );
}
-KUrl IncidenceBase::uri() const
+QUrl IncidenceBase::uri() const
{
- return KUrl( QString( "urn:x-ical:" ) + uid() );
+ return QUrl( QString( "urn:x-ical:" ) + uid() );
}
void IncidenceBase::setDirtyFields( const QSet<IncidenceBase::Field> &dirtyFields )
diff --git a/kcalcore/incidencebase.h b/kcalcore/incidencebase.h
index 3a25091..9bc3661 100644
--- a/kcalcore/incidencebase.h
+++ b/kcalcore/incidencebase.h
@@ -235,7 +235,7 @@ class KCALCORE_EXPORT IncidenceBase : public CustomProperties
if ( i1.type() == i2.type() ) {
i1 = i2;
} else {
- kDebug() << "Invalid assignment!";
+ qDebug() << "Invalid assignment!";
}
@endcode
@@ -298,7 +298,7 @@ class KCALCORE_EXPORT IncidenceBase : public CustomProperties
/**
Returns the uri for the incidence, of form urn:x-ical:\<uid\>
*/
- KUrl uri() const;
+ QUrl uri() const;
/**
Sets the time the incidence was last modified to @p lm.
diff --git a/kcalcore/journal.cpp b/kcalcore/journal.cpp
index e6d22bb..8cb1dd4 100644
--- a/kcalcore/journal.cpp
+++ b/kcalcore/journal.cpp
@@ -32,7 +32,7 @@
#include "journal.h"
#include "visitor.h"
-#include <KDebug>
+#include <QtCore/QDebug>
using namespace KCalCore;
@@ -98,7 +98,7 @@ void Journal::setDateTime( const KDateTime &dateTime, DateTimeRole role )
break;
}
default:
- kDebug() << "Unhandled role" << role;
+ qDebug() << "Unhandled role" << role;
}
}
diff --git a/kcalcore/kcalcore_export.h b/kcalcore/kcalcore_export.h
new file mode 100644
index 0000000..364c818
--- /dev/null
+++ b/kcalcore/kcalcore_export.h
@@ -0,0 +1,69 @@
+/*
+ This file is part of the kcalcore library.
+
+ Copyright (C) 2004 Dirk Mueller <mueller@kde.org>
+
+ 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 KCALCORE_EXPORT_H
+#define KCALCORE_EXPORT_H
+
+#include <kdemacros.h>
+
+#ifndef KCALCORE_EXPORT
+# if defined(KDEPIM_STATIC_LIBS)
+ /* No export/import for static libraries */
+# define KCALCORE_EXPORT
+# elif defined(MAKE_KCALCORE_LIB)
+ /* We are building this library */
+# define KCALCORE_EXPORT KDE_EXPORT
+# else
+ /* We are using this library */
+# define KCALCORE_EXPORT KDE_IMPORT
+# endif
+#endif
+
+# ifndef KCALCORE_EXPORT_DEPRECATED
+# if !defined( WANT_DEPRECATED_KCALCORE_API )
+# define KCALCORE_EXPORT_DEPRECATED KDE_DEPRECATED KCALCORE_EXPORT
+# else
+# define KCALCORE_EXPORT_DEPRECATED KCALCORE_EXPORT
+# endif
+# endif
+
+#ifdef COMPILING_TESTS
+#ifndef KCALCORE_TEST_EXPORT
+# if defined(KDEPIM_STATIC_LIBS)
+ /* No export/import for static libraries */
+# define KCALCORE_TEST_EXPORT
+# elif defined(MAKE_KCALCORE_TEST_LIB)
+ /* We are building this library */
+# define KCALCORE_TEST_EXPORT KDE_EXPORT
+# else
+ /* We are using this library */
+# define KCALCORE_TEST_EXPORT KDE_IMPORT
+# endif
+#endif
+#endif /* COMPILING_TESTS */
+
+/**
+ @namespace KCalCore
+
+ @brief
+ Contains all the KCalCore library global classes, objects, and functions.
+*/
+
+#endif
diff --git a/kcalcore/memorycalendar.cpp b/kcalcore/memorycalendar.cpp
index e2fd3d7..397382b 100644
--- a/kcalcore/memorycalendar.cpp
+++ b/kcalcore/memorycalendar.cpp
@@ -34,7 +34,7 @@
#include "memorycalendar.h"
-#include <KDebug>
+#include <QtCore/QDebug>
using namespace KCalCore;
@@ -154,7 +154,7 @@ bool MemoryCalendar::deleteIncidence( const Incidence::Ptr &incidence )
}
return true;
} else {
- kWarning() << incidence->typeStr() << " not found.";
+ qWarning() << incidence->typeStr() << " not found.";
return false;
}
}
@@ -167,11 +167,11 @@ bool MemoryCalendar::deleteIncidenceInstances( const Incidence::Ptr &incidence )
for ( it = values.constBegin(); it != values.constEnd(); ++it ) {
Incidence::Ptr i = *it;
if ( i->hasRecurrenceId() ) {
- kDebug() << "deleting child"
- << ", type=" << int( type )
- << ", uid=" << i->uid()
- << ", start=" << i->dtStart()
- << " from calendar";
+// qDebug() << "deleting child"
+// << ", type=" << int( type )
+// << ", uid=" << i->uid()
+// << ", start=" << i->dtStart()
+// << " from calendar";
deleteIncidence( i );
}
}
diff --git a/kcalcore/period.cpp b/kcalcore/period.cpp
index 53f4bdf..df5da88 100644
--- a/kcalcore/period.cpp
+++ b/kcalcore/period.cpp
@@ -32,8 +32,8 @@
#include "period.h"
-#include <KDateTime>
-#include <KSystemTimeZone>
+#include <kdatetime.h>
+#include <ksystemtimezone.h>
#include <QtCore/QHash>
diff --git a/kcalcore/recurrence.cpp b/kcalcore/recurrence.cpp
index 622fbca..27d3b62 100644
--- a/kcalcore/recurrence.cpp
+++ b/kcalcore/recurrence.cpp
@@ -23,7 +23,7 @@
*/
#include "recurrence.h"
-#include <KDebug>
+#include <QtCore/QDebug>
#include <QtCore/QBitArray>
@@ -72,7 +72,7 @@ class KCalCore::Recurrence::Private
bool Recurrence::Private::operator==( const Recurrence::Private &p ) const
{
- kDebug() << mStartDateTime << p.mStartDateTime;
+// qDebug() << mStartDateTime << p.mStartDateTime;
if ( ( mStartDateTime != p.mStartDateTime &&
( mStartDateTime.isValid() || p.mStartDateTime.isValid() ) ) ||
@@ -880,7 +880,7 @@ void Recurrence::addYearlyMonth( short month )
TimeList Recurrence::recurTimesOn( const QDate &date, const KDateTime::Spec &timeSpec ) const
{
-// kDebug() << "recurTimesOn(" << date << ")";
+// qDebug() << "recurTimesOn(" << date << ")";
int i, end;
TimeList times;
@@ -1347,41 +1347,41 @@ void Recurrence::recurrenceChanged( RecurrenceRule * )
void Recurrence::dump() const
{
- kDebug();
+ qDebug();
int i;
int count = d->mRRules.count();
- kDebug() << " -)" << count << "RRULEs:";
+ qDebug() << " -)" << count << "RRULEs:";
for ( i = 0; i < count; ++i ) {
- kDebug() << " -) RecurrenceRule: ";
+ qDebug() << " -) RecurrenceRule: ";
d->mRRules[i]->dump();
}
count = d->mExRules.count();
- kDebug() << " -)" << count << "EXRULEs:";
+ qDebug() << " -)" << count << "EXRULEs:";
for ( i = 0; i < count; ++i ) {
- kDebug() << " -) ExceptionRule :";
+ qDebug() << " -) ExceptionRule :";
d->mExRules[i]->dump();
}
count = d->mRDates.count();
- kDebug() << endl << " -)" << count << "Recurrence Dates:";
+ qDebug() << endl << " -)" << count << "Recurrence Dates:";
for ( i = 0; i < count; ++i ) {
- kDebug() << " " << d->mRDates[i];
+ qDebug() << " " << d->mRDates[i];
}
count = d->mRDateTimes.count();
- kDebug() << endl << " -)" << count << "Recurrence Date/Times:";
+ qDebug() << endl << " -)" << count << "Recurrence Date/Times:";
for ( i = 0; i < count; ++i ) {
- kDebug() << " " << d->mRDateTimes[i].dateTime();
+ qDebug() << " " << d->mRDateTimes[i].dateTime();
}
count = d->mExDates.count();
- kDebug() << endl << " -)" << count << "Exceptions Dates:";
+ qDebug() << endl << " -)" << count << "Exceptions Dates:";
for ( i = 0; i < count; ++i ) {
- kDebug() << " " << d->mExDates[i];
+ qDebug() << " " << d->mExDates[i];
}
count = d->mExDateTimes.count();
- kDebug() << endl << " -)" << count << "Exception Date/Times:";
+ qDebug() << endl << " -)" << count << "Exception Date/Times:";
for ( i = 0; i < count; ++i ) {
- kDebug() << " " << d->mExDateTimes[i].dateTime();
+ qDebug() << " " << d->mExDateTimes[i].dateTime();
}
}
diff --git a/kcalcore/recurrencerule.cpp b/kcalcore/recurrencerule.cpp
index 4dbb9d3..648d242 100644
--- a/kcalcore/recurrencerule.cpp
+++ b/kcalcore/recurrencerule.cpp
@@ -21,7 +21,7 @@
*/
#include "recurrencerule.h"
-#include <KDebug>
+#include <QtCore/QDebug>
#include <QtCore/QStringList>
@@ -1363,7 +1363,7 @@ bool RecurrenceRule::Private::buildCache() const
// it = dts.begin();
// while ( it != dts.end() ) {
-// kDebug() << " -=>" << dumpTime(*it);
+// qDebug() << " -=>" << dumpTime(*it);
// ++it;
// }
if ( int( dts.count() ) == mDuration ) {
@@ -2000,13 +2000,13 @@ DateTimeList RecurrenceRule::Private::datesForInterval( const Constraint &interv
lst.sortUnique();
/*if ( lst.isEmpty() ) {
- kDebug() << " No Dates in Interval";
+ qDebug() << " No Dates in Interval";
} else {
- kDebug() << " Dates:";
+ qDebug() << " Dates:";
for ( int i = 0, iend = lst.count(); i < iend; ++i ) {
- kDebug()<< " -)" << dumpTime(lst[i]);
+ qDebug()<< " -)" << dumpTime(lst[i]);
}
- kDebug() << " ---------------------";
+ qDebug() << " ---------------------";
}*/
if ( !mBySetPos.isEmpty() ) {
DateTimeList tmplst = lst;
@@ -2033,15 +2033,15 @@ DateTimeList RecurrenceRule::Private::datesForInterval( const Constraint &interv
void RecurrenceRule::dump() const
{
#ifndef NDEBUG
- kDebug();
+ qDebug();
if ( !d->mRRule.isEmpty() ) {
- kDebug() << " RRULE=" << d->mRRule;
+ qDebug() << " RRULE=" << d->mRRule;
}
- kDebug() << " Read-Only:" << isReadOnly();
+ qDebug() << " Read-Only:" << isReadOnly();
- kDebug() << " Period type:" << int( recurrenceType() ) << ", frequency:" << frequency();
- kDebug() << " #occurrences:" << duration();
- kDebug() << " start date:" << dumpTime( startDt() )
+ qDebug() << " Period type:" << int( recurrenceType() ) << ", frequency:" << frequency();
+ qDebug() << " #occurrences:" << duration();
+ qDebug() << " start date:" << dumpTime( startDt() )
<< ", end date:" << dumpTime( endDt() );
#define dumpByIntList(list,label) \
@@ -2050,7 +2050,7 @@ void RecurrenceRule::dump() const
for ( int i = 0, iend = list.count(); i < iend; ++i ) {\
lst.append( QString::number( list[i] ) );\
}\
- kDebug() << " " << label << lst.join( ", " );\
+ qDebug() << " " << label << lst.join( ", " );\
}
dumpByIntList( d->mBySeconds, "BySeconds: " );
dumpByIntList( d->mByMinutes, "ByMinutes: " );
@@ -2061,7 +2061,7 @@ void RecurrenceRule::dump() const
lst.append( ( d->mByDays[i].pos() ? QString::number( d->mByDays[i].pos() ) : "" ) +
DateHelper::dayName( d->mByDays[i].day() ) );
}
- kDebug() << " ByDays: " << lst.join( ", " );
+ qDebug() << " ByDays: " << lst.join( ", " );
}
dumpByIntList( d->mByMonthDays, "ByMonthDays:" );
dumpByIntList( d->mByYearDays, "ByYearDays: " );
@@ -2070,9 +2070,9 @@ void RecurrenceRule::dump() const
dumpByIntList( d->mBySetPos, "BySetPos: " );
#undef dumpByIntList
- kDebug() << " Week start:" << DateHelper::dayName( d->mWeekStart ); //krazy:exclude=kdebug
+ qDebug() << " Week start:" << DateHelper::dayName( d->mWeekStart ); //krazy:exclude=kdebug
- kDebug() << " Constraints:";
+ qDebug() << " Constraints:";
// dump constraints
for ( int i = 0, iend = d->mConstraints.count(); i < iend; ++i ) {
d->mConstraints[i].dump();
@@ -2083,7 +2083,7 @@ void RecurrenceRule::dump() const
//@cond PRIVATE
void Constraint::dump() const
{
- kDebug() << " ~> Y=" << year
+ qDebug() << " ~> Y=" << year
<< ", M=" << month
<< ", D=" << day
<< ", H=" << hour
diff --git a/kcalcore/sorting.cpp b/kcalcore/sorting.cpp
index 17a9180..087f960 100644
--- a/kcalcore/sorting.cpp
+++ b/kcalcore/sorting.cpp
@@ -24,7 +24,7 @@
#include "journal.h"
#include "todo.h"
-#include <KDateTime>
+#include <kdatetime.h>
// PENDING(kdab) Review
// The QString::compare() need to be replace by a DUI string comparisons.
diff --git a/kcalcore/tests/incidencestest.cpp b/kcalcore/tests/incidencestest.cpp
index 007f9d3..f0ec432 100644
--- a/kcalcore/tests/incidencestest.cpp
+++ b/kcalcore/tests/incidencestest.cpp
@@ -61,7 +61,7 @@ int main( int argc, char **argv )
QString eventString1 = f.toString( event1.staticCast<Incidence>() );
if ( verbose ) {
- kDebug() << "EVENT1 START:" << eventString1 << "EVENT1 END";
+ qDebug() << "EVENT1 START:" << eventString1 << "EVENT1 END";
}
event1->setSchedulingID( "foo" );
@@ -72,31 +72,31 @@ int main( int argc, char **argv )
QString eventString2 = f.toString( event2.staticCast<Incidence>() );
if( verbose ) {
- kDebug() << "EVENT2 START:" << eventString2 << "EVENT2 END";
+ qDebug() << "EVENT2 START:" << eventString2 << "EVENT2 END";
}
if ( eventString1 != eventString2 ) {
- kDebug() << "Clone Event FAILED.";
+ qDebug() << "Clone Event FAILED.";
} else {
- kDebug() << "Clone Event SUCCEEDED.";
+ qDebug() << "Clone Event SUCCEEDED.";
}
Todo::Ptr todo1 = Todo::Ptr( new Todo );
todo1->setSummary( "Test todo" );
QString todoString1 = f.toString( todo1.staticCast<Incidence>() );
if( verbose ) {
- kDebug() << "todo1 START:" << todoString1 << "todo1 END";
+ qDebug() << "todo1 START:" << todoString1 << "todo1 END";
}
Incidence::Ptr todo2 = Incidence::Ptr( todo1->clone() );
QString todoString2 = f.toString( todo2 );
if( verbose ) {
- kDebug() << "todo2 START:" << todoString2 << "todo2 END";
+ qDebug() << "todo2 START:" << todoString2 << "todo2 END";
}
if ( todoString1 != todoString2 ) {
- kDebug() << "Clone Todo FAILED.";
+ qDebug() << "Clone Todo FAILED.";
} else {
- kDebug() << "Clone Todo SUCCEEDED.";
+ qDebug() << "Clone Todo SUCCEEDED.";
}
}
diff --git a/kcalcore/tests/loadcalendar.cpp b/kcalcore/tests/loadcalendar.cpp
index 4aa76e3..1f5dc3b 100644
--- a/kcalcore/tests/loadcalendar.cpp
+++ b/kcalcore/tests/loadcalendar.cpp
@@ -54,14 +54,14 @@ int main( int argc, char **argv )
// Build dictionary to look up Task object from Todo uid. Each task is a
// QListViewItem, and is initially added with the view as the parent.
todoList = cal->rawTodos();
- kDebug() << ( *todoList.begin() )->uid();
+ qDebug() << ( *todoList.begin() )->uid();
QString result = ( *todoList.begin() )->customProperty( QByteArray( "karm" ),
QByteArray( "totalTaskTime" ) );
- kDebug() << result;
+ qDebug() << result;
if ( result != QString( "a,b" ) ) {
- kDebug() << "The string a,b was expected, but given was" << result;
+ qDebug() << "The string a,b was expected, but given was" << result;
return 1;
} else {
- kDebug() << "Test passed";
+ qDebug() << "Test passed";
}
}
diff --git a/kcalcore/tests/readandwrite.cpp b/kcalcore/tests/readandwrite.cpp
index e365f0f..881c5b9 100644
--- a/kcalcore/tests/readandwrite.cpp
+++ b/kcalcore/tests/readandwrite.cpp
@@ -62,14 +62,14 @@ int main( int argc, char **argv )
QFileInfo outputFileInfo( output );
output = outputFileInfo.absoluteFilePath();
- kDebug() << "Input file:" << input;
- kDebug() << "Output file:" << output;
+ qDebug() << "Input file:" << input;
+ qDebug() << "Output file:" << output;
MemoryCalendar::Ptr cal( new MemoryCalendar( KDateTime::UTC ) );
FileStorage instore( cal, input );
if ( !instore.load() ) {
- kDebug() << "DAMN";
+ qDebug() << "DAMN";
return 1;
}
QString tz = cal->nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
diff --git a/kcalcore/tests/testfb.cpp b/kcalcore/tests/testfb.cpp
index 569983b..08d2b74 100644
--- a/kcalcore/tests/testfb.cpp
+++ b/kcalcore/tests/testfb.cpp
@@ -52,15 +52,15 @@ int main( int, char ** )
ICalFormat format;
FreeBusy::Ptr fb = format.parseFreeBusy( fbString );
- kDebug() << fb->fullBusyPeriods().count() << " " << fb->dtStart();
+ qDebug() << fb->fullBusyPeriods().count() << " " << fb->dtStart();
const FreeBusyPeriod::List l = fb->fullBusyPeriods();
for ( FreeBusyPeriod::List::ConstIterator it = l.begin(); it != l.end(); ++it ) {
- kDebug() << (*it).start() << " " << (*it).end() << "+ "
+ qDebug() << (*it).start() << " " << (*it).end() << "+ "
<< (*it).summary() << ":" << (*it).location();
}
typedef QMap<QByteArray, QString> FooMap;
const FooMap props = fb->customProperties();
for ( FooMap::ConstIterator it = props.begin(); it != props.end(); ++it ) {
- kDebug() << it.key() << ": " << it.value();
+ qDebug() << it.key() << ": " << it.value();
}
}
diff --git a/kcalcore/tests/testfilestorage.cpp b/kcalcore/tests/testfilestorage.cpp
index f7e22b8..85c0dfb 100644
--- a/kcalcore/tests/testfilestorage.cpp
+++ b/kcalcore/tests/testfilestorage.cpp
@@ -22,7 +22,7 @@
#include "../filestorage.h"
#include "../memorycalendar.h"
-#include <KDebug>
+#include <QtCore/QDebug>
#include <unistd.h>
diff --git a/kcalcore/tests/testicalformat.cpp b/kcalcore/tests/testicalformat.cpp
index 55e79ca..72f510d 100644
--- a/kcalcore/tests/testicalformat.cpp
+++ b/kcalcore/tests/testicalformat.cpp
@@ -25,7 +25,7 @@
#include "../icalformat.h"
#include "../memorycalendar.h"
-#include <KDebug>
+#include <QtCore/QDebug>
#include <kdatetime.h>
#include <qtest_kde.h>
@@ -84,8 +84,8 @@ void ICalFormatTest::testCharsets()
QVERIFY( format.load( calendar2, "hommer.ics" ) );
QVERIFY( calendar2->incidences().count() == 1 );
- // kDebug() << format.toString( event.staticCast<Incidence>() );
- // kDebug() << format.toString( calendar2->incidences().first() );
+ // qDebug() << format.toString( event.staticCast<Incidence>() );
+ // qDebug() << format.toString( calendar2->incidences().first() );
Event::Ptr loadedEvent = calendar2->incidences().first().staticCast<Event>();
QVERIFY( loadedEvent->summary().toUtf8() == QByteArray( utf_umlaut ) );
diff --git a/kcalcore/tests/testmemorycalendar.cpp b/kcalcore/tests/testmemorycalendar.cpp
index c14755c..50856b5 100644
--- a/kcalcore/tests/testmemorycalendar.cpp
+++ b/kcalcore/tests/testmemorycalendar.cpp
@@ -139,12 +139,12 @@ void MemoryCalendarTest::testRelationsCrash()
FileStorage store1( cal, ICALTESTDATADIR "test_relations.ics" );
store1.load();
const Todo::List oldTodos = cal->todos();
- kDebug()<<"Loaded " << oldTodos.count() << " todos into oldTodos.";
+ qDebug()<<"Loaded " << oldTodos.count() << " todos into oldTodos.";
FileStorage store2( cal, ICALTESTDATADIR "test_relations.ics" );
store2.load();
const Todo::List newTodos = cal->todos();
- kDebug()<<"Loaded " << newTodos.count() << " into newTodos.";
+ qDebug()<<"Loaded " << newTodos.count() << " into newTodos.";
// We can saftely access the old deleted todos here, since they are not really deleted
// and are still kept in a map of deleted items somewhere.
diff --git a/kcalcore/tests/testrecurprevious.cpp b/kcalcore/tests/testrecurprevious.cpp
index 0ebf169..0697fe5 100644
--- a/kcalcore/tests/testrecurprevious.cpp
+++ b/kcalcore/tests/testrecurprevious.cpp
@@ -59,18 +59,18 @@ int main( int argc, char **argv )
}
QString input = args->arg( 0 );
- kDebug() << "Input file:" << input;
+ qDebug() << "Input file:" << input;
QTextStream *outstream;
outstream = 0;
QString fn( "" );
if ( args->count() > 1 ) {
fn = args->arg( 1 );
- kDebug() << "We have a file name given:" << fn;
+ qDebug() << "We have a file name given:" << fn;
}
QFile outfile( fn );
if ( !fn.isEmpty() && outfile.open( QIODevice::WriteOnly ) ) {
- kDebug() << "Opened output file!!!";
+ qDebug() << "Opened output file!!!";
outstream = new QTextStream( &outfile );
}
@@ -88,8 +88,8 @@ int main( int argc, char **argv )
for ( Incidence::List::Iterator it = inc.begin(); it != inc.end(); ++it ) {
Incidence::Ptr incidence = *it;
- kDebug() << "*+*+*+*+*+*+*+*+*+*";
- kDebug() << " ->" << incidence->summary() << "<-";
+ qDebug() << "*+*+*+*+*+*+*+*+*+*";
+ qDebug() << " ->" << incidence->summary() << "<-";
incidence->recurrence()->dump();
@@ -105,8 +105,8 @@ int main( int argc, char **argv )
} else {
dt = dt.addYears( 2 );
}
- kDebug() << "-------------------------------------------";
- kDebug() << " *~*~*~*~ Starting with date:" << dumpTime( dt, viewSpec );
+ qDebug() << "-------------------------------------------";
+ qDebug() << " *~*~*~*~ Starting with date:" << dumpTime( dt, viewSpec );
// Output to file for testing purposes
while ( dt.isValid() && i < 500 ) {
++i;
@@ -122,15 +122,15 @@ int main( int argc, char **argv )
dt = dt.addYears( 2 );
}
incidence->recurrence()->dump();
- kDebug() << "-------------------------------------------";
- kDebug() << " *~*~*~*~ Starting with date:" << dumpTime( dt, viewSpec );
+ qDebug() << "-------------------------------------------";
+ qDebug() << " *~*~*~*~ Starting with date:" << dumpTime( dt, viewSpec );
// Output to konsole
while ( dt.isValid() && i < 50 ) {
++i;
- kDebug() << "-------------------------------------------";
+ qDebug() << "-------------------------------------------";
dt = incidence->recurrence()->getPreviousDateTime( dt );
if ( dt.isValid() ) {
- kDebug() << " *~*~*~*~ Previous date is:" << dumpTime( dt, viewSpec );
+ qDebug() << " *~*~*~*~ Previous date is:" << dumpTime( dt, viewSpec );
}
}
}
diff --git a/kcalcore/tests/testrecurrence.cpp b/kcalcore/tests/testrecurrence.cpp
index 6248f8e..f76581a 100644
--- a/kcalcore/tests/testrecurrence.cpp
+++ b/kcalcore/tests/testrecurrence.cpp
@@ -60,18 +60,18 @@ int main( int argc, char **argv )
}
QString input = args->arg( 0 );
- kDebug() << "Input file:" << input;
+ qDebug() << "Input file:" << input;
QTextStream *outstream;
outstream = 0;
QString fn( "" );
if ( args->count() > 1 ) {
fn = args->arg( 1 );
- kDebug() << "We have a file name given:" << fn;
+ qDebug() << "We have a file name given:" << fn;
}
QFile outfile( fn );
if ( !fn.isEmpty() && outfile.open( QIODevice::WriteOnly ) ) {
- kDebug() << "Opened output file!!!";
+ qDebug() << "Opened output file!!!";
outstream = new QTextStream( &outfile );
}
@@ -89,8 +89,8 @@ int main( int argc, char **argv )
for ( Incidence::List::Iterator it = inc.begin(); it != inc.end(); ++it ) {
Incidence::Ptr incidence = *it;
- kDebug() << "*+*+*+*+*+*+*+*+*+*";
- kDebug() << " ->" << incidence->summary() << "<-";
+ qDebug() << "*+*+*+*+*+*+*+*+*+*";
+ qDebug() << " ->" << incidence->summary() << "<-";
incidence->recurrence()->dump();
@@ -115,10 +115,10 @@ int main( int argc, char **argv )
// Output to konsole
while ( dt.isValid() && i < 10 ) {
++i;
- kDebug() << "-------------------------------------------";
+ qDebug() << "-------------------------------------------";
dt = incidence->recurrence()->getNextDateTime( dt );
if ( dt.isValid() ) {
- kDebug() << " *~*~*~*~ Next date is:" << dumpTime( dt, viewSpec );
+ qDebug() << " *~*~*~*~ Next date is:" << dumpTime( dt, viewSpec );
}
}
}
diff --git a/kcalcore/tests/testrecurrencetype.cpp b/kcalcore/tests/testrecurrencetype.cpp
index 0cd0130..89e7b3d 100644
--- a/kcalcore/tests/testrecurrencetype.cpp
+++ b/kcalcore/tests/testrecurrencetype.cpp
@@ -59,18 +59,18 @@ int main( int argc, char **argv )
}
QString input = args->arg( 0 );
- kDebug() << "Input file:" << input;
+ qDebug() << "Input file:" << input;
QTextStream *outstream;
outstream = 0;
QString fn( "" );
if ( args->count() > 1 ) {
fn = args->arg( 1 );
- kDebug() << "We have a file name given:" << fn;
+ qDebug() << "We have a file name given:" << fn;
}
QFile outfile( fn );
if ( !fn.isEmpty() && outfile.open( QIODevice::WriteOnly ) ) {
- kDebug() << "Opened output file!!!";
+ qDebug() << "Opened output file!!!";
outstream = new QTextStream( &outfile );
}
@@ -88,8 +88,8 @@ int main( int argc, char **argv )
for ( Incidence::List::Iterator it = inc.begin(); it != inc.end(); ++it ) {
Incidence::Ptr incidence = *it;
- kDebug() << "*+*+*+*+*+*+*+*+*+*";
- kDebug() << " ->" << incidence->summary() << "<-";
+ qDebug() << "*+*+*+*+*+*+*+*+*+*";
+ qDebug() << " ->" << incidence->summary() << "<-";
incidence->recurrence()->dump();
@@ -114,10 +114,10 @@ int main( int argc, char **argv )
// Output to konsole
while ( dt.isValid() && i<10 ) {
++i;
- kDebug() << "-------------------------------------------";
+ qDebug() << "-------------------------------------------";
dt = incidence->recurrence()->getNextDateTime( dt );
if ( dt.isValid() ) {
- kDebug() << " *~*~*~*~ Next date is:" << dumpTime( dt, viewSpec );
+ qDebug() << " *~*~*~*~ Next date is:" << dumpTime( dt, viewSpec );
}
}
}
diff --git a/kcalcore/tests/testrecurson.cpp b/kcalcore/tests/testrecurson.cpp
index 54ee679..84bf23f 100644
--- a/kcalcore/tests/testrecurson.cpp
+++ b/kcalcore/tests/testrecurson.cpp
@@ -57,18 +57,18 @@ int main( int argc, char **argv )
}
QString input = args->arg( 0 );
-// kDebug() << "Input file:" << input;
+// qDebug() << "Input file:" << input;
QTextStream *outstream;
outstream = 0;
QString fn( "" );
if ( args->count() > 1 ) {
fn = args->arg( 1 );
-// kDebug() << "We have a file name given:" << fn;
+// qDebug() << "We have a file name given:" << fn;
}
QFile outfile( fn );
if ( !fn.isEmpty() && outfile.open( QIODevice::WriteOnly ) ) {
-// kDebug() << "Opened output file!!!";
+// qDebug() << "Opened output file!!!";
outstream = new QTextStream( &outfile );
}
@@ -86,7 +86,7 @@ int main( int argc, char **argv )
for ( Incidence::List::Iterator it = inc.begin(); it != inc.end(); ++it ) {
Incidence::Ptr incidence = *it;
-// kDebug() << " ->" << incidence->summary() << "<-";
+// qDebug() << " ->" << incidence->summary() << "<-";
// incidence->recurrence()->dump();
@@ -105,7 +105,7 @@ int main( int argc, char **argv )
dt = QDate( 2005, 1, 1 );
while ( dt.year() < 2007 ) {
if ( incidence->recursOn( dt, cal->viewTimeSpec() ) ) {
- kDebug() << dt.toString( Qt::ISODate );
+ qDebug() << dt.toString( Qt::ISODate );
}
dt = dt.addDays( 1 );
}
diff --git a/kcalcore/tests/testrecurtodo.cpp b/kcalcore/tests/testrecurtodo.cpp
index d1b4c3e..13c093a 100644
--- a/kcalcore/tests/testrecurtodo.cpp
+++ b/kcalcore/tests/testrecurtodo.cpp
@@ -80,7 +80,7 @@ void RecurTodoTest::testNonAllDay()
currentTime,
todo->dtDue().timeSpec() ).addDays( 1 );
if ( !equal ) {
- kDebug() << "Test Failed. dtDue = " << todo->dtDue() << "OriginalDtDue:" << originalDtDue
+ qDebug() << "Test Failed. dtDue = " << todo->dtDue() << "OriginalDtDue:" << originalDtDue
<< "KDateTime:"
<< KDateTime( currentDate, currentTime, todo->dtDue().timeSpec() ).addDays( 1 );
}
diff --git a/kcalcore/tests/testtostring.cpp b/kcalcore/tests/testtostring.cpp
index d7c7e6e..43b9a5e 100644
--- a/kcalcore/tests/testtostring.cpp
+++ b/kcalcore/tests/testtostring.cpp
@@ -36,13 +36,13 @@ int main( int, char ** )
ev->setSummary( "Griazi" );
ICalFormat iformat;
QString icalstr = iformat.toICalString( ev );
- kDebug() << icalstr;
+ qDebug() << icalstr;
Incidence::Ptr ev2 = iformat.fromString( icalstr );
- kDebug() << "Event reread!";
+ qDebug() << "Event reread!";
if ( ev2 ) {
- kDebug() << iformat.toICalString( ev2 );
+ qDebug() << iformat.toICalString( ev2 );
} else {
- kDebug() << "Could not read incidence";
+ qDebug() << "Could not read incidence";
}
}
diff --git a/kcalcore/tests/testvcalexport.cpp b/kcalcore/tests/testvcalexport.cpp
index 5a6c02a..c3cf5de 100644
--- a/kcalcore/tests/testvcalexport.cpp
+++ b/kcalcore/tests/testvcalexport.cpp
@@ -63,8 +63,8 @@ int main( int argc, char **argv )
QFileInfo outputFileInfo( output );
output = outputFileInfo.absoluteFilePath();
- kDebug() << "Input file:" << input;
- kDebug() << "Output file:" << output;
+ qDebug() << "Input file:" << input;
+ qDebug() << "Output file:" << output;
MemoryCalendar::Ptr cal( new MemoryCalendar( KDateTime::UTC ) );
FileStorage instore( cal, input );
diff --git a/kcalcore/todo.cpp b/kcalcore/todo.cpp
index e98b2ee..83516d1 100644
--- a/kcalcore/todo.cpp
+++ b/kcalcore/todo.cpp
@@ -34,7 +34,7 @@
#include "todo.h"
#include "visitor.h"
-#include <KDebug>
+#include <QtCore/QDebug>
using namespace KCalCore;
@@ -549,7 +549,7 @@ void Todo::setDateTime( const KDateTime &dateTime, DateTimeRole role )
setDtDue( dateTime );
break;
default:
- kDebug() << "Unhandled role" << role;
+ qDebug() << "Unhandled role" << role;
}
}
diff --git a/kcalcore/vcalformat.cpp b/kcalcore/vcalformat.cpp
index 30ab47d..97ba180 100644
--- a/kcalcore/vcalformat.cpp
+++ b/kcalcore/vcalformat.cpp
@@ -43,8 +43,8 @@
#include "versit/vcc.h"
#include "versit/vobject.h"
-#include <KCodecs>
-#include <KDebug>
+#include <kcodecs.h>
+#include <QtCore/QDebug>
#include <QtCore/QBitArray>
#include <QtCore/QFile>
@@ -353,7 +353,7 @@ VObject *VCalFormat::eventToVTodo( const Todo::Ptr &anEvent )
tmpStr = "MAILTO:" + curAttendee->name() + " <" + curAttendee->email() + '>';
} else if ( curAttendee->name().isEmpty() && curAttendee->email().isEmpty() ) {
tmpStr = "MAILTO: ";
- kDebug() << "warning! this Event has an attendee w/o name or email!";
+ qDebug() << "warning! this Event has an attendee w/o name or email!";
} else if ( curAttendee->name().isEmpty() ) {
tmpStr = "MAILTO: " + curAttendee->email();
} else {
@@ -441,7 +441,7 @@ VObject *VCalFormat::eventToVTodo( const Todo::Ptr &anEvent )
}
default:
// TODO: Write rYearlyPos and arbitrary rules!
- kDebug() << "ERROR, it should never get here in eventToVTodo!";
+ qDebug() << "ERROR, it should never get here in eventToVTodo!";
validRecur = false;
break;
} // switch
@@ -699,7 +699,7 @@ VObject *VCalFormat::eventToVEvent( const Event::Ptr &anEvent )
tmpStr = "MAILTO:" + curAttendee->name() + " <" + curAttendee->email() + '>';
} else if ( curAttendee->name().isEmpty() && curAttendee->email().isEmpty() ) {
tmpStr = "MAILTO: ";
- kDebug() << "warning! this Event has an attendee w/o name or email!";
+ qDebug() << "warning! this Event has an attendee w/o name or email!";
} else if ( curAttendee->name().isEmpty() ) {
tmpStr = "MAILTO: " + curAttendee->email();
} else {
@@ -787,7 +787,7 @@ VObject *VCalFormat::eventToVEvent( const Event::Ptr &anEvent )
}
default:
// TODO: Write rYearlyPos and arbitrary rules!
- kDebug() << "ERROR, it should never get here in eventToVEvent!";
+ qDebug() << "ERROR, it should never get here in eventToVEvent!";
validRecur = false;
break;
} // switch
@@ -1364,7 +1364,7 @@ Todo::Ptr VCalFormat::VTodoToEvent( VObject *vtodo )
anEvent->recurrence()->setEndDateTime( rEndDate );
}
} else {
- kDebug() << "we don't understand this type of recurrence!";
+ qDebug() << "we don't understand this type of recurrence!";
} // if known recurrence type
} // repeats
@@ -1850,7 +1850,7 @@ Event::Ptr VCalFormat::VEventToEvent( VObject *vevent )
// anEvent->recurrence()->dump();
} else {
- kDebug() << "we don't understand this type of recurrence!";
+ qDebug() << "we don't understand this type of recurrence!";
} // if known recurrence type
} // repeats
@@ -2268,7 +2268,7 @@ void VCalFormat::populate( VObject *vcal, bool deleted, const QString &notebook
if ( ( curVO = isAPropertyOf( vcal, ICMethodProp ) ) != 0 ) {
char *methodType = 0;
methodType = fakeCString( vObjectUStringZValue( curVO ) );
- kDebug() << "This calendar is an iTIP transaction of type '"
+ qDebug() << "This calendar is an iTIP transaction of type '"
<< methodType << "'";
deleteStr( methodType );
}
@@ -2277,7 +2277,7 @@ void VCalFormat::populate( VObject *vcal, bool deleted, const QString &notebook
if ( ( curVO = isAPropertyOf( vcal, VCProdIdProp ) ) != 0 ) {
char *s = fakeCString( vObjectUStringZValue( curVO ) );
if ( !s || strcmp( productId().toUtf8(), s ) != 0 ) {
- kDebug() << "This vCalendar file was not created by KOrganizer or"
+ qDebug() << "This vCalendar file was not created by KOrganizer or"
<< "any other product we support. Loading anyway...";
}
setLoadedProductId( s );
@@ -2288,7 +2288,7 @@ void VCalFormat::populate( VObject *vcal, bool deleted, const QString &notebook
if ( ( curVO = isAPropertyOf( vcal, VCVersionProp ) ) != 0 ) {
char *s = fakeCString( vObjectUStringZValue( curVO ) );
if ( !s || strcmp( _VCAL_VERSION, s ) != 0 ) {
- kDebug() << "This vCalendar file has version" << s
+ qDebug() << "This vCalendar file has version" << s
<< "We only support" << _VCAL_VERSION;
}
deleteStr( s );
@@ -2311,7 +2311,7 @@ void VCalFormat::populate( VObject *vcal, bool deleted, const QString &notebook
int utcOffset;
int utcOffsetDst;
if ( parseTZOffsetISO8601( ts, utcOffset ) ) {
- kDebug() << "got standard offset" << ts << utcOffset;
+ qDebug() << "got standard offset" << ts << utcOffset;
// standard from tz
// starting date for now 01011900
KDateTime dt = KDateTime( QDateTime( QDate( 1900, 1, 1 ), QTime( 0, 0, 0 ) ) );
@@ -2340,7 +2340,7 @@ void VCalFormat::populate( VObject *vcal, bool deleted, const QString &notebook
if ( parseTZOffsetISO8601( argl[1], utcOffsetDst ) ) {
- kDebug() << "got DST offset" << argl[1] << utcOffsetDst;
+ qDebug() << "got DST offset" << argl[1] << utcOffsetDst;
// standard
QString strEndDate = argl[3];
KDateTime endDate = ISOToKDateTime( strEndDate );
@@ -2371,7 +2371,7 @@ void VCalFormat::populate( VObject *vcal, bool deleted, const QString &notebook
arg( realStartDate.toString() );
tzList.append( tz );
} else {
- kDebug() << "unable to parse dst" << argl[1];
+ qDebug() << "unable to parse dst" << argl[1];
}
}
}
@@ -2379,14 +2379,14 @@ void VCalFormat::populate( VObject *vcal, bool deleted, const QString &notebook
ICalTimeZoneSource tzs;
ICalTimeZone zone = tzs.parse( name, tzList, *tzlist );
if ( !zone.isValid() ) {
- kDebug() << "zone is not valid, parsing error" << tzList;
+ qDebug() << "zone is not valid, parsing error" << tzList;
} else {
previousSpec = d->mCalendar->timeSpec();
d->mCalendar->setTimeZoneId( name );
hasTimeZone = true;
}
} else {
- kDebug() << "unable to parse tzoffset" << ts;
+ qDebug() << "unable to parse tzoffset" << ts;
}
}
@@ -2412,7 +2412,7 @@ void VCalFormat::populate( VObject *vcal, bool deleted, const QString &notebook
if ( s ) {
if ( atoi( s ) == SYNCDEL ) {
deleteStr( s );
- kDebug() << "skipping pilot-deleted event";
+ qDebug() << "skipping pilot-deleted event";
goto SKIP;
}
deleteStr( s );
@@ -2421,7 +2421,7 @@ void VCalFormat::populate( VObject *vcal, bool deleted, const QString &notebook
if ( !isAPropertyOf( curVO, VCDTstartProp ) &&
!isAPropertyOf( curVO, VCDTendProp ) ) {
- kDebug() << "found a VEvent with no DTSTART and no DTEND! Skipping...";
+ qDebug() << "found a VEvent with no DTSTART and no DTEND! Skipping...";
goto SKIP;
}
@@ -2515,7 +2515,7 @@ void VCalFormat::populate( VObject *vcal, bool deleted, const QString &notebook
// do nothing daylights are already processed
;
} else {
- kDebug() << "Ignoring unknown vObject \"" << vObjectName(curVO) << "\"";
+ qDebug() << "Ignoring unknown vObject \"" << vObjectName(curVO) << "\"";
}
SKIP:
;
@@ -2597,7 +2597,7 @@ Attendee::PartStat VCalFormat::readStatus( const char *s ) const
} else if ( statStr == "DELEGATED" ) {
status = Attendee::Delegated;
} else {
- kDebug() << "error setting attendee mStatus, unknown mStatus!";
+ qDebug() << "error setting attendee mStatus, unknown mStatus!";
status = Attendee::NeedsAction;
}
diff --git a/kdecore/CMakeLists.txt b/kdecore/CMakeLists.txt
index 44a2ab1..a8b21fc 100644
--- a/kdecore/CMakeLists.txt
+++ b/kdecore/CMakeLists.txt
@@ -2,7 +2,7 @@ project(kdecore)
-set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
cmake_minimum_required(VERSION 2.6)
# only available from cmake-2.8.0
@@ -18,7 +18,7 @@ endif()
-find_package(Qt4 4.7.0 REQUIRED)
+find_package(Qt4 4.6.0 REQUIRED)
include_directories(${QT_INCLUDES})
@@ -222,9 +222,9 @@ set(kdecore_LIB_SRCS
# compression/kgzipfilter.cpp
# compression/kfilterbase.cpp
# compression/kfilterdev.cpp
-# config/kconfig.cpp
-# config/kconfigbase.cpp
-# config/kconfiggroup.cpp
+ config/kconfig.cpp
+ config/kconfigbase.cpp
+ config/kconfiggroup.cpp
# config/kconfigbackend.cpp
# config/kconfigini.cpp
# config/kdesktopfile.cpp
@@ -348,7 +348,7 @@ set(kdecore_LIB_SRCS ${kdecore_LIB_SRCS}
# network/ktcpsocket.cpp
# localization/kcatalog.cpp
# localization/kcurrencycode.cpp
-# localization/kcharsets.cpp
+ localization/kcharsets.cpp
# localization/kencodingdetector.cpp
# localization/guess_ja.cpp
# localization/kencodingprober.cpp
@@ -432,9 +432,9 @@ set(kdecore_LIB_SRCS ${kdecore_LIB_SRCS}
# add_definitions(-DNO_DISPLAY)
# endif (NOT Q_WS_X11 AND NOT Q_WS_QWS)
-add_library(kdecore ${LIBRARY_TYPE} ${kdecore_LIB_SRCS})
+add_library(calendaring-kdecore ${LIBRARY_TYPE} ${kdecore_LIB_SRCS})
-target_link_libraries(kdecore ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${ZLIB_LIBRARY} ${kdecore_OPTIONAL_LIBS})
+target_link_libraries(calendaring-kdecore ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${ZLIB_LIBRARY} ${kdecore_OPTIONAL_LIBS})
# if(WINCE)
# target_link_libraries(kdecore ${WCECOMPAT_LIBRARIES} Ceshell.lib)
@@ -462,9 +462,9 @@ target_link_libraries(kdecore ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_
# endif(APPLE)
# endif(WIN32)
-target_link_libraries(kdecore LINK_INTERFACE_LIBRARIES ${kdecore_LINK_INTERFACE_LIBRARIES} )
+target_link_libraries(calendaring-kdecore LINK_INTERFACE_LIBRARIES ${kdecore_LINK_INTERFACE_LIBRARIES} )
-set_target_properties(kdecore PROPERTIES
+set_target_properties(calendaring-kdecore PROPERTIES
VERSION ${KDE_NON_GENERIC_LIB_VERSION}
SOVERSION ${KDE_NON_GENERIC_LIB_SOVERSION}
)