Diffstat (limited to 'noncore/graphics/drawpad/drawpadcanvas.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/drawpadcanvas.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/graphics/drawpad/drawpadcanvas.cpp b/noncore/graphics/drawpad/drawpadcanvas.cpp index dcf0871..4547b41 100644 --- a/noncore/graphics/drawpad/drawpadcanvas.cpp +++ b/noncore/graphics/drawpad/drawpadcanvas.cpp | |||
@@ -79,13 +79,13 @@ bool DrawPadCanvasXmlHandler::startElement(const QString& namespaceURI, const QS | |||
79 | { | 79 | { |
80 | Q_CONST_UNUSED(namespaceURI) | 80 | Q_CONST_UNUSED(namespaceURI) |
81 | Q_CONST_UNUSED(localName) | 81 | Q_CONST_UNUSED(localName) |
82 | 82 | ||
83 | if (qName == "image") { | 83 | if (qName == "image") { |
84 | m_title = QString(); | 84 | m_title = QString(); |
85 | m_date = QDateTime(QDate(1970, 1, 1)); | 85 | m_date = QDateTime::currentDateTime(); |
86 | } else if (qName == "title") { | 86 | } else if (qName == "title") { |
87 | m_state = InTitle; | 87 | m_state = InTitle; |
88 | } else if (qName == "date") { | 88 | } else if (qName == "date") { |
89 | m_state = InDate; | 89 | m_state = InDate; |
90 | } else if (qName == "data") { | 90 | } else if (qName == "data") { |
91 | m_state = InData; | 91 | m_state = InData; |
@@ -119,13 +119,13 @@ bool DrawPadCanvasXmlHandler::endElement(const QString& namespaceURI, const QStr | |||
119 | 119 | ||
120 | bool DrawPadCanvasXmlHandler::characters(const QString& ch) | 120 | bool DrawPadCanvasXmlHandler::characters(const QString& ch) |
121 | { | 121 | { |
122 | if (m_state == InTitle) { | 122 | if (m_state == InTitle) { |
123 | m_title = ch; | 123 | m_title = ch; |
124 | } else if (m_state == InDate) { | 124 | } else if (m_state == InDate) { |
125 | m_date = m_date.addSecs(ch.toInt()); | 125 | m_date = QDateTime(QDate(1970, 1, 1)).addSecs(ch.toInt()); |
126 | } else if (m_state == InData) { | 126 | } else if (m_state == InData) { |
127 | QByteArray byteArray(ch.length() / 2); | 127 | QByteArray byteArray(ch.length() / 2); |
128 | 128 | ||
129 | for (int i = 0; i < (int)ch.length() / 2; i++) { | 129 | for (int i = 0; i < (int)ch.length() / 2; i++) { |
130 | char h = ch[2 * i].latin1(); | 130 | char h = ch[2 * i].latin1(); |
131 | char l = ch[2 * i + 1].latin1(); | 131 | char l = ch[2 * i + 1].latin1(); |