Merge lp:~mzanetti/reminders-app/gif-support into lp:reminders-app

Proposed by Michael Zanetti
Status: Merged
Approved by: David Planella
Approved revision: 293
Merged at revision: 299
Proposed branch: lp:~mzanetti/reminders-app/gif-support
Merge into: lp:reminders-app
Diff against target: 21 lines (+3/-1)
1 file modified
src/plugin/Evernote/resource.cpp (+3/-1)
To merge this branch: bzr merge lp:~mzanetti/reminders-app/gif-support
Reviewer Review Type Date Requested Status
David Planella Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+240842@code.launchpad.net

Commit message

add gif support

As Qt doesn't support writing gif (probably licensing reasons) the code
will now always store cached images as jpg

To post a comment you must log in.
293. By Michael Zanetti

drop unneeded _

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
David Planella (dpm) wrote :

Looks good to me and works as expected!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/plugin/Evernote/resource.cpp'
2--- src/plugin/Evernote/resource.cpp 2014-05-06 20:48:29 +0000
3+++ src/plugin/Evernote/resource.cpp 2014-11-06 12:24:20 +0000
4@@ -77,6 +77,8 @@
5 m_type = "image/png";
6 } else if (m_fileName.endsWith(".jpg") || m_fileName.endsWith(".jpeg")) {
7 m_type = "image/jpeg";
8+ } else if (m_fileName.endsWith(".gif")) {
9+ m_type = "image/gif";
10 } else {
11 qWarning() << "cannot determine mime type of file" << m_fileName;
12 }
13@@ -113,7 +115,7 @@
14
15 QString finalFilePath = m_filePath;
16 if (size.isValid() && !size.isNull()) {
17- finalFilePath = m_filePath + "_" + QString::number(size.width()) + "x" + QString::number(size.height()) + "_" + m_fileName;
18+ finalFilePath = m_filePath + "_" + QString::number(size.width()) + "x" + QString::number(size.height()) + ".jpg";
19 QFileInfo fi(finalFilePath);
20 if (!fi.exists()) {
21 QImage image(m_filePath);

Subscribers

People subscribed via source and target branches