aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-08-17 00:23:53 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-08-17 00:23:53 +0300
commit5e2d1ffdfbb3f673c063029c9a6c55071cba160a (patch)
tree61d496255b64b05dc6bb04691b14e7d0d2d2c5ec /launcher
parentc94ee67077076fdfb3ad04e93a0de2ae32b6a4e5 (diff)
downloadPrismLauncher-5e2d1ffdfbb3f673c063029c9a6c55071cba160a.tar.gz
PrismLauncher-5e2d1ffdfbb3f673c063029c9a6c55071cba160a.tar.bz2
PrismLauncher-5e2d1ffdfbb3f673c063029c9a6c55071cba160a.zip
removed line
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher')
-rw-r--r--launcher/modplatform/flame/FlameAPI.cpp2
-rw-r--r--launcher/ui/MainWindow.cpp16
-rw-r--r--launcher/ui/pages/modplatform/ImportPage.cpp1
3 files changed, 9 insertions, 10 deletions
diff --git a/launcher/modplatform/flame/FlameAPI.cpp b/launcher/modplatform/flame/FlameAPI.cpp
index 4a04e583..74d7db97 100644
--- a/launcher/modplatform/flame/FlameAPI.cpp
+++ b/launcher/modplatform/flame/FlameAPI.cpp
@@ -204,7 +204,7 @@ Task::Ptr FlameAPI::getFiles(const QStringList& fileIds, std::shared_ptr<QByteAr
return netJob;
}
-Task::Ptr FlameAPI::getFile(const QString& addonId, const QString& fileId, std::shared_ptr<QByteArray>response) const
+Task::Ptr FlameAPI::getFile(const QString& addonId, const QString& fileId, std::shared_ptr<QByteArray> response) const
{
auto netJob = makeShared<NetJob>(QString("Flame::GetFile"), APPLICATION->network());
netJob->addNetAction(
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index 7d414877..067108f2 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -984,7 +984,7 @@ void MainWindow::processURLs(QList<QUrl> urls)
QUrl local_url;
if (!url.isLocalFile()) { // download the remote resource and identify
QUrl dl_url;
- if(url.scheme() == "curseforge") {
+ if (url.scheme() == "curseforge") {
// need to find the download link for the modpack / resource
// format of url curseforge://install?addonId=IDHERE&fileId=IDHERE
QUrlQuery query(url);
@@ -1027,19 +1027,18 @@ void MainWindow::processURLs(QList<QUrl> urls)
resource_name = Json::ensureString(data, "displayName", dl_file.completeBaseName(), "displayName");
});
- { // drop stack
+ { // drop stack
ProgressDialog dlUrlDialod(this);
dlUrlDialod.setSkipButton(true, tr("Abort"));
dlUrlDialod.execWithTask(job.get());
}
-
} else {
dl_url = url;
}
if (!dl_url.isValid()) {
- continue; // no valid url to download this resource
+ continue; // no valid url to download this resource
}
const QString path = dl_url.host() + '/' + dl_url.path();
@@ -1050,17 +1049,18 @@ void MainWindow::processURLs(QList<QUrl> urls)
auto archivePath = entry->getFullPath();
bool dl_success = false;
- connect(dl_job.get(), &Task::failed, this, [this](QString reason){CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show(); });
- connect(dl_job.get(), &Task::succeeded, this, [&dl_success]{dl_success = true;});
+ connect(dl_job.get(), &Task::failed, this,
+ [this](QString reason) { CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show(); });
+ connect(dl_job.get(), &Task::succeeded, this, [&dl_success] { dl_success = true; });
- { // drop stack
+ { // drop stack
ProgressDialog dlUrlDialod(this);
dlUrlDialod.setSkipButton(true, tr("Abort"));
dlUrlDialod.execWithTask(dl_job.get());
}
if (!dl_success) {
- continue; // no local file to identify
+ continue; // no local file to identify
}
local_url = QUrl::fromLocalFile(archivePath);
diff --git a/launcher/ui/pages/modplatform/ImportPage.cpp b/launcher/ui/pages/modplatform/ImportPage.cpp
index ee8757f8..3e3c36b7 100644
--- a/launcher/ui/pages/modplatform/ImportPage.cpp
+++ b/launcher/ui/pages/modplatform/ImportPage.cpp
@@ -114,7 +114,6 @@ void ImportPage::updateState()
bool isMRPack = fi.suffix() == "mrpack";
if (fi.exists() && (isZip || isMRPack)) {
- QFileInfo fi(url.fileName());
auto extra_info = QMap(m_extra_info);
qDebug() << "Pack Extra Info" << extra_info << m_extra_info;
dialog->setSuggestedPack(fi.completeBaseName(), new InstanceImportTask(url, this, std::move(extra_info)));