summaryrefslogtreecommitdiff
path: root/src/modlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modlist.cpp')
-rw-r--r--src/modlist.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp
index 681d880c..fb8df15e 100644
--- a/src/modlist.cpp
+++ b/src/modlist.cpp
@@ -49,8 +49,12 @@ using namespace MOBase;
ModList::ModList(QObject *parent)
- : QAbstractItemModel(parent), m_Profile(NULL), m_Modified(false),
- m_FontMetrics(QFont()), m_DropOnItems(false)
+ : QAbstractItemModel(parent)
+ , m_Profile(NULL)
+ , m_NexusInterface(NULL)
+ , m_Modified(false)
+ , m_FontMetrics(QFont())
+ , m_DropOnItems(false)
{
m_ContentIcons[ModInfo::CONTENT_PLUGIN] = std::make_tuple(QIcon(":/MO/gui/content/plugin"), ":/MO/gui/content/plugin", tr("Game plugins (esp/esm)"));
m_ContentIcons[ModInfo::CONTENT_INTERFACE] = std::make_tuple(QIcon(":/MO/gui/content/interface"), ":/MO/gui/content/interface", tr("Interface"));
@@ -64,6 +68,12 @@ ModList::ModList(QObject *parent)
m_ContentIcons[ModInfo::CONTENT_TEXTURE] = std::make_tuple(QIcon(":/MO/gui/content/texture"), ":/MO/gui/content/texture", tr("Textures"));
}
+ModList::~ModList()
+{
+ m_ModStateChanged.disconnect_all_slots();
+ m_ModMoved.disconnect_all_slots();
+}
+
void ModList::setProfile(Profile *profile)
{
m_Profile = profile;
@@ -653,6 +663,11 @@ void ModList::modInfoChanged(ModInfo::Ptr info)
}
}
+void ModList::disconnectSlots() {
+ m_ModMoved.disconnect_all_slots();
+ m_ModStateChanged.disconnect_all_slots();
+}
+
IModList::ModStates ModList::state(unsigned int modIndex) const
{
IModList::ModStates result;