X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.cpp;h=8f022cac586dcd01e898843b4f08035d7d617802;hp=84c315970918695dfeda017ca8b04b7fba393df8;hb=921321156c2f1ceed0e02d519a1835e63e8c8b48;hpb=d367542ce54ed86fd3c8dbdbbf8210fc9a19a882 diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index 84c31597..8f022cac 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -87,6 +87,7 @@ #include "legacysystemtray.h" #include "msgprocessorstatuswidget.h" #include "nicklistwidget.h" +#include "passwordchangedlg.h" #include "qtuiapplication.h" #include "qtuimessageprocessor.h" #include "qtuisettings.h" @@ -197,8 +198,6 @@ void MainWin::init() connect(Client::coreConnection(), SIGNAL(handleSslErrors(const QSslSocket *, bool *, bool *)), SLOT(handleSslErrors(const QSslSocket *, bool *, bool *))); #endif - connect(this, SIGNAL(changePassword(QString)), Client::instance(), SLOT(changePassword(QString))); - // Setup Dock Areas setDockNestingEnabled(true); setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea); @@ -363,7 +362,7 @@ void MainWin::setupActions() coll->addAction("DisconnectCore", new Action(QIcon::fromTheme("network-disconnect"), tr("&Disconnect from Core"), coll, Client::instance(), SLOT(disconnectFromCore()))); coll->addAction("ChangePassword", new Action(QIcon::fromTheme("dialog-password"), tr("Change &Password..."), coll, - this, SLOT(showChangePasswordDialog()))); + this, SLOT(showPasswordChangeDlg()))); coll->addAction("CoreInfo", new Action(QIcon::fromTheme("help-about"), tr("Core &Info..."), coll, this, SLOT(showCoreInfoDlg()))); coll->addAction("ConfigureNetworks", new Action(QIcon::fromTheme("configure"), tr("Configure &Networks..."), coll, @@ -738,14 +737,11 @@ void MainWin::changeActiveBufferView(int bufferViewId) } -void MainWin::showChangePasswordDialog() +void MainWin::showPasswordChangeDlg() { if((Client::coreFeatures() & Quassel::PasswordChange)) { - bool ok; - QString newPassword = QInputDialog::getText(this, tr("Set Core Password"), tr("New password for your Quassel Core:"), QLineEdit::Password, QString(), &ok); - if (ok && !newPassword.isEmpty()) { - emit changePassword(newPassword); - } + PasswordChangeDlg dlg(this); + dlg.exec(); } else { QMessageBox box(QMessageBox::Warning, tr("Feature Not Supported"),