summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-09-26 19:10:44 +0200
committerTannin <devnull@localhost>2013-09-26 19:10:44 +0200
commit0a3169b808cf2b84ae7c77fd6cb0a7b0aa9a8df3 (patch)
tree0774e1f3dae63a4e9111b1429169b55d8b19aeb4 /src
parentf4528c7aaab81d904977666a475899ab153137f9 (diff)
- plugin tooltip now only lists the masters that aren't enabled (if any)
Diffstat (limited to 'src')
-rw-r--r--src/pluginlist.cpp11
-rw-r--r--src/pluginlist.h2
2 files changed, 6 insertions, 7 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp
index 6cb9bdf7..0ed0d7f9 100644
--- a/src/pluginlist.cpp
+++ b/src/pluginlist.cpp
@@ -608,12 +608,11 @@ void PluginList::testMasters()
}
for (auto iter = m_ESPs.begin(); iter != m_ESPs.end(); ++iter) {
- iter->m_MasterUnset = false;
+ iter->m_MasterUnset.clear();
if (iter->m_Enabled) {
for (auto master = iter->m_Masters.begin(); master != iter->m_Masters.end(); ++master) {
if (enabledMasters.find(master->toLower()) == enabledMasters.end()) {
- iter->m_MasterUnset = true;
- break;
+ iter->m_MasterUnset.insert(*master);
}
}
}
@@ -648,7 +647,7 @@ QVariant PluginList::data(const QModelIndex &modelIndex, int role) const
} break;
}
} else if ((role == Qt::DecorationRole) && (modelIndex.column() == 0)) {
- if (m_ESPs[index].m_MasterUnset) {
+ if (m_ESPs[index].m_MasterUnset.size() > 0) {
return QIcon(":/MO/gui/warning");
} else if (m_LockedOrder.find(m_ESPs[index].m_Name.toLower()) != m_LockedOrder.end()) {
return QIcon(":/MO/gui/locked");
@@ -675,8 +674,8 @@ QVariant PluginList::data(const QModelIndex &modelIndex, int role) const
return tr("This plugin can't be disabled (enforced by the game)");
} else {
QString text = tr("Origin: %1").arg(m_ESPs[index].m_OriginName);
- if (m_ESPs[index].m_MasterUnset) {
- text += "\nDepends on the following masters: " + SetJoin(m_ESPs[index].m_Masters, ", ");
+ if (m_ESPs[index].m_MasterUnset.size() > 0) {
+ text += "\n" + tr("Missing Masters") + ": " + SetJoin(m_ESPs[index].m_MasterUnset, ", ");
}
return text;
}
diff --git a/src/pluginlist.h b/src/pluginlist.h
index b1f1cc0e..3442a9f7 100644
--- a/src/pluginlist.h
+++ b/src/pluginlist.h
@@ -185,7 +185,7 @@ private:
QString m_OriginName;
bool m_IsMaster;
std::set<QString> m_Masters;
- mutable bool m_MasterUnset;
+ mutable std::set<QString> m_MasterUnset;
};
friend bool ByName(const ESPInfo& LHS, const ESPInfo& RHS);