diff options
| author | Tannin <devnull@localhost> | 2015-01-11 11:14:10 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-01-11 11:14:10 +0100 |
| commit | caf31e72cc3f7d607bcc1b53c7c179895cdd6ecf (patch) | |
| tree | 06d1a173e5e39b1aada74bdf57dc606e13d14779 /src/mainwindow.cpp | |
| parent | f2ab6825bfd3b9467f38ab7f29a698fa44b79510 (diff) | |
bugfix: executables with extensions other than .com, .cmd or .bat were started with cmd.exe (since 1.2.16)
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 6f6b9a47..fb9fede3 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4371,6 +4371,7 @@ void MainWindow::installTranslator(const QString &name) qWarning("localization file %s not found", qPrintable(fileName)); } // we don't actually expect localization files for english } + qApp->installTranslator(translator); m_Translators.push_back(translator); } @@ -4523,9 +4524,9 @@ void MainWindow::writeDataToFile() int MainWindow::getBinaryExecuteInfo(const QFileInfo &targetInfo, QFileInfo &binaryInfo, QString &arguments) { QString extension = targetInfo.completeSuffix(); - if ((extension.compare("cmd", Qt::CaseInsensitive)) || - (extension.compare("com", Qt::CaseInsensitive)) || - (extension.compare("bat", Qt::CaseInsensitive))) { + if ((extension.compare("cmd", Qt::CaseInsensitive) == 0) || + (extension.compare("com", Qt::CaseInsensitive) == 0) || + (extension.compare("bat", Qt::CaseInsensitive) == 0)) { binaryInfo = QFileInfo("C:\\Windows\\System32\\cmd.exe"); arguments = QString("/C \"%1\"").arg(QDir::toNativeSeparators(targetInfo.absoluteFilePath())); return 1; |
