Commit 754b4199 authored by Karel Slaný's avatar Karel Slaný

Always store box identifier in TaskDownloadAccountInfo::downloadAccountInfo().

parent b9873a89
......@@ -339,7 +339,7 @@ QString IsdsWrapper::getAccountDbId(const QString &userName)
return QString();
}
QString errTxt = tr("Wrong username");
QString errTxt(tr("Wrong username"));
if (userName.isEmpty()) {
Dialogues::errorMessage(Dialogues::CRITICAL,
tr("Error"), errTxt, tr("Internal error"));
......@@ -357,7 +357,7 @@ QString IsdsWrapper::getAccountDbId(const QString &userName)
m_isdsSession.isdsCtxMap[userName], &m_netLayer, false);
task->setAutoDelete(false);
GlobInstcs::workPoolPtr->runSingle(task);
QString dbId = task->m_dbID;
QString dbId(task->m_dbID);
delete task; task = Q_NULLPTR;
return dbId;
......@@ -1162,9 +1162,9 @@ void IsdsWrapper::doLoginAction(const QString &isdsAction,
emit unsuccessedLoginToIsdsSig(userName);
} else if (isdsAction == "changeUserName") {
Dialogues::errorMessage(Dialogues::CRITICAL,
tr("User name change: %1").arg(userName),
tr("User name could not be changed because an error occurred "
"while trying to log in with new user name '%1'.").arg(userName),
tr("Username change: %1").arg(userName),
tr("Username could not be changed because an error occurred while trying to log in with new user name '%1'.")
.arg(userName),
tr("ISDS returns:") + " " + m_isdsSession.isdsCtxMap[userName].last_isds_msg + "\n\n" +
tr("Check your login data and try again."));
emit unsuccessedLoginToIsdsSig(userName);
......
......@@ -35,7 +35,7 @@
TaskDownloadAccountInfo::TaskDownloadAccountInfo(IsdsSession::IsdsContext &ctx,
NetLayer *netLayer, bool storeToDb)
: m_result(DL_ERR),
m_dbID(QString()),
m_dbID(),
m_ctx(ctx),
m_netLayer(netLayer),
m_storeToDb(storeToDb)
......@@ -44,7 +44,7 @@ TaskDownloadAccountInfo::TaskDownloadAccountInfo(IsdsSession::IsdsContext &ctx,
void TaskDownloadAccountInfo::run(void)
{
if (Q_NULLPTR == m_netLayer) {
if (Q_UNLIKELY(Q_NULLPTR == m_netLayer)) {
Q_ASSERT(0);
return;
}
......@@ -102,8 +102,9 @@ enum TaskDownloadAccountInfo::Result TaskDownloadAccountInfo::downloadAccountInf
return DL_XML_ERROR;
}
dbID = dbOwnerInfo.dbID();
if (!storeToDb) {
dbID = dbOwnerInfo.dbID();
return DL_SUCCESS;
}
......
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