summaryrefslogtreecommitdiff
path: root/noncore/settings/backup/backuprestore.cpp
Unidiff
Diffstat (limited to 'noncore/settings/backup/backuprestore.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/backup/backuprestore.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp
index 477e24d..93bedf6 100644
--- a/noncore/settings/backup/backuprestore.cpp
+++ b/noncore/settings/backup/backuprestore.cpp
@@ -267,49 +267,49 @@ void BackupAndRestore::backup()
267 QTextStream t( &errorFile ); 267 QTextStream t( &errorFile );
268 QString s; 268 QString s;
269 while ( !t.eof() ) 269 while ( !t.eof() )
270 { // until end of file... 270 { // until end of file...
271 s += t.readLine(); // line of text excluding '\n' 271 s += t.readLine(); // line of text excluding '\n'
272 } 272 }
273 errorFile.close(); 273 errorFile.close();
274 274
275 pErrDialog->m_textarea->setText( s ); 275 pErrDialog->m_textarea->setText( s );
276 } 276 }
277 else 277 else
278 { 278 {
279 pErrDialog->m_textarea->setText( "Unable to open File: /tmp/backup.er" ); 279 pErrDialog->m_textarea->setText( "Unable to open File: /tmp/backup.er" );
280 } 280 }
281 pErrDialog->showMaximized(); 281 pErrDialog->showMaximized();
282 pErrDialog->exec(); 282 pErrDialog->exec();
283 delete pErrDialog; 283 delete pErrDialog;
284 break; 284 break;
285 } 285 }
286 setCaption(tr("Backup and Restore.. Failed !!")); 286 setCaption(tr("Backup and Restore.. Failed !!"));
287 return; 287 return;
288 } 288 }
289 else 289 else
290 { 290 {
291 QMessageBox::information(this, tr( "Message" ), tr( "Backup Successfull." ), QString(tr( "Ok" ) ) ); 291 QMessageBox::information(this, tr( "Message" ), tr( "Backup Successful." ), QString(tr( "Ok" ) ) );
292 292
293 } 293 }
294 294
295 //write store-location 295 //write store-location
296 Config config( "BackupAndRestore" ); 296 Config config( "BackupAndRestore" );
297 config.setGroup( "LastLocation" ); 297 config.setGroup( "LastLocation" );
298 config.writeEntry( "LastStoreLocation", storeToLocation->currentText() ); 298 config.writeEntry( "LastStoreLocation", storeToLocation->currentText() );
299 299
300 setCaption(tr("Backup and Restore")); 300 setCaption(tr("Backup and Restore"));
301} 301}
302 302
303/*** 303/***
304 * Get a list of all of the files to backup. 304 * Get a list of all of the files to backup.
305 */ 305 */
306int BackupAndRestore::getBackupFiles(QString &backupFiles, QListViewItem *parent) 306int BackupAndRestore::getBackupFiles(QString &backupFiles, QListViewItem *parent)
307{ 307{
308 QListViewItem * currentItem; 308 QListViewItem * currentItem;
309 QString currentHome; 309 QString currentHome;
310 if(!parent) 310 if(!parent)
311 currentItem = backupList->firstChild(); 311 currentItem = backupList->firstChild();
312 else 312 else
313 { 313 {
314 currentItem = parent->firstChild(); 314 currentItem = parent->firstChild();
315 currentHome = parent->text(BACKUP_LOCATION); 315 currentHome = parent->text(BACKUP_LOCATION);
@@ -435,37 +435,37 @@ void BackupAndRestore::restore()
435 { // until end of file... 435 { // until end of file...
436 s += t.readLine(); // line of text excluding '\n' 436 s += t.readLine(); // line of text excluding '\n'
437 } 437 }
438 errorFile.close(); 438 errorFile.close();
439 439
440 pErrDialog->m_textarea->setText( s ); 440 pErrDialog->m_textarea->setText( s );
441 } 441 }
442 else 442 else
443 { 443 {
444 pErrDialog->m_textarea->setText( tr( "Unable to open File: %1" ).arg( "/tmp/backup.er" ) ); 444 pErrDialog->m_textarea->setText( tr( "Unable to open File: %1" ).arg( "/tmp/backup.er" ) );
445 } 445 }
446 pErrDialog->showMaximized(); 446 pErrDialog->showMaximized();
447 pErrDialog->exec(); 447 pErrDialog->exec();
448 delete pErrDialog; 448 delete pErrDialog;
449 449
450 setCaption(tr("Backup and Restore.. Failed !!")); 450 setCaption(tr("Backup and Restore.. Failed !!"));
451 return; 451 return;
452 452
453 break; 453 break;
454 454
455 } 455 }
456 } 456 }
457 else 457 else
458 { 458 {
459 QMessageBox::information(this, tr( "Message" ), tr( "Restore Successfull." ), QString( tr( "Ok") ) ); 459 QMessageBox::information(this, tr( "Message" ), tr( "Restore Successful." ), QString( tr( "Ok") ) );
460 } 460 }
461 461
462 //write restore-location 462 //write restore-location
463 Config config( "BackupAndRestore" ); 463 Config config( "BackupAndRestore" );
464 config.setGroup( "LastLocation" ); 464 config.setGroup( "LastLocation" );
465 config.writeEntry( "LastRestoreLocation", restoreSource->currentText() ); 465 config.writeEntry( "LastRestoreLocation", restoreSource->currentText() );
466 466
467 setCaption(tr("Backup and Restore")); 467 setCaption(tr("Backup and Restore"));
468} 468}
469 469
470// backuprestore.cpp 470// backuprestore.cpp
471 471