GH-841 fix for modpack downloads on windows
This commit is contained in:
parent
2eb3ec39bf
commit
eae544f0eb
@ -1075,12 +1075,13 @@ void MainWindow::on_actionAddInstance_triggered()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const QString path = modpackUrl.host() + '/' + QString::fromUtf8(modpackUrl.toEncoded());
|
const QString path = modpackUrl.host() + '/' + modpackUrl.path();
|
||||||
auto entry = MMC->metacache()->resolveEntry("general", path);
|
auto entry = MMC->metacache()->resolveEntry("general", path);
|
||||||
CacheDownloadPtr dl = CacheDownload::make(modpackUrl, entry);
|
CacheDownloadPtr dl = CacheDownload::make(modpackUrl, entry);
|
||||||
NetJob job(tr("Modpack download"));
|
NetJob job(tr("Modpack download"));
|
||||||
job.addNetAction(dl);
|
job.addNetAction(dl);
|
||||||
|
|
||||||
|
// FIXME: possibly causes endless loop problems
|
||||||
ProgressDialog dlDialog(this);
|
ProgressDialog dlDialog(this);
|
||||||
if (dlDialog.exec(&job) != QDialog::Accepted)
|
if (dlDialog.exec(&job) != QDialog::Accepted)
|
||||||
{
|
{
|
||||||
|
@ -73,7 +73,8 @@ void NetJob::start()
|
|||||||
{
|
{
|
||||||
m_todo.enqueue(i);
|
m_todo.enqueue(i);
|
||||||
}
|
}
|
||||||
startMoreParts();
|
// hack that delays early failures so they can be caught easier
|
||||||
|
QMetaObject::invokeMethod(this, "startMoreParts", Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetJob::startMoreParts()
|
void NetJob::startMoreParts()
|
||||||
|
@ -83,7 +83,7 @@ public:
|
|||||||
}
|
}
|
||||||
QStringList getFailedFiles();
|
QStringList getFailedFiles();
|
||||||
|
|
||||||
private:
|
private slots:
|
||||||
void startMoreParts();
|
void startMoreParts();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
Loading…
Reference in New Issue
Block a user