소스 검색

Remove no longer used code

Ivan Savenko 2 년 전
부모
커밋
1f525c59c3

+ 0 - 2
launcher/mainwindow_moc.cpp

@@ -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);

+ 0 - 8
launcher/modManager/cmodlistview_moc.cpp

@@ -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);

+ 0 - 3
launcher/modManager/cmodlistview_moc.h

@@ -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;
 	

+ 0 - 20
launcher/modManager/cmodmanager.cpp

@@ -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);
-}

+ 0 - 7
launcher/modManager/cmodmanager.h

@@ -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;
 };