File buildfix-qjson_0_8_0.diff of Package kdepim4-runtime

commit ca06d09b6b78381bb152deb02c31ecb9d6a43210
Author: Christophe Giboudeaux <cgiboudeaux@gmx.com>
Date:   Sat Nov 24 21:53:56 2012 +0100

    Fix build with QJson >= 0.8.0

diff --git a/resources/google/calendar/CMakeLists.txt b/resources/google/calendar/CMakeLists.txt
index 5879cb1..b118d8e 100644
--- a/resources/google/calendar/CMakeLists.txt
+++ b/resources/google/calendar/CMakeLists.txt
@@ -1,5 +1,10 @@
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
 
+# QJson 0.8.0 is BIC
+if(QJSON_VERSION VERSION_GREATER 0.7.1)
+  add_definitions(-DUSE_QJSON_0_8)
+endif()
+
 include_directories(${QJSON_INCLUDE_DIR} ${qjson_INCLUDE_DIR})
 
 set(calendarresource_SRCS
diff --git a/resources/google/calendar/defaultreminderattribute.cpp b/resources/google/calendar/defaultreminderattribute.cpp
index 879a2c3..7dc45b4 100644
--- a/resources/google/calendar/defaultreminderattribute.cpp
+++ b/resources/google/calendar/defaultreminderattribute.cpp
@@ -79,7 +79,11 @@ QByteArray DefaultReminderAttribute::serialized() const
   }
 
   QJson::Serializer serializer;
+  #if !defined( USE_QJSON_0_8 )
   return serializer.serialize( list );
+  #else
+  return serializer.serialize( list, 0 );
+  #endif
 }
 
 Alarm::List DefaultReminderAttribute::alarms( Incidence *incidence ) const
openSUSE Build Service is sponsored by