X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclient.cpp;h=94a33d1b94750e2efae345fb72cee6f1561ec576;hp=7bbbefe7203e8d23940e252caae9d28da9e4147f;hb=8379f6f725cf8ed2fdad1a19bd10743436c2d086;hpb=99ae722f4f4b427698d07d6476b3b860da7fa09c diff --git a/src/client/client.cpp b/src/client/client.cpp index 7bbbefe7..94a33d1b 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -48,6 +48,7 @@ #include "quassel.h" #include "signalproxy.h" #include "util.h" +#include "clientauthhandler.h" #include #include @@ -152,6 +153,8 @@ void Client::init() p->attachSlot(SIGNAL(networkCreated(NetworkId)), this, SLOT(coreNetworkCreated(NetworkId))); p->attachSlot(SIGNAL(networkRemoved(NetworkId)), this, SLOT(coreNetworkRemoved(NetworkId))); + p->attachSignal(this, SIGNAL(clientChangePassword(QString))); + //connect(mainUi(), SIGNAL(connectToCore(const QVariantMap &)), this, SLOT(connectToCore(const QVariantMap &))); connect(mainUi(), SIGNAL(disconnectFromCore()), this, SLOT(disconnectFromCore())); connect(this, SIGNAL(connected()), mainUi(), SLOT(connectedToCore())); @@ -645,6 +648,13 @@ void Client::markBufferAsRead(BufferId id) bufferSyncer()->requestMarkBufferAsRead(id); } +void Client::changePassword(QString newPassword) { + CoreAccount account = currentCoreAccount(); + account.setPassword(newPassword); + coreAccountModel()->createOrUpdateAccount(account); + emit clientChangePassword(newPassword); +} + #if QT_VERSION < 0x050000 void Client::logMessage(QtMsgType type, const char *msg)