diff options
| author | Tannin <devnull@localhost> | 2014-03-26 15:35:59 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-03-26 15:35:59 +0100 |
| commit | 28301e7486423a2ca0b5434d1538d36b05f4ac86 (patch) | |
| tree | 65a422bac32ab42ea847a8479d2d06f1f700e5b3 /src | |
| parent | 2d0fab4482cea8a3472e2430f4746feeae1784ff (diff) | |
- improved NCC compatibility
- crude support for multi-volume archives
- updated imageformats plugins
- nxmhandler now puts the exe to the top of the list when registering an MO instance, even if it is already in the list
- bugfix: WritePrivateProfileString hook attempted to access lpKeyName even when it is null
Diffstat (limited to 'src')
| -rw-r--r-- | src/installationmanager.cpp | 17 | ||||
| -rw-r--r-- | src/pluginlist.cpp | 3 | ||||
| -rw-r--r-- | src/profile.cpp | 4 |
3 files changed, 15 insertions, 9 deletions
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index e6e660e6..7b8ed176 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -69,7 +69,7 @@ template <typename T> T resolveFunction(QLibrary &lib, const char *name) InstallationManager::InstallationManager(QWidget *parent) : QObject(parent), m_ParentWidget(parent), - 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")("001")) { QLibrary archiveLib("dlls\\archive.dll"); if (!archiveLib.load()) { @@ -659,7 +659,9 @@ bool InstallationManager::install(const QString &fileName, GuessedValue<QString> // open the archive and construct the directory tree the installers work on bool archiveOpen = m_CurrentArchive->open(ToWString(QDir::toNativeSeparators(fileName)).c_str(), new MethodCallback<InstallationManager, void, LPSTR>(this, &InstallationManager::queryPassword)); - + if (!archiveOpen) { + qDebug("integrated archiver can't open %s. errorcode %d", qPrintable(fileName), m_CurrentArchive->getLastError()); + } ON_BLOCK_EXIT(std::bind(&InstallationManager::postInstallCleanup, this)); QScopedPointer<DirectoryTree> filesTree(archiveOpen ? createFilesTree() : NULL); @@ -676,8 +678,12 @@ bool InstallationManager::install(const QString &fileName, GuessedValue<QString> } // try only manual installers if that was requested - if ((installResult == IPluginInstaller::RESULT_MANUALREQUESTED) && !installer->isManualInstaller()) { - continue; + if (installResult == IPluginInstaller::RESULT_MANUALREQUESTED) { + if (!installer->isManualInstaller()) { + continue; + } + } else if (installResult != IPluginInstaller::RESULT_NOTATTEMPTED) { + break; } try { @@ -719,7 +725,8 @@ bool InstallationManager::install(const QString &fileName, GuessedValue<QString> case IPluginInstaller::RESULT_FAILED: { return false; } break; - case IPluginInstaller::RESULT_SUCCESS: { + case IPluginInstaller::RESULT_SUCCESS: + case IPluginInstaller::RESULT_SUCCESSCANCEL: { if (filesTree != NULL) { DirectoryTree::node_iterator iniTweakNode = filesTree->nodeFind(DirectoryTreeInformation("INI Tweaks")); hasIniTweaks = (iniTweakNode != filesTree->nodesEnd()) && diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 289032bb..af6f42da 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -1035,9 +1035,8 @@ QVariant PluginList::data(const QModelIndex &modelIndex, int role) const result.append(QIcon(":/MO/gui/edit_clear")); } return result; - } else { - return QVariant(); } + return QVariant(); } diff --git a/src/profile.cpp b/src/profile.cpp index 41a867c5..42358b7d 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -93,7 +93,7 @@ Profile::Profile(const QDir& directory) GameInfo::instance().repairProfile(ToWString(m_Directory.absolutePath())); if (!QFile::exists(getIniFileName())) { - reportError(QObject::tr("\"%1\" is missing").arg(getIniFileName())); + reportError(QObject::tr("\"%1\" is missing or inaccessible").arg(getIniFileName())); } refreshModStatus(); } @@ -231,7 +231,7 @@ void Profile::refreshModStatus() { QFile file(getModlistFileName()); if (!file.exists()) { - throw MyException(QObject::tr("failed to find \"%1\"").arg(getModlistFileName())); + throw MyException(tr("\"%1\" is missing or inaccessible").arg(getModlistFileName())); } bool modStatusModified = false; |
