diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-07 22:30:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-07 22:30:29 +0000 |
commit | d8b40941f9d1a221add0b9094eb09405a91a8aab (patch) | |
tree | 0b8e9b6347f6e75925bb3c386a47c5300b1a4775 /kitchensync/libqopensync/conversion.cpp | |
parent | 009631d0fc83f471d6c515e2a5001337a5a2ea21 (diff) | |
download | tdepim-d8b40941f9d1a221add0b9094eb09405a91a8aab.tar.gz tdepim-d8b40941f9d1a221add0b9094eb09405a91a8aab.zip |
Part 2/2 of Chakra patch commit
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1172727 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kitchensync/libqopensync/conversion.cpp')
-rw-r--r-- | kitchensync/libqopensync/conversion.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/kitchensync/libqopensync/conversion.cpp b/kitchensync/libqopensync/conversion.cpp index 0be2fdb73..dac027b1c 100644 --- a/kitchensync/libqopensync/conversion.cpp +++ b/kitchensync/libqopensync/conversion.cpp @@ -20,6 +20,7 @@ */ #include <opensync/opensync.h> +#include <opensync/opensync-format.h> #include "conversion.h" @@ -43,16 +44,20 @@ TQStringList Conversion::objectTypes() const { Q_ASSERT( mEnvironment ); - OSyncFormatEnv *formatEnv = osync_conv_env_new( mEnvironment ); + OSyncError *error = NULL; + OSyncFormatEnv *formatEnv = osync_format_env_new( &error ); Q_ASSERT( formatEnv ); + osync_format_env_load_plugins(formatEnv, NULL, &error); + TQStringList types; - for ( int i = 0; i < osync_conv_num_objtypes( formatEnv ); i++ ) { - OSyncObjType *type = osync_conv_nth_objtype( formatEnv, i ); - types.append( TQString::fromUtf8( osync_objtype_get_name( type ) ) ); - } - osync_conv_env_free( formatEnv ); + for (int i = 0; i < osync_format_env_num_objformats(formatEnv); i++) { + OSyncObjFormat *format = osync_format_env_nth_objformat(formatEnv, i); + types.append( TQString::fromUtf8( osync_objformat_get_objtype(format) ) ); + } + + osync_format_env_free( formatEnv ); return types; } |