Diffstat (limited to 'noncore/graphics/drawpad/drawpadcanvas.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/drawpadcanvas.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/noncore/graphics/drawpad/drawpadcanvas.cpp b/noncore/graphics/drawpad/drawpadcanvas.cpp index ae1b554..5437068 100644 --- a/noncore/graphics/drawpad/drawpadcanvas.cpp +++ b/noncore/graphics/drawpad/drawpadcanvas.cpp @@ -30,4 +30,2 @@ -#include <zlib.h> - const int PAGE_BACKUPS = 99; @@ -95,6 +93,2 @@ bool DrawPadCanvasXmlHandler::startElement(const QString& namespaceURI, const QS m_dataFormat = atts.value("format"); - - if (m_dataFormat.isEmpty()) { - m_dataFormat = "XPM"; - } } @@ -152,17 +146,4 @@ bool DrawPadCanvasXmlHandler::characters(const QString& ch) - QImage image; - - if (m_dataFormat == "XPM") { - if (m_dataLenght < ch.length() * 5) { - m_dataLenght = ch.length() * 5; - } - - QByteArray byteArrayUnzipped(m_dataLenght); - ::uncompress((uchar*)byteArrayUnzipped.data(), &m_dataLenght, (uchar*)byteArray.data(), byteArray.size()); - - image.loadFromData((const uchar*)byteArrayUnzipped.data(), m_dataLenght, m_dataFormat); - } else { image.loadFromData((const uchar*)byteArray.data(), m_dataLenght, m_dataFormat); - } |