Commit 2265f3f9 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

factorize

parent 48459c63
......@@ -812,7 +812,7 @@ void KPImagesList::slotAddImages(const KUrl::List& list)
if (d->allowDuplicate || !found)
{
// if RAW files are not allowed, skip the image
if (!d->allowRAW && isRAWFile(imageUrl.path()))
if (!d->allowRAW && KPMetadata::isRawFile(imageUrl))
{
raw = true;
continue;
......@@ -1175,20 +1175,6 @@ Interface* KPImagesList::iface() const
return d->iface;
}
bool KPImagesList::isRAWFile(const QString& filePath) const
{
QString rawFilesExt(KDcrawIface::KDcraw::rawFiles());
QFileInfo fileInfo(filePath);
if (rawFilesExt.toUpper().contains(fileInfo.suffix().toUpper()))
{
return true;
}
return false;
}
void KPImagesList::slotImageListChanged()
{
const QList<QTreeWidgetItem*> selectedItemsList = d->listView->selectedItems();
......
......@@ -292,7 +292,6 @@ private Q_SLOTS:
private:
bool isRAWFile(const QString& filePath) const;
void setIconSize(int size);
private:
......
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