| 293 | } |
| 294 | |
| 295 | void SettingsDialog::populateApplicationList() |
| 296 | { |
| 297 | const int defapp = mTempApplications->getDefaultApplication(); |
| 298 | for (int i = 0; i < mTempApplications->getApplicationCount(); i++) { |
| 299 | const Application& app = mTempApplications->getApplication(i); |
| 300 | QString name = app.getName(); |
| 301 | if (i == defapp) { |
| 302 | name += " "; |
| 303 | name += tr("[Default]"); |
| 304 | } |
| 305 | mUI->mListWidget->addItem(name); |
| 306 | } |
| 307 | |
| 308 | // Select default application, or if there is no default app then the |
| 309 | // first item. |
| 310 | if (defapp == -1) |
| 311 | mUI->mListWidget->setCurrentRow(0); |
| 312 | else { |
| 313 | if (mTempApplications->getApplicationCount() > defapp) |
| 314 | mUI->mListWidget->setCurrentRow(defapp); |
| 315 | else |
| 316 | mUI->mListWidget->setCurrentRow(0); |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | void SettingsDialog::ok() |
| 321 | { |
nothing calls this directly
no test coverage detected