| 59 | #endif |
| 60 | |
| 61 | foreach (QString provFile, provisioningFiles) |
| 62 | { |
| 63 | int startIndex = provFile.indexOf('_'); |
| 64 | int endIndex = provFile.lastIndexOf('.'); |
| 65 | ui->appList->addItem(provFile.mid(startIndex + 1, endIndex - startIndex - 1)); |
| 66 | |
| 67 | descriptions.push_back(QString()); |
| 68 | QString descriptionFileName = provFile.left(provFile.lastIndexOf('.')) + ".txt"; |
| 69 | QFile descriptionFile(appDir.filePath(descriptionFileName)); |
| 70 | |
| 71 | if (descriptionFile.exists()) |
| 72 | { |
| 73 | if (descriptionFile.open(QIODevice::ReadOnly)) |
| 74 | { |
| 75 | descriptions.back() = descriptionFile.readAll(); |
| 76 | } |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | if (ui->appList->currentRow() == -1) |
| 81 | ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); |