Compare commits

..

15 Commits

Author SHA1 Message Date
17239a7ea6 GIT_SILENT Upgrade ECM and KF5 version requirements for 5.49.0 release. 2018-08-04 08:43:39 +00:00
118d262bec GIT_SILENT Upgrade ECM and KF5 version requirements for 5.48.0 release. 2018-07-07 21:52:47 +00:00
67a84f459d Use override 2018-06-12 07:01:11 +02:00
de2b942b33 GIT_SILENT Upgrade ECM and KF5 version requirements for 5.47.0 release. 2018-06-02 16:28:21 +00:00
813a7bdddb Remove duplicated mime types from json files
Qt expects a bijection between keys and mime types.
2018-05-25 14:32:11 +03:00
a4d1f4db1d Use override 2018-05-23 08:06:50 +02:00
29d090f078 GIT_SILENT Upgrade ECM and KF5 version requirements for 5.46.0 release. 2018-05-05 12:39:09 +00:00
19f33239e7 [XCF/GIMP loader] Raise maximimum allowed image size to 32767x32767 on 64 bit platforms
The GIMP image loader had a limit to 16K x 16K pixels, because this would
already exhaust the 2 GByte address space limit of 32 bit systems.

Remove this limit on 64 bit systems to allow the full 32K x 32K size.

BUG: 391970

Differential Revision: https://phabricator.kde.org/D12557
2018-05-02 02:10:26 +02:00
4668fbbcdc GIT_SILENT Upgrade ECM and KF5 version requirements for 5.45.0 release. 2018-04-07 07:47:44 +00:00
698ba297d3 We depend against 5.8.0 now 2018-03-27 08:01:04 +02:00
3a9bafdbbe GIT_SILENT Upgrade Qt5 version requirement to 5.8.0. 2018-03-24 13:34:11 +00:00
e5b226e804 Remove not necessary QtCore and co 2018-03-11 13:49:26 +01:00
871d0f976f GIT_SILENT Upgrade ECM and KF5 version requirements for 5.44.0 release. 2018-03-03 09:52:42 +00:00
7aa5333a3f kcoreaddons_add_plugin: remove effectless OBJECT_DEPENDS on json file
The JSON file argument is passed to Q_PLUGIN_METADATA, which is a no-code
macro at the C++ level and only used to note information used by moc
for the generated moc file.

So when the content of the JSON file has changed, this will not change
anything in the preprocessed source file itself. It only has an effect on
the content of the moc file generated based on it, which is either included
and thus already triggers a dependecy or generated by automoc and compiled
separately into the target with the needed dependencies.

It is automoc which needs to properly trigger a recreation of the moc
file when checking the sources (and at least in 3.9 & 10 does),
and this is nothing that can be influenced by dependency rules.
2018-02-23 19:09:18 +01:00
aeabd92eea GIT_SILENT Upgrade ECM and KF5 version requirements for 5.43.0 release. 2018-02-05 08:11:10 +00:00
21 changed files with 71 additions and 83 deletions

View File

@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.0)
project(KImageFormats)
include(FeatureSummary)
find_package(ECM 5.42.0 NO_MODULE)
find_package(ECM 5.49.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules")
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
@ -17,7 +17,7 @@ include(KDECMakeSettings)
include(CheckIncludeFiles)
set(REQUIRED_QT_VERSION 5.7.0)
set(REQUIRED_QT_VERSION 5.8.0)
find_package(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
find_package(KF5Archive)

View File

@ -15,7 +15,6 @@ function(kimageformats_add_plugin plugin)
message(FATAL_ERROR "JSON file doesn't exist: ${json}")
endif()
set_property(SOURCE ${KIF_ADD_PLUGIN_SOURCES} APPEND PROPERTY OBJECT_DEPENDS ${json})
add_library(${plugin} MODULE ${KIF_ADD_PLUGIN_SOURCES})
set_property(TARGET ${plugin} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${json})
set_target_properties(${plugin} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/imageformats")

View File

@ -15,9 +15,9 @@ class EPSHandler : public QImageIOHandler
public:
EPSHandler();
bool canRead() const Q_DECL_OVERRIDE;
bool read(QImage *image) Q_DECL_OVERRIDE;
bool write(const QImage &image) Q_DECL_OVERRIDE;
bool canRead() const override;
bool read(QImage *image) override;
bool write(const QImage &image) override;
static bool canRead(QIODevice *device);
};
@ -28,8 +28,8 @@ class EPSPlugin : public QImageIOPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "eps.json")
public:
Capabilities capabilities(QIODevice *device, const QByteArray &format) const Q_DECL_OVERRIDE;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const Q_DECL_OVERRIDE;
Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
};
Q_DECLARE_LOGGING_CATEGORY(EPSPLUGIN)

