diff options
| author | Tannin <devnull@localhost> | 2014-11-06 00:07:06 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-11-06 00:07:06 +0100 |
| commit | 10cc56608135b5ca0454b7515f6e7d90f4eb7b92 (patch) | |
| tree | 8b4f79a40ac6b4e2d0e4202b88875f44986785a8 /src/pluginlist.cpp | |
| parent | 53d1f3e00e8f2cfc8f2d715b4bbbf0309dcb8947 (diff) | |
| parent | df0bd3331a4b2174f99117c5a6f21ff6bddca1ba (diff) | |
Merge
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 973e3cfc..b2d02cd2 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -23,6 +23,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "settings.h"
#include "safewritefile.h"
#include "scopeguard.h"
+#include "modinfo.h"
#include <utility.h>
#include <gameinfo.h>
#include <espfile.h>
@@ -158,7 +159,14 @@ void PluginList::refresh(const QString &profileName, const DirectoryEntry &baseD QString iniPath = QFileInfo(filename).baseName() + ".ini";
bool hasIni = baseDirectory.findFile(ToWString(iniPath)).get() != NULL;
- m_ESPs.push_back(ESPInfo(filename, forceEnabled, current->getFileTime(), ToQString(origin.getName()), ToQString(current->getFullPath()), hasIni));
+ QString originName = ToQString(origin.getName());
+ unsigned int modIndex = ModInfo::getIndex(originName);
+ if (modIndex != UINT_MAX) {
+ ModInfo::Ptr modInfo = ModInfo::getByIndex(modIndex);
+ originName = modInfo->name();
+ }
+
+ m_ESPs.push_back(ESPInfo(filename, forceEnabled, current->getFileTime(), originName, ToQString(current->getFullPath()), hasIni));
} catch (const std::exception &e) {
reportError(tr("failed to update esp info for file %1 (source id: %2), error: %3").arg(filename).arg(current->getOrigin(archive)).arg(e.what()));
}
@@ -290,6 +298,8 @@ void PluginList::addInformation(const QString &name, const QString &message) if (iter != m_ESPsByName.end()) {
m_AdditionalInfo[name.toLower()].m_Messages.append(message);
+ } else {
+ qWarning("failed to associate message for \"%s\"", qPrintable(name));
}
}
|
