KRA/ORA: merged in a single plugin and added metadata support

- ORA/KRA: merged in a single plugin (KRA)
- ORA: removed standalone plugin
- KRA: use of logging category
- KRA: add metadata support by processing the embedded `documentinfo.xml`
- Improved signature lookup (see MR !17) and added test case
This commit is contained in:
Mirco Miranda
2026-07-29 07:42:42 +02:00
parent 516750e6fc
commit 2e199eea80
13 changed files with 122 additions and 168 deletions
+34
View File
@@ -0,0 +1,34 @@
/*
This file is part of the KDE project
SPDX-FileCopyrightText: 2013 Boudewijn Rempt <[email protected]>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#ifndef KIMG_KRA_H
#define KIMG_KRA_H
#include <QImageIOPlugin>
class KraHandler : public QImageIOHandler
{
public:
KraHandler();
bool canRead() const override;
bool read(QImage *image) override;
static bool canRead(QIODevice *device);
};
class KraPlugin : public QImageIOPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "kra.json")
public:
Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
};
#endif