~ubuntu-branches/ubuntu/edgy/digikam/edgy-proposed

« back to all changes in this revision

Viewing changes to digikam/utilities/cameragui/cameracontroller.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Achim Bohnet
  • Date: 2006-05-15 01:15:02 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515011502-kpyuz7766hpbuia8
Tags: 0.8.2~rc1-0ubuntu1
* sync with debian (UVF see #44102)
  0.8.2~rc1-0ubuntu1 is identical to debian's 0.8.1+0.8.2-rc1-1.
  Version was changed due to latest 0.8.1.ubuntu-0ubuntu1 upload.
  This version is unfortunately bigger than debian's 0.8.1+0.8.2-rc1-1
* Merge in ubuntu changelog

Show diffs side-by-side

added added

removed removed

Lines of Context:
277
277
                     .arg(file));
278
278
 
279
279
            char* edata = 0;
280
 
            int   esize;
 
280
            int   esize = 0;
281
281
            d->camera->getExif(folder, file, &edata, esize);
282
282
 
283
283
            if (!edata || !esize)
308
308
            QString dest       = cmd->map["dest"].asString();
309
309
            bool    autoRotate = cmd->map["autoRotate"].asBool();
310
310
 
311
 
            sendInfo(i18n("Downloading file %1...")
312
 
                     .arg(file));
 
311
            sendInfo(i18n("Downloading file %1...").arg(file));
313
312
 
314
313
            // download to a temp file
315
314
            KURL tempURL(dest);
316
315
            tempURL = tempURL.upURL();
317
 
            tempURL.addPath( QString(".digikam-camera-%1")
318
 
                             .arg(getpid()));
 
316
            tempURL.addPath( QString(".digikam-camera-%1").arg(getpid()));
319
317
 
320
 
            bool result = d->camera->downloadItem(folder, file,
321
 
                                                  tempURL.path());
 
318
            bool result = d->camera->downloadItem(folder, file, tempURL.path());
322
319
 
323
320
            if (result)
324
321
            {
325
322
                if (autoRotate)
326
323
                {
327
 
                    sendInfo(i18n("EXIF rotating file %1...")
328
 
                             .arg(file));
 
324
                    kdDebug() << "Exif autorotate: " << file << " using (" << tempURL.path() << ")" << endl;
 
325
                    sendInfo(i18n("EXIF rotating file %1...").arg(file));
329
326
                    Digikam::exifRotate(tempURL.path());
330
327
                }
 
328
                else 
 
329
                {
 
330
                    kdDebug() << "No Autorotate: " << file << endl;
 
331
                }
331
332
 
332
333
                // move the file to the destination file
333
 
                if (rename(QFile::encodeName(tempURL.path()),
334
 
                           QFile::encodeName(dest)) != 0)
 
334
                if (rename(QFile::encodeName(tempURL.path()), QFile::encodeName(dest)) != 0)
335
335
                {
336
336
                    // rename failed. delete the temp file
337
337
                    unlink(QFile::encodeName(tempURL.path()));
338
338
                    result = false;
339
339
                }
340
340
            }
341
 
 
342
341
            
343
342
            if (result)
344
343
            {