Diffstat (limited to 'kabc/plugins/file/resourcefile.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index 1d3acec..361b36b 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp | |||
@@ -48,12 +48,14 @@ $Id$ | |||
48 | 48 | ||
49 | #include "resource.h" | 49 | #include "resource.h" |
50 | #include "resourcefileconfig.h" | 50 | #include "resourcefileconfig.h" |
51 | #include "stdaddressbook.h" | 51 | #include "stdaddressbook.h" |
52 | 52 | ||
53 | #include "resourcefile.h" | 53 | #include "resourcefile.h" |
54 | #include "syncwidget.h" | ||
55 | |||
54 | 56 | ||
55 | using namespace KABC; | 57 | using namespace KABC; |
56 | 58 | ||
57 | extern "C" | 59 | extern "C" |
58 | #ifdef _WIN32_ | 60 | #ifdef _WIN32_ |
59 | __declspec(dllexport) | 61 | __declspec(dllexport) |
@@ -61,20 +63,20 @@ __declspec(dllexport) | |||
61 | { | 63 | { |
62 | #endif | 64 | #endif |
63 | 65 | ||
64 | //US void *init_kabc_file() | 66 | //US void *init_kabc_file() |
65 | void *init_microkabc_file() | 67 | void *init_microkabc_file() |
66 | { | 68 | { |
67 | return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>(); | 69 | return new KRES::PluginFactory<ResourceFile,ResourceFileConfig, KRES::SyncWidget>(); |
68 | } | 70 | } |
69 | #ifndef _WIN32_ | 71 | #ifndef _WIN32_ |
70 | } | 72 | } |
71 | #endif | 73 | #endif |
72 | 74 | ||
73 | ResourceFile::ResourceFile( const KConfig *config ) | 75 | ResourceFile::ResourceFile( const KConfig *config, bool syncable ) |
74 | : Resource( config ) , mFormat( 0 ) | 76 | : Resource( config, syncable ) , mFormat( 0 ) |
75 | { | 77 | { |
76 | QString fileName, formatName; | 78 | QString fileName, formatName; |
77 | 79 | ||
78 | KConfig *cfg = (KConfig *)config; | 80 | KConfig *cfg = (KConfig *)config; |
79 | if ( cfg ) { | 81 | if ( cfg ) { |
80 | fileName = cfg->readEntry( "FileName", StdAddressBook::fileName() ); | 82 | fileName = cfg->readEntry( "FileName", StdAddressBook::fileName() ); |
@@ -86,15 +88,15 @@ ResourceFile::ResourceFile( const KConfig *config ) | |||
86 | // qDebug("ResourceFile::ResourceFile : 2 %s, %s", fileName.latin1(), formatName.latin1() ); | 88 | // qDebug("ResourceFile::ResourceFile : 2 %s, %s", fileName.latin1(), formatName.latin1() ); |
87 | } | 89 | } |
88 | 90 | ||
89 | init( fileName, formatName ); | 91 | init( fileName, formatName ); |
90 | } | 92 | } |
91 | 93 | ||
92 | ResourceFile::ResourceFile( const QString &fileName, | 94 | ResourceFile::ResourceFile( const QString &fileName, bool syncable , |
93 | const QString &formatName ) | 95 | const QString &formatName ) |
94 | : Resource( 0 ) | 96 | : Resource( 0, syncable ) |
95 | { | 97 | { |
96 | // qDebug("ResourceFile::ResourceFile : 3 %s, %s", fileName.latin1(), formatName.latin1()); | 98 | // qDebug("ResourceFile::ResourceFile : 3 %s, %s", fileName.latin1(), formatName.latin1()); |
97 | init( fileName, formatName ); | 99 | init( fileName, formatName ); |
98 | } | 100 | } |
99 | 101 | ||
100 | void ResourceFile::init( const QString &fileName, const QString &formatName ) | 102 | void ResourceFile::init( const QString &fileName, const QString &formatName ) |