aboutsummaryrefslogtreecommitdiff
path: root/contacts.cpp
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-08-21 00:37:36 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-08-30 02:46:41 +0200
commit78d9bd40849a39db1fbdbfc87b2c45e9d3e73d06 (patch)
treebb3898abbdaf5d11c62c5deee8debe582ace8c60 /contacts.cpp
parent8cbcb1f98f5982f56c9b3ac5b8e089b3b18cf305 (diff)
Insert JidDb into Client
Diffstat (limited to 'contacts.cpp')
-rw-r--r--contacts.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/contacts.cpp b/contacts.cpp
index 3d3ff77..4336ac3 100644
--- a/contacts.cpp
+++ b/contacts.cpp
@@ -3,16 +3,16 @@
#include <QListWidgetItem>
#include <QScroller>
-Contacts::Contacts(const QHash<QString, JidDb *> &databases,
+Contacts::Contacts(const QList<Client *> &clients,
QWidget *const parent) :
QDialog(parent)
{
ui.setupUi(this);
QScroller::grabGesture(ui.contacts_list, QScroller::TouchGesture);
- for (const auto db : databases)
- for (const auto &contact : db->roster())
- add(db->jid, contact);
+ for (const auto c : clients)
+ for (const auto &contact : c->database().roster())
+ add(c->jidBare(), contact);
connect(ui.contacts_list, &QListWidget::itemActivated, this,
[this]