Commit ca3f3b06 authored by Karel Slaný's avatar Karel Slaný
Browse files

Replaced QInputDialog::getText() with PasteInputDialogue::getText().

parent 663a4d7f
......@@ -25,7 +25,6 @@
#include <QDebug>
#include <QFileInfo>
#include <QMessageBox>
#include <QInputDialog>
#include "src/common.h"
#include "src/net/isds_const.h"
......@@ -33,7 +32,7 @@
#include "src/net/xml_layer.h"
#include "src/models/accountmodel.h"
#include "src/settings.h"
#include "src/widgets/paste_input_dialogue.h"
IsdsSession::IsdsSession(QObject *parent) : QObject(parent),
isdsCtxMap()
......@@ -77,7 +76,7 @@ bool IsdsSession::createIsdsCtx(const QString &userName, QString &errText)
if (!acntData.password().isEmpty()) {
isdsCtx.password = acntData.password();
} else {
QString text = QInputDialog::getText(0,
QString text = PasteInputDialogue::getText(0,
tr("Password: %1").arg(userName),
tr("Enter password for account\n'%1'").arg(acntData.accountName()),
QLineEdit::Password, NULL, &ok, Qt::Dialog);
......@@ -94,7 +93,7 @@ bool IsdsSession::createIsdsCtx(const QString &userName, QString &errText)
return false;
}
} else if (acntData.loginMethod() == USERNAME_PWD_HOTP) {
QString text = QInputDialog::getText(0,
QString text = PasteInputDialogue::getText(0,
tr("Security code: %1").arg(userName),
tr("Enter security code for account\n'%1'").arg(acntData.accountName()),
QLineEdit::Normal, NULL, &ok, Qt::Dialog,
......@@ -157,7 +156,7 @@ bool IsdsSession::setCertificateData(const QString &userName,
return false;
}
const QString passPhrase = QInputDialog::getText(0,
const QString passPhrase = PasteInputDialogue::getText(0,
tr("Certificate password: %1").arg(userName),
tr("Enter certificate password for account\n'%1'").arg(accountName),
QLineEdit::Password, NULL, &ok, Qt::Dialog);
......
......@@ -22,12 +22,12 @@
*/
#include <QDebug>
#include <QInputDialog>
#include <QMessageBox>
#include "src/net/isds_wrapper.h"
#include "src/models/accountmodel.h"
#include "src/settings.h"
#include "src/widgets/paste_input_dialogue.h"
IsdsWrapper::IsdsWrapper(QObject *parent) : QObject(parent)
{
......@@ -332,7 +332,7 @@ void IsdsWrapper::changePassword(const QString &userName,
}
bool ok;
QString newPwd = QInputDialog::getText(0,
QString newPwd = PasteInputDialogue::getText(0,
tr("New password: %1").arg(userName),
tr("Enter a new password for account\n'%1'").arg(accountName),
QLineEdit::Normal, NULL, &ok, Qt::Dialog);
......@@ -371,7 +371,7 @@ void IsdsWrapper::changePassword(const QString &userName,
return;
}
QString text = QInputDialog::getText(0,
QString text = PasteInputDialogue::getText(0,
tr("SMS code: %1").arg(userName),
tr("Enter SMS code for account\n'%1'").arg(accountName),
QLineEdit::Normal, NULL, &ok, Qt::Dialog,
......@@ -383,7 +383,7 @@ void IsdsWrapper::changePassword(const QString &userName,
}
} else if (m_isdsSession.isdsCtxMap[userName].login_method == USERNAME_PWD_HOTP) {
QString text = QInputDialog::getText(0,
QString text = PasteInputDialogue::getText(0,
tr("Security code: %1").arg(userName),
tr("Enter security code for account\n'%1'").arg(accountName),
QLineEdit::Normal, NULL, &ok, Qt::Dialog,
......
......@@ -24,7 +24,6 @@
#include <QDebug>
#include <QEventLoop>
#include <QInputDialog>
#include <QNetworkAccessManager>
#include <QNetworkCookie>
#include <QNetworkCookieJar>
......@@ -36,6 +35,7 @@
#include "src/net/net_layer.h"
#include "src/net/xml_layer.h"
#include "src/net/isds_const.h"
#include "src/widgets/paste_input_dialogue.h"
void printRequest(QNetworkRequest request, QByteArray requestContent)
......@@ -512,7 +512,7 @@ bool NetLayer::doTotpLoginRequest(IsdsContext &ctx, const QByteArray &xmlDataIn,
/* Set authorization header */
bool ok;
const QString code = QInputDialog::getText(0,
const QString code = PasteInputDialogue::getText(0,
tr("SMS code: %1").arg(ctx.username),
tr("Enter SMS code for user '%1'").arg(ctx.username),
QLineEdit::Normal, NULL, &ok, Qt::Dialog, Qt::ImhDigitsOnly);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment