summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/addressbook.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/addressbook/addressbook.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp54
1 files changed, 4 insertions, 50 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 2eb9ddf..93581e8 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -69,14 +69,2 @@
#include "picker.h"
-static QString addressbookOldXMLFilename()
-{
- QString filename = QPEApplication::documentDir() + "addressbook.xml";
- return filename;
-}
-
-static QString addressbookXMLFilename()
-{
- QString filename = Global::applicationFileName("addressbook",
- "addressbook.xml");
- return filename;
-}
@@ -204,17 +192,2 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
// Create Views
-
- // This is safe to call without checking to see if it exists...
- // not to mention it also does the necessary stuff for the
- // journaling...
- QString str = addressbookXMLFilename();
- if ( str.isNull() ) {
- QMessageBox::warning(
- this,
- tr("Out of Space"),
- tr("There is not enough space to create\n"
- "neccessary startup files.\n"
- "\nFree up some space before\nentering data!")
- );
- }
-
listContainer = new QWidget( this );
@@ -232,7 +205,3 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
- abList->load( addressbookXMLFilename() );
- if ( QFile::exists(addressbookOldXMLFilename()) ) {
- abList->load( addressbookOldXMLFilename() );
- QFile::remove(addressbookOldXMLFilename());
- }
+ abList->load();
@@ -711,3 +680,3 @@ void AddressbookWindow::reload()
abList->clear();
- abList->load( addressbookXMLFilename() );
+ abList->reload();
}
@@ -717,3 +686,3 @@ void AddressbookWindow::flush()
syncing = TRUE;
- abList->save( addressbookXMLFilename() );
+ abList->save();
}
@@ -757,4 +726,3 @@ bool AddressbookWindow::save()
{
- QString str = addressbookXMLFilename();
- if ( str.isNull() ) {
+ if ( !abList->save() ) {
if ( QMessageBox::critical( 0, tr("Out of space"),
@@ -770,16 +738,2 @@ bool AddressbookWindow::save()
return FALSE;
- } else {
- if ( !abList->save( str ) ) {
- if ( QMessageBox::critical( 0, tr( "Out of space" ),
- tr("Unable to save information.\n"
- "Free up some space\n"
- "and try again.\n"
- "\nQuit anyway?"),
- QMessageBox::Yes|QMessageBox::Escape,
- QMessageBox::No|QMessageBox::Default )
- != QMessageBox::No )
- return TRUE;
- else
- return FALSE;
- }
}