Diffstat (limited to 'kabc/plugins/dir/resourcedir.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/plugins/dir/resourcedir.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index e2b7b08..c61664b 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp | |||
@@ -77,24 +77,31 @@ __declspec(dllexport) | |||
77 | } | 77 | } |
78 | #ifndef _WIN32_ | 78 | #ifndef _WIN32_ |
79 | } | 79 | } |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | ResourceDir::ResourceDir( const KConfig *config ) | 82 | ResourceDir::ResourceDir( const KConfig *config ) |
83 | : Resource( config ) | 83 | : Resource( config ) |
84 | { | 84 | { |
85 | QString path; | 85 | QString path; |
86 | 86 | ||
87 | KConfig *cfg = (KConfig *)config; | 87 | KConfig *cfg = (KConfig *)config; |
88 | if ( cfg ) { | 88 | if ( cfg ) { |
89 | #ifdef _WIN32_ | ||
90 | // we use plugins on win32. the group is stored in a static variable | ||
91 | // such that group info not available on win32 plugins | ||
92 | // to fix that, it would be a looooot of work | ||
93 | if ( !cfg->tempGroup().isEmpty() ) | ||
94 | cfg->setGroup( cfg->tempGroup() ); | ||
95 | #endif | ||
89 | //US path = config->readEntry( "FilePath" ); | 96 | //US path = config->readEntry( "FilePath" ); |
90 | path = cfg->readEntry( "FilePath", StdAddressBook::directoryName() ); | 97 | path = cfg->readEntry( "FilePath", StdAddressBook::directoryName() ); |
91 | //US mFormatName = config->readEntry( "FileFormat" ); | 98 | //US mFormatName = config->readEntry( "FileFormat" ); |
92 | mFormatName = cfg->readEntry( "FileFormat", "vcard" ); | 99 | mFormatName = cfg->readEntry( "FileFormat", "vcard" ); |
93 | } else { | 100 | } else { |
94 | path = StdAddressBook::directoryName(); | 101 | path = StdAddressBook::directoryName(); |
95 | mFormatName = "vcard"; | 102 | mFormatName = "vcard"; |
96 | } | 103 | } |
97 | 104 | ||
98 | 105 | ||
99 | FormatFactory *factory = FormatFactory::self(); | 106 | FormatFactory *factory = FormatFactory::self(); |
100 | mFormat = factory->format( mFormatName ); | 107 | mFormat = factory->format( mFormatName ); |