summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorRobin Burchell <robin+qt@viroteck.net>2012-04-12 13:37:43 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-12 17:22:19 +0200
commit5aa8e5a81cfa1b7a45f5b1642d4706962ee821ed (patch)
tree3f23508dc030ad98bb895a2426150f4ca9fc47ce /src/gui/painting
parent6b39f614d18597d4b5364dbd8b56ce8125e88e45 (diff)
Remove QPaintBufferSignalProxy and QPaintBufferResource.
Nothing seems to use these... Change-Id: I58b3e5f8536e43b3076da0a86d9093a6e11b947a Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qpaintbuffer.cpp54
-rw-r--r--src/gui/painting/qpaintbuffer_p.h35
2 files changed, 0 insertions, 89 deletions
diff --git a/src/gui/painting/qpaintbuffer.cpp b/src/gui/painting/qpaintbuffer.cpp
index 9a57404169..309b619082 100644
--- a/src/gui/painting/qpaintbuffer.cpp
+++ b/src/gui/painting/qpaintbuffer.cpp
@@ -98,19 +98,6 @@ QTextItemIntCopy::~QTextItemIntCopy()
/************************************************************************
*
- * QPaintBufferSignalProxy
- *
- ************************************************************************/
-
-Q_GLOBAL_STATIC(QPaintBufferSignalProxy, theSignalProxy)
-
-QPaintBufferSignalProxy *QPaintBufferSignalProxy::instance()
-{
- return theSignalProxy();
-}
-
-/************************************************************************
- *
* QPaintBufferPrivate
*
************************************************************************/
@@ -124,8 +111,6 @@ QPaintBufferPrivate::QPaintBufferPrivate()
QPaintBufferPrivate::~QPaintBufferPrivate()
{
- QPaintBufferSignalProxy::instance()->emitAboutToDestroy(this);
-
for (int i = 0; i < commands.size(); ++i) {
const QPaintBufferCommand &cmd = commands.at(i);
if (cmd.id == QPaintBufferPrivate::Cmd_DrawTextItem)
@@ -2058,45 +2043,6 @@ void QPaintEngineExReplayer::process(const QPaintBufferCommand &cmd)
}
}
-QPaintBufferResource::QPaintBufferResource(FreeFunc f, QObject *parent) : QObject(parent), free(f)
-{
- connect(QPaintBufferSignalProxy::instance(), SIGNAL(aboutToDestroy(const QPaintBufferPrivate*)), this, SLOT(remove(const QPaintBufferPrivate*)));
-}
-
-QPaintBufferResource::~QPaintBufferResource()
-{
- for (Cache::iterator it = m_cache.begin(); it != m_cache.end(); ++it)
- free(it.value());
-}
-
-void QPaintBufferResource::insert(const QPaintBufferPrivate *key, void *value)
-{
- Cache::iterator it = m_cache.find(key);
- if (it != m_cache.end()) {
- free(it.value());
- it.value() = value;
- } else {
- m_cache.insert(key, value);
- }
-}
-
-void *QPaintBufferResource::value(const QPaintBufferPrivate *key)
-{
- Cache::iterator it = m_cache.find(key);
- if (it != m_cache.end())
- return it.value();
- return 0;
-}
-
-void QPaintBufferResource::remove(const QPaintBufferPrivate *key)
-{
- Cache::iterator it = m_cache.find(key);
- if (it != m_cache.end()) {
- free(it.value());
- m_cache.erase(it);
- }
-}
-
QDataStream &operator<<(QDataStream &stream, const QPaintBufferCommand &command)
{
quint32 id = command.id;
diff --git a/src/gui/painting/qpaintbuffer_p.h b/src/gui/painting/qpaintbuffer_p.h
index 0a049fa06e..24886076f5 100644
--- a/src/gui/painting/qpaintbuffer_p.h
+++ b/src/gui/painting/qpaintbuffer_p.h
@@ -421,41 +421,6 @@ public:
mutable QPainterState *m_created_state;
};
-class Q_GUI_EXPORT QPaintBufferSignalProxy : public QObject
-{
- Q_OBJECT
-public:
- QPaintBufferSignalProxy() : QObject() {}
- void emitAboutToDestroy(const QPaintBufferPrivate *buffer) {
- emit aboutToDestroy(buffer);
- }
- static QPaintBufferSignalProxy *instance();
-Q_SIGNALS:
- void aboutToDestroy(const QPaintBufferPrivate *buffer);
-};
-
-// One resource per paint buffer and vice versa.
-class Q_GUI_EXPORT QPaintBufferResource : public QObject
-{
- Q_OBJECT
-public:
- typedef void (*FreeFunc)(void *);
-
- QPaintBufferResource(FreeFunc f, QObject *parent = 0);
- ~QPaintBufferResource();
- // Set resource 'value' for 'key'.
- void insert(const QPaintBufferPrivate *key, void *value);
- // Return resource for 'key'.
- void *value(const QPaintBufferPrivate *key);
-public slots:
- // Remove entry 'key' from cache and delete resource.
- void remove(const QPaintBufferPrivate *key);
-private:
- typedef QHash<const QPaintBufferPrivate *, void *> Cache;
- Cache m_cache;
- FreeFunc free;
-};
-
QT_END_NAMESPACE
#endif // QPAINTBUFFER_P_H