summaryrefslogtreecommitdiff
path: root/src/pluginlist.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2014-11-11 21:42:18 +0100
committerTannin <devnull@localhost>2014-11-11 21:42:18 +0100
commit9494938534e3dc251cd1d462bb5b40b8d98103ef (patch)
tree6fe937eab4886dc17c7b9e7d44f7d778c27f72a8 /src/pluginlist.cpp
parent7c1273b246117740dd17fb70ad712346421224d7 (diff)
parent9ab7bada1c81eb82d97df23da64a56a0eba0bf42 (diff)
Merge
Diffstat (limited to 'src/pluginlist.cpp')
-rw-r--r--src/pluginlist.cpp12
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));
}
}