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