author | zautrix <zautrix> | 2005-04-03 23:09:08 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-03 23:09:08 (UTC) |
commit | 06fbd5e92ff0cb2a5ef630f7f09ca3e1927f5cf5 (patch) (unidiff) | |
tree | a9f01377dc21931e5d267edc3b196232f244d1fb /kabc | |
parent | 30359da3c126e67f6c75400323fcca4c159c3d93 (diff) | |
download | kdepimpi-06fbd5e92ff0cb2a5ef630f7f09ca3e1927f5cf5.zip kdepimpi-06fbd5e92ff0cb2a5ef630f7f09ca3e1927f5cf5.tar.gz kdepimpi-06fbd5e92ff0cb2a5ef630f7f09ca3e1927f5cf5.tar.bz2 |
sync fix
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 18 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.h | 1 |
2 files changed, 13 insertions, 6 deletions
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index 0e6c2a3..af76558 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp | |||
@@ -86,2 +86,3 @@ ResourceFile::ResourceFile( const KConfig *config ) | |||
86 | formatName = cfg->readEntry( "FileFormat", "vcard" ); | 86 | formatName = cfg->readEntry( "FileFormat", "vcard" ); |
87 | mFamily = cfg->readEntry( "ResourceName", "std" ); | ||
87 | } else { | 88 | } else { |
@@ -123,4 +124,3 @@ void ResourceFile::init( const QString &fileName, const QString &formatName ) | |||
123 | 124 | ||
124 | 125 | QString localKdeDir; | |
125 | QString localKdeDir; | ||
126 | localKdeDir = readEnvPath("LOCALMICROKDEHOME"); | 126 | localKdeDir = readEnvPath("LOCALMICROKDEHOME"); |
@@ -131,6 +131,12 @@ void ResourceFile::init( const QString &fileName, const QString &formatName ) | |||
131 | QFileInfo fi2 ( localname ); | 131 | QFileInfo fi2 ( localname ); |
132 | if ( ! fi2.exists() ) { | 132 | if ( ! fi2.exists() || mFamily == "sync_res" ) { |
133 | KMessageBox::error(0,i18n("Addressbook resource file not found:\n '%1'.\nIn LOCAL mode only resource files in\n'%2'\nare supported.\n(i.e. in the dir ./apps/kabc/ relative to the kapi(.exe) binary.)\n\nIf you are starting KA/Pi for the very first time\nyou will get this error message as well.\nIt will create the missing file automatically for you.").arg(localname).arg(localKdeDir+"/apps/kabc/") ); | 133 | if ( fi.exists() && mFamily == "sync_res") { |
134 | setFileName( localname ); | 134 | qDebug("LOCAL mode SYNC mode using absolute file path "); |
135 | return; | 135 | setFileName( fileName ); |
136 | return; | ||
137 | } else { | ||
138 | KMessageBox::error(0,i18n("Addressbook resource file not found:\n '%1'.\nIn LOCAL mode only resource files in\n'%2'\nare supported.\n(i.e. in the dir ./apps/kabc/ relative to the kapi(.exe) binary.)\n\nIf you are starting KA/Pi for the very first time\nyou will get this error message as well.\nIt will create the missing file automatically for you.").arg(localname).arg(localKdeDir+"/apps/kabc/") ); | ||
139 | setFileName( localname ); | ||
140 | return; | ||
141 | } | ||
136 | 142 | ||
diff --git a/kabc/plugins/file/resourcefile.h b/kabc/plugins/file/resourcefile.h index dd38a9d..3e9edfc 100644 --- a/kabc/plugins/file/resourcefile.h +++ b/kabc/plugins/file/resourcefile.h | |||
@@ -149,2 +149,3 @@ protected: | |||
149 | private: | 149 | private: |
150 | QString mFamily; | ||
150 | QString mFileName2; | 151 | QString mFileName2; |