diff options
| author | Tannin <devnull@localhost> | 2014-01-14 21:16:36 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-01-14 21:16:36 +0100 |
| commit | 6ed82866b07414e91dfe0c47ee5f580bfd4fe479 (patch) | |
| tree | 0b9fa043236d95ea821ab8e43bf641beeda701dc /src/pluginlist.cpp | |
| parent | a083a2d3b6506ab95d3b18ab0ffa7751750e0249 (diff) | |
- moved code for file previews to plugins
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 20d4d357..a0045ab3 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -312,6 +312,7 @@ bool PluginList::readLoadOrder(const QString &fileName) void PluginList::readEnabledFrom(const QString &fileName) { +qDebug("read enabled from %s", qPrintable(fileName)); for (std::vector<ESPInfo>::iterator iter = m_ESPs.begin(); iter != m_ESPs.end(); ++iter) { if (!iter->m_ForceEnabled) { iter->m_Enabled = false; @@ -389,7 +390,7 @@ void PluginList::writePlugins(const QString &fileName, bool writeUnchecked) cons file.write(textCodec->fromUnicode("# This file was automatically generated by Mod Organizer.\r\n")); bool invalidFileNames = false; - + int writtenCount = 0; for (size_t i = 0; i < m_ESPs.size(); ++i) { int priority = m_ESPsByPriority[i]; if ((m_ESPs[priority].m_Enabled || writeUnchecked) && !m_ESPs[priority].m_Removed) { @@ -401,6 +402,7 @@ void PluginList::writePlugins(const QString &fileName, bool writeUnchecked) cons file.write(textCodec->fromUnicode(m_ESPs[priority].m_Name)); } file.write("\r\n"); + ++writtenCount; } } file.close(); @@ -783,6 +785,7 @@ QVariant PluginList::data(const QModelIndex &modelIndex, int role) const bool PluginList::setData(const QModelIndex &modIndex, const QVariant &value, int role) { if (role == Qt::CheckStateRole) { +qDebug("uncheck plugin"); m_ESPs[modIndex.row()].m_Enabled = value.toInt() == Qt::Checked; emit dataChanged(modIndex, modIndex); |
