Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Datovka projects
mobile Datovka
Commits
815b5d73
Commit
815b5d73
authored
Oct 24, 2017
by
Martin Straka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed open zfo file from database in send page
parent
c23dd8e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
qml/pages/PageSendMessage.qml
qml/pages/PageSendMessage.qml
+7
-1
src/zfo.cpp
src/zfo.cpp
+6
-0
src/zfo.h
src/zfo.h
+10
-0
No files found.
qml/pages/PageSendMessage.qml
View file @
815b5d73
...
...
@@ -405,7 +405,7 @@ Item {
anchors.fill
:
parent
onClicked
:
{
// fileId is set and is valid, use files from database
if
(
rFileId
!=
FileIdType
.
NO_FILE_ID
)
{
if
(
rFileId
>
0
)
{
if
(
files
.
isZfoFile
(
rFileName
))
{
pageView
.
push
(
pageMessageDetail
,
{
"
pageView
"
:
pageView
,
...
...
@@ -415,6 +415,12 @@ Item {
}
else
{
files
.
openAttachmentFromDb
(
userName
,
msgId
,
rFileId
)
}
}
else
if
(
rFileId
==
FileIdType
.
DB_ZFO_ID
)
{
pageView
.
push
(
pageMessageDetail
,
{
"
pageView
"
:
pageView
,
"
statusBar
"
:
statusBar
,
"
fromLocalDb
"
:
false
,
"
rawZfoContent
"
:
zfo
.
getZfoContentFromDb
(
userName
,
msgId
)})
}
else
{
if
(
files
.
isZfoFile
(
getFileNameFromPath
(
rFilePath
)))
{
pageView
.
push
(
pageMessageDetail
,
{
...
...
src/zfo.cpp
View file @
815b5d73
...
...
@@ -29,6 +29,12 @@ Zfo::Zfo(QObject *parent) : QObject(parent)
{
}
QByteArray
Zfo
::
getZfoContentFromDb
(
const
QString
&
userName
,
qint64
msgId
)
{
return
QByteArray
::
fromBase64
(
globZfoDbPtr
->
getZfoContentFromDb
(
msgId
,
AccountListModel
::
globAccounts
[
userName
].
isTestAccount
()));
}
int
Zfo
::
getZfoSizeFromDb
(
const
QString
&
userName
,
qint64
msgId
)
{
return
globZfoDbPtr
->
getZfoSizeFromDb
(
msgId
,
...
...
src/zfo.h
View file @
815b5d73
...
...
@@ -41,6 +41,16 @@ public:
*/
explicit
Zfo
(
QObject
*
parent
=
Q_NULLPTR
);
/*!
* @brief Get Zfo content.
*
* @param[in] userName User name identifying account.
* @param[in] msgId String with message id.
* @return Zfo content.
*/
Q_INVOKABLE
static
QByteArray
getZfoContentFromDb
(
const
QString
&
userName
,
qint64
msgId
);
/*!
* @brief Get Zfo size in bytes.
*
...
...
Write
Preview
Markdown
is supported
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