[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Fri Mar 18 01:30:41 CET 2005
CVS commit by arwalker:
Fix compile errors for KDE 3.1
M +12 -0 kstviewwindow.cpp 1.46
M +2 -0 plotmimesource.cpp 1.6
--- kdeextragear-2/kst/kst/kstviewwindow.cpp #1.45:1.46
@@ -165,5 +165,17 @@ void KstViewWindow::immediatePrintToPng(
view()->resizeForPrint(size);
view()->paint(P_EXPORT, paint);
+#if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0)
pixmap.save(dataStream->device(), format.latin1());
+#else
+ Q_UNUSED(format)
+
+ QByteArray bytes;
+ QDataStream tempStream(bytes, IO_ReadWrite);
+
+ tempStream << pixmap;
+ if (bytes.count() > 4) {
+ dataStream->writeRawBytes(bytes.data()+4, bytes.count()-4);
+ }
+#endif
view()->revertForPrint();
paint.end();
--- kdeextragear-2/kst/kst/plotmimesource.cpp #1.5:1.6
@@ -33,6 +33,8 @@ typedef struct formatTypes {
static formatTypes formats[] = {
{ "image/png", "PNG" },
+#if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0)
{ "image/jpeg", "JPG" },
{ "application/postscript", "EPS" },
+#endif
};
More information about the Kst
mailing list