summaryrefslogtreecommitdiff
path: root/noncore/settings/backup/backuprestore.cpp
Unidiff
Diffstat (limited to 'noncore/settings/backup/backuprestore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/backup/backuprestore.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp
index d028379..8928cda 100644
--- a/noncore/settings/backup/backuprestore.cpp
+++ b/noncore/settings/backup/backuprestore.cpp
@@ -84,13 +84,12 @@ BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name, WFlags f
84 connect( backupButton, SIGNAL( clicked() ), this, SLOT( backup() ) ); 84 connect( backupButton, SIGNAL( clicked() ), this, SLOT( backup() ) );
85 connect( restoreButton, SIGNAL( clicked() ), this, SLOT( restore() ) ); 85 connect( restoreButton, SIGNAL( clicked() ), this, SLOT( restore() ) );
86 connect( backupList, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( selectItem( QListViewItem* ) ) ); 86 connect( backupList, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( selectItem( QListViewItem* ) ) );
87 connect( restoreSource, SIGNAL( activated( int ) ), this, SLOT( sourceDirChanged( int ) ) ); 87 connect( restoreSource, SIGNAL( activated( int ) ), this, SLOT( sourceDirChanged( int ) ) );
88 connect( addLocationButton, SIGNAL( clicked() ), this, SLOT( addLocation() ) ); 88 connect( addLocationButton, SIGNAL( clicked() ), this, SLOT( addLocation() ) );
89 connect( removeLocationButton, SIGNAL( clicked() ), this, SLOT( removeLocation() ) ); 89 connect( removeLocationButton, SIGNAL( clicked() ), this, SLOT( removeLocation() ) );
90 connect( saveLocationsButton, SIGNAL( clicked() ), this, SLOT( saveLocations() ) );
91 connect( selectLocationButton, SIGNAL( clicked() ), this, SLOT( selectLocation() ) ); 90 connect( selectLocationButton, SIGNAL( clicked() ), this, SLOT( selectLocation() ) );
92 91
93 //add directorys for backing up 92 //add directorys for backing up
94 applicationSettings = new QListViewItem(backupList, "Application Settings", "", "Settings/"); 93 applicationSettings = new QListViewItem(backupList, "Application Settings", "", "Settings/");
95 selectItem(applicationSettings); 94 selectItem(applicationSettings);
96 applicationSettings = new QListViewItem(backupList, "Application Data", "", "Applications/"); 95 applicationSettings = new QListViewItem(backupList, "Application Data", "", "Applications/");
@@ -724,20 +723,22 @@ void BackupAndRestore::addLocation()
724{ 723{
725 if ( ( !locationEdit->text().isEmpty() ) && 724 if ( ( !locationEdit->text().isEmpty() ) &&
726 ( QDir( locationEdit->text() ).exists() ) ) 725 ( QDir( locationEdit->text() ).exists() ) )
727 { 726 {
728 (void) new QListViewItem( locationList, locationEdit->text() ); 727 (void) new QListViewItem( locationList, locationEdit->text() );
729 locationEdit->setText( "" ); 728 locationEdit->setText( "" );
729 saveLocations();
730 } 730 }
731} 731}
732 732
733void BackupAndRestore::removeLocation() 733void BackupAndRestore::removeLocation()
734{ 734{
735 if ( locationList->selectedItem() ) 735 if ( locationList->selectedItem() )
736 { 736 {
737 delete( locationList->selectedItem() ); 737 delete( locationList->selectedItem() );
738 saveLocations();
738 } 739 }
739} 740}
740 741
741void BackupAndRestore::saveLocations() 742void BackupAndRestore::saveLocations()
742{ 743{
743 Config config("BackupAndRestore"); 744 Config config("BackupAndRestore");