summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/file/resourcefile.cpp
authorzautrix <zautrix>2005-08-19 13:29:20 (UTC)
committer zautrix <zautrix>2005-08-19 13:29:20 (UTC)
commit14cc7e0e2440d19cee538b10ba158f4b8c362e4e (patch) (side-by-side diff)
tree57a79bf5a7d50ea9ea332f6634da243199b074e9 /kabc/plugins/file/resourcefile.cpp
parent9014049779be6cfec02d73e19596439f0f4f9bed (diff)
downloadkdepimpi-14cc7e0e2440d19cee538b10ba158f4b8c362e4e.zip
kdepimpi-14cc7e0e2440d19cee538b10ba158f4b8c362e4e.tar.gz
kdepimpi-14cc7e0e2440d19cee538b10ba158f4b8c362e4e.tar.bz2
fix
Diffstat (limited to 'kabc/plugins/file/resourcefile.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/plugins/file/resourcefile.cpp7
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
@@ -74,24 +74,31 @@ __declspec(dllexport)
}
#endif
ResourceFile::ResourceFile( const KConfig *config )
: Resource( config ) , mFormat( 0 )
{
QString fileName, formatName, default_fileName;
default_fileName = StdAddressBook::fileName();
mLastBackupDate = -1;
KConfig *cfg = (KConfig *)config;
if ( cfg ) {
+#ifdef _WIN32_
+ // we use plugins on win32. the group is stored in a static variable
+ // such that group info not available on win32 plugins
+ // to fix that, it would be a looooot of work
+ if ( !cfg->tempGroup().isEmpty() )
+ cfg->setGroup( cfg->tempGroup() );
+#endif
fileName = cfg->readEntry( "FileName", default_fileName );
formatName = cfg->readEntry( "FileFormat", "vcard" );
mFamily = cfg->readEntry( "ResourceName", "std" );
mLastBackupDate = cfg->readNumEntry( "LastBackupDate", 0 );
} else {
fileName = default_fileName;
formatName = "vcard";
}
init( fileName, formatName );
}