author | zautrix <zautrix> | 2005-08-19 13:29:20 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-19 13:29:20 (UTC) |
commit | 14cc7e0e2440d19cee538b10ba158f4b8c362e4e (patch) (unidiff) | |
tree | 57a79bf5a7d50ea9ea332f6634da243199b074e9 /kabc/plugins/file | |
parent | 9014049779be6cfec02d73e19596439f0f4f9bed (diff) | |
download | kdepimpi-14cc7e0e2440d19cee538b10ba158f4b8c362e4e.zip kdepimpi-14cc7e0e2440d19cee538b10ba158f4b8c362e4e.tar.gz kdepimpi-14cc7e0e2440d19cee538b10ba158f4b8c362e4e.tar.bz2 |
fix
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index c89939d..dad4571 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp | |||
@@ -62,48 +62,55 @@ extern "C" | |||
62 | #ifdef _WIN32_ | 62 | #ifdef _WIN32_ |
63 | __declspec(dllexport) | 63 | __declspec(dllexport) |
64 | #else | 64 | #else |
65 | { | 65 | { |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | //US void *init_kabc_file() | 68 | //US void *init_kabc_file() |
69 | void *init_microkabc_file() | 69 | void *init_microkabc_file() |
70 | { | 70 | { |
71 | return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>(); | 71 | return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>(); |
72 | } | 72 | } |
73 | #ifndef _WIN32_ | 73 | #ifndef _WIN32_ |
74 | } | 74 | } |
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | ResourceFile::ResourceFile( const KConfig *config ) | 77 | ResourceFile::ResourceFile( const KConfig *config ) |
78 | : Resource( config ) , mFormat( 0 ) | 78 | : Resource( config ) , mFormat( 0 ) |
79 | { | 79 | { |
80 | QString fileName, formatName, default_fileName; | 80 | QString fileName, formatName, default_fileName; |
81 | 81 | ||
82 | default_fileName = StdAddressBook::fileName(); | 82 | default_fileName = StdAddressBook::fileName(); |
83 | mLastBackupDate = -1; | 83 | mLastBackupDate = -1; |
84 | KConfig *cfg = (KConfig *)config; | 84 | KConfig *cfg = (KConfig *)config; |
85 | if ( cfg ) { | 85 | if ( cfg ) { |
86 | #ifdef _WIN32_ | ||
87 | // we use plugins on win32. the group is stored in a static variable | ||
88 | // such that group info not available on win32 plugins | ||
89 | // to fix that, it would be a looooot of work | ||
90 | if ( !cfg->tempGroup().isEmpty() ) | ||
91 | cfg->setGroup( cfg->tempGroup() ); | ||
92 | #endif | ||
86 | fileName = cfg->readEntry( "FileName", default_fileName ); | 93 | fileName = cfg->readEntry( "FileName", default_fileName ); |
87 | formatName = cfg->readEntry( "FileFormat", "vcard" ); | 94 | formatName = cfg->readEntry( "FileFormat", "vcard" ); |
88 | mFamily = cfg->readEntry( "ResourceName", "std" ); | 95 | mFamily = cfg->readEntry( "ResourceName", "std" ); |
89 | mLastBackupDate = cfg->readNumEntry( "LastBackupDate", 0 ); | 96 | mLastBackupDate = cfg->readNumEntry( "LastBackupDate", 0 ); |
90 | } else { | 97 | } else { |
91 | fileName = default_fileName; | 98 | fileName = default_fileName; |
92 | formatName = "vcard"; | 99 | formatName = "vcard"; |
93 | } | 100 | } |
94 | 101 | ||
95 | init( fileName, formatName ); | 102 | init( fileName, formatName ); |
96 | } | 103 | } |
97 | 104 | ||
98 | ResourceFile::ResourceFile( const QString &fileName , | 105 | ResourceFile::ResourceFile( const QString &fileName , |
99 | const QString &formatName ) | 106 | const QString &formatName ) |
100 | : Resource( 0 ) | 107 | : Resource( 0 ) |
101 | { | 108 | { |
102 | // qDebug("ResourceFile::ResourceFile : 3 %s, %s", fileName.latin1(), formatName.latin1()); | 109 | // qDebug("ResourceFile::ResourceFile : 3 %s, %s", fileName.latin1(), formatName.latin1()); |
103 | 110 | ||
104 | 111 | ||
105 | mLastBackupDate = -1; | 112 | mLastBackupDate = -1; |
106 | init( fileName, formatName ); | 113 | init( fileName, formatName ); |
107 | } | 114 | } |
108 | 115 | ||
109 | void ResourceFile::init( const QString &fileName, const QString &formatName ) | 116 | void ResourceFile::init( const QString &fileName, const QString &formatName ) |