diff options
| author | Tannin <devnull@localhost> | 2014-11-21 15:07:31 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-11-21 15:07:31 +0100 |
| commit | 45a46778fb9c7195cb09fbba4a2c502dca6bca13 (patch) | |
| tree | c304a6ffa3412fa66edab50fd293cc7fd13faaa9 /src/modlist.cpp | |
| parent | cfb863f6c3ae7406028b9e167a3115250fefbca3 (diff) | |
| parent | f2f9e11fdd876821107cff0c1c5b9d8ecf66691f (diff) | |
Merge
Diffstat (limited to 'src/modlist.cpp')
| -rw-r--r-- | src/modlist.cpp | 19 |
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;
|
