diff options
| author | Tannin <devnull@localhost> | 2014-07-21 19:14:24 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-07-21 19:14:24 +0200 |
| commit | 9879aae5757e0c2ca930b38c6b7a4aeb4715d2d9 (patch) | |
| tree | 43ccc85bf5998c4e37abc7cdb627b49276cc441b /src/profile.cpp | |
| parent | cc9827cdda5776a4fd540a2ab0fb8a08ec9f75a7 (diff) | |
- download-list will no longer show a file as having incomplete data if there is no file version
- added a new mod column with icons displaying the content of the mod
- MO now differentiates between mods using an internal name that disambiguates between foreign and regular mods
Diffstat (limited to 'src/profile.cpp')
| -rw-r--r-- | src/profile.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/profile.cpp b/src/profile.cpp index fbfb3266..ca47d327 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -265,22 +265,23 @@ void Profile::refreshModStatus() modName = QString::fromUtf8(line.trimmed().constData());
}
if (modName.size() > 0) {
- if (namesRead.find(modName) != namesRead.end()) {
+ QString lookupName = modName + (line.at(0) == '*' ? ModInfoForeign::INT_IDENTIFIER : "");
+ if (namesRead.find(lookupName) != namesRead.end()) {
continue;
} else {
- namesRead.insert(modName);
+ namesRead.insert(lookupName);
}
- unsigned int modindex = ModInfo::getIndex(modName);
- if (modindex != UINT_MAX) {
- ModInfo::Ptr info = ModInfo::getByIndex(modindex);
- if ((modindex < m_ModStatus.size())
+ unsigned int modIndex = ModInfo::getIndex(lookupName);
+ if (modIndex != UINT_MAX) {
+ ModInfo::Ptr info = ModInfo::getByIndex(modIndex);
+ if ((modIndex < m_ModStatus.size())
&& (info->getFixedPriority() == INT_MIN)) {
- m_ModStatus[modindex].m_Enabled = enabled || info->alwaysEnabled();
- if (m_ModStatus[modindex].m_Priority == -1) {
+ m_ModStatus[modIndex].m_Enabled = enabled || info->alwaysEnabled();
+ if (m_ModStatus[modIndex].m_Priority == -1) {
if (static_cast<size_t>(index) >= m_ModStatus.size()) {
throw MyException(tr("invalid index %1").arg(index));
}
- m_ModStatus[modindex].m_Priority = index++;
+ m_ModStatus[modIndex].m_Priority = index++;
}
} else {
qDebug("mod \"%s\" (profile \"%s\") not found",
@@ -381,7 +382,7 @@ std::vector<std::tuple<QString, QString, int> > Profile::getActiveMods() iter != m_ModIndexByPriority.end(); ++iter) {
if ((*iter != UINT_MAX) && m_ModStatus[*iter].m_Enabled) {
ModInfo::Ptr modInfo = ModInfo::getByIndex(*iter);
- result.push_back(std::make_tuple(modInfo->name(), modInfo->absolutePath(), m_ModStatus[*iter].m_Priority));
+ result.push_back(std::make_tuple(modInfo->internalName(), modInfo->absolutePath(), m_ModStatus[*iter].m_Priority));
}
}
|
