Skip to content

Commit d4e0378

Browse files
authored
Fix: Use system directory separators (#187)
...instead of hardcoded slashes Co-authored-by: a-sum-duma <a-sum-duma@users.noreply.github.com>
1 parent 2c95060 commit d4e0378

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

gui/src/forms/frmconvert.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include <QDesktopServices>
2121
#include <QDesktopWidget>
22+
#include <QDir>
2223
#include <QFileDialog>
2324
#include <QFileInfo>
2425
#include <QMessageBox>
@@ -150,7 +151,7 @@ void frmConvert::checkFPSNeeded() {
150151
QFileInfo srcSubFI(ui.leSrcSubFile->text());
151152

152153
QString movieFilePathBase =
153-
srcSubFI.absolutePath() + "/" + srcSubFI.completeBaseName();
154+
srcSubFI.absoluteDir().filePath(srcSubFI.completeBaseName());
154155

155156
foreach (QString movieExt, staticConfig->movieExtensions()) {
156157
QString movieFilePath = movieFilePathBase + "." + movieExt;
@@ -216,8 +217,8 @@ void frmConvert::generateTargetFileName() {
216217
extension = ui.cbTargetExtension->currentText();
217218
}
218219

219-
QString defaultTargetPath = srcSubFI.absolutePath() + "/" +
220-
srcSubFI.completeBaseName() + "." + extension;
220+
QString defaultTargetPath = srcSubFI.absoluteDir()
221+
.filePath(srcSubFI.completeBaseName() + "." + extension);
221222
ui.leTargetFileName->setText(defaultTargetPath);
222223
}
223224
}

0 commit comments

Comments
 (0)