[Kst] [Bug 124652] Crash when printing from the command line
George Staikos
staikos at kde.org
Mon Apr 3 10:59:32 CEST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=124652
staikos kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From staikos kde org 2006-04-03 10:59 -------
SVN commit 525906 by staikos:
can't "revert" when there is nothing to go back to
BUG: 124652
M +1 -1 kst/main.cpp
M +4 -2 libkstapp/kst.cpp
M +6 -6 libkstapp/kst.h
--- trunk/extragear/graphics/kst/src/kst/main.cpp #525905:525906
@ -786,7 +786,7 @
if (printfile != "<none>") {
kst->forceUpdate();
- kst->immediatePrintToFile(printfile);
+ kst->immediatePrintToFile(printfile, false);
}
if (pngfile != "<none>") {
--- trunk/extragear/graphics/kst/src/libkstapp/kst.cpp #525905:525906
@ -1579,7 +1579,7 @
}
-void KstApp::immediatePrintToFile(const QString& filename) {
+void KstApp::immediatePrintToFile(const QString& filename, bool revert) {
KMdiIterator<KMdiChildView*> *it = createIterator();
if (!it) {
return;
@ -1613,7 +1613,9 @
view->view()->resizeForPrint(size);
view->view()->paint(paint, QRegion());
- view->view()->revertForPrint();
+ if (revert) {
+ view->view()->revertForPrint();
+ }
firstPage = false;
}
--- trunk/extragear/graphics/kst/src/libkstapp/kst.h #525905:525906
@ -271,17 +271,17 @
void slotFilePrint();
/** print without querying */
- void immediatePrintToFile(const QString &filename);
- void immediatePrintWindowToFile(KMdiChildView* pWindow, const QString& filename);
+ void immediatePrintToFile(const QString& filename, bool revert = true);
+ void immediatePrintWindowToFile(KMdiChildView *window, const QString& filename);
void immediatePrintActiveWindowToFile(const QString& filename);
/** export to png without querying */
- void immediatePrintToPng(const QString &filename, const QString& format = "PNG", int iWidth=640, int iHeight=480, bool bAll=false, int display=0);
- void immediatePrintWindowToPng(KMdiChildView* pWindow, const QString& filename, const QString& format = "PNG", int iWidth=640, int iHeight=480, int display=0);
- void immediatePrintActiveWindowToPng(const QString& filename, const QString& format = "PNG", int iWidth=640, int iHeight=480, int display=0);
+ void immediatePrintToPng(const QString& filename, const QString& format = "PNG", int width = 640, int height = 480, bool all = false, int display = 0);
+ void immediatePrintWindowToPng(KMdiChildView *window, const QString& filename, const QString& format = "PNG", int width = 640, int height = 480, int display = 0);
+ void immediatePrintActiveWindowToPng(const QString& filename, const QString& format = "PNG", int width = 640, int height = 480, int display = 0);
/** export to eps without querying */
- void immediatePrintToEps(const QString &filename, int iWidth=640, int iHeight=480, bool bAll=false, int display=0);
+ void immediatePrintToEps(const QString& filename, int width = 640, int height = 480, bool all=false, int display = 0);
void immediatePrintWindowToEps(KMdiChildView *win, const QString& filename, int width, int height, int display);
void immediatePrintActiveWindowToEps(const QString& filename, int width, int height, int display);
More information about the Kst
mailing list