[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs
From: Christophe Giboudeaux <cgiboudeaux () gmail ! com>
Date: 2010-09-08 20:58:21
Message-ID: 20100908205821.90F31AC857 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1173168 by cgiboudeaux:
Work around an incompatible change in libical>0.46.
MERGE: 4.4
M +3 -0 cmake/modules/FindLibical.cmake
M +5 -0 kcal/CMakeLists.txt
M +4 -0 kcal/icalformat_p.cpp
M +3 -0 kcalcore/config-kcalcore.h.cmake
M +7 -0 kcalcore/icalformat_p.cpp
--- trunk/KDE/kdepimlibs/cmake/modules/FindLibical.cmake #1173167:1173168
@@ -72,6 +72,9 @@
set(LIBICAL_INCLUDE_DIRS "")
set(LIBICAL_LIBRARIES "")
endif(NOT LIBICAL_VERSION_OK)
+ 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.")
--- trunk/KDE/kdepimlibs/kcal/CMakeLists.txt #1173167:1173168
@@ -6,6 +6,11 @@
add_definitions(-DWANT_DEPRECATED_KABC_API)
add_definitions(-DWANT_DEPRECATED_KRESOURCE_API)
+# Workaround a SIC change in libical 0.46
+if(USE_ICAL_0_46)
+ add_definitions(-DUSE_ICAL_0_46)
+endif()
+
include (ConfigureChecks.cmake)
if(KDE4_BUILD_TESTS)
--- trunk/KDE/kdepimlibs/kcal/icalformat_p.cpp #1173167:1173168
@@ -784,7 +784,11 @@
if ( att->isUri() ) {
attach = icalattach_new_from_url( att->uri().toUtf8().data() );
} else {
+#ifdef USE_ICAL_0_46
+ attach = icalattach_new_from_data ( ( const char * )att->data(), 0, 0 );
+#else
attach = icalattach_new_from_data ( ( unsigned char * )att->data(), 0, 0 );
+#endif
}
icalproperty *p = icalproperty_new_attach( attach );
--- trunk/KDE/kdepimlibs/kcalcore/config-kcalcore.h.cmake #1173167:1173168
@@ -1,2 +1,5 @@
/* Define to 1 if you have the <uuid/uuid.h> header file. */
#cmakedefine HAVE_UUID_UUID_H
+
+/* Define to 1 if the libical version is equal or greater than 0.46 */
+#cmakedefine USE_ICAL_0_46
\ No newline at end of file
--- trunk/KDE/kdepimlibs/kcalcore/icalformat_p.cpp #1173167:1173168
@@ -32,6 +32,7 @@
@author Reinhold Kainhofer \<reinhold@kainhofer.com\>
@author David Jarvie \<software@astrojar.org.uk\>
*/
+
#include "icalformat_p.h"
#include "compat.h"
#include "event.h"
@@ -44,6 +45,8 @@
#include "todo.h"
#include "visitor.h"
+#include "config-kcalcore.h"
+
#include <KCodecs>
#include <KDebug>
@@ -791,7 +794,11 @@
if ( att->isUri() ) {
attach = icalattach_new_from_url( att->uri().toUtf8().data() );
} else {
+#ifdef USE_ICAL_0_46
+ attach = icalattach_new_from_data( ( const char * )att->data().data(), 0, 0 );
+#else
attach = icalattach_new_from_data( ( unsigned char * )att->data().data(), 0, 0 );
+#endif
}
icalproperty *p = icalproperty_new_attach( attach );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic