Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
#include <kdebug.h>
#include <qfile.h>
-#ifndef QT_KATIE
-# include <qjson/parser.h>
-#endif
-
-
JSONArchiveInterface::JSONArchiveInterface(QObject *parent, const QVariantList& args)
: Kerfuffle::ReadWriteArchiveInterface(parent, args)
{
block = _cursor->block();
QImage image;
mSectionMap.insert(link, block);
-#ifndef QT_KATIE
- if (image.loadFromData((unsigned char *)data, size)) {
-#else
if (image.loadFromData(data, size)) {
-#endif
mTextDocument->addResource(QTextDocument::ImageResource,
QUrl(link), image);
_cursor->insertImage(link);
if (data) {
switch(type) {
case QTextDocument::ImageResource:{
-#ifndef QT_KATIE
- QImage img = QImage::fromData((unsigned char *)data, size);
-#else
QImage img = QImage::fromData(data, size);
-#endif
const int maxHeight = maxContentHeight();
const int maxWidth = maxContentWidth();
if(img.height() > maxHeight)