| 204 | void frmConvert::targetExtensionChanged() { generateTargetFileName(); } |
| 205 | |
| 206 | void frmConvert::generateTargetFileName() { |
| 207 | if (!targetFileNameSelected) { |
| 208 | QFileInfo srcSubFI(ui.leSrcSubFile->text()); |
| 209 | QString extension; |
| 210 | |
| 211 | if (ui.cbTargetExtension->currentIndex() == 0) { |
| 212 | QSharedPointer<const SubtitleFormat> targetSF = |
| 213 | subtitleFormatsRegistry->select(targetFormat); |
| 214 | extension = targetSF->defaultExtension(); |
| 215 | } else { |
| 216 | extension = ui.cbTargetExtension->currentText(); |
| 217 | } |
| 218 | |
| 219 | QString defaultTargetPath = srcSubFI.absolutePath() + "/" + |
| 220 | srcSubFI.completeBaseName() + "." + extension; |
| 221 | ui.leTargetFileName->setText(defaultTargetPath); |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | void frmConvert::subDelayToggled() { checkFPSNeeded(); } |
| 226 |
nothing calls this directly
no test coverage detected