-rw-r--r-- | kabc/plugins/dir/resourcedir.cpp | 7 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 7 | ||||
-rw-r--r-- | kabc/plugins/ldap/resourceldap.cpp | 7 |
3 files changed, 21 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 | |||
@@ -83,12 +83,19 @@ 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(); |
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 | |||
@@ -80,12 +80,19 @@ ResourceFile::ResourceFile( const KConfig *config ) | |||
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; |
diff --git a/kabc/plugins/ldap/resourceldap.cpp b/kabc/plugins/ldap/resourceldap.cpp index 55c43af..c3097de 100644 --- a/kabc/plugins/ldap/resourceldap.cpp +++ b/kabc/plugins/ldap/resourceldap.cpp | |||
@@ -53,12 +53,19 @@ void addModOp( LDAPMod ***pmods, const QString &attr, const QString &value ); | |||
53 | 53 | ||
54 | ResourceLDAP::ResourceLDAP( const KConfig *config ) | 54 | ResourceLDAP::ResourceLDAP( const KConfig *config ) |
55 | : Resource( config ), mPort( 389 ), mLdap( 0 ) | 55 | : Resource( config ), mPort( 389 ), mLdap( 0 ) |
56 | { | 56 | { |
57 | KConfig *cfg = (KConfig *)config; | 57 | KConfig *cfg = (KConfig *)config; |
58 | if ( cfg ) { | 58 | if ( cfg ) { |
59 | #ifdef _WIN32_ | ||
60 | // we use plugins on win32. the group is stored in a static variable | ||
61 | // such that group info not available on win32 plugins | ||
62 | // to fix that, it would be a looooot of work | ||
63 | if ( !cfg->tempGroup().isEmpty() ) | ||
64 | cfg->setGroup( cfg->tempGroup() ); | ||
65 | #endif | ||
59 | mUser = cfg->readEntry( "LdapUser" ); | 66 | mUser = cfg->readEntry( "LdapUser" ); |
60 | mPassword = KStringHandler::obscure( cfg->readEntry( "LdapPassword" ) ); | 67 | mPassword = KStringHandler::obscure( cfg->readEntry( "LdapPassword" ) ); |
61 | mDn = cfg->readEntry( "LdapDn" ); | 68 | mDn = cfg->readEntry( "LdapDn" ); |
62 | mHost = cfg->readEntry( "LdapHost" ); | 69 | mHost = cfg->readEntry( "LdapHost" ); |
63 | mPort = cfg->readNumEntry( "LdapPort", 389 ); | 70 | mPort = cfg->readNumEntry( "LdapPort", 389 ); |
64 | mFilter = cfg->readEntry( "LdapFilter" ); | 71 | mFilter = cfg->readEntry( "LdapFilter" ); |