forked from blue/squawk
trust summary gui delivery
This commit is contained in:
parent
fffef9876a
commit
4f295fee3c
13 changed files with 169 additions and 143 deletions
|
@ -21,9 +21,15 @@
|
|||
|
||||
#include <QDateTime>
|
||||
|
||||
using namespace Core;
|
||||
|
||||
Account::Account(const QString& p_login, const QString& p_server, const QString& p_password, const QString& p_name, bool p_active, NetworkAccess* p_net, QObject* parent):
|
||||
Core::Account::Account(
|
||||
const QString& p_login,
|
||||
const QString& p_server,
|
||||
const QString& p_password,
|
||||
const QString& p_name,
|
||||
bool p_active,
|
||||
NetworkAccess* p_net,
|
||||
QObject* parent
|
||||
):
|
||||
QObject(parent),
|
||||
name(p_name),
|
||||
archiveQueries(),
|
||||
|
@ -36,13 +42,15 @@ Account::Account(const QString& p_login, const QString& p_server, const QString&
|
|||
rh(new RosterHandler(this)),
|
||||
vh(new VCardHandler(this)),
|
||||
dh(new DiscoveryHandler(this)),
|
||||
#ifdef WITH_OMEMO
|
||||
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 5, 0)
|
||||
th(new TrustHandler(this)),
|
||||
#endif
|
||||
#ifdef WITH_OMEMO
|
||||
oh(new OmemoHandler(this)),
|
||||
tm(new QXmppTrustManager(th)),
|
||||
om(new QXmppOmemoManager(oh)),
|
||||
#endif
|
||||
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 5, 0)
|
||||
tm(new QXmppTrustManager(th)),
|
||||
cm(new QXmppCarbonManagerV2()),
|
||||
psm(new QXmppPubSubManager()),
|
||||
#else
|
||||
|
@ -157,7 +165,7 @@ Account::Account(const QString& p_login, const QString& p_server, const QString&
|
|||
}
|
||||
}
|
||||
|
||||
Account::~Account() {
|
||||
Core::Account::~Account() {
|
||||
if (reconnectScheduled) {
|
||||
reconnectScheduled = false;
|
||||
reconnectTimer->stop();
|
||||
|
@ -701,9 +709,7 @@ void Core::Account::setActive(bool p_active) {
|
|||
if (active != p_active) {
|
||||
active = p_active;
|
||||
|
||||
emit changed({
|
||||
{"active", active}
|
||||
});
|
||||
emit changed({{"active", active}});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -795,14 +801,12 @@ void Core::Account::addContactToGroupRequest(const QString& jid, const QString&
|
|||
void Core::Account::removeContactFromGroupRequest(const QString& jid, const QString& groupName) {
|
||||
rh->removeContactFromGroupRequest(jid, groupName);}
|
||||
|
||||
void Core::Account::renameContactRequest(const QString& jid, const QString& newName)
|
||||
{
|
||||
void Core::Account::renameContactRequest(const QString& jid, const QString& newName) {
|
||||
Contact* cnt = rh->getContact(jid);
|
||||
if (cnt == 0) {
|
||||
if (cnt == 0)
|
||||
qDebug() << "An attempt to rename non existing contact" << jid << "of account" << name << ", skipping";
|
||||
} else {
|
||||
else
|
||||
rm->renameItem(jid, newName);
|
||||
}
|
||||
}
|
||||
|
||||
void Core::Account::invalidatePassword() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue