~ubuntu-branches/ubuntu/karmic/digikam/karmic

« back to all changes in this revision

Viewing changes to utilities/cameragui/dkcamera.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Luka Renko
  • Date: 2009-02-14 17:52:28 UTC
  • mfrom: (1.2.19 upstream)
  • Revision ID: james.westby@ubuntu.com-20090214175228-axs6z8e5pgg7bqfx
Tags: 2:0.10.0~rc2-0ubuntu1
* New upstream release (release candidate 2)
* patches/01-kubuntu-fix-armel.patch: 
  - Dropped, included upstream
* control: 
  - Remove quilt from build-depends (no patches)
  - Add liblensfun-dev to build-depends (now in main)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 * Description : abstract camera interface class
8
8
 *
9
9
 * Copyright (C) 2004-2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
10
 
 * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
 
10
 * Copyright (C) 2006-2009 by Gilles Caulier <caulier dot gilles at gmail dot com>
11
11
 *
12
12
 * This program is free software; you can redistribute it
13
13
 * and/or modify it under the terms of the GNU General
24
24
 
25
25
#include "dkcamera.h"
26
26
 
 
27
// KDE includes.
 
28
 
 
29
#include <kdebug.h>
 
30
 
27
31
// Local includes.
28
32
 
29
33
#include "albumsettings.h"
117
121
 
118
122
QString DKCamera::mimeType(const QString& fileext) const
119
123
{
 
124
    if (fileext.isEmpty()) return QString();
 
125
 
120
126
    QString ext = fileext;
 
127
    QString mime;
121
128
 
122
129
    // Massage known variations of known mimetypes into KDE specific ones
123
130
    if (ext == "jpg" || ext == "jpe")
127
134
 
128
135
    if (m_rawFilter.contains(ext))
129
136
    {
130
 
        return QString("image/x-raw");
 
137
        mime = QString("image/x-raw");
131
138
    }
132
139
    else if (m_imageFilter.contains(ext))
133
140
    {
134
 
        return QString("image/") + ext;
 
141
        mime = QString("image/") + ext;
135
142
    }
136
143
    else if (m_movieFilter.contains(ext))
137
144
    {
138
 
        return QString("video/") + ext;
 
145
        mime = QString("video/") + ext;
139
146
    }
140
147
    else if (m_audioFilter.contains(ext))
141
148
    {
142
 
        return QString("audio/") + ext;
143
 
    }
144
 
    else
145
 
    {
146
 
        return QString();
147
 
    }
 
149
        mime = QString("audio/") + ext;
 
150
    }
 
151
 
 
152
    return mime;
148
153
}
149
154
 
150
155
}  // namespace Digikam