View File

@ -41,10 +41,10 @@ public:
{
}
bool read(char c[], int n) Q_DECL_OVERRIDE;
Imf::Int64 tellg() Q_DECL_OVERRIDE;
void seekg(Imf::Int64 pos) Q_DECL_OVERRIDE;
void clear() Q_DECL_OVERRIDE;
bool read(char c[], int n) override;
Imf::Int64 tellg() override;
void seekg(Imf::Int64 pos) override;
void clear() override;
private:
QIODevice *m_dev;

View File

@ -18,8 +18,8 @@ class EXRHandler : public QImageIOHandler
public:
EXRHandler();
bool canRead() const Q_DECL_OVERRIDE;
bool read(QImage *outImage) Q_DECL_OVERRIDE;
bool canRead() const override;
bool read(QImage *outImage) override;
static bool canRead(QIODevice *device);
};
@ -30,8 +30,8 @@ class EXRPlugin : public QImageIOPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "exr.json")
public:
Capabilities capabilities(QIODevice *device, const QByteArray &format) const Q_DECL_OVERRIDE;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const Q_DECL_OVERRIDE;
Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
};
#endif // KIMG_EXR_H

View File

@ -11,7 +11,7 @@
#include "hdr_p.h"
#include <QImage>
#include <QtCore/QDataStream>
#include <QDataStream>
#include <QDebug>

View File

@ -17,8 +17,8 @@ class KraHandler : public QImageIOHandler
public:
KraHandler();
bool canRead() const Q_DECL_OVERRIDE;
bool read(QImage *image) Q_DECL_OVERRIDE;
bool canRead() const override;
bool read(QImage *image) override;
static bool canRead(QIODevice *device);
};
@ -29,8 +29,8 @@ class KraPlugin : public QImageIOPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "kra.json")
public:
Capabilities capabilities(QIODevice *device, const QByteArray &format) const Q_DECL_OVERRIDE;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const Q_DECL_OVERRIDE;
Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
};

View File

@ -1,5 +1,4 @@
{
"Keys": [ "kra" ],
"MimeTypes": [ "application/x-krita", "application/x-krita" ]
"MimeTypes": [ "application/x-krita" ]
}

View File

@ -17,8 +17,8 @@ class OraHandler : public QImageIOHandler
public:
OraHandler();
bool canRead() const Q_DECL_OVERRIDE;
bool read(QImage *image) Q_DECL_OVERRIDE;
bool canRead() const override;
bool read(QImage *image) override;
static bool canRead(QIODevice *device);
};
@ -29,8 +29,8 @@ class OraPlugin : public QImageIOPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "ora.json")
public:
Capabilities capabilities(QIODevice *device, const QByteArray &format) const Q_DECL_OVERRIDE;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const Q_DECL_OVERRIDE;
Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
};

View File

@ -1,5 +1,4 @@
{
"Keys": [ "ora" ],
"MimeTypes": [ "image/openraster", "image/openraster" ]
"MimeTypes": [ "image/openraster" ]
}

View File

@ -17,9 +17,9 @@ class PCXHandler : public QImageIOHandler
public:
PCXHandler();
bool canRead() const Q_DECL_OVERRIDE;
bool read(QImage *image) Q_DECL_OVERRIDE;
bool write(const QImage &image) Q_DECL_OVERRIDE;
bool canRead() const override;
bool read(QImage *image) override;
bool write(const QImage &image) override;
static bool canRead(QIODevice *device);
};
@ -30,8 +30,8 @@ class PCXPlugin : public QImageIOPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "pcx.json")
public:
Capabilities capabilities(QIODevice *device, const QByteArray &format) const Q_DECL_OVERRIDE;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const Q_DECL_OVERRIDE;
Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
};
#endif // KIMG_PCX_H

View File

@ -154,13 +154,13 @@ struct PicChannel {
class SoftimagePICHandler : public QImageIOHandler
{
public:
bool canRead() const Q_DECL_OVERRIDE;
bool read(QImage *image) Q_DECL_OVERRIDE;
bool write(const QImage &) Q_DECL_OVERRIDE;
bool canRead() const override;
bool read(QImage *image) override;
bool write(const QImage &) override;
QVariant option(ImageOption option) const Q_DECL_OVERRIDE;
void setOption(ImageOption option, const QVariant &value) Q_DECL_OVERRIDE;
bool supportsOption(ImageOption option) const Q_DECL_OVERRIDE;
QVariant option(ImageOption option) const override;
void setOption(ImageOption option, const QVariant &value) override;
bool supportsOption(ImageOption option) const override;
static bool canRead(QIODevice *device);
@ -195,8 +195,8 @@ class SoftimagePICPlugin : public QImageIOPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "pic.json")
public:
Capabilities capabilities(QIODevice *device, const QByteArray &format) const Q_DECL_OVERRIDE;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const Q_DECL_OVERRIDE;
Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
};
#endif // KIMG_PIC_H

View File

@ -17,8 +17,8 @@ class PSDHandler : public QImageIOHandler
public:
PSDHandler();
bool canRead() const Q_DECL_OVERRIDE;
bool read(QImage *image) Q_DECL_OVERRIDE;
bool canRead() const override;
bool read(QImage *image) override;
static bool canRead(QIODevice *device);
};
@ -29,8 +29,8 @@ class PSDPlugin : public QImageIOPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "psd.json")
public:
Capabilities capabilities(QIODevice *device, const QByteArray &format) const Q_DECL_OVERRIDE;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const Q_DECL_OVERRIDE;
Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
};
#endif // KIMG_PSD_H

View File

@ -12,7 +12,7 @@
#include "ras_p.h"
#include <QImage>
#include <QtCore/QDataStream>
#include <QDataStream>
// #include <QDebug>
namespace // Private.

View File

@ -18,8 +18,8 @@ class RASHandler : public QImageIOHandler
public:
RASHandler();
bool canRead() const Q_DECL_OVERRIDE;
bool read(QImage *image) Q_DECL_OVERRIDE;
bool canRead() const override;
bool read(QImage *image) override;
static bool canRead(QIODevice *device);
};
@ -30,8 +30,8 @@ class RASPlugin : public QImageIOPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "ras.json")
public:
Capabilities capabilities(QIODevice *device, const QByteArray &format) const Q_DECL_OVERRIDE;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const Q_DECL_OVERRIDE;
Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
};
#endif // KIMG_RAS_H

View File

@ -23,8 +23,8 @@
#include "rgb_p.h"
#include <QtCore/QMap>
#include <QtCore/QVector>
#include <QMap>
#include <QVector>
#include <QImage>
// #include <QDebug>

View File

@ -17,9 +17,9 @@ class RGBHandler : public QImageIOHandler
public:
RGBHandler();
bool canRead() const Q_DECL_OVERRIDE;
bool read(QImage *image) Q_DECL_OVERRIDE;
bool write(const QImage &image) Q_DECL_OVERRIDE;
bool canRead() const override;
bool read(QImage *image) override;
bool write(const QImage &image) override;
static bool canRead(QIODevice *device);
};
@ -30,8 +30,8 @@ class RGBPlugin : public QImageIOPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "rgb.json")
public:
Capabilities capabilities(QIODevice *device, const QByteArray &format) const Q_DECL_OVERRIDE;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const Q_DECL_OVERRIDE;
Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
};
#endif // KIMG_RGB_H

View File

@ -23,7 +23,7 @@
#include <assert.h>
#include <QImage>
#include <QtCore/QDataStream>
#include <QDataStream>
// #include <QDebug>
typedef quint32 uint;
@ -145,9 +145,7 @@ struct TgaHeaderInfo {
switch (tga.image_type) {
case TGA_TYPE_RLE_INDEXED:
rle = true;
#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
Q_FALLTHROUGH();
#endif
// no break is intended!
case TGA_TYPE_INDEXED:
pal = true;
@ -155,9 +153,7 @@ struct TgaHeaderInfo {
case TGA_TYPE_RLE_RGB:
rle = true;
#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
Q_FALLTHROUGH();
#endif
// no break is intended!
case TGA_TYPE_RGB:
rgb = true;
@ -165,9 +161,7 @@ struct TgaHeaderInfo {
case TGA_TYPE_RLE_GREY:
rle = true;
#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
Q_FALLTHROUGH();
#endif
// no break is intended!
case TGA_TYPE_GREY:
grey = true;

View File

@ -17,9 +17,9 @@ class TGAHandler : public QImageIOHandler
public:
TGAHandler();
bool canRead() const Q_DECL_OVERRIDE;
bool read(QImage *image) Q_DECL_OVERRIDE;
bool write(const QImage &image) Q_DECL_OVERRIDE;
bool canRead() const override;
bool read(QImage *image) override;
bool write(const QImage &image) override;
static bool canRead(QIODevice *device);
};
@ -30,8 +30,8 @@ class TGAPlugin : public QImageIOPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "tga.json")
public:
Capabilities capabilities(QIODevice *device, const QByteArray &format) const Q_DECL_OVERRIDE;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const Q_DECL_OVERRIDE;
Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
};
#endif // KIMG_TGA_H

View File

@ -24,9 +24,9 @@
#include <stdlib.h>
#include <QImage>
#include <QPainter>
#include <QtCore/QIODevice>
#include <QtCore/QStack>
#include <QtCore/QVector>
#include <QIODevice>
#include <QStack>
#include <QVector>
// #include <QDebug>
#include "gimp_p.h"
@ -713,7 +713,8 @@ bool XCFImageFormat::composeTiles(XCFImage &xcf_image)
// SANITY CHECK: Catch corrupted XCF image file where the width or height
// of a tile is reported are bogus. See Bug# 234030.
if (layer.width > 32767 || layer.height > 32767 || layer.width * layer.height > 16384 * 16384) {
if (layer.width > 32767 || layer.height > 32767
|| (sizeof(void *) == 4 && layer.width * layer.height > 16384 * 16384)) {
return false;
}
@ -1323,9 +1324,7 @@ bool XCFImageFormat::initializeImage(XCFImage &xcf_image)
image.fill(qRgb(255, 255, 255));
break;
} // else, fall through to 32-bit representation
#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
Q_FALLTHROUGH();
#endif
case RGBA_GIMAGE:
image = QImage(xcf_image.width, xcf_image.height, QImage::Format_ARGB32);
if (image.isNull()) {
@ -1345,9 +1344,7 @@ bool XCFImageFormat::initializeImage(XCFImage &xcf_image)
image.fill(255);
break;
} // else, fall through to 32-bit representation
#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
Q_FALLTHROUGH();
#endif
case GRAYA_GIMAGE:
image = QImage(xcf_image.width, xcf_image.height, QImage::Format_ARGB32);
if (image.isNull()) {

View File

@ -29,9 +29,9 @@ class XCFHandler : public QImageIOHandler
public:
XCFHandler();
bool canRead() const Q_DECL_OVERRIDE;
bool read(QImage *image) Q_DECL_OVERRIDE;
bool write(const QImage &image) Q_DECL_OVERRIDE;
bool canRead() const override;
bool read(QImage *image) override;
bool write(const QImage &image) override;
static bool canRead(QIODevice *device);
};
@ -42,8 +42,8 @@ class XCFPlugin : public QImageIOPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "xcf.json")
public:
Capabilities capabilities(QIODevice *device, const QByteArray &format) const Q_DECL_OVERRIDE;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const Q_DECL_OVERRIDE;
Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
};
#endif // KIMG_XCF_H