[Kst] branches/work/kst/portto4/kst/src/libkst
Adam Treat
treat at kde.org
Fri Feb 16 01:43:11 CET 2007
SVN commit 634003 by treat:
* Small fixes. Not sure what to do about private qmutex
header...
M +5 -5 kstamatrix.cpp
M +7 -7 kstvector.cpp
M +1 -1 kstwaitcondition_unix.cpp
--- branches/work/kst/portto4/kst/src/libkst/kstamatrix.cpp #634002:634003
@@ -65,11 +65,11 @@
QDomElement e = n.toElement();
if (!e.isNull()) {
if (e.tagName() == "data") {
- Q3CString qcs(e.text().latin1());
+ QString qcs(e.text().toLatin1());
QByteArray qbca;
- KCodecs::base64Decode(qcs, qbca);
+ KCodecs::base64Decode(qcs.toLatin1(), qbca);
QByteArray qba = qUncompress(qbca);
- QDataStream qds(qba, QIODevice::ReadOnly);
+ QDataStream qds(&qba, QIODevice::ReadOnly);
int i;
// fill in the raw array with the data
for (i = 0; i < in_nX*in_nY && !qds.atEnd(); i++) {
@@ -99,8 +99,8 @@
QString indent2 = " ";
- QByteArray qba(_zSize*sizeof(double));
- QDataStream qds(qba, QIODevice::WriteOnly);
+ QByteArray qba(_zSize*sizeof(double), '\0');
+ QDataStream qds(&qba, QIODevice::WriteOnly);
for (int i = 0; i < _zSize; i++) {
qds << _z[i];
--- branches/work/kst/portto4/kst/src/libkst/kstvector.cpp #634002:634003
@@ -26,7 +26,7 @@
#include <kglobal.h>
#include <klocale.h>
-#include <kmdcodec.h>
+#include <kcodecs.h>
#include "ksdebug.h"
#include "kstdatacollection.h"
@@ -109,11 +109,11 @@
if (e.tagName() == "tag") {
in_tag = KstObjectTag::fromString(e.text());
} else if (e.tagName() == "data") {
- Q3CString qcs(e.text().latin1());
+ QString qcs(e.text().toLatin1());
QByteArray qbca;
- KCodecs::base64Decode(qcs, qbca);
+ KCodecs::base64Decode(qcs.toLatin1(), qbca);
qba = qUncompress(qbca);
- sz = kMax((size_t)(INITSIZE), qba.size()/sizeof(double));
+ sz = qMax((size_t)(INITSIZE), qba.size()/sizeof(double));
}
}
n = n.nextSibling();
@@ -135,7 +135,7 @@
if (!qba.isEmpty()) {
_saveable = true;
_saveData = true;
- QDataStream qds(qba, QIODevice::ReadOnly);
+ QDataStream qds(&qba, QIODevice::ReadOnly);
for (int i = 0; !qds.atEnd(); ++i) {
qds >> _v[i];
}
@@ -592,8 +592,8 @@
Q_UNUSED(saveAbsolutePosition)
ts << indent << "<tag>" << Q3StyleSheet::escape(tag().tagString()) << "</tag>" << endl;
if (_saveData) {
- QByteArray qba(length()*sizeof(double));
- QDataStream qds(qba, QIODevice::WriteOnly);
+ QByteArray qba(length()*sizeof(double), '\0');
+ QDataStream qds(&qba, QIODevice::WriteOnly);
for (int i = 0; i < length(); i++) {
qds << _v[i];
--- branches/work/kst/portto4/kst/src/libkst/kstwaitcondition_unix.cpp #634002:634003
@@ -45,7 +45,7 @@
#define private public
#include "qmutex.h"
#undef private
-#include "private/qmutex_p.h"
+// #include "private/qmutex_p.h"
#include <errno.h>
#include <stdlib.h>
More information about the Kst
mailing list