summaryrefslogtreecommitdiffabout
path: root/kabc
authorulf69 <ulf69>2004-07-09 08:12:00 (UTC)
committer ulf69 <ulf69>2004-07-09 08:12:00 (UTC)
commitaae8af24992bf3b7b59fb425955153b86f31bb5d (patch) (side-by-side diff)
tree2ad2e501a14c5a96bf5c7deebd3638bed405350e /kabc
parentde99e22a7093e857ee3c08a67ccc389d6374099a (diff)
downloadkdepimpi-aae8af24992bf3b7b59fb425955153b86f31bb5d.zip
kdepimpi-aae8af24992bf3b7b59fb425955153b86f31bb5d.tar.gz
kdepimpi-aae8af24992bf3b7b59fb425955153b86f31bb5d.tar.bz2
IntDateFormat is now an enum instead of an ionteger value
Diffstat (limited to 'kabc') (more/less context) (show whitespace changes)
-rw-r--r--kabc/field.cpp8
-rw-r--r--kabc/plugins/opie/resourceopie.cpp16
-rw-r--r--kabc/plugins/opie/resourceopieconfig.cpp11
-rw-r--r--kabc/plugins/opie/resourceopieconfig.h3
4 files changed, 20 insertions, 18 deletions
diff --git a/kabc/field.cpp b/kabc/field.cpp
index bc2e176..e27970e 100644
--- a/kabc/field.cpp
+++ b/kabc/field.cpp
@@ -263,6 +263,6 @@ QString Field::value( const KABC::Addressee &a )
// But Qt::IsoDate was not specified.
- QString _oldFormat = KGlobal::locale()->dateFormat();
- KGlobal::locale()->setDateFormat("%Y-%m-%d"); // = Qt::ISODate
- QString dt = KGlobal::locale()->formatDate(a.birthday().date(), false);
- KGlobal::locale()->setDateFormat(_oldFormat);
+// QString _oldFormat = KGlobal::locale()->dateFormat();
+// KGlobal::locale()->setDateFormat("%Y-%m-%d"); // = Qt::ISODate
+ QString dt = KGlobal::locale()->formatDate(a.birthday().date(), false, KLocale::ISODate);
+// KGlobal::locale()->setDateFormat(_oldFormat);
return dt;
diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp
index 3b2a6b7..a7d271f 100644
--- a/kabc/plugins/opie/resourceopie.cpp
+++ b/kabc/plugins/opie/resourceopie.cpp
@@ -99,3 +99,3 @@ void ResourceOpie::init( const QString &fileName )
//US opie addressbook is always readonly
- setReadOnly( true );
+//US setReadOnly( true );
@@ -114,3 +114,3 @@ void ResourceOpie::writeConfig( KConfig *config )
//US opie addressbook is always readonly
- setReadOnly( true );
+//US setReadOnly( true );
@@ -196,4 +196,15 @@ bool ResourceOpie::load()
+ bool res = false;
if (mConverter == 0)
+ {
mConverter = new OpieConverter();
+ res = mConverter->init();
+ if ( !res )
+ {
+ qDebug("Unable to initialize opie converter. Most likely a problem with the category file");
+ addressBook()->error( i18n( "Unable to initialize opie converter. Most likely a problem with the category file" ) );
+ delete access;
+ return false;
+ }
+ }
@@ -202,3 +213,2 @@ bool ResourceOpie::load()
OContactAccess::List allList = access->allRecords();
- bool res = false;
for ( it = allList.begin(); it != allList.end(); ++it )
diff --git a/kabc/plugins/opie/resourceopieconfig.cpp b/kabc/plugins/opie/resourceopieconfig.cpp
index f4cc4f9..eef9cc9 100644
--- a/kabc/plugins/opie/resourceopieconfig.cpp
+++ b/kabc/plugins/opie/resourceopieconfig.cpp
@@ -64,11 +64,3 @@ ResourceOpieConfig::ResourceOpieConfig( QWidget* parent, const char* name )
mainLayout->addWidget( mFileNameEdit, 0, 1 );
-
-//US mInEditMode = false;
-}
-/*US
-void ResourceOpieConfig::setEditMode( bool value )
-{
- mInEditMode = value;
}
-*/
@@ -87,2 +79,5 @@ void ResourceOpieConfig::loadSettings( KRES::Resource *res )
mFileNameEdit->setURL( QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml" );
+
+ //US Opie resources are ReadOnly by definition
+ emit setPersistentReadOnly( true );
}
diff --git a/kabc/plugins/opie/resourceopieconfig.h b/kabc/plugins/opie/resourceopieconfig.h
index 533b7f4..8cc192c 100644
--- a/kabc/plugins/opie/resourceopieconfig.h
+++ b/kabc/plugins/opie/resourceopieconfig.h
@@ -44,4 +44,2 @@ public:
-//US void setEditMode( bool value );
-
public slots:
@@ -55,3 +53,2 @@ private:
KURLRequester* mFileNameEdit;
-//US bool mInEditMode;
};