mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-01 19:06:58 +03:00
refactor!!!: migrate from shared pointers
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
(cherry picked from commit 549405ab2f)
This commit is contained in:
parent
7755e0def9
commit
e89ce1124a
199 changed files with 742 additions and 710 deletions
|
|
@ -33,7 +33,7 @@
|
|||
#include "MMCZip.h"
|
||||
#include "modplatform/modrinth/ModrinthPackExportTask.h"
|
||||
|
||||
ExportPackDialog::ExportPackDialog(MinecraftInstancePtr instance, QWidget* parent, ModPlatform::ResourceProvider provider)
|
||||
ExportPackDialog::ExportPackDialog(MinecraftInstance* instance, QWidget* parent, ModPlatform::ResourceProvider provider)
|
||||
: QDialog(parent), m_instance(instance), m_ui(new Ui::ExportPackDialog), m_provider(provider)
|
||||
{
|
||||
Q_ASSERT(m_provider == ModPlatform::ResourceProvider::MODRINTH || m_provider == ModPlatform::ResourceProvider::FLAME);
|
||||
|
|
@ -101,23 +101,20 @@ ExportPackDialog::ExportPackDialog(MinecraftInstancePtr instance, QWidget* paren
|
|||
|
||||
const QDir::Filters filter(QDir::AllEntries | QDir::NoDotAndDotDot | QDir::AllDirs | QDir::Hidden);
|
||||
|
||||
MinecraftInstance* mcInstance = dynamic_cast<MinecraftInstance*>(instance.get());
|
||||
if (mcInstance) {
|
||||
for (auto resourceModel : mcInstance->resourceLists()) {
|
||||
if (resourceModel == nullptr) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!resourceModel->indexDir().exists()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (resourceModel->dir() == resourceModel->indexDir()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
m_proxy->ignoreFilesWithPath().insert(instanceRoot.relativeFilePath(resourceModel->indexDir().absolutePath()));
|
||||
for (auto resourceModel : instance->resourceLists()) {
|
||||
if (resourceModel == nullptr) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!resourceModel->indexDir().exists()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (resourceModel->dir() == resourceModel->indexDir()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
m_proxy->ignoreFilesWithPath().insert(instanceRoot.relativeFilePath(resourceModel->indexDir().absolutePath()));
|
||||
}
|
||||
|
||||
m_ui->files->setModel(m_proxy);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue