author | ar <ar> | 2005-02-01 19:54:57 (UTC) |
---|---|---|
committer | ar <ar> | 2005-02-01 19:54:57 (UTC) |
commit | 62aad63f824740f15357c28e6bb61fbdf2120585 (patch) (unidiff) | |
tree | 079a6f219f8eed3743414b64b68e45d7003a08d7 /noncore/settings/backup/backuprestore.cpp | |
parent | 17a8d1d5d2d9ec7a5e09da00e055d566fbd85353 (diff) | |
download | opie-62aad63f824740f15357c28e6bb61fbdf2120585.zip opie-62aad63f824740f15357c28e6bb61fbdf2120585.tar.gz opie-62aad63f824740f15357c28e6bb61fbdf2120585.tar.bz2 |
- fix bug #1536
custom locations are stored and removed immadiately after add and remove in location list.
Diffstat (limited to 'noncore/settings/backup/backuprestore.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/backup/backuprestore.cpp | 3 |
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 | ||
733 | void BackupAndRestore::removeLocation() | 733 | void 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 | ||
741 | void BackupAndRestore::saveLocations() | 742 | void BackupAndRestore::saveLocations() |
742 | { | 743 | { |
743 | Config config("BackupAndRestore"); | 744 | Config config("BackupAndRestore"); |