Commit 42d04f80 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

Return true if no XMP sidecar exist. Only return false if sidecar moving failed.

API doc.
parent f636e759
......@@ -156,10 +156,10 @@ bool KPMetadata::moveSidecar(const KUrl& src, const KUrl& dst)
if (hasSidecar(src.toLocalFile()))
{
if (KDE_rename(QFile::encodeName(sidecarUrl(src).toLocalFile()),
QFile::encodeName(sidecarUrl(dst).toLocalFile())) == 0)
return true;
QFile::encodeName(sidecarUrl(dst).toLocalFile())) != 0)
return false;
}
return false;
return true;
}
bool KPMetadata::isRawFile(const KUrl& url)
......
......@@ -65,7 +65,6 @@ namespace KIPI
}
using namespace KIPI;
using namespace KExiv2Iface;
namespace KIPIPlugins
......@@ -134,7 +133,14 @@ public:
public:
/** Move XMP sidecar file of source file src to destination dest.
* If src do not has an XMP sidecar, nothing is done and true is returned.
* If src has an XMP sidecar file, if moving is done succesfully, true is returned, else false.
*/
static bool moveSidecar(const KUrl& src, const KUrl& dest);
/** Return true if url is a RAW file. File-name extension is used to check type mime.
*/
static bool isRawFile(const KUrl& url);
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