rpms/libopensync-plugin-kdepim/F-9 libopensync-plugin-kdepim-0.36-kde4.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 libopensync-plugin-kdepim.spec, 1.11, 1.12 sources, 1.6, 1.7
Andreas Bierfert (awjb)
fedora-extras-commits at redhat.com
Fri Jun 20 07:35:06 UTC 2008
- Previous message (by thread): rpms/libopensync-plugin-irmc/devel .cvsignore, 1.6, 1.7 libopensync-plugin-irmc.spec, 1.15, 1.16 sources, 1.6, 1.7
- Next message (by thread): rpms/libopensync-plugin-moto/F-9 .cvsignore, 1.2, 1.3 libopensync-plugin-moto.spec, 1.3, 1.4 sources, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: awjb
Update of /cvs/pkgs/rpms/libopensync-plugin-kdepim/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18070
Modified Files:
.cvsignore libopensync-plugin-kdepim.spec sources
Added Files:
libopensync-plugin-kdepim-0.36-kde4.patch
Log Message:
- pull 0.36 from devel
libopensync-plugin-kdepim-0.36-kde4.patch:
--- NEW FILE libopensync-plugin-kdepim-0.36-kde4.patch ---
diff -Nur libopensync-plugin-kdepim-0.36/AUTHORS libopensync-plugin-kdepim-0.36-kde4/AUTHORS
--- libopensync-plugin-kdepim-0.36/AUTHORS 2008-01-26 18:03:04.000000000 +0100
+++ libopensync-plugin-kdepim-0.36-kde4/AUTHORS 2008-03-07 21:22:20.000000000 +0100
@@ -1,2 +1,4 @@
Stewart Heitmann <sheitmann at users.sourceforge.net>
Eduardo Pereira Habkost <ehabkost at conectiva.com.br>
+
+Thomas Gillespie <tomjamesgillespie at googlemail.com>
diff -Nur libopensync-plugin-kdepim-0.36/CMakeLists.txt libopensync-plugin-kdepim-0.36-kde4/CMakeLists.txt
--- libopensync-plugin-kdepim-0.36/CMakeLists.txt 2008-01-26 18:03:04.000000000 +0100
+++ libopensync-plugin-kdepim-0.36-kde4/CMakeLists.txt 2008-03-07 21:22:20.000000000 +0100
@@ -7,12 +7,16 @@
SET( OPENSYNC_MIN_VERSION "0.36" )
FIND_PACKAGE( OpenSync REQUIRED )
-FIND_PACKAGE( Qt3 REQUIRED )
-FIND_PACKAGE( KDEPIM3 REQUIRED )
+FIND_PACKAGE( Qt4 REQUIRED )
+find_package (KDE4 REQUIRED)
+include(KDE4Defaults)
+include(MacroLibrary)
+include(MacroOptionalAddSubdirectory)
+FIND_PACKAGE( KdepimLibs REQUIRED )
INCLUDE( OpenSyncInternal )
ADD_SUBDIRECTORY( src )
-
+
OPENSYNC_PACKAGE( ${PROJECT_NAME} ${VERSION} )
diff -Nur libopensync-plugin-kdepim-0.36/cmake/modules/FindKDE4.cmake libopensync-plugin-kdepim-0.36-kde4/cmake/modules/FindKDE4.cmake
--- libopensync-plugin-kdepim-0.36/cmake/modules/FindKDE4.cmake 1970-01-01 01:00:00.000000000 +0100
+++ libopensync-plugin-kdepim-0.36-kde4/cmake/modules/FindKDE4.cmake 2008-03-07 21:22:20.000000000 +0100
@@ -0,0 +1,61 @@
+# Find KDE4 and provide all necessary variables and macros to compile software for it.
+# It looks for KDE 4 in the following directories in the given order:
+# CMAKE_INSTALL_PREFIX
+# KDEDIRS
+# /opt/kde4
+#
+# Please look in FindKDE4Internal.cmake and KDE4Macros.cmake for more information.
+# They are installed with the KDE 4 libraries in $KDEDIRS/share/apps/cmake/modules/.
+#
+# Author: Alexander Neundorf <neundorf at kde.org>
+
+FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
+
+# For KDE4 kde-config has been renamed to kde4-config
+FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config
+ PATH_SUFFIXES bin # the suffix is for the paths coming from KDEDIRS
+ PATHS
+ ${CMAKE_INSTALL_PREFIX}/bin
+ ${_KDEDIRS}
+ /opt/kde4/bin
+ NO_DEFAULT_PATH
+ )
+
+FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config )
+
+IF (KDE4_KDECONFIG_EXECUTABLE)
+ # then ask kde4-config for the kde data dirs
+ EXECUTE_PROCESS(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path data OUTPUT_VARIABLE _data_DIR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ FILE(TO_CMAKE_PATH "${_data_DIR}" _data_DIR)
+
+ # then check the data dirs for FindKDE4Internal.cmake
+ FIND_PATH(KDE4_DATA_DIR cmake/modules/FindKDE4Internal.cmake ${_data_DIR})
+
+ # if it has been found...
+ IF (KDE4_DATA_DIR)
+
+ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${KDE4_DATA_DIR}/cmake/modules)
+
+ IF (KDE4_FIND_QUIETLY)
+ SET(_quiet QUIET)
+ ENDIF (KDE4_FIND_QUIETLY)
+
+ IF (KDE4_FIND_REQUIRED)
+ SET(_req REQUIRED)
+ ENDIF (KDE4_FIND_REQUIRED)
+
+ # use FindKDE4Internal.cmake to do the rest
+ FIND_PACKAGE(KDE4Internal ${_req} ${_quiet})
+ ELSE (KDE4_DATA_DIR)
+ IF (KDE4_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "ERROR: cmake/modules/FindKDE4Internal.cmake not found in ${_data_DIR}")
+ ENDIF (KDE4_FIND_REQUIRED)
+ ENDIF (KDE4_DATA_DIR)
+
+ELSE (KDE4_KDECONFIG_EXECUTABLE)
+ IF (KDE4_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "ERROR: Could not find KDE4 kde4-config")
+ ENDIF (KDE4_FIND_REQUIRED)
+ENDIF (KDE4_KDECONFIG_EXECUTABLE)
+
diff -Nur libopensync-plugin-kdepim-0.36/cmake/modules/cmake_uninstall.cmake.in libopensync-plugin-kdepim-0.36-kde4/cmake/modules/cmake_uninstall.cmake.in
--- libopensync-plugin-kdepim-0.36/cmake/modules/cmake_uninstall.cmake.in 2008-01-26 18:03:04.000000000 +0100
+++ libopensync-plugin-kdepim-0.36-kde4/cmake/modules/cmake_uninstall.cmake.in 1970-01-01 01:00:00.000000000 +0100
@@ -1,21 +0,0 @@
-IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
- MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
-ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
-
-FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
-STRING(REGEX REPLACE "\n" ";" files "${files}")
-FOREACH(file ${files})
- MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
- IF(EXISTS "$ENV{DESTDIR}${file}")
- EXEC_PROGRAM(
- "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
- OUTPUT_VARIABLE rm_out
- RETURN_VALUE rm_retval
- )
- IF(NOT "${rm_retval}" STREQUAL 0)
- MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
- ENDIF(NOT "${rm_retval}" STREQUAL 0)
- ELSE(EXISTS "$ENV{DESTDIR}${file}")
- MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
- ENDIF(EXISTS "$ENV{DESTDIR}${file}")
-ENDFOREACH(file)
diff -Nur libopensync-plugin-kdepim-0.36/src/CMakeLists.txt libopensync-plugin-kdepim-0.36-kde4/src/CMakeLists.txt
--- libopensync-plugin-kdepim-0.36/src/CMakeLists.txt 2008-01-26 18:03:04.000000000 +0100
+++ libopensync-plugin-kdepim-0.36-kde4/src/CMakeLists.txt 2008-03-08 20:24:46.000000000 +0100
@@ -1,5 +1,5 @@
-LINK_DIRECTORIES( ${OPENSYNC_LIBRARY_DIRS} )
-INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${OPENSYNC_INCLUDE_DIRS} ${KDE3_INCLUDE_DIR} ${KDEPIM3_INCLUDE_DIR} ${QT_INCLUDE_DIR} )
+LINK_DIRECTORIES( ${OPENSYNC_LIBRARIES} )
+#INCLUDE_DIRECTORIES( ${OPENSYNC_INCLUDE_DIR} )
# kdepim-sync sources
SET( kdepim_sync_LIB_SRCS
@@ -12,18 +12,25 @@
kaddrbook.cpp
kcal.cpp
kdepim_impl.cpp
-knotes.cpp
+#knotes.cpp
)
+find_package (KDE4 REQUIRED)
+include(KDE4Defaults)
+
+INCLUDE_DIRECTORIES( ${KDE4_INCLUDES} ${OPENSYNC_INCLUDE_DIR} )
+
ADD_DEFINITIONS( -DKDEPIM_LIBDIR="\\\"${OPENSYNC_PLUGINDIR}\\\"" )
-KDE3_ADD_DCOP_STUBS( kdepim_module_LIB_SRCS KNotesIface.h )
+#KDE3_ADD_DCOP_STUBS( kdepim_module_LIB_SRCS KNotesIface.h )
OPENSYNC_PLUGIN_ADD( kdepim-sync ${kdepim_sync_LIB_SRCS} )
OPENSYNC_PLUGIN_ADD( kdepim_lib ${kdepim_module_LIB_SRCS} )
-TARGET_LINK_LIBRARIES( kdepim-sync ${OPENSYNC_LIBRARIES} ${KDE3_LIBRARIES} ${KDEPIM3_KABC_LIBRARIES} ${QT_LIBRARIES} ${KDEPIM3_KCAL_LIBRARIES} )
-TARGET_LINK_LIBRARIES( kdepim_lib ${OPENSYNC_LIBRARIES} ${KDE3_LIBRARIES} ${KDEPIM3_KABC_LIBRARIES} ${QT_LIBRARIES} ${KDEPIM3_KCAL_LIBRARIES} )
+TARGET_LINK_LIBRARIES( kdepim-sync ${OPENSYNC_LIBRARIES} ${QT_QTCORE_LIBRARY}
+ ${KDE4_KDECORE_LIBRARY} ${KDE4_KCAL_LIBS} ${CMAKE_DL_LIBS} )
+TARGET_LINK_LIBRARIES( kdepim_lib ${OPENSYNC_LIBRARIES} ${QT_QTCORE_LIBRARY}
+ ${KDE4_KDECORE_LIBRARY} ${KDE4_KCAL_LIBS} ${CMAKE_DL_LIBS} )
# Install plugins
OPENSYNC_PLUGIN_INSTALL( kdepim-sync )
diff -Nur libopensync-plugin-kdepim-0.36/src/KNotesIface.h libopensync-plugin-kdepim-0.36-kde4/src/KNotesIface.h
--- libopensync-plugin-kdepim-0.36/src/KNotesIface.h 2008-01-26 18:03:04.000000000 +0100
+++ libopensync-plugin-kdepim-0.36-kde4/src/KNotesIface.h 2008-03-07 21:22:20.000000000 +0100
@@ -25,9 +25,9 @@
#include <qstring.h>
#include <qmap.h>
-#include <dcopobject.h>
-
+//#include <dcopobject.h>
+/*
class KNotesIface : virtual public DCOPObject
{
K_DCOP
@@ -38,7 +38,7 @@
* KNotes will choose an appropriate name
* @param text the body of the new note
* @return the new notes' id
- */
+ * /
virtual QString newNote( const QString& name = QString::null,
const QString& text = QString::null ) = 0;
@@ -49,72 +49,72 @@
* @param name the name (title) of the new note, if it is empty,
* KNotes will choose an appropriate name
* @return the new notes' id
- */
+ * /
virtual QString newNoteFromClipboard( const QString& name = QString::null ) = 0;
/**
* Show a note as if it had been selected from the "notes" menu.
* @param noteId the id of the note to show
- */
+ * /
virtual ASYNC showNote( const QString& noteId ) const = 0;
/**
* Hide a note.
* @param noteId the id of the note to hide
- */
+ * /
virtual ASYNC hideNote( const QString& noteId ) const = 0;
/**
* Deletes a note forever.
* @param noteId the id of the note to kill
- */
+ * /
virtual ASYNC killNote( const QString& noteId ) = 0;
/**
* Deletes a note forever.
* @param noteId the id of the note to kill
* @param force do not request confirmation
- */
+ * /
virtual ASYNC killNote( const QString& noteId, bool force ) = 0;
/**
* Get all the notes including their ids.
* @return a QMap that maps the id of a note to its name
- */
+ * /
virtual QMap<QString,QString> notes() const = 0;
/**
* Changes the title/name of a note.
* @param noteId the id of the note to be modified
* @param newName the new title
- */
+ * /
virtual ASYNC setName( const QString& noteId, const QString& newName ) = 0;
/**
* Sets the text of a note. This will delete the old text!
* @param noteId the id of the note
* @param newText the new text for the note
- */
+ * /
virtual ASYNC setText( const QString& noteId, const QString& newText ) = 0;
/**
* Returns the title/name of a note.
* @param noteId the id of the note in question
* @return the name as a QString
- */
+ * /
virtual QString name( const QString& noteId ) const = 0;
/**
* Returns the text of a note.
* @param noteId the id of the note in question
* @return the body as a QString
- */
+ * /
virtual QString text( const QString& noteId ) const = 0;
/**
* This tells KNotes that a specific app has synchronized with all the notes.
* @param app the app that has synced with KNotes
- */
+ * /
virtual ASYNC sync( const QString& app ) = 0;
/**
@@ -123,7 +123,7 @@
* @param noteId the id of the note
* @return true if the note is new, false if not or if the note does
* not exist
- */
+ * /
virtual bool isNew( const QString& app, const QString& noteId ) const = 0;
/**
@@ -132,8 +132,8 @@
* @param noteId the id of the note
* @return true if modified (note that this will return true if the note is
* new as well!) and false if the note is not modified or doesn't exist
- */
+ * /
virtual bool isModified( const QString& app, const QString& noteId ) const = 0;
};
-
+*/
#endif
diff -Nur libopensync-plugin-kdepim-0.36/src/datasource.cpp libopensync-plugin-kdepim-0.36-kde4/src/datasource.cpp
--- libopensync-plugin-kdepim-0.36/src/datasource.cpp 2008-01-26 18:03:04.000000000 +0100
+++ libopensync-plugin-kdepim-0.36-kde4/src/datasource.cpp 2008-03-07 21:22:20.000000000 +0100
@@ -87,7 +87,7 @@
const char *configdir = osync_plugin_info_get_configdir(info);
QString tablepath = QString("%1/%2-hash.db").arg(configdir, objtype);
- hashtable = osync_hashtable_new(tablepath, osync_objtype_sink_get_name(sink), error);
+ hashtable = osync_hashtable_new(tablepath.toUtf8(), osync_objtype_sink_get_name(sink), error);
if (hashtable == NULL) {
osync_trace(TRACE_EXIT_ERROR, "%s: %s", __PRETTY_FUNCTION__, osync_error_print(error));
return false;
@@ -103,7 +103,7 @@
//Detection mechanismn if this is the first sync
QString anchorpath = QString("%1/anchor.db").arg(osync_plugin_info_get_configdir(info));
- if (!osync_anchor_compare(anchorpath, objtype, "true")) {
+ if (!osync_anchor_compare(anchorpath.toUtf8(), objtype, "true")) {
osync_trace(TRACE_INTERNAL, "Setting slow-sync for %s", objtype);
osync_objtype_sink_set_slowsync(sink, TRUE);
}
@@ -118,7 +118,7 @@
//Detection mechanismn if this is the first sync
QString anchorpath = QString("%1/anchor.db").arg(osync_plugin_info_get_configdir(info));
- osync_anchor_update(anchorpath, objtype, "true");
+ osync_anchor_update(anchorpath.toUtf8(), objtype, "true");
osync_context_report_success(ctx);
osync_trace(TRACE_EXIT, "%s", __PRETTY_FUNCTION__);
@@ -138,9 +138,9 @@
if (!change)
goto error;
- osync_change_set_uid(change, uid.local8Bit());
+ osync_change_set_uid(change, (const char *)uid.toLocal8Bit());
- data_str = strdup((const char *)data.utf8());
+ data_str = strdup((const char *)data.toUtf8());
osync_trace(TRACE_SENSITIVE,"Data:\n%s", data_str);
@@ -156,16 +156,16 @@
// Use the hash table to check if the object
// needs to be reported
- osync_change_set_hash(change, hash.data());
+ osync_change_set_hash(change, hash.toUtf8());
// Report entry ... otherwise it gets deleted!
- osync_hashtable_report(hashtable, uid);
+ osync_hashtable_report(hashtable, uid.toUtf8());
- changetype = osync_hashtable_get_changetype(hashtable, uid, hash.data());
+ changetype = osync_hashtable_get_changetype(hashtable, uid.toUtf8(), hash.toUtf8());
osync_change_set_changetype(change, changetype);
if (OSYNC_CHANGE_TYPE_UNMODIFIED != changetype) {
osync_context_report_change(ctx, change);
- osync_hashtable_update_hash(hashtable, changetype, uid, hash.data());
+ osync_hashtable_update_hash(hashtable, changetype, uid.toUtf8(), hash.toUtf8());
}
osync_trace(TRACE_EXIT, "%s", __PRETTY_FUNCTION__);
diff -Nur libopensync-plugin-kdepim-0.36/src/kaddrbook.cpp libopensync-plugin-kdepim-0.36-kde4/src/kaddrbook.cpp
--- libopensync-plugin-kdepim-0.36/src/kaddrbook.cpp 2008-01-26 18:03:04.000000000 +0100
+++ libopensync-plugin-kdepim-0.36-kde4/src/kaddrbook.cpp 2008-03-07 21:22:20.000000000 +0100
@@ -28,8 +28,8 @@
#include "kaddrbook.h"
#include <kapplication.h>
-#include <dcopclient.h>
-#include <qdeepcopy.h>
+//#include <dcopclient.h>
+//#include <qdeepcopy.h>
bool KContactDataSource::initialize(OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **error)
{
@@ -69,7 +69,7 @@
{
osync_trace(TRACE_ENTRY, "%s(%p, %p)", __PRETTY_FUNCTION__, info, ctx);
- DCOPClient *dcopc = KApplication::kApplication()->dcopClient();
+/* DCOPClient *dcopc = KApplication::kApplication()->dcopClient();
if (!dcopc) {
osync_context_report_error(ctx, OSYNC_ERROR_INITIALIZATION, "Unable to initialize dcop client");
osync_trace(TRACE_EXIT_ERROR, "%s: Unable to initialize dcop client", __PRETTY_FUNCTION__);
@@ -85,7 +85,7 @@
osync_trace(TRACE_EXIT_ERROR, "%s: KAddressBook is running", __PRETTY_FUNCTION__);
return;
}
-
+*/
//get a handle to the standard KDE addressbook
addressbookptr = KABC::StdAddressBook::self();
@@ -177,7 +177,7 @@
OSyncChangeType chtype = osync_change_get_changetype(chg);
switch(chtype) {
case OSYNC_CHANGE_TYPE_MODIFIED: {
- KABC::Addressee addressee = converter.parseVCard(QString::fromUtf8(data, data_size));
+ KABC::Addressee addressee = converter.parseVCard(QByteArray(data, data_size));
// ensure it has the correct UID and revision
addressee.setUid(uid);
@@ -188,12 +188,12 @@
addressbookptr->insertAddressee(addressee);
QString hash = calc_hash(addressee);
- osync_change_set_hash(chg, hash);
+ osync_change_set_hash(chg, hash.toUtf8());
// osync_debug("kde", 3, "KDE ADDRESSBOOK ENTRY UPDATED (UID=%s)", (const char *)uid.local8Bit());
break;
}
case OSYNC_CHANGE_TYPE_ADDED: {
- KABC::Addressee addressee = converter.parseVCard(QString::fromUtf8(data, data_size));
+ KABC::Addressee addressee = converter.parseVCard(QByteArray(data, data_size));
// ensure it has the correct revision
addressee.setRevision(QDateTime::currentDateTime());
@@ -201,10 +201,10 @@
// add the new address to the addressbook
addressbookptr->insertAddressee(addressee);
- osync_change_set_uid(chg, addressee.uid().local8Bit());
+ osync_change_set_uid(chg, addressee.uid().toLocal8Bit());
QString hash = calc_hash(addressee);
- osync_change_set_hash(chg, hash);
+ osync_change_set_hash(chg, hash.toUtf8());
// osync_debug("kde", 3, "KDE ADDRESSBOOK ENTRY ADDED (UID=%s)", (const char *)addressee.uid().local8Bit());
break;
}
@@ -231,7 +231,7 @@
}
}
- osync_hashtable_update_hash(hashtable, chtype, uid, osync_change_get_hash(chg));
+ osync_hashtable_update_hash(hashtable, chtype, uid.toUtf8(), osync_change_get_hash(chg));
osync_context_report_success(ctx);
osync_trace(TRACE_EXIT, "%s", __PRETTY_FUNCTION__);
diff -Nur libopensync-plugin-kdepim-0.36/src/kcal.cpp libopensync-plugin-kdepim-0.36-kde4/src/kcal.cpp
--- libopensync-plugin-kdepim-0.36/src/kcal.cpp 2008-01-26 18:03:04.000000000 +0100
+++ libopensync-plugin-kdepim-0.36-kde4/src/kcal.cpp 2008-03-07 21:22:20.000000000 +0100
@@ -28,7 +28,7 @@
#include <assert.h>
#include <kapplication.h>
-#include <dcopclient.h>
+//#include <dcopclient.h>
bool KCalSharedResource::open(OSyncContext *ctx)
{
@@ -36,7 +36,7 @@
assert(calendar);
return true;
}
-
+/*
DCOPClient *dcopc = KApplication::kApplication()->dcopClient();
if (!dcopc) {
osync_context_report_error(ctx, OSYNC_ERROR_INITIALIZATION, "Unable to initialize dcop client");
@@ -53,19 +53,12 @@
osync_trace(TRACE_EXIT_ERROR, "%s: KOrganizer is running", __func__);
return false;
}
-
+*/
calendar = new KCal::CalendarResources(QString::fromLatin1( "UTC" ));
if (!calendar) {
osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "Can't open KDE calendar");
return false;
}
-#if KDE_IS_VERSION(3,3,0)
- /* On KDE 3.2, there was no readConfig() and load(): the data
- * was loaded automatically on the CalendarResources() constructor
- */
- calendar->readConfig();
- calendar->load();
-#endif
// osync_debug("kcal", 3, "Calendar: %d events", calendar->events().size());
@@ -87,9 +80,9 @@
static QString calc_hash(const KCal::Incidence *e)
{
- QDateTime d = e->lastModified();
+ KDateTime d = e->lastModified();
if (!d.isValid()) {
- d = QDateTime::currentDateTime();
+ d = KDateTime::currentLocalDateTime();
//e->setLastModified(&d);
}
/*FIXME: not i18ned string */
@@ -153,10 +146,10 @@
/* osync_debug("kcal", 3, "Writing incidence: uid: %s, summary: %s",
(const char*)e->uid().local8Bit(), (const char*)e->summary().local8Bit()); */
- QString c_uid = e->uid().utf8();
- osync_change_set_uid(chg, (const char*)c_uid);
+ QString c_uid = e->uid().toUtf8();
+ osync_change_set_uid(chg, (const char*)c_uid.toUtf8());
QString hash = calc_hash(*i);
- osync_change_set_hash(chg, hash);
+ osync_change_set_hash(chg, hash.toUtf8());
calendar->addIncidence(e);
}
break;
diff -Nur libopensync-plugin-kdepim-0.36/src/kcal.h libopensync-plugin-kdepim-0.36-kde4/src/kcal.h
--- libopensync-plugin-kdepim-0.36/src/kcal.h 2008-01-26 18:03:04.000000000 +0100
+++ libopensync-plugin-kdepim-0.36-kde4/src/kcal.h 2008-03-07 21:22:20.000000000 +0100
@@ -24,10 +24,10 @@
* @author Andrew Baumann <andrewb at cse.unsw.edu.au>
*/
-#include <libkcal/calendarresources.h>
-#include <libkcal/incidence.h>
-#include <libkcal/icalformat.h>
-#include <libkcal/calendarlocal.h>
+#include <kcal/calendarresources.h>
+#include <kcal/incidence.h>
+#include <kcal/icalformat.h>
+#include <kcal/calendarlocal.h>
#include <kdeversion.h>
#include "osyncbase.h"
diff -Nur libopensync-plugin-kdepim-0.36/src/kdepim_impl.cpp libopensync-plugin-kdepim-0.36-kde4/src/kdepim_impl.cpp
--- libopensync-plugin-kdepim-0.36/src/kdepim_impl.cpp 2008-01-26 18:03:04.000000000 +0100
+++ libopensync-plugin-kdepim-0.36-kde4/src/kdepim_impl.cpp 2008-03-08 20:24:46.000000000 +0100
@@ -25,14 +25,14 @@
* @author Andrew Baumann <andrewb at cse.unsw.edu.au>
*/
-#include <libkcal/resourcecalendar.h>
-#include <kinstance.h>
+#include <kcal/resourcecalendar.h>
+//#include <kinstance.h>
#include <klocale.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
-#include <qsignal.h>
+//#include <qsignal.h>
#include <qfile.h>
#include <dlfcn.h>
@@ -50,7 +50,7 @@
KCalSharedResource kcal;
KCalEventDataSource *kcal_event;
KCalTodoDataSource *kcal_todo;
- KNotesDataSource *knotes;
+ //KNotesDataSource *knotes;
KApplication *application;
bool newApplication;
@@ -61,15 +61,16 @@
return;
KAboutData aboutData(
- "libopensync-kdepim-plugin", // internal program name
- "OpenSync-KDE-plugin", // displayable program name.
- "0.3", // version string
- "OpenSync KDEPIM plugin", // short porgram description
+ QByteArray("libopensync-kdepim-plugin"), // internal program name
+ QByteArray(""),
+ ki18n("Opensync kdepim plugin"), // displayable name
+ QByteArray("0.36"),
+ ki18n("Sync kdepim with opensync"), // short porgram description
KAboutData::License_GPL, // license type
- "(c) 2005, Eduardo Pereira Habkost, (c)", // copyright statement
- 0, // any free form text
- "http://www.opensync.org", // program home page address
- "http://www.opensync.org/newticket" // bug report email address
+ ki18n("(c) 2005, Eduardo Pereira Habkost, (c)"), // copyright statement
+ ki18n(""), // any free form text
+ QByteArray("http://www.opensync.org"), // program home page address
+ QByteArray("http://www.opensync.org")
);
KCmdLineArgs::init( &aboutData );
@@ -77,7 +78,7 @@
application = kapp;
newApplication = false;
} else {
- application = new KApplication( true, true );
+ application = new KApplication( true );
newApplication = true;
}
@@ -90,7 +91,7 @@
kaddrbook = new KContactDataSource();
kcal_event = new KCalEventDataSource(&kcal);
kcal_todo = new KCalTodoDataSource(&kcal);
- knotes = new KNotesDataSource();
+ //knotes = new KNotesDataSource();
}
bool initialize(OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **error)
@@ -108,8 +109,8 @@
if (!kcal_todo->initialize(plugin, info, error))
goto error;
- if (!knotes->initialize(plugin, info, error))
- goto error;
+ //if (!knotes->initialize(plugin, info, error))
+ // goto error;
osync_trace(TRACE_EXIT, "%s", __PRETTY_FUNCTION__);
return true;
@@ -124,7 +125,7 @@
delete kaddrbook;
delete kcal_event;
delete kcal_todo;
- delete knotes;
+ //delete knotes;
if ( newApplication ) {
delete application;
@@ -136,7 +137,7 @@
extern "C"
{
- KdePluginImplementationBase *new_KdePluginImplementation(OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **error) {
+ KDE_EXPORT KdePluginImplementationBase *new_KdePluginImplementation(OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **error) {
KdePluginImplementation *imp = new KdePluginImplementation();
if (!imp->initialize(plugin, info, error)) {
delete imp;
diff -Nur libopensync-plugin-kdepim-0.36/src/kdepim_sync.cpp libopensync-plugin-kdepim-0.36-kde4/src/kdepim_sync.cpp
--- libopensync-plugin-kdepim-0.36/src/kdepim_sync.cpp 2008-01-26 18:03:04.000000000 +0100
+++ libopensync-plugin-kdepim-0.36-kde4/src/kdepim_sync.cpp 2008-03-08 20:24:46.000000000 +0100
@@ -98,7 +98,7 @@
osync_trace(TRACE_EXIT, "%s", __func__);
}
-osync_bool get_sync_info(OSyncPluginEnv *env, OSyncError **error)
+OSYNC_EXPORT osync_bool get_sync_info(OSyncPluginEnv *env, OSyncError **error)
{
osync_trace(TRACE_ENTRY, "%s(%p)", __func__, env);
@@ -127,7 +127,7 @@
return FALSE;
}
-int get_version(void)
+OSYNC_EXPORT int get_version(void)
{
return 1;
}
diff -Nur libopensync-plugin-kdepim-0.36/src/knotes.cpp libopensync-plugin-kdepim-0.36-kde4/src/knotes.cpp
--- libopensync-plugin-kdepim-0.36/src/knotes.cpp 2008-01-26 18:03:04.000000000 +0100
+++ libopensync-plugin-kdepim-0.36-kde4/src/knotes.cpp 2008-03-07 21:22:20.000000000 +0100
@@ -31,8 +31,10 @@
#include "knotes.h"
/*An adapted C++ implementation of RSA Data Securities MD5 algorithm.*/
-#include <kmdcodec.h>
+//#include <kmdcodec.h>
+///Wont work because we dont have dcop in kde4 (i dont think), port later
+/*
bool KNotesDataSource::initialize(OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **error)
{
osync_trace(TRACE_ENTRY, "%s(%p, %p)", __PRETTY_FUNCTION__, plugin, info);
@@ -64,7 +66,7 @@
osync_context_report_error(ctx, OSYNC_ERROR_INITIALIZATION, "Unable to attach dcop for knotes");
osync_trace(TRACE_EXIT_ERROR, "%s: Unable to attach dcop for knotes", __func__);
return FALSE;
- }*/
+ }* /
QString appId = kn_dcop->registerAs("opensync");
@@ -107,7 +109,7 @@
osync_context_report_error(ctx, OSYNC_ERROR_INITIALIZATION, "Unable to detach dcop for knotes");
osync_trace(TRACE_EXIT_ERROR, "%s: Unable to detach dcop for knotes", __func__);
return FALSE;
- }*/
+ }* /
//destroy dcop
delete kn_iface;
kn_iface = NULL;
@@ -171,7 +173,7 @@
for (i = fNotes.begin(); i != fNotes.end(); i++) {
/* XXX: don't report empty notes, knotes always
* "keeps" at least one
- */
+ * /
if (kn_iface->text(i.key()) == "") {
// osync_debug("knotes", 4, "Skipping empty note");
continue;
@@ -351,10 +353,11 @@
osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "Unable to delete note");
osync_trace(TRACE_EXIT_ERROR, "%s: Unable to delete note", __func__);
return false;
- }*/
+ }* /
}
osync_hashtable_update_hash(hashtable, type, uid, osync_change_get_hash(chg));
osync_context_report_success(ctx);
osync_trace(TRACE_EXIT, "%s", __func__);
}
+*/
\ No newline at end of file
diff -Nur libopensync-plugin-kdepim-0.36/src/knotes.h libopensync-plugin-kdepim-0.36-kde4/src/knotes.h
--- libopensync-plugin-kdepim-0.36/src/knotes.h 2008-01-26 18:03:04.000000000 +0100
+++ libopensync-plugin-kdepim-0.36-kde4/src/knotes.h 2008-03-07 21:22:20.000000000 +0100
@@ -33,10 +33,10 @@
#include <kapplication.h>
#include <qmap.h>
#include "KNotesIface.h"
-#include "KNotesIface_stub.h"
+//#include "KNotesIface_stub.h"
#include <stdio.h>
#include <qtimer.h>
-#include <dcopclient.h>
+//#include <dcopclient.h>
#include <qstring.h>
#include <qstringlist.h>
@@ -52,13 +52,13 @@
/** KNotes access implementation interface
*/
-class KNotesDataSource : public OSyncDataSource
+/*class KNotesDataSource : public OSyncDataSource
{
private:
- DCOPClient *kn_dcop;
- KNotesIface_stub *kn_iface;
+ //DCOPClient *kn_dcop;
+ //KNotesIface_stub *kn_iface;
- /** Ugly hack to restart KNotes if it was running */
+ /** Ugly hack to restart KNotes if it was running * /
bool knotesWasRunning;
bool saveNotes(OSyncContext *ctx);
@@ -73,3 +73,4 @@
virtual void get_changes(OSyncPluginInfo *info, OSyncContext *ctx);
virtual void commit(OSyncPluginInfo *info, OSyncContext *ctx, OSyncChange *chg);
};
+*/
\ No newline at end of file
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/libopensync-plugin-kdepim/F-9/.cvsignore,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- .cvsignore 28 Dec 2007 23:57:21 -0000 1.6
+++ .cvsignore 20 Jun 2008 07:33:45 -0000 1.7
@@ -1 +1 @@
-libopensync-plugin-kdepim-0.35.tar.bz2
+libopensync-plugin-kdepim-0.36.tar.bz2
Index: libopensync-plugin-kdepim.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libopensync-plugin-kdepim/F-9/libopensync-plugin-kdepim.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- libopensync-plugin-kdepim.spec 18 Feb 2008 20:31:11 -0000 1.11
+++ libopensync-plugin-kdepim.spec 20 Jun 2008 07:33:45 -0000 1.12
@@ -1,25 +1,38 @@
+%if 0%{?fedora} > 9
+%define kdepim4 1
+%endif
+
Name: libopensync-plugin-kdepim
-Version: 0.35
-Release: 2%{?dist}
+Version: 0.36
+Release: 1%{?dist}
Summary: KDE plugin for libopensync
Group: System Environment/Libraries
License: GPLv2
URL: http://www.opensync.org
Source0: http://www.opensync.org/download/releases/%{version}/%{name}-%{version}.tar.bz2
+# KDE 4 port: http://websvn.kde.org/trunk/playground/pim/libopensync-plugin-kdepim-0.36/
+Patch0: libopensync-plugin-kdepim-0.36-kde4.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cmake
-BuildRequires: libopensync-devel >= 0.35
+BuildRequires: libopensync-devel >= 0.36
BuildRequires: libstdc++-devel
-BuildRequires: kdepim-devel
-BuildRequires: kdelibs-devel
+%if 0%{?kdepim4}
+BuildRequires: kdepimlibs-devel
+BuildRequires: openldap-devel
+%else
+BuildRequires: kdepim3-devel
+%endif
%description
%{summary}
%prep
%setup -q
+%if 0%{?kdepim4}
+%patch0 -p1 -b .kdepim4
+%endif
%build
mkdir build
@@ -47,6 +60,10 @@
%{_datadir}/opensync-1.0/defaults/kdepim-sync
%changelog
+* Sat Jun 07 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> 0.36-1
+- update to 0.36 (base for the KDE 4 port)
+- apply KDE 4 port patch on F10+
+
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 0.35-2
- Autorebuild for GCC 4.3
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/libopensync-plugin-kdepim/F-9/sources,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- sources 28 Dec 2007 23:57:21 -0000 1.6
+++ sources 20 Jun 2008 07:33:45 -0000 1.7
@@ -1 +1 @@
-eaa2044e00f570b54155068f12726e5b libopensync-plugin-kdepim-0.35.tar.bz2
+4fc80504fc76fbd0bb04d61f5a1b8a6d libopensync-plugin-kdepim-0.36.tar.bz2
- Previous message (by thread): rpms/libopensync-plugin-irmc/devel .cvsignore, 1.6, 1.7 libopensync-plugin-irmc.spec, 1.15, 1.16 sources, 1.6, 1.7
- Next message (by thread): rpms/libopensync-plugin-moto/F-9 .cvsignore, 1.2, 1.3 libopensync-plugin-moto.spec, 1.3, 1.4 sources, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list