MCPcopy Create free account
hub / github.com/MultiMC/Launcher / extractConfigs

Method extractConfigs

launcher/modplatform/atlauncher/ATLPackInstallTask.cpp:488–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488void PackInstallTask::extractConfigs()
489{
490 qDebug() << "PackInstallTask::extractConfigs: " << QThread::currentThreadId();
491 setStatus(tr("Extracting configs..."));
492
493 QDir extractDir(m_stagingPath);
494
495 QuaZip packZip(archivePath);
496 if(!packZip.open(QuaZip::mdUnzip))
497 {
498 emitFailed(tr("Failed to open pack configs %1!").arg(archivePath));
499 return;
500 }
501
502 m_extractFuture = QtConcurrent::run(QThreadPool::globalInstance(), MMCZip::extractDir, archivePath, extractDir.absolutePath() + "/minecraft");
503 connect(&m_extractFutureWatcher, &QFutureWatcher<QStringList>::finished, this, [&]()
504 {
505 downloadMods();
506 });
507 connect(&m_extractFutureWatcher, &QFutureWatcher<QStringList>::canceled, this, [&]()
508 {
509 emitAborted();
510 });
511 m_extractFutureWatcher.setFuture(m_extractFuture);
512}
513
514void PackInstallTask::downloadMods()
515{

Callers

nothing calls this directly

Calls 2

runFunction · 0.85
openMethod · 0.80

Tested by

no test coverage detected