Replace QStringRef with QStringView

This commit is contained in:
Vladimir Golovnev (Glassez) 2021-03-01 09:40:30 +03:00
parent 27baa55443
commit 399d3ad85a
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
26 changed files with 82 additions and 90 deletions

View file

@ -2184,8 +2184,9 @@ void MainWindow::pythonDownloadFinished(const Net::DownloadResult &result)
QProcess installer;
qDebug("Launching Python installer in passive mode...");
QFile::rename(result.filePath, result.filePath + ".exe");
installer.start('"' + Utils::Fs::toNativePath(result.filePath) + ".exe\" /passive");
const QString exePath = result.filePath + QLatin1String(".exe");
QFile::rename(result.filePath, exePath);
installer.start(Utils::Fs::toNativePath(exePath), {"/passive"});
// Wait for setup to complete
installer.waitForFinished(10 * 60 * 1000);
@ -2195,7 +2196,7 @@ void MainWindow::pythonDownloadFinished(const Net::DownloadResult &result)
qDebug("Setup should be complete!");
// Delete temp file
Utils::Fs::forceRemove(result.filePath + ".exe");
Utils::Fs::forceRemove(exePath);
// Reload search engine
if (Utils::ForeignApps::pythonInfo().isSupportedVersion())