~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to utilities/advancedrename/parser/options/cameranameoption.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-21 23:19:11 UTC
  • mfrom: (1.2.33 upstream) (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221231911-z9jip7s5aht1jqn9
Tags: 2:1.7.0-1ubuntu1
* Merge from Debian Experimental. Remaining Ubuntu changes:
  - Export .pot name and copy to plugins in debian/rules
  - Version build-depends on kipi-plugins-dev to ensure build is against the
    same version on all archs
* Drop debian/patches/kubuntu_01_linker.diff, incoporated upstream
* Remove patches directory and unused patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
{
38
38
 
39
39
CameraNameOption::CameraNameOption()
40
 
                : Option(i18n("Camera"), i18n("Add the camera name"), SmallIcon("camera-photo"))
 
40
    : Option(i18n("Camera"), i18n("Add the camera name"), SmallIcon("camera-photo"))
41
41
{
42
 
    QString token = "[cam]";
 
42
    QString token("[cam]");
43
43
    addToken(token, i18n("Camera name"));
44
44
 
45
45
    QRegExp reg(escapeToken(token));
52
52
    QString result;
53
53
 
54
54
    ImageInfo info(settings.fileUrl);
 
55
 
55
56
    if (!info.isNull())
56
57
    {
57
58
        result = info.photoInfoContainer().make + " " + info.photoInfoContainer().model;
63
64
        QString model;
64
65
 
65
66
        DMetadata meta(settings.fileUrl.toLocalFile());
 
67
 
66
68
        if (!meta.isEmpty())
67
69
        {
68
70
            KExiv2::MetaDataMap dataMap;
69
71
            dataMap = meta.getExifTagsDataList(QStringList(), true);
70
72
 
71
 
            foreach (const QString &key, dataMap.keys())
 
73
            foreach (const QString& key, dataMap.keys())
72
74
            {
73
75
                if (key.toLower().contains("exif.image.model"))
74
76
                {