From 23cc4be5bc02328fe73ccbd67493dd71ef2e2b8f Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Wed, 4 Feb 2026 11:34:38 +0100 Subject: Add accounts and login pages --- yc.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'yc.cpp') diff --git a/yc.cpp b/yc.cpp index 94798f6..28e780c 100644 --- a/yc.cpp +++ b/yc.cpp @@ -77,6 +77,11 @@ void Yc::addOutMessage(const QString &msg, const QDateTime &dt) #endif } +void Yc::storeAccount(Client *c) +{ + creds.store(c); +} + void Yc::addAccount(Client *const c) { c->configuration().setAutoReconnectionEnabled(true); @@ -165,6 +170,16 @@ void Yc::retrieveConversations() } } +QStringList Yc::accounts() const +{ + QStringList ret; + + for (const auto c : clients) + ret << c->jidBare(); + + return ret; +} + void Yc::init() { creds.load().then(this, -- cgit v1.2.3