summaryrefslogtreecommitdiff
path: root/noncore/settings/backup/backuprestore.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/backup/backuprestore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/backup/backuprestore.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp
index 36b101c..1748e8d 100644
--- a/noncore/settings/backup/backuprestore.cpp
+++ b/noncore/settings/backup/backuprestore.cpp
@@ -7,8 +7,9 @@
#include <opie2/ostorageinfo.h>
using namespace Opie::Core;
#include <opie2/ofiledialog.h>
+#include <opie2/owait.h>
using namespace Opie::Ui;
#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
@@ -250,9 +251,13 @@ void BackupAndRestore::backup()
"No items selected.",QString("Ok") );
return;
}
- setCaption(tr("Backup and Restore... working..."));
+ OWait *owait = new OWait();
+ Global::statusMessage( tr( "Backing up..." ) );
+ owait->show();
+ qApp->processEvents();
+
QString outputFile = backupLocations[storeToLocation->currentText()];
QDateTime datetime = QDateTime::currentDateTime();
QString dateString = QString::number( datetime.date().year() ) + QString::number( datetime.date().month() ).rightJustify(2, '0') +
@@ -283,8 +288,12 @@ void BackupAndRestore::backup()
odebug << commandLine << oendl;
int r = system( commandLine );
+ owait->hide();
+ delete owait;
+
+ //Error-Handling
if(r != 0)
{
perror("Error: ");
QString errorMsg= tr( "Error from System:\n" ) + (QString)strerror( errno );
@@ -433,9 +442,13 @@ void BackupAndRestore::restore()
QMessageBox::critical(this, tr( "Message" ),
tr( "Please select something to restore." ),QString( tr( "Ok") ) );
return;
}
- setCaption(tr("Backup and Restore... working..."));
+
+ OWait *owait = new OWait();
+ Global::statusMessage( tr( "Restore Backup..." ) );
+ owait->show();
+ qApp->processEvents();
QString restoreFile = backupLocations[restoreSource->currentText()];
restoreFile += "/" + restoreItem->text(0);
@@ -466,8 +479,11 @@ void BackupAndRestore::restore()
odebug << commandLine << oendl;
r = system( commandLine );
+ owait->hide();
+ delete owait;
+
//error handling
if(r != 0)
{
QString errorMsg= tr( "Error from System:\n" ) + (QString)strerror( errno );