1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Remove no longer used code

This commit is contained in:
Ivan Savenko 2023-06-27 21:59:43 +03:00
parent 4911cf0bd4
commit 1f525c59c3
5 changed files with 0 additions and 40 deletions

View File

@ -111,8 +111,6 @@ MainWindow::MainWindow(QWidget * parent)
enterSetup();
ui->settingsView->setDisplayList();
connect(ui->modlistView, &CModListView::extraResolutionsEnabledChanged,
ui->settingsView, &CSettingsView::fillValidResolutions);
if(settings["launcher"]["updateOnStartup"].Bool())
UpdateDialog::showUpdateDialog(false);

View File

@ -30,9 +30,6 @@ void CModListView::setupModModel()
{
modModel = new CModListModel(this);
manager = std::make_unique<CModManager>(modModel);
connect(manager.get(), &CModManager::extraResolutionsEnabledChanged,
this, &CModListView::extraResolutionsEnabledChanged);
}
void CModListView::changeEvent(QEvent *event)
@ -391,11 +388,6 @@ void CModListView::selectMod(const QModelIndex & index)
}
}
bool CModListView::isExtraResolutionsModEnabled() const
{
return manager->isExtraResolutionsModEnabled();
}
void CModListView::modSelected(const QModelIndex & current, const QModelIndex &)
{
selectMod(current);

View File

@ -67,8 +67,6 @@ class CModListView : public QWidget
void changeEvent(QEvent *event) override;
signals:
void extraResolutionsEnabledChanged(bool enabled);
void modsChanged();
public:
@ -80,7 +78,6 @@ public:
void disableModInfo();
void selectMod(const QModelIndex & index);
bool isExtraResolutionsModEnabled() const;
const CModList & getModList() const;

View File

@ -20,8 +20,6 @@
namespace
{
const QLatin1String extraResolutionsMod{"vcmi-extras.extraresolutions"};
QString detectModArchive(QString path, QString modName)
{
auto files = ZipArchive::listFiles(qstringToPath(path));
@ -223,11 +221,6 @@ bool CModManager::canDisableMod(QString modname)
return true;
}
bool CModManager::isExtraResolutionsModEnabled() const
{
return modList->hasMod(extraResolutionsMod) && modList->getMod(extraResolutionsMod).isEnabled();
}
static QVariant writeValue(QString path, QVariantMap input, QVariant value)
{
if(path.size() > 1)
@ -255,8 +248,6 @@ bool CModManager::doEnableMod(QString mod, bool on)
modList->setModSettings(modSettings["activeMods"]);
modList->modChanged(mod);
if(mod == extraResolutionsMod)
sendExtraResolutionsEnabledChanged(on);
JsonUtils::JsonToFile(settingsPath(), modSettings);
@ -298,9 +289,6 @@ bool CModManager::doInstallMod(QString modname, QString archivePath)
loadMods();
modList->reloadRepositories();
if(modname == extraResolutionsMod)
sendExtraResolutionsEnabledChanged(true);
return true;
}
@ -321,9 +309,6 @@ bool CModManager::doUninstallMod(QString modname)
loadMods();
modList->reloadRepositories();
if(modname == extraResolutionsMod)
sendExtraResolutionsEnabledChanged(false);
return true;
}
@ -347,8 +332,3 @@ bool CModManager::removeModDir(QString path)
return dir.removeRecursively();
}
void CModManager::sendExtraResolutionsEnabledChanged(bool enabled)
{
emit extraResolutionsEnabledChanged(enabled);
}

View File

@ -31,11 +31,6 @@ class CModManager : public QObject
bool addError(QString modname, QString message);
bool removeModDir(QString mod);
void sendExtraResolutionsEnabledChanged(bool enabled);
signals:
void extraResolutionsEnabledChanged(bool enabled);
public:
CModManager(CModList * modList);
@ -58,6 +53,4 @@ public:
bool canUninstallMod(QString mod);
bool canEnableMod(QString mod);
bool canDisableMod(QString mod);
bool isExtraResolutionsModEnabled() const;
};