diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-03 22:25:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-03 22:25:13 +0000 |
commit | 67e460ae2bf43109b9095c518cd2ede4e043e202 (patch) | |
tree | d4b6afb98a75fa4142b2980b792e92ee8f8fc11a /protocols/JabberG/src/jabber_privacy.cpp | |
parent | 784c2757e8c791b4c76a6e739f08b0fb92ec093a (diff) |
ptrT/A/W is used everywhere instead of DBVARIANT to read database strings
git-svn-id: http://svn.miranda-ng.org/main/trunk@6322 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_privacy.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_privacy.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index 748a0d8df5..2c0c260c86 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -418,11 +418,9 @@ public: SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUES, CB_RESETCONTENT, 0, 0);
{
for (HANDLE hContact = db_find_first(m_proto->m_szModuleName); hContact; hContact = db_find_next(hContact, m_proto->m_szModuleName)) {
- DBVARIANT dbv;
- if ( !m_proto->getTString(hContact, "jid", &dbv)) {
- SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUES, CB_ADDSTRING, 0, (LPARAM)dbv.ptszVal);
- db_free(&dbv);
- }
+ ptrT jid( m_proto->getTStringA(hContact, "jid"));
+ if (jid != NULL)
+ SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUES, CB_ADDSTRING, 0, jid);
}
// append known chatroom jids from bookmarks
@@ -1460,19 +1458,15 @@ void CJabberDlgPrivacyLists::CListBuildList(HWND hwndList, CPrivacyList *pList) for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
hItem = m_clcClist.FindContact(hContact);
- DBVARIANT dbv = {0};
- if (m_proto->getTString(hContact, "jid", &dbv))
- if (m_proto->getTString(hContact, "ChatRoomID", &dbv))
+ ptrT jid( m_proto->getTStringA(hContact, "jid"));
+ if (jid == NULL)
+ if ((jid = m_proto->getTStringA(hContact, "ChatRoomID")) == NULL)
continue;
- szJid = dbv.ptszVal;
-
if (dwPackets = CListGetPackets(hwndList, hItem, true))
pList->AddRule(Jid, szJid, TRUE, dwOrder++, dwPackets);
if (dwPackets = CListGetPackets(hwndList, hItem, false))
pList->AddRule(Jid, szJid, FALSE, dwOrder++, dwPackets);
-
- db_free(&dbv);
}
// group handles start with 1 (0 is "root")
|