mirror of
https://github.com/QuasarApp/installer-framework.git
synced 2025-04-28 06:24:32 +00:00
Fix warning and handle file scheme like files better.
Calling setFileName() prints a warning if the path is reset without calling close() before. Convert the source path with file:/// scheme to local file. Change-Id: Ie21e7e8ad8f76dbe1afc1843ff5bf7fb4598123a Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
parent
6857a0e87e
commit
bc91a2204e
@ -64,8 +64,8 @@ int BinaryReplace::replace(const QString &source, const QString &target)
|
||||
QFutureWatcher<QInstaller::FileTaskResult> taskWatcher;
|
||||
if (url.isRelative() || url.isLocalFile()) {
|
||||
taskWatcher.setFuture(QtConcurrent::run(&QInstaller::CopyFileTask::doTask,
|
||||
new QInstaller::CopyFileTask(QInstaller::FileTaskItem(QFileInfo(source)
|
||||
.absoluteFilePath()))));
|
||||
new QInstaller::CopyFileTask(QInstaller::FileTaskItem(url.isRelative()
|
||||
? QFileInfo(source).absoluteFilePath() : url.toLocalFile()))));
|
||||
} else {
|
||||
taskWatcher.setFuture(QtConcurrent::run(&QInstaller::DownloadFileTask::doTask,
|
||||
new QInstaller::DownloadFileTask(QInstaller::FileTaskItem(url.toString()))));
|
||||
|
@ -120,6 +120,7 @@ int main(int argc, char *argv[])
|
||||
fi.setFile(bundlePath);
|
||||
path = fi.absolutePath() + QLatin1Char('/') + fi.baseName() + QLatin1String(".dat");
|
||||
|
||||
tmp.close();
|
||||
tmp.setFileName(path);
|
||||
QInstaller::openForRead(&tmp);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user