Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Kipi Plugins
Commits
78629503
Commit
78629503
authored
Apr 26, 2012
by
Gilles Caulier
🗼
Browse files
new commun static method to check if file is RAW type
parent
b1685e66
Changes
2
Hide whitespace changes
Inline
Side-by-side
common/libkipiplugins/tools/kpmetadata.cpp
View file @
78629503
...
...
@@ -38,11 +38,17 @@
#include
"kpmetasettings.h"
#include
"kphostsettings.h"
// LibKDcraw includes
#include
<libkdcraw/kdcraw.h>
// LibKipi includes
#include
<libkipi/interface.h>
#include
<libkipi/pluginloader.h>
using
namespace
KDcrawIface
;
namespace
KIPIPlugins
{
...
...
@@ -143,6 +149,8 @@ bool KPMetadata::hasSidecar(const QString& path)
#endif // KEXIV2_VERSION < 0x020300
// -- Static Methods -------------------------------------------------------------------------
bool
KPMetadata
::
moveSidecar
(
const
KUrl
&
src
,
const
KUrl
&
dst
)
{
if
(
hasSidecar
(
src
.
toLocalFile
()))
...
...
@@ -154,4 +162,11 @@ bool KPMetadata::moveSidecar(const KUrl& src, const KUrl& dst)
return
false
;
}
bool
KPMetadata
::
isRawFile
(
const
KUrl
&
url
)
{
QString
rawFilesExt
(
KDcraw
::
rawFiles
());
QFileInfo
fileInfo
(
url
.
toLocalFile
());
return
(
rawFilesExt
.
toUpper
().
contains
(
fileInfo
.
suffix
().
toUpper
()));
}
}
// namespace KIPIPlugins
common/libkipiplugins/tools/kpmetadata.h
View file @
78629503
...
...
@@ -135,13 +135,14 @@ public:
public:
static
bool
moveSidecar
(
const
KUrl
&
src
,
const
KUrl
&
dest
);
static
bool
isRawFile
(
const
KUrl
&
url
);
private:
void
init
();
private:
Interface
*
m_iface
;
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment