diff options
author | George Hazan <ghazan@miranda.im> | 2018-10-10 23:38:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-10-10 23:38:16 +0300 |
commit | 9390b42340def16388cd06ab851cc303db0c096e (patch) | |
tree | c5ef12d340d47e4021ab68ef8c37d3a8f7f220f7 | |
parent | 39681c2aa83e33d46598f8aeecd10370b04cf364 (diff) |
code cleaning
-rw-r--r-- | plugins/Db3x_mmap/src/dbcontacts.cpp | 4 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/dbcontacts.cpp | 4 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/dbintf.cpp | 9 | ||||
-rw-r--r-- | plugins/Dbx_sqlite/src/dbcontacts.cpp | 4 |
4 files changed, 6 insertions, 15 deletions
diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp index d2433d2d46..97d7e0d6b4 100644 --- a/plugins/Db3x_mmap/src/dbcontacts.cpp +++ b/plugins/Db3x_mmap/src/dbcontacts.cpp @@ -55,7 +55,7 @@ STDMETHODIMP_(LONG) CDb3Mmap::DeleteContact(MCONTACT contactID) log0("del contact");
// call notifier while outside mutex
- NotifyEventHooks(g_hevEventDeleted, contactID, 0);
+ NotifyEventHooks(g_hevContactDeleted, contactID, 0);
// get back in
lck.lock();
@@ -136,7 +136,7 @@ STDMETHODIMP_(MCONTACT) CDb3Mmap::AddContact() DBCachedContact *cc = m_cache->AddContactToCache(dbc.dwContactID);
cc->dwOfsContact = ofsNew;
- NotifyEventHooks(g_hevEventAdded, dbc.dwContactID, 0);
+ NotifyEventHooks(g_hevContactAdded, dbc.dwContactID, 0);
return dbc.dwContactID;
}
diff --git a/plugins/Dbx_mdbx/src/dbcontacts.cpp b/plugins/Dbx_mdbx/src/dbcontacts.cpp index 1cda600b34..6c6fd8a8ba 100644 --- a/plugins/Dbx_mdbx/src/dbcontacts.cpp +++ b/plugins/Dbx_mdbx/src/dbcontacts.cpp @@ -41,7 +41,7 @@ LONG CDbxMDBX::DeleteContact(MCONTACT contactID) if (contactID == 0) // global contact cannot be removed
return 1;
- NotifyEventHooks(g_hevEventDeleted, contactID, 0);
+ NotifyEventHooks(g_hevContactDeleted, contactID, 0);
{
OBJLIST<EventItem> events(50);
GatherContactHistory(contactID, events);
@@ -102,7 +102,7 @@ MCONTACT CDbxMDBX::AddContact() DBFlush();
- NotifyEventHooks(g_hevEventAdded, dwContactId, 0);
+ NotifyEventHooks(g_hevContactAdded, dwContactId, 0);
return dwContactId;
}
diff --git a/plugins/Dbx_mdbx/src/dbintf.cpp b/plugins/Dbx_mdbx/src/dbintf.cpp index e2bb33d12c..17005a3cbb 100644 --- a/plugins/Dbx_mdbx/src/dbintf.cpp +++ b/plugins/Dbx_mdbx/src/dbintf.cpp @@ -57,15 +57,6 @@ CDbxMDBX::~CDbxMDBX() if (m_crypto)
m_crypto->destroy();
- DestroyHookableEvent(g_hevEventDeleted);
- DestroyHookableEvent(g_hevEventAdded);
- DestroyHookableEvent(g_hevSettingChanged);
- DestroyHookableEvent(g_hevMarkedRead);
-
- DestroyHookableEvent(g_hevEventAdded);
- DestroyHookableEvent(g_hevEventDeleted);
- DestroyHookableEvent(g_hevEventFiltered);
-
mir_free(m_tszProfileName);
}
diff --git a/plugins/Dbx_sqlite/src/dbcontacts.cpp b/plugins/Dbx_sqlite/src/dbcontacts.cpp index 7800e8b09a..63347e74c4 100644 --- a/plugins/Dbx_sqlite/src/dbcontacts.cpp +++ b/plugins/Dbx_sqlite/src/dbcontacts.cpp @@ -81,8 +81,8 @@ MCONTACT CDbxSQLite::AddContact() DBCachedContact *cc = m_cache->AddContactToCache(hContact); if (cc == nullptr) return INVALID_CONTACT_ID; - NotifyEventHooks(g_hevEventAdded, hContact); + NotifyEventHooks(g_hevContactAdded, hContact); return hContact; } @@ -104,7 +104,7 @@ LONG CDbxSQLite::DeleteContact(MCONTACT hContact) } m_cache->FreeCachedContact(hContact); - NotifyEventHooks(g_hevEventDeleted, hContact); + NotifyEventHooks(g_hevContactDeleted, hContact); return 0; } |