Commit 8f66ce70 authored by Martin Straka's avatar Martin Straka

Fixed attachment open in the create a new message page

parent d49a61e6
......@@ -554,7 +554,7 @@ Item {
"fromLocalDb": false,
"rawZfoContent": files.rawFileContent(rFilePath)})
} else {
files.openAttachmentFromPath(rFilePath)
files.openAttachment(getFileNameFromPath(rFilePath), files.rawFileContent(rFilePath))
}
}
}
......
......@@ -255,7 +255,7 @@ void Files::openAttachmentFromPath(const QString &filePath)
return;
}
if (isZfoFile(filePath)) {
if (Q_UNLIKELY(isZfoFile(filePath))) {
/* Don't open zfo files from here. */
logErrorNL("%s", "The application should open ZFO files by itself.");
Q_ASSERT(0);
......
......@@ -134,14 +134,6 @@ public:
void openAttachment(const QString &fileName,
const QByteArray &binaryData);
/*!
* @brief Open attachment from path in default application.
*
* @param[in] filePath File path.
*/
Q_INVOKABLE static
void openAttachmentFromPath(const QString &filePath);
/*!
* @brief Send message attachments or complete zfo message
* from database with email application.
......@@ -296,6 +288,14 @@ signals:
private:
/*!
* @brief Open attachment from path in default application.
*
* @param[in] filePath File path.
*/
static
void openAttachmentFromPath(const QString &filePath);
/*!
* @brief Parse xml data of zfo file.
*
......
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