Commit f087dd0a authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

factoring

parent 9be1e210
......@@ -8,7 +8,7 @@
*
* Copyright (C) 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com>
* Copyright (C) 2007-2008 by Orgad Shaneh <orgads at gmail dot com>
* Copyright (C) 2012 by Angelo Naselli <anaselli at linux dot it>
* Copyright (C) 2012 by Angelo Naselli <anaselli at linux dot it>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
......@@ -52,7 +52,7 @@
namespace KIPICalendarPlugin
{
CalPainter::CalPainter(QPaintDevice* pd)
CalPainter::CalPainter(QPaintDevice* const pd)
: QPainter(pd)
{
orientation_ = KPMetadata::ORIENTATION_UNSPECIFIED;
......@@ -314,11 +314,7 @@ void CalPainter::paint(int month)
}
// Check if RAW file.
QFileInfo fi(imagePath_.path());
QString rawFilesExt(KDcrawIface::KDcraw::rawFiles());
if (rawFilesExt.toUpper().contains(fi.suffix().toUpper()))
if (KPMetadata::isRawFile(imagePath_))
{
KDcrawIface::KDcraw::loadDcrawPreview(image_, imagePath_.path());
}
......
......@@ -8,7 +8,7 @@
*
* Copyright (C) 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com>
* Copyright (C) 2007-2008 by Orgad Shaneh <orgads at gmail dot com>
* Copyright (C) 2012 by Angelo Naselli <anaselli at linux dot it>
* Copyright (C) 2012 by Angelo Naselli <anaselli at linux dot it>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
......@@ -52,7 +52,7 @@ class CalPainter : public QObject, public QPainter
public:
CalPainter(QPaintDevice* pd);
CalPainter(QPaintDevice* const pd);
virtual ~CalPainter();
void setImage(const KUrl& imagePath, KPMetadata::ImageOrientation orientation);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment