get rid of QPictureIO

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2016-07-01 11:38:31 +00:00
parent 0551719acd
commit bef2393f6e
10 changed files with 98 additions and 1371 deletions

1
README
View file

@ -24,6 +24,7 @@ There are several things you should be aware before considering Katie:
- Symbian, QWS and QPA are no longer supported platforms
- OpenVG is no longer supported graphics output
- Blitter is no longer supported painting engine
- QPictureIO and plugins for it are no longer supported
- QML debugger and inspector have been removed, potentially dangerous
- removed non-open source DB2, OCI and TDS database drivers
- removed 3rd party sources that are very common nowdays

View file

@ -52,6 +52,7 @@
#define QT_NO_DIRECTPAINTER
#define QT_NO_COP
#define QT_NO_BLITTABLE
#define QT_NO_PICTUREIO
/* Qt build specs */
#ifndef QT_EDITION

View file

@ -183,9 +183,6 @@ set(GUI_PUBLIC_HEADERS
QPanGesture
QPen
QPicture
QPictureFormatInterface
QPictureFormatPlugin
QPictureIO
QPixmap
QPixmapCache
QPlainTextDocumentLayout

View file

@ -16,7 +16,6 @@ set(GUI_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/image/qpaintengine_pic_p.h
${CMAKE_CURRENT_SOURCE_DIR}/image/qpicture.h
${CMAKE_CURRENT_SOURCE_DIR}/image/qpicture_p.h
${CMAKE_CURRENT_SOURCE_DIR}/image/qpictureformatplugin.h
${CMAKE_CURRENT_SOURCE_DIR}/image/qpixmap.h
${CMAKE_CURRENT_SOURCE_DIR}/image/qpixmap_raster_p.h
${CMAKE_CURRENT_SOURCE_DIR}/image/qpixmapcache.h
@ -46,7 +45,6 @@ set(GUI_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/image/qimagewriter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/image/qpaintengine_pic.cpp
${CMAKE_CURRENT_SOURCE_DIR}/image/qpicture.cpp
${CMAKE_CURRENT_SOURCE_DIR}/image/qpictureformatplugin.cpp
${CMAKE_CURRENT_SOURCE_DIR}/image/qpixmap.cpp
${CMAKE_CURRENT_SOURCE_DIR}/image/qpixmapcache.cpp
${CMAKE_CURRENT_SOURCE_DIR}/image/qpixmapdata.cpp

File diff suppressed because it is too large Load diff

View file

@ -58,7 +58,7 @@ class Q_GUI_EXPORT QPicture : public QPaintDevice
{
Q_DECLARE_PRIVATE(QPicture)
public:
explicit QPicture(int formatVersion = -1);
explicit QPicture();
QPicture(const QPicture &);
~QPicture();
@ -71,10 +71,10 @@ public:
bool play(QPainter *p);
bool load(QIODevice *dev, const char *format = 0);
bool load(const QString &fileName, const char *format = 0);
bool save(QIODevice *dev, const char *format = 0);
bool save(const QString &fileName, const char *format = 0);
bool load(QIODevice *dev);
bool load(const QString &fileName);
bool save(QIODevice *dev);
bool save(const QString &fileName);
QRect boundingRect() const;
void setBoundingRect(const QRect &r);
@ -119,67 +119,6 @@ public:
Q_DECLARE_SHARED(QPicture)
#ifndef QT_NO_PICTUREIO
class QIODevice;
class QPictureIO;
typedef void (*picture_io_handler)(QPictureIO *); // picture IO handler
struct QPictureIOData;
class Q_GUI_EXPORT QPictureIO
{
public:
QPictureIO();
QPictureIO(QIODevice *ioDevice, const char *format);
QPictureIO(const QString &fileName, const char *format);
~QPictureIO();
const QPicture &picture() const;
int status() const;
const char *format() const;
QIODevice *ioDevice() const;
QString fileName() const;
int quality() const;
QString description() const;
const char *parameters() const;
float gamma() const;
void setPicture(const QPicture &);
void setStatus(int);
void setFormat(const char *);
void setIODevice(QIODevice *);
void setFileName(const QString &);
void setQuality(int);
void setDescription(const QString &);
void setParameters(const char *);
void setGamma(float);
bool read();
bool write();
static QByteArray pictureFormat(const QString &fileName);
static QByteArray pictureFormat(QIODevice *);
static QList<QByteArray> inputFormats();
static QList<QByteArray> outputFormats();
static void defineIOHandler(const char *format,
const char *header,
const char *flags,
picture_io_handler read_picture,
picture_io_handler write_picture);
private:
Q_DISABLE_COPY(QPictureIO)
void init();
QPictureIOData *d;
};
#endif //QT_NO_PICTUREIO
/*****************************************************************************
QPicture stream functions
*****************************************************************************/

View file

@ -1,142 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qpictureformatplugin.h"
#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_PICTURE)
#include "qpicture.h"
QT_BEGIN_NAMESPACE
/*!
\obsolete
\class QPictureFormatPlugin
\brief The QPictureFormatPlugin class provides an abstract base
for custom picture format plugins.
\ingroup plugins
The picture format plugin is a simple plugin interface that makes
it easy to create custom picture formats that can be used
transparently by applications.
Writing an picture format plugin is achieved by subclassing this
base class, reimplementing the pure virtual functions keys(),
loadPicture(), savePicture(), and installIOHandler(), and
exporting the class with the Q_EXPORT_PLUGIN2() macro.
\sa {How to Create Qt Plugins}
*/
/*!
\fn QStringList QPictureFormatPlugin::keys() const
Returns the list of picture formats this plugin supports.
\sa installIOHandler()
*/
/*!
\fn bool QPictureFormatPlugin::installIOHandler(const QString &format)
Installs a QPictureIO picture I/O handler for the picture format \a
format.
\sa keys()
*/
/*!
Constructs an picture format plugin with the given \a parent.
This is invoked automatically by the Q_EXPORT_PLUGIN2() macro.
*/
QPictureFormatPlugin::QPictureFormatPlugin(QObject *parent)
: QObject(parent)
{
}
/*!
Destroys the picture format plugin.
You never have to call this explicitly. Qt destroys a plugin
automatically when it is no longer used.
*/
QPictureFormatPlugin::~QPictureFormatPlugin()
{
}
/*!
Loads the picture stored in the file called \a fileName, with the
given \a format, into *\a picture. Returns true on success;
otherwise returns false.
\sa savePicture()
*/
bool QPictureFormatPlugin::loadPicture(const QString &format, const QString &fileName, QPicture *picture)
{
Q_UNUSED(format)
Q_UNUSED(fileName)
Q_UNUSED(picture)
return false;
}
/*!
Saves the given \a picture into the file called \a fileName,
using the specified \a format. Returns true on success; otherwise
returns false.
\sa loadPicture()
*/
bool QPictureFormatPlugin::savePicture(const QString &format, const QString &fileName, const QPicture &picture)
{
Q_UNUSED(format)
Q_UNUSED(fileName)
Q_UNUSED(picture)
return false;
}
#endif // QT_NO_LIBRARY || QT_NO_PICTURE
QT_END_NAMESPACE
#include "moc_qpictureformatplugin.h"

View file

@ -1,93 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QPICTUREFORMATPLUGIN_H
#define QPICTUREFORMATPLUGIN_H
#include <QtCore/qplugin.h>
#include <QtCore/qfactoryinterface.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_PICTURE)
class QPicture;
class QImage;
class QString;
class QStringList;
struct Q_GUI_EXPORT QPictureFormatInterface : public QFactoryInterface
{
virtual bool loadPicture(const QString &format, const QString &filename, QPicture *) = 0;
virtual bool savePicture(const QString &format, const QString &filename, const QPicture &) = 0;
virtual bool installIOHandler(const QString &) = 0;
};
#define QPictureFormatInterface_iid "com.trolltech.Qt.QPictureFormatInterface"
Q_DECLARE_INTERFACE(QPictureFormatInterface, QPictureFormatInterface_iid)
class Q_GUI_EXPORT QPictureFormatPlugin : public QObject, public QPictureFormatInterface
{
Q_OBJECT
Q_INTERFACES(QPictureFormatInterface:QFactoryInterface)
public:
explicit QPictureFormatPlugin(QObject *parent = 0);
~QPictureFormatPlugin();
virtual QStringList keys() const = 0;
virtual bool loadPicture(const QString &format, const QString &filename, QPicture *pic);
virtual bool savePicture(const QString &format, const QString &filename, const QPicture &pic);
virtual bool installIOHandler(const QString &format) = 0;
};
#endif // QT_NO_LIBRARY || QT_NO_PICTURE
QT_END_NAMESPACE
QT_END_HEADER
#endif // QPICTUREFORMATPLUGIN_H

View file

@ -343,13 +343,10 @@ static const ClassInfoEntry qclass_lib_map[] = {
{ "QImage", "QtGui/qimage.h"},
{ "QIconEngine", "QtGui/qiconengine.h"},
{ "QPicture", "QtGui/qpicture.h"},
{ "QPictureIO", "QtGui/qpicture.h"},
{ "QImageReader", "QtGui/qimagereader.h"},
{ "QImageIOHandler", "QtGui/qimageiohandler.h"},
{ "QImageIOHandlerFactoryInterface", "QtGui/qimageiohandler.h"},
{ "QImageIOPlugin", "QtGui/qimageiohandler.h"},
{ "QPictureFormatInterface", "QtGui/qpictureformatplugin.h"},
{ "QPictureFormatPlugin", "QtGui/qpictureformatplugin.h"},
{ "QBitmap", "QtGui/qbitmap.h"},
{ "QPixmapCache", "QtGui/qpixmapcache.h"},
{ "Key", "QtGui/qpixmapcache.h"},
@ -787,6 +784,6 @@ static const ClassInfoEntry qclass_lib_map[] = {
{ "QSslError", "QtNetwork/qsslerror.h"},
{ "QSslCertificate", "QtNetwork/qsslcertificate.h"},
};
static const int qclass_lib_count = 781;
static const int qclass_lib_count = 778;
#endif

View file

@ -103,7 +103,7 @@ void tst_QGraphicsLayout::invalidate()
RectWidget *window = new RectWidget(0, Qt::Window);
window->setGeometryCalls = &setGeometryCalls;
window->setData(0, QString(QChar('a')));
window->setData(0, QString(QLatin1Char('a')));
scene.addItem(window);
RectWidget *leaf = 0;