~dpm/reminders-app/clarify-reminders

« back to all changes in this revision

Viewing changes to src/app/camerahelper.cpp

fix errors/warnings regarding images:

* Create the cachedir on startup if it doesn't exist.
* Don't scale images to 0,0 if sourceSize is not set.
.

Approved by Ubuntu Phone Apps Jenkins Bot, Riccardo Padovani.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
 
38
38
QString CameraHelper::importLocation() const
39
39
{
40
 
    QString homePath = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first();
41
 
    QString appName = QCoreApplication::applicationName();
42
 
    return  homePath + "/.cache/" + appName + "/tempImage.jpg";
 
40
    QString cachePath = QStandardPaths::standardLocations(QStandardPaths::CacheLocation).first();
 
41
    return  cachePath + "/tempImage.jpg";
43
42
}
44
43
 
45
44
bool CameraHelper::rotate(const QString &imageFile, int angle)