diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-04-17 12:58:41 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2012-04-17 12:58:52 +0200 |
commit | 64255ef6502b1144f7b0aa4b2bf62803e0d4788b (patch) | |
tree | 29bf116bfda2ccf61057115690d14f85cc9b085b /src/gui/painting/qpaintbuffer.cpp | |
parent | 4a9fb41a7947d0bb7a47a9625603a436df288b24 (diff) | |
parent | 7e0beba891cb963a1d535bd45b0be78b43b8d07f (diff) |
Merge remote-tracking branch 'origin/api_changes'
Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
Diffstat (limited to 'src/gui/painting/qpaintbuffer.cpp')
-rw-r--r-- | src/gui/painting/qpaintbuffer.cpp | 54 |
1 files changed, 0 insertions, 54 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; |