Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Datovka projects
mobile Datovka
Commits
754b4199
Commit
754b4199
authored
Nov 15, 2018
by
Karel Slaný
Browse files
Always store box identifier in TaskDownloadAccountInfo::downloadAccountInfo().
parent
b9873a89
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/net/isds_wrapper.cpp
View file @
754b4199
...
...
@@ -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
);
...
...
src/worker/task_download_account_info.cpp
View file @
754b4199
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment