summaryrefslogtreecommitdiffstats
path: root/kitchensync/libqopensync/conversion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kitchensync/libqopensync/conversion.cpp')
-rw-r--r--kitchensync/libqopensync/conversion.cpp17
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;
}