mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Enable warnings as errors (#5101)
This commit is contained in:
commit
352b98db8e
33 changed files with 112 additions and 272 deletions
|
|
@ -67,8 +67,8 @@ void FlamePackExportTask::collectFiles()
|
|||
setAbortable(false);
|
||||
QCoreApplication::processEvents();
|
||||
|
||||
files.clear();
|
||||
if (!MMCZip::collectFileListRecursively(m_options.instance->gameRoot(), nullptr, &files, m_options.filter)) {
|
||||
m_files.clear();
|
||||
if (!MMCZip::collectFileListRecursively(m_options.instance->gameRoot(), nullptr, &m_files, m_options.filter)) {
|
||||
emitFailed(tr("Could not search for files"));
|
||||
return;
|
||||
}
|
||||
|
|
@ -88,7 +88,7 @@ void FlamePackExportTask::collectHashes()
|
|||
auto allMods = m_options.instance->loaderModList()->allMods();
|
||||
ConcurrentTask::Ptr hashingTask(new ConcurrentTask("MakeHashesTask", APPLICATION->settings()->get("NumberOfConcurrentTasks").toInt()));
|
||||
task.reset(hashingTask);
|
||||
for (const QFileInfo& file : files) {
|
||||
for (const QFileInfo& file : m_files) {
|
||||
const QString relative = m_gameRoot.relativeFilePath(file.absoluteFilePath());
|
||||
// require sensible file types
|
||||
if (!std::any_of(FILE_EXTENSIONS.begin(), FILE_EXTENSIONS.end(), [&relative](const QString& extension) {
|
||||
|
|
@ -319,7 +319,7 @@ void FlamePackExportTask::buildZip()
|
|||
setStatus(tr("Adding files..."));
|
||||
setProgress(4, 5);
|
||||
|
||||
auto zipTask = makeShared<MMCZip::ExportToZipTask>(m_options.output, m_gameRoot, files, "overrides/", true);
|
||||
auto zipTask = makeShared<MMCZip::ExportToZipTask>(m_options.output, m_gameRoot, m_files, "overrides/", true);
|
||||
zipTask->addExtraFile("manifest.json", generateIndex());
|
||||
zipTask->addExtraFile("modlist.html", generateHTML());
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class FlamePackExportTask : public Task {
|
|||
|
||||
FlameAPI api;
|
||||
|
||||
QFileInfoList files;
|
||||
QFileInfoList m_files;
|
||||
QMap<QString, HashInfo> pendingHashes{};
|
||||
QMap<QString, ResolvedFile> resolvedFiles{};
|
||||
Task::Ptr task;
|
||||
|
|
|
|||
|
|
@ -150,11 +150,8 @@ void ModrinthCheckUpdate::checkVersionsResponse(QByteArray* response, std::optio
|
|||
// Sometimes a version may have multiple files, one with "forge" and one with "fabric",
|
||||
// so we may want to filter it
|
||||
QString loader_filter;
|
||||
if (loader.has_value()) {
|
||||
for (auto flag : ModPlatform::modLoaderTypesToList(*loader)) {
|
||||
loader_filter = ModPlatform::getModLoaderAsString(flag);
|
||||
break;
|
||||
}
|
||||
if (loader.has_value() && loader != 0) {
|
||||
loader_filter = ModPlatform::getModLoaderAsString(ModPlatform::modLoaderTypesToList(*loader).first());
|
||||
}
|
||||
|
||||
// Currently, we rely on a couple heuristics to determine whether an update is actually available or not:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue