| 99 | } |
| 100 | |
| 101 | void ApplicationList::saveSettings() const |
| 102 | { |
| 103 | QSettings settings; |
| 104 | QStringList names; |
| 105 | QStringList paths; |
| 106 | QStringList params; |
| 107 | |
| 108 | for (int i = 0; i < getApplicationCount(); i++) { |
| 109 | const Application& app = getApplication(i); |
| 110 | names << app.getName(); |
| 111 | paths << app.getPath(); |
| 112 | params << app.getParameters(); |
| 113 | } |
| 114 | |
| 115 | settings.setValue(SETTINGS_APPLICATION_NAMES, names); |
| 116 | settings.setValue(SETTINGS_APPLICATION_PATHS, paths); |
| 117 | settings.setValue(SETTINGS_APPLICATION_PARAMS, params); |
| 118 | settings.setValue(SETTINGS_APPLICATION_DEFAULT, mDefaultApplicationIndex); |
| 119 | } |
| 120 | |
| 121 | int ApplicationList::getApplicationCount() const |
| 122 | { |