summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-05-22 18:16:56 +0200
committerTannin <devnull@localhost>2013-05-22 18:16:56 +0200
commitf0ba6ce95c1f30524453ce996fa536a888f018da (patch)
treeff6fc7ad1de0e4813a0485cc7ab90baf23c51595
parent45f6cd21a2c730b9dea322b0dba30120cdc40521 (diff)
- added NCC to repository
- deleting files from download manager now moves them to recycle bin instead of deleting permanentyl - cleanup in installation manager - ini editor (old) can now be configured to open files in external editor - bugfix: .net check in ncc installer was broken - bugfix: mod-overwrite dialog wasn't displayed for complex installers
-rw-r--r--src/downloadmanager.cpp4
-rw-r--r--src/installationmanager.cpp106
-rw-r--r--src/installationmanager.h34
-rw-r--r--src/main.cpp4
-rw-r--r--src/mainwindow.cpp42
-rw-r--r--src/modinfo.cpp11
-rw-r--r--src/modinfo.h4
-rw-r--r--src/profile.cpp6
-rw-r--r--src/profilesdialog.cpp2
-rw-r--r--src/settings.cpp6
-rw-r--r--src/settingsdialog.ui49
11 files changed, 82 insertions, 186 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index aa6ba12b..3aeb9429 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -334,13 +334,13 @@ void DownloadManager::removeFile(int index, bool deleteFile)
}
if (deleteFile) {
- if (!shellDelete(QStringList(filePath), NULL)) {
+ if (!shellDelete(QStringList(filePath), true)) {
reportError(tr("failed to delete %1").arg(filePath));
return;
}
QFile metaFile(filePath.append(".meta"));
- if (metaFile.exists() && !metaFile.remove()) {
+ if (metaFile.exists() && !shellDelete(QStringList(filePath), true)) {
reportError(tr("failed to delete meta file for %1").arg(filePath));
}
} else {
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp
index 5db8877d..fee6361a 100644
--- a/src/installationmanager.cpp
+++ b/src/installationmanager.cpp
@@ -68,8 +68,7 @@ template <typename T> T resolveFunction(QLibrary &lib, const char *name)
InstallationManager::InstallationManager(QWidget *parent)
: QObject(parent), m_ParentWidget(parent),
- m_NCCPath(QApplication::applicationDirPath() + "/NCC/NexusClientCLI.exe"),
- m_InstallationProgress(parent), m_SupportedExtensions(boost::assign::list_of("zip")("rar")("7z")("fomod"))
+ m_InstallationProgress(parent), m_SupportedExtensions() //boost::assign::list_of("zip")("rar")("7z")("fomod")
{
QLibrary archiveLib("dlls\\archive.dll");
if (!archiveLib.load()) {
@@ -137,12 +136,6 @@ void InstallationManager::mapToArchive(const DirectoryTree::Node *baseNode)
}
-bool InstallationManager::unpackPackageTXT()
-{
- return unpackSingleFile("package.txt");
-}
-
-
bool InstallationManager::unpackSingleFile(const QString &fileName)
{
FileData* const *data;
@@ -268,7 +261,7 @@ IPluginInstaller::EInstallResult InstallationManager::installArchive(GuessedValu
{
GuessedValue<QString> temp(modName);
bool iniTweaks;
- if (install(archiveName, "modsdir", temp, iniTweaks)) {
+ if (install(archiveName, temp, iniTweaks)) {
return IPluginInstaller::RESULT_SUCCESS;
} else {
return IPluginInstaller::RESULT_FAILED;
@@ -379,69 +372,6 @@ DirectoryTree::Node *InstallationManager::getSimpleArchiveBase(DirectoryTree *da
}
-bool InstallationManager::checkBainPackage(DirectoryTree *dataTree)
-{
- int numDirs = dataTree->numNodes();
- // each directory would have to serve as a top-level directory
- for (DirectoryTree::const_node_iterator iter = dataTree->nodesBegin();
- iter != dataTree->nodesEnd(); ++iter) {
- const QString &dirName = (*iter)->getData().name;
- if ((dirName.compare("fomod", Qt::CaseInsensitive) == 0) ||
- (dirName.startsWith("--"))) {
- --numDirs;
- continue;
- }
- if (!isSimpleArchiveTopLayer(*iter, true)) {
- qDebug("%s is not a top layer directory", (*iter)->getData().name.toUtf8().constData());
- return false;
- }
- }
-
- if (numDirs < 2) {
- // a complex bain package contains at least 2 directories to choose from
- qDebug("only %d dirs", numDirs);
- return false;
- }
-
- return true;
-}
-
-
-bool InstallationManager::checkNMMInstaller()
-{
- return QFile::exists(m_NCCPath);
-}
-
-
-bool InstallationManager::checkFomodPackage(DirectoryTree *dataTree, QString &offset, bool &xmlInstaller)
-{
- bool scriptInstaller = false;
- xmlInstaller = false;
- for (DirectoryTree::const_node_iterator iter = dataTree->nodesBegin();
- iter != dataTree->nodesEnd(); ++iter) {
- const QString &dirName = (*iter)->getData().name;
- if (dirName.compare("fomod", Qt::CaseInsensitive) == 0) {
- for (DirectoryTree::const_leaf_iterator fileIter = (*iter)->leafsBegin();
- fileIter != (*iter)->leafsEnd(); ++fileIter) {
- if (fileIter->getName().compare("ModuleConfig.xml", Qt::CaseInsensitive) == 0) {
- xmlInstaller = true;
- } else if (fileIter->getName().compare("script.cs", Qt::CaseInsensitive) == 0) {
- scriptInstaller = true;
- }
- }
- break;
- }
- }
- if (!xmlInstaller && !scriptInstaller && (dataTree->numNodes() == 1) && (dataTree->numLeafs() == 0)) {
- DirectoryTree::Node *node = *dataTree->nodesBegin();
- offset = node->getData().name;
- return checkFomodPackage(node, offset, xmlInstaller);
- }
-
- return (xmlInstaller || scriptInstaller);
-}
-
-
void InstallationManager::updateProgress(float percentage)
{
m_InstallationProgress.setValue(static_cast<int>(percentage * 100.0));
@@ -464,7 +394,7 @@ void InstallationManager::report7ZipError(LPCWSTR errorMessage)
}
-QString InstallationManager::generateBackupName(const QString &directoryName)
+QString InstallationManager::generateBackupName(const QString &directoryName) const
{
QString backupName = directoryName + "_backup";
if (QDir(backupName).exists()) {
@@ -480,9 +410,9 @@ QString InstallationManager::generateBackupName(const QString &directoryName)
}
-bool InstallationManager::testOverwrite(const QString &modsDirectory, GuessedValue<QString> &modName)
+bool InstallationManager::testOverwrite(GuessedValue<QString> &modName) const
{
- QString targetDirectory = QDir::fromNativeSeparators(modsDirectory.mid(0).append("\\").append(modName));
+ QString targetDirectory = QDir::fromNativeSeparators(m_ModsDirectory.mid(0).append("\\").append(modName));
while (QDir(targetDirectory).exists()) {
QueryOverwriteDialog overwriteDialog(m_ParentWidget);
@@ -503,7 +433,7 @@ bool InstallationManager::testOverwrite(const QString &modsDirectory, GuessedVal
if (!ensureValidModName(modName)) {
return false;
}
- targetDirectory = QDir::fromNativeSeparators(modsDirectory.mid(0).append("\\").append(modName));
+ targetDirectory = QDir::fromNativeSeparators(m_ModsDirectory.mid(0).append("\\").append(modName));
}
} else if (overwriteDialog.action() == QueryOverwriteDialog::ACT_REPLACE) {
// save original settings like categories. Because it makes sense
@@ -516,9 +446,10 @@ bool InstallationManager::testOverwrite(const QString &modsDirectory, GuessedVal
}
// remove the directory with all content, then recreate it empty
- shellDelete(QStringList(targetDirectory), NULL);
+ shellDelete(QStringList(targetDirectory));
if (!QDir().mkdir(targetDirectory)) {
- // windows may keep the directory around for a moment, preventing its re-creation
+ // windows may keep the directory around for a moment, preventing its re-creation. Not sure
+ // if this still happens with shellDelete
Sleep(100);
QDir().mkdir(targetDirectory);
}
@@ -568,7 +499,7 @@ bool InstallationManager::fixModName(QString &name)
}
*/
-bool InstallationManager::ensureValidModName(GuessedValue<QString> &name)
+bool InstallationManager::ensureValidModName(GuessedValue<QString> &name) const
{
while (name->isEmpty()) {
bool ok;
@@ -584,7 +515,7 @@ bool InstallationManager::ensureValidModName(GuessedValue<QString> &name)
}
-bool InstallationManager::doInstall(const QString &modsDirectory, GuessedValue<QString> &modName, int modID,
+bool InstallationManager::doInstall(GuessedValue<QString> &modName, int modID,
const QString &version, const QString &newestVersion, int categoryID)
{
if (!ensureValidModName(modName)) {
@@ -592,11 +523,11 @@ bool InstallationManager::doInstall(const QString &modsDirectory, GuessedValue<Q
}
// determine target directory
- if (!testOverwrite(modsDirectory, modName)) {
+ if (!testOverwrite(modName)) {
return false;
}
- QString targetDirectory = QDir::fromNativeSeparators(modsDirectory.mid(0).append("\\").append(modName));
+ QString targetDirectory = QDir::fromNativeSeparators(m_ModsDirectory.mid(0).append("\\").append(modName));
qDebug("installing to \"%s\"", targetDirectory.toUtf8().constData());
@@ -689,11 +620,9 @@ bool InstallationManager::wasCancelled()
}
-bool InstallationManager::install(const QString &fileName, const QString &modsDirectory,
- GuessedValue<QString> &modName, bool &hasIniTweaks)
+bool InstallationManager::install(const QString &fileName, GuessedValue<QString> &modName, bool &hasIniTweaks)
{
QFileInfo fileInfo(fileName);
-// bool success = false;
if (m_SupportedExtensions.find(fileInfo.suffix()) == m_SupportedExtensions.end()) {
reportError(tr("File format \"%1\" not supported").arg(fileInfo.completeSuffix()));
return false;
@@ -772,7 +701,8 @@ bool InstallationManager::install(const QString &fileName, const QString &modsDi
installResult = installerSimple->install(modName, *filesTree);
if (installResult == IPluginInstaller::RESULT_SUCCESS) {
mapToArchive(filesTree);
- if (!doInstall(modsDirectory, modName, modID, version, newestVersion, categoryID)) {
+ // the simple installer only prepares the installation, the rest works the same for all installers
+ if (!doInstall(modName, modID, version, newestVersion, categoryID)) {
installResult = IPluginInstaller::RESULT_FAILED;
}
}
@@ -786,7 +716,9 @@ bool InstallationManager::install(const QString &fileName, const QString &modsDi
((filesTree == NULL) && installerCustom->isArchiveSupported(fileName)))) {
std::set<QString> installerExtensions = installerCustom->supportedExtensions();
if (installerExtensions.find(fileInfo.suffix()) != installerExtensions.end()) {
- installResult = installerCustom->install(modName, fileName);
+ if (testOverwrite(modName)) {
+ installResult = installerCustom->install(modName, fileName);
+ }
}
}
}
diff --git a/src/installationmanager.h b/src/installationmanager.h
index 5bf64e94..818558b8 100644
--- a/src/installationmanager.h
+++ b/src/installationmanager.h
@@ -57,16 +57,17 @@ public:
~InstallationManager();
+ void setModsDirectory(const QString &modsDirectory) { m_ModsDirectory = modsDirectory; }
+
/**
* @brief install a mod from an archive
*
* @param fileName absolute file name of the archive to install
- * @param modsDirectory directory to install mods to
* @param modName suggested name of the mod. If this is empty (the default), a name will be guessed based on the filename. The user will always have a chance to rename the mod
* @return true if the archive was installed, false if installation failed or was refused
* @exception std::exception an exception may be thrown if the archive can't be opened (maybe the format is invalid or the file is damaged)
**/
- bool install(const QString &fileName, const QString &modsDirectory, MOBase::GuessedValue<QString> &modName, bool &hasIniTweaks);
+ bool install(const QString &fileName, MOBase::GuessedValue<QString> &modName, bool &hasIniTweaks);
/**
* @return true if the installation was canceled
@@ -82,8 +83,6 @@ public:
**/
static QString getErrorString(Archive::Error errorCode);
- void installManual(MOBase::DirectoryTree::Node *baseNode, MOBase::DirectoryTree *filesTree, bool &hasIniTweaks, QString &modName, int categoryID, const QString &modsDirectory, QString newestVersion, QString version, int modID, bool success, bool manualRequest);
-
/**
* @brief register an installer-plugin
* @param the installer to register
@@ -125,6 +124,13 @@ public:
*/
virtual MOBase::IPluginInstaller::EInstallResult installArchive(MOBase::GuessedValue<QString> &modName, const QString &archiveName);
+ /**
+ * @brief test if the specified mod name is free. If not, query the user how to proceed
+ * @param modName current possible names for the mod
+ * @return true if we can proceed with the installation, false if the user canceled or in case of an unrecoverable error
+ */
+ virtual bool testOverwrite(MOBase::GuessedValue<QString> &modName) const;
+
private:
void queryPassword(LPSTR password);
@@ -142,30 +148,20 @@ private:
// recursive worker function for mapToArchive
void mapToArchive(const MOBase::DirectoryTree::Node *node, std::wstring path, FileData * const *data);
- bool unpackPackageTXT();
bool unpackSingleFile(const QString &fileName);
bool isSimpleArchiveTopLayer(const MOBase::DirectoryTree::Node *node, bool bainStyle);
MOBase::DirectoryTree::Node *getSimpleArchiveBase(MOBase::DirectoryTree *dataTree);
- bool checkBainPackage(MOBase::DirectoryTree *dataTree);
- bool checkFomodPackage(MOBase::DirectoryTree *dataTree, QString &offset, bool &xmlInstaller);
- bool checkNMMInstaller();
-
-// static bool fixModName(QString &name);
bool testOverwrite(const QString &modsDirectory, MOBase::GuessedValue<QString> &modName);
- bool doInstall(const QString &modsDirectory, MOBase::GuessedValue<QString> &modName,
+ bool doInstall(MOBase::GuessedValue<QString> &modName,
int modID, const QString &version, const QString &newestVersion, int categoryID);
- bool installFomodExternal(const QString &fileName, const QString &pluginsFileName, const QString &modDirectory);
- bool installFomodInternal(MOBase::DirectoryTree *&baseNode, const QString &fomodPath, const QString &modsDirectory,
- int modID, const QString &version, const QString &newestVersion,
- int categoryID, QString &modName, bool nameGuessed, bool &manualRequest);
- QString generateBackupName(const QString &directoryName);
+ QString generateBackupName(const QString &directoryName) const;
- bool ensureValidModName(MOBase::GuessedValue<QString> &name);
+ bool ensureValidModName(MOBase::GuessedValue<QString> &name) const;
private slots:
@@ -191,11 +187,11 @@ private:
QWidget *m_ParentWidget;
+ QString m_ModsDirectory;
+
std::vector<MOBase::IPluginInstaller*> m_Installers;
std::set<QString, CaseInsensitive> m_SupportedExtensions;
- QString m_NCCPath;
-
Archive *m_CurrentArchive;
QString m_CurrentFile;
diff --git a/src/main.cpp b/src/main.cpp
index ab740467..7146f4d1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -84,7 +84,7 @@ void removeOldLogfiles()
deleteFiles.append(files.at(i).absoluteFilePath());
}
- if (!shellDelete(deleteFiles, NULL)) {
+ if (!shellDelete(deleteFiles)) {
qWarning("failed to remove log files: %s", qPrintable(windowsErrorString(::GetLastError())));
}
}
@@ -102,7 +102,7 @@ bool bootstrap()
QString moDirectory = QDir::fromNativeSeparators(ToQString(gameInfo.getOrganizerDirectory()));
QString backupDirectory = moDirectory.mid(0).append("/update_backup");
if (QDir(backupDirectory).exists()) {
- shellDelete(QStringList(backupDirectory), NULL);
+ shellDelete(QStringList(backupDirectory));
}
// cycle logfile
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 89dc9904..4ba3f2dc 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1065,24 +1065,33 @@ IModInterface *MainWindow::createMod(const QString &name)
fixDirectoryName(fixedName);
unsigned int index = ModInfo::getIndex(fixedName);
if (index != UINT_MAX) {
- throw MyException(tr("The mod \"%1\" already exists!").arg(fixedName));
- }
-
- QString targetDirectory = QDir::fromNativeSeparators(m_Settings.getModDirectory()).append("/").append(fixedName.trimmed());
+ ModInfo::Ptr result = ModInfo::getByIndex(index);
+ if (!result->isEmpty()) {
+ throw MyException(tr("The mod \"%1\" already exists!").arg(fixedName));
+ }
+ return result.data();
+ } else {
+ QString targetDirectory = QDir::fromNativeSeparators(m_Settings.getModDirectory()).append("/").append(fixedName.trimmed());
- QSettings settingsFile(targetDirectory.mid(0).append("/meta.ini"), QSettings::IniFormat);
+ QSettings settingsFile(targetDirectory.mid(0).append("/meta.ini"), QSettings::IniFormat);
- settingsFile.setValue("modid", 0);
- settingsFile.setValue("version", 0);
- settingsFile.setValue("newestVersion", 0);
- settingsFile.setValue("category", 0);
- settingsFile.setValue("installationFile", 0);
- return ModInfo::createFrom(QDir(targetDirectory), &m_DirectoryStructure).data();
+ settingsFile.setValue("modid", 0);
+ settingsFile.setValue("version", 0);
+ settingsFile.setValue("newestVersion", 0);
+ settingsFile.setValue("category", 0);
+ settingsFile.setValue("installationFile", 0);
+ return ModInfo::createFrom(QDir(targetDirectory), &m_DirectoryStructure).data();
+ }
}
bool MainWindow::removeMod(IModInterface *mod)
{
- return ModInfo::removeMod(ModInfo::getIndex(mod->name()));
+ unsigned int index = ModInfo::getIndex(mod->name());
+ if (index == UINT_MAX) {
+ return mod->remove();
+ } else {
+ return ModInfo::removeMod(index);
+ }
}
@@ -1827,11 +1836,11 @@ void MainWindow::on_tabWidget_currentChanged(int index)
void MainWindow::installMod(const QString &fileName)
{
-qDebug("install %s", qPrintable(fileName));
bool hasIniTweaks = false;
GuessedValue<QString> modName;
m_CurrentProfile->writeModlistNow();
- if (m_InstallationManager.install(fileName, m_Settings.getModDirectory(), modName, hasIniTweaks)) {
+ m_InstallationManager.setModsDirectory(m_Settings.getModDirectory());
+ if (m_InstallationManager.install(fileName, modName, hasIniTweaks)) {
MessageDialog::showMessage(tr("Installation successful"), this);
refreshModList();
@@ -2447,7 +2456,7 @@ void MainWindow::restoreBackup_clicked()
(QMessageBox::question(this, tr("Overwrite?"),
tr("This will replace the existing mod \"%1\". Continue?").arg(regName),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes)) {
- if (modDir.exists(regName) && !shellDelete(QStringList(modDir.absoluteFilePath(regName)), NULL)) {
+ if (modDir.exists(regName) && !shellDelete(QStringList(modDir.absoluteFilePath(regName)))) {
reportError(tr("failed to remove mod \"%1\"").arg(regName));
} else {
QString destinationPath = QDir::fromNativeSeparators(m_Settings.getModDirectory()) + "/" + regName;
@@ -3495,7 +3504,8 @@ void MainWindow::installDownload(int index)
m_CurrentProfile->writeModlistNow();
bool hasIniTweaks = false;
- if (m_InstallationManager.install(fileName, m_Settings.getModDirectory(), modName, hasIniTweaks)) {
+ m_InstallationManager.setModsDirectory(m_Settings.getModDirectory());
+ if (m_InstallationManager.install(fileName, modName, hasIniTweaks)) {
MessageDialog::showMessage(tr("Installation successful"), this);
refreshModList();
diff --git a/src/modinfo.cpp b/src/modinfo.cpp
index bc475b92..a08a4ccd 100644
--- a/src/modinfo.cpp
+++ b/src/modinfo.cpp
@@ -369,6 +369,15 @@ ModInfoRegular::~ModInfoRegular()
}
}
+bool ModInfoRegular::isEmpty() const
+{
+ QDirIterator iter(m_Path, QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs);
+ if (!iter.hasNext()) return true;
+ iter.next();
+ if ((iter.fileName() == "meta.ini") && !iter.hasNext()) return true;
+ return false;
+}
+
void ModInfoRegular::saveMeta()
{
@@ -573,7 +582,7 @@ void ModInfoRegular::setNeverEndorse()
bool ModInfoRegular::remove()
{
m_MetaInfoChanged = false;
- return shellDelete(QStringList(absolutePath()), NULL);
+ return shellDelete(QStringList(absolutePath()));
}
void ModInfoRegular::endorse(bool doEndorse)
diff --git a/src/modinfo.h b/src/modinfo.h
index e08ef8b6..faf33f0d 100644
--- a/src/modinfo.h
+++ b/src/modinfo.h
@@ -179,6 +179,8 @@ public:
virtual bool isRegular() const { return false; }
+ virtual bool isEmpty() const { return false; }
+
/**
* @brief test if there is a newer version of the mod
*
@@ -495,6 +497,8 @@ public:
virtual bool isRegular() const { return true; }
+ virtual bool isEmpty() const;
+
/**
* @brief test if there is a newer version of the mod
*
diff --git a/src/profile.cpp b/src/profile.cpp
index 24c6d943..5f98d4be 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -72,7 +72,7 @@ Profile::Profile(const QString &name, bool useDefaultSettings)
GameInfo::instance().createProfile(ToWString(fullPath), useDefaultSettings);
} catch (...) {
// clean up in case of an error
- shellDelete(QStringList(profileBase.absoluteFilePath(fixedName)), NULL);
+ shellDelete(QStringList(profileBase.absoluteFilePath(fixedName)));
throw;
}
refreshModStatus();
@@ -185,7 +185,7 @@ void Profile::createTweakedIniFile()
{
QString tweakedIni = m_Directory.absoluteFilePath("initweaks.ini");
- if (QFile::exists(tweakedIni) && !shellDelete(QStringList(tweakedIni), NULL)) {
+ if (QFile::exists(tweakedIni) && !shellDelete(QStringList(tweakedIni))) {
reportError(tr("failed to update tweaked ini file, wrong settings may be used: %1").arg(windowsErrorString(::GetLastError())));
return;
}
@@ -673,7 +673,7 @@ bool Profile::enableLocalSaves(bool enable)
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,
QMessageBox::Cancel);
if (res == QMessageBox::Yes) {
- shellDelete(QStringList(m_Directory.absoluteFilePath("_saves")), NULL);
+ shellDelete(QStringList(m_Directory.absoluteFilePath("_saves")));
} else if (res == QMessageBox::No) {
m_Directory.rename("saves", "_saves");
} else {
diff --git a/src/profilesdialog.cpp b/src/profilesdialog.cpp
index 1f644a2f..9955ecd2 100644
--- a/src/profilesdialog.cpp
+++ b/src/profilesdialog.cpp
@@ -179,7 +179,7 @@ void ProfilesDialog::on_removeProfileButton_clicked()
if (item != NULL) {
delete item;
}
- shellDelete(QStringList(profilePath), NULL);
+ shellDelete(QStringList(profilePath));
}
}
diff --git a/src/settings.cpp b/src/settings.cpp
index 57fba055..27dea0dc 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -369,9 +369,7 @@ void Settings::query(QWidget *parent)
QLineEdit *modDirEdit = dialog.findChild<QLineEdit*>("modDirEdit");
QLineEdit *cacheDirEdit = dialog.findChild<QLineEdit*>("cacheDirEdit");
- QCheckBox *preferIntegratedCheckBox = dialog.findChild<QCheckBox*>("preferIntegratedBox");
QCheckBox *preferExternalBox = dialog.findChild<QCheckBox*>("preferExternalBox");
- QCheckBox *quickInstallerBox = dialog.findChild<QCheckBox*>("quickInstallerBox");
QCheckBox *offlineBox = dialog.findChild<QCheckBox*>("offlineBox");
QLineEdit *nmmVersionEdit = dialog.findChild<QLineEdit*>("nmmVersionEdit");
@@ -450,9 +448,7 @@ void Settings::query(QWidget *parent)
downloadDirEdit->setText(getDownloadDirectory());
modDirEdit->setText(getModDirectory());
cacheDirEdit->setText(getCacheDirectory());
- preferIntegratedCheckBox->setChecked(m_Settings.value("Settings/prefer_integrated_installer", false).toBool());
preferExternalBox->setChecked(m_Settings.value("Settings/prefer_external_browser", false).toBool());
- quickInstallerBox->setChecked(m_Settings.value("Settings/enable_quick_installer", true).toBool());
offlineBox->setChecked(m_Settings.value("Settings/offline_mode", false).toBool());
nmmVersionEdit->setText(m_Settings.value("Settings/nmm_version", "0.33.1").toString());
logLevelBox->setCurrentIndex(logLevel());
@@ -521,10 +517,8 @@ void Settings::query(QWidget *parent)
if (nxmHandler != handleNXMBox->isChecked()) {
setNXMHandlerActive(handleNXMBox->isChecked(), registryWritable);
}
- m_Settings.setValue("Settings/prefer_integrated_installer", preferIntegratedCheckBox->isChecked());
m_Settings.setValue("Settings/prefer_external_browser", preferExternalBox->isChecked());
m_Settings.setValue("Settings/offline_mode", offlineBox->isChecked());
- m_Settings.setValue("Settings/enable_quick_installer", quickInstallerBox->isChecked());
m_Settings.setValue("Settings/nmm_version", nmmVersionEdit->text());
diff --git a/src/settingsdialog.ui b/src/settingsdialog.ui
index f248ae29..a35e0c1c 100644
--- a/src/settingsdialog.ui
+++ b/src/settingsdialog.ui
@@ -240,55 +240,6 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</widget>
- <widget class="QWidget" name="instalerTab">
- <attribute name="title">
- <string>Installer</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout_6">
- <item>
- <widget class="QCheckBox" name="preferIntegratedBox">
- <property name="toolTip">
- <string>Choose the integrated fomod installer over the external one wherever possible.</string>
- </property>
- <property name="whatsThis">
- <string>Use the integrated fomod installer if possible. This installer is only able to handle archives scripted using an xml-file (that's maybe half the fomods out there), other files are still installed using the external installer if it's available.</string>
- </property>
- <property name="text">
- <string>Prefer integrated fomod installer</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="quickInstallerBox">
- <property name="toolTip">
- <string>Use a very simple installation dialog if MO recognizes the structure of the installation archive. If you prefer your life complicated, uncheck this box.</string>
- </property>
- <property name="whatsThis">
- <string>Use a very simple installation dialog if MO recognizes the structure of the installation archive. If you prefer your life complicated, uncheck this box.</string>
- </property>
- <property name="text">
- <string>Enable &quot;Quick Installer&quot;</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer_4">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
<widget class="QWidget" name="nexusTab">
<attribute name="title">
<string>Nexus</string>