Diffstat (limited to 'noncore/settings/backup/backuprestore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/backup/backuprestore.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp index eb69a70..2d79384 100644 --- a/noncore/settings/backup/backuprestore.cpp +++ b/noncore/settings/backup/backuprestore.cpp | |||
@@ -49,60 +49,60 @@ BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name, WFlags f | |||
49 | connect(restoreButton, SIGNAL(clicked()), | 49 | connect(restoreButton, SIGNAL(clicked()), |
50 | this, SLOT(restore())); | 50 | this, SLOT(restore())); |
51 | connect(backupList, SIGNAL(clicked( QListViewItem * )), | 51 | connect(backupList, SIGNAL(clicked( QListViewItem * )), |
52 | this, SLOT(selectItem(QListViewItem*))); | 52 | this, SLOT(selectItem(QListViewItem*))); |
53 | connect(restoreSource, SIGNAL(activated( int )), | 53 | connect(restoreSource, SIGNAL(activated( int )), |
54 | this, SLOT(sourceDirChanged(int))); | 54 | this, SLOT(sourceDirChanged(int))); |
55 | connect(updateList, SIGNAL(clicked()), | 55 | connect(updateList, SIGNAL(clicked()), |
56 | this, SLOT( fileListUpdate())); | 56 | this, SLOT( fileListUpdate())); |
57 | 57 | ||
58 | //add directorys for backing up | 58 | //add directorys for backing up |
59 | applicationSettings = new QListViewItem(backupList, "Application Settings", "", "Settings/"); | 59 | applicationSettings = new QListViewItem(backupList, "Application Settings", "", "Settings/"); |
60 | selectItem(applicationSettings); | 60 | selectItem(applicationSettings); |
61 | applicationSettings = new QListViewItem(backupList, "Application Data", "", "Applications/"); | 61 | applicationSettings = new QListViewItem(backupList, "Application Data", "", "Applications/"); |
62 | selectItem(applicationSettings); | 62 | selectItem(applicationSettings); |
63 | documents= new QListViewItem(backupList, "Documents", "", "Documents/"); | 63 | documents= new QListViewItem(backupList, "Documents", "", "Documents/"); |
64 | selectItem(documents); | 64 | selectItem(documents); |
65 | 65 | ||
66 | scanForApplicationSettings(); | 66 | scanForApplicationSettings(); |
67 | 67 | ||
68 | OStorageInfo storage; | 68 | OStorageInfo storage; |
69 | 69 | ||
70 | backupLocations.insert( "Documents", QDir::homeDirPath() + "/Documents" ); | 70 | backupLocations.insert( "Documents", QDir::homeDirPath() + "/Documents" ); |
71 | if ( storage.hasCf() ) | 71 | if ( storage.hasCf() ) |
72 | { | 72 | { |
73 | backupLocations.insert( "CF", storage.getCfPath() ); | 73 | backupLocations.insert( "CF", storage.cfPath() ); |
74 | qDebug( "Cf Path: " + storage.getCfPath() ); | 74 | qDebug( "Cf Path: " + storage.cfPath() ); |
75 | } | 75 | } |
76 | if ( storage.hasSd() ) | 76 | if ( storage.hasSd() ) |
77 | { | 77 | { |
78 | backupLocations.insert( "SD", storage.getSdPath() ); | 78 | backupLocations.insert( "SD", storage.sdPath() ); |
79 | qDebug( " Sd Path: " + storage.getSdPath() ); | 79 | qDebug( " Sd Path: " + storage.sdPath() ); |
80 | } | 80 | } |
81 | if ( storage.hasMmc() ) | 81 | if ( storage.hasMmc() ) |
82 | { | 82 | { |
83 | backupLocations.insert( "MMC", storage.getMmcPath() ); | 83 | backupLocations.insert( "MMC", storage.mmcPath() ); |
84 | qDebug( "Mmc Path: " + storage.getMmcPath() ); | 84 | qDebug( "Mmc Path: " + storage.mmcPath() ); |
85 | } | 85 | } |
86 | 86 | ||
87 | Config config("BackupAndRestore"); | 87 | Config config("BackupAndRestore"); |
88 | //read last locations | 88 | //read last locations |
89 | config.setGroup("LastLocation"); | 89 | config.setGroup("LastLocation"); |
90 | QString lastStoreLocation = config.readEntry( "LastStoreLocation", "" ); | 90 | QString lastStoreLocation = config.readEntry( "LastStoreLocation", "" ); |
91 | QString lastRestoreLocation = config.readEntry( "LastRestoreLocation", "" ); | 91 | QString lastRestoreLocation = config.readEntry( "LastRestoreLocation", "" ); |
92 | int locationIndex = 0; | 92 | int locationIndex = 0; |
93 | 93 | ||
94 | QMap<QString, QString>::Iterator it; | 94 | QMap<QString, QString>::Iterator it; |
95 | for( it = backupLocations.begin(); it != backupLocations.end(); ++it ) | 95 | for( it = backupLocations.begin(); it != backupLocations.end(); ++it ) |
96 | { | 96 | { |
97 | storeToLocation->insertItem(it.key()); | 97 | storeToLocation->insertItem(it.key()); |
98 | restoreSource->insertItem(it.key()); | 98 | restoreSource->insertItem(it.key()); |
99 | 99 | ||
100 | //check for last locations | 100 | //check for last locations |
101 | if ( it.key() == lastStoreLocation ) | 101 | if ( it.key() == lastStoreLocation ) |
102 | storeToLocation->setCurrentItem( locationIndex ); | 102 | storeToLocation->setCurrentItem( locationIndex ); |
103 | if ( it.key() == lastRestoreLocation ) | 103 | if ( it.key() == lastRestoreLocation ) |
104 | restoreSource->setCurrentItem( locationIndex ); | 104 | restoreSource->setCurrentItem( locationIndex ); |
105 | locationIndex++; | 105 | locationIndex++; |
106 | } | 106 | } |
107 | 107 | ||
108 | // Read the list of items to ignore. | 108 | // Read the list of items to ignore. |