Commit 488e2a65 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Removed old debug prints.

parent c25dd394
...@@ -85,7 +85,7 @@ int main(int argc, char* argv[]) ...@@ -85,7 +85,7 @@ int main(int argc, char* argv[])
viewer = new PnViewerQt("Profinet Viewer", dev_name, &sts); viewer = new PnViewerQt("Profinet Viewer", dev_name, &sts);
} catch (co_error& e) { } catch (co_error& e) {
printf("** Exception: %s\n", e.what().c_str()); printf("** Exception: %s\n", e.what().c_str());
debug_print("Shutting down...\n"); exit(0); exit(0);
} }
// Create help window // Create help window
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
void tbl_close_cb(void* tbl) void tbl_close_cb(void* tbl)
{ {
debug_print("Shutting down...\n");
exit(0); exit(0);
} }
...@@ -77,7 +76,6 @@ int main(int argc, char* argv[]) ...@@ -77,7 +76,6 @@ int main(int argc, char* argv[])
sevcli_init(&sts, &sevcli); sevcli_init(&sts, &sevcli);
if (EVEN(sts)) { if (EVEN(sts)) {
printf("Sev client init error %u\n", sts); printf("Sev client init error %u\n", sts);
debug_print("Shutting down...\n");
exit(0); exit(0);
} }
...@@ -88,7 +86,6 @@ int main(int argc, char* argv[]) ...@@ -88,7 +86,6 @@ int main(int argc, char* argv[])
sevcli_get_itemlist(&sts, sevcli, &items, &itemcnt); sevcli_get_itemlist(&sts, sevcli, &items, &itemcnt);
if (EVEN(sts)) { if (EVEN(sts)) {
printf("Sev client get itemlist error %u\n", sts); printf("Sev client get itemlist error %u\n", sts);
debug_print("Shutting down...\n");
exit(0); exit(0);
} }
......
...@@ -57,7 +57,6 @@ void XttTblQt::message(char severity, const char* message) ...@@ -57,7 +57,6 @@ void XttTblQt::message(char severity, const char* message)
void XttTblQtWidget::closeEvent(QCloseEvent* event) void XttTblQtWidget::closeEvent(QCloseEvent* event)
{ {
debug_print("XttTblQtWidget::closeEvent\n");
if (tbl->close_cb) { if (tbl->close_cb) {
(tbl->close_cb)(tbl); (tbl->close_cb)(tbl);
} else { } else {
......
...@@ -47,7 +47,6 @@ TblNavQt::TblNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid, ...@@ -47,7 +47,6 @@ TblNavQt::TblNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
pwr_tStatus* status) pwr_tStatus* status)
: TblNav(xn_parent_ctx, xn_itemlist, xn_item_cnt, status) : TblNav(xn_parent_ctx, xn_itemlist, xn_item_cnt, status)
{ {
debug_print("creating a scrolledbrowwidgetqt\n");
form_widget form_widget
= scrolledbrowwidgetqt_new(TblNav::init_brow_cb, this, &brow_widget); = scrolledbrowwidgetqt_new(TblNav::init_brow_cb, this, &brow_widget);
......
...@@ -81,7 +81,6 @@ int main(int argc, char* argv[]) ...@@ -81,7 +81,6 @@ int main(int argc, char* argv[])
setDebug(1); setDebug(1);
if (argc >= 2 && streq(argv[1], "-m")) { if (argc >= 2 && streq(argv[1], "-m")) {
wb_erep::printMethods(); wb_erep::printMethods();
debug_print("Shutting down...\n");
exit(0); exit(0);
} }
...@@ -321,8 +320,3 @@ WbQt::WbQt(int argc, char* argv[]) : mainwindow(0) ...@@ -321,8 +320,3 @@ WbQt::WbQt(int argc, char* argv[]) : mainwindow(0)
QTimer::singleShot(100, wow->object, SLOT(DisplayWarranty())); QTimer::singleShot(100, wow->object, SLOT(DisplayWarranty()));
} }
} }
WbQt::~WbQt()
{
debug_print("Shutting down...\n");
}
...@@ -47,8 +47,8 @@ public: ...@@ -47,8 +47,8 @@ public:
QWidget* mainwindow; QWidget* mainwindow;
WbQt(int argc, char* argv[]); WbQt(int argc, char* argv[]);
~WbQt() {}
virtual ~WbQt();
Wtt* wtt_new(const char* name, const char* iconname, ldh_tWBContext wbctx, Wtt* wtt_new(const char* name, const char* iconname, ldh_tWBContext wbctx,
pwr_tVolumeId volid, ldh_tVolume volctx, wnav_sStartMenu* root_menu, pwr_tVolumeId volid, ldh_tVolume volctx, wnav_sStartMenu* root_menu,
pwr_tStatus* status); pwr_tStatus* status);
......
...@@ -46,7 +46,6 @@ WbBckWNavQt::WbBckWNavQt(void* l_parent_ctx, QWidget* l_parent_wid, ...@@ -46,7 +46,6 @@ WbBckWNavQt::WbBckWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
ldh_tSession l_ldhses, wb_bck_list* l_list, int l_editmode, QWidget** w) ldh_tSession l_ldhses, wb_bck_list* l_list, int l_editmode, QWidget** w)
: WbBckWNav(l_parent_ctx, l_ldhses, l_list, l_editmode) : WbBckWNav(l_parent_ctx, l_ldhses, l_list, l_editmode)
{ {
debug_print("creating a scrolledbrowwidgetqt\n");
form_widget form_widget
= scrolledbrowwidgetqt_new(WbBckWNav::init_brow_cb, this, &brow_widget); = scrolledbrowwidgetqt_new(WbBckWNav::init_brow_cb, this, &brow_widget);
...@@ -56,7 +55,6 @@ WbBckWNavQt::WbBckWNavQt(void* l_parent_ctx, QWidget* l_parent_wid, ...@@ -56,7 +55,6 @@ WbBckWNavQt::WbBckWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
WbBckWNavQt::~WbBckWNavQt() WbBckWNavQt::~WbBckWNavQt()
{ {
debug_print("WbBckWNavQt::~WbBckWNavQt\n");
delete brow; delete brow;
form_widget->close(); form_widget->close();
} }
......
...@@ -46,7 +46,6 @@ WbExpWNavQt::WbExpWNavQt(void* l_parent_ctx, QWidget* l_parent_wid, ...@@ -46,7 +46,6 @@ WbExpWNavQt::WbExpWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
ldh_tSession l_ldhses, int l_type, int l_editmode, QWidget** w) ldh_tSession l_ldhses, int l_type, int l_editmode, QWidget** w)
: WbExpWNav(l_parent_ctx, l_ldhses, l_type, l_editmode) : WbExpWNav(l_parent_ctx, l_ldhses, l_type, l_editmode)
{ {
debug_print("creating a scrolledbrowwidgetqt\n");
form_widget form_widget
= scrolledbrowwidgetqt_new(WbExpWNav::init_brow_cb, this, &brow_widget); = scrolledbrowwidgetqt_new(WbExpWNav::init_brow_cb, this, &brow_widget);
...@@ -56,7 +55,6 @@ WbExpWNavQt::WbExpWNavQt(void* l_parent_ctx, QWidget* l_parent_wid, ...@@ -56,7 +55,6 @@ WbExpWNavQt::WbExpWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
WbExpWNavQt::~WbExpWNavQt() WbExpWNavQt::~WbExpWNavQt()
{ {
debug_print("WbExpWNavQt::~WbExpWNavQt\n");
delete brow; delete brow;
form_widget->close(); form_widget->close();
} }
......
...@@ -158,7 +158,6 @@ void WGeQt::set_size(int width, int height) ...@@ -158,7 +158,6 @@ void WGeQt::set_size(int width, int height)
void WGeQt::set_subwindow_release() void WGeQt::set_subwindow_release()
{ {
subwindow_release = 1; subwindow_release = 1;
debug_print("Shutting down...\n");
QApplication::exit(); QApplication::exit();
} }
...@@ -171,7 +170,6 @@ void WGeQtWidget::closeEvent(QCloseEvent* event) ...@@ -171,7 +170,6 @@ void WGeQtWidget::closeEvent(QCloseEvent* event)
{ {
if (ge->modal) { if (ge->modal) {
ge->terminated = 1; ge->terminated = 1;
debug_print("Shutting down...\n");
QApplication::exit(); QApplication::exit();
} else { } else {
delete ge; delete ge;
......
...@@ -2324,7 +2324,6 @@ WttQt::~WttQt() ...@@ -2324,7 +2324,6 @@ WttQt::~WttQt()
delete toplevel; delete toplevel;
if (!close_cb) { if (!close_cb) {
debug_print("Shutting down...\n");
exit(0); exit(0);
} }
} }
......
...@@ -99,7 +99,6 @@ void WCrrQt::print() ...@@ -99,7 +99,6 @@ void WCrrQt::print()
void WCrrQtWidget::closeEvent(QCloseEvent* event) void WCrrQtWidget::closeEvent(QCloseEvent* event)
{ {
debug_print("WCrrQtWidget::closeEvent\n");
if (crr->close_cb) { if (crr->close_cb) {
(crr->close_cb)(crr->parent_ctx, crr); (crr->close_cb)(crr->parent_ctx, crr);
} else { } else {
...@@ -118,7 +117,6 @@ WCrrQt::WCrrQt(QWidget* xa_parent_wid, void* xa_parent_ctx, ...@@ -118,7 +117,6 @@ WCrrQt::WCrrQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
int* xa_sts) int* xa_sts)
: WCrr(xa_parent_ctx, xa_ldhses, xa_objar, xa_advanced_user, xa_sts) : WCrr(xa_parent_ctx, xa_ldhses, xa_objar, xa_advanced_user, xa_sts)
{ {
debug_print("\n");
int sts; int sts;
char* namep; char* namep;
int size; int size;
......
...@@ -51,7 +51,6 @@ void close_cb(void* ctx, void* xhelp) ...@@ -51,7 +51,6 @@ void close_cb(void* ctx, void* xhelp)
{ {
((CoXHelpQt*)xhelp)->toplevel->close(); ((CoXHelpQt*)xhelp)->toplevel->close();
delete help; delete help;
debug_print("Shutting down...\n");
exit(0); exit(0);
} }
......
...@@ -66,7 +66,7 @@ static void rtmon_close_cb(void* ctx) ...@@ -66,7 +66,7 @@ static void rtmon_close_cb(void* ctx)
{ {
delete rtmon; delete rtmon;
delete xhelp; delete xhelp;
debug_print("Shutting down...\n"); exit(0); exit(0);
} }
int main(int argc, char* argv[]) int main(int argc, char* argv[])
...@@ -80,7 +80,7 @@ int main(int argc, char* argv[]) ...@@ -80,7 +80,7 @@ int main(int argc, char* argv[])
fprintf(stderr, "%s ", argv[i]); fprintf(stderr, "%s ", argv[i]);
if (streq(argv[i], "-h")) { if (streq(argv[i], "-h")) {
usage(); usage();
debug_print("\nShutting down...\n"); exit(0); exit(0);
} else if (streq(argv[i], "--display") && i + 1 < argc) { } else if (streq(argv[i], "--display") && i + 1 < argc) {
strncpy(display, argv[i + 1], sizeof(display)); strncpy(display, argv[i + 1], sizeof(display));
} }
......
...@@ -66,7 +66,7 @@ static void statusmon_close(void* ctx) ...@@ -66,7 +66,7 @@ static void statusmon_close(void* ctx)
{ {
delete nl; delete nl;
delete xhelp; delete xhelp;
debug_print("Shutting down...\n"); exit(0); exit(0);
} }
int main(int argc, char* argv[]) int main(int argc, char* argv[])
...@@ -82,14 +82,14 @@ int main(int argc, char* argv[]) ...@@ -82,14 +82,14 @@ int main(int argc, char* argv[])
fprintf(stderr, "%s ", argv[i]); fprintf(stderr, "%s ", argv[i]);
if (streq(argv[i], "-h")) { if (streq(argv[i], "-h")) {
usage(); usage();
debug_print("Shutting down...\n"); exit(0); exit(0);
} else if (streq(argv[i], "-l") && i + 1 < argc) { } else if (streq(argv[i], "-l") && i + 1 < argc) {
strncpy(language, argv[i + 1], sizeof(language)); strncpy(language, argv[i + 1], sizeof(language));
Lng::set(language); Lng::set(language);
} else if (streq(argv[i], "-m")) { } else if (streq(argv[i], "-m")) {
if (argc == i) { if (argc == i) {
usage(); usage();
debug_print("Shutting down...\n"); exit(0); exit(0);
} }
if (streq(argv[i + 1], "1")) { if (streq(argv[i + 1], "1")) {
mode = nodelist_eMode_Status1; mode = nodelist_eMode_Status1;
...@@ -103,7 +103,7 @@ int main(int argc, char* argv[]) ...@@ -103,7 +103,7 @@ int main(int argc, char* argv[])
mode = nodelist_eMode_Status5; mode = nodelist_eMode_Status5;
} else { } else {
usage(); usage();
debug_print("Shutting down...\n"); exit(0); exit(0);
} }
i++; i++;
} else if (streq(argv[i], "-e")) { } else if (streq(argv[i], "-e")) {
......
...@@ -93,7 +93,7 @@ int main(int argc, char* argv[]) ...@@ -93,7 +93,7 @@ int main(int argc, char* argv[])
switch (argv[i][1]) { switch (argv[i][1]) {
case 'h': case 'h':
XttCmd::usage(); XttCmd::usage();
debug_print("Shutting down...\n"); exit(0); exit(0);
case 'q': case 'q':
// Quiet // Quiet
quiet = 1; quiet = 1;
...@@ -121,7 +121,7 @@ int main(int argc, char* argv[]) ...@@ -121,7 +121,7 @@ int main(int argc, char* argv[])
sts = gdh_Init("rt_xtt_cmd"); sts = gdh_Init("rt_xtt_cmd");
if (EVEN(sts)) { if (EVEN(sts)) {
printf("Unable to connect to database\n"); printf("Unable to connect to database\n");
debug_print("Shutting down...\n"); exit(0); exit(0);
} }
QApplication app(argc, argv); QApplication app(argc, argv);
......
...@@ -96,7 +96,7 @@ int main(int argc, char* argv[]) ...@@ -96,7 +96,7 @@ int main(int argc, char* argv[])
if (streq(argv[i], "-l")) { if (streq(argv[i], "-l")) {
if (i + 1 >= argc) { if (i + 1 >= argc) {
usage(); usage();
debug_print("Shutting down...\n"); exit(0); exit(0);
} }
Lng::set(argv[i + 1]); Lng::set(argv[i + 1]);
i++; i++;
......
...@@ -45,7 +45,6 @@ CoLogWNavQt::CoLogWNavQt( ...@@ -45,7 +45,6 @@ CoLogWNavQt::CoLogWNavQt(
void* l_parent_ctx, QWidget* l_parent_wid, int l_show_item, QWidget** w) void* l_parent_ctx, QWidget* l_parent_wid, int l_show_item, QWidget** w)
: CoLogWNav(l_parent_ctx, l_show_item) : CoLogWNav(l_parent_ctx, l_show_item)
{ {
debug_print("creating a scrolledbrowwidgetqt\n");
form_widget form_widget
= scrolledbrowwidgetqt_new(CoLogWNav::init_brow_cb, this, &brow_widget); = scrolledbrowwidgetqt_new(CoLogWNav::init_brow_cb, this, &brow_widget);
...@@ -55,7 +54,6 @@ CoLogWNavQt::CoLogWNavQt( ...@@ -55,7 +54,6 @@ CoLogWNavQt::CoLogWNavQt(
CoLogWNavQt::~CoLogWNavQt() CoLogWNavQt::~CoLogWNavQt()
{ {
debug_print("CoLogWNavQt::~CoLogWNavQt\n");
delete brow; delete brow;
form_widget->close(); form_widget->close();
} }
......
...@@ -749,7 +749,6 @@ CoWowModalDialogQt::CoWowModalDialogQt(QWidget* parent, const char* title, ...@@ -749,7 +749,6 @@ CoWowModalDialogQt::CoWowModalDialogQt(QWidget* parent, const char* title,
void CoWowModalDialogQt::destroy(bool destroyWindow, bool destroySubWindows) void CoWowModalDialogQt::destroy(bool destroyWindow, bool destroySubWindows)
{ {
debug_print("Not shutting down...\n");
setResult(wow_eModalDialogReturn_Deleted); setResult(wow_eModalDialogReturn_Deleted);
QDialog::destroy(destroyWindow, destroySubWindows); QDialog::destroy(destroyWindow, destroySubWindows);
} }
......
This diff is collapsed.
...@@ -906,10 +906,8 @@ int GlowDrawQt::rect_helper(GlowWind* wind, int painter_type, int size, int x, ...@@ -906,10 +906,8 @@ int GlowDrawQt::rect_helper(GlowWind* wind, int painter_type, int size, int x,
} }
if (fill) { if (fill) {
// debug_print("fillRect [%d, %d, %d, %d] painter_type=%d, with color %s\n", x, y, width, height, painter_type, qPrintable(painter->brush().color().name()));
painter->fillRect(x, y, width, height, painter->brush()); painter->fillRect(x, y, width, height, painter->brush());
} else { } else {
// debug_print("drawRect [%d, %d, %d, %d]\n", x, y, width, height);
painter->setBrush(Qt::NoBrush); painter->setBrush(Qt::NoBrush);
painter->drawRect(x, y, width, height); painter->drawRect(x, y, width, height);
} }
...@@ -955,7 +953,6 @@ int GlowDrawQt::arrow_helper(GlowWind* wind, int painter_type, int size, int x1, ...@@ -955,7 +953,6 @@ int GlowDrawQt::arrow_helper(GlowWind* wind, int painter_type, int size, int x1,
QPainterPath path; QPainterPath path;
path.addPolygon(poly); path.addPolygon(poly);
// debug_print("arrow (%d, %d) (%d, %d) (%d, %d)\n", x1, y1, x2, y2, x3, y3);
painter->fillPath(path, painter->brush()); painter->fillPath(path, painter->brush());
return 1; return 1;
...@@ -1008,10 +1005,8 @@ int GlowDrawQt::arc_helper(GlowWind* wind, int painter_type, int size, int x, ...@@ -1008,10 +1005,8 @@ int GlowDrawQt::arc_helper(GlowWind* wind, int painter_type, int size, int x,
} }
if (fill) { if (fill) {
// debug_print("pie [%d, %d, %d, %d], %d, %d\n", x, y, width, height, angle1, angle2);
painter->drawPie(x, y, width, height, angle1 * 16, angle2 * 16); painter->drawPie(x, y, width, height, angle1 * 16, angle2 * 16);
} else { } else {
// debug_print("arc [%d, %d, %d, %d], %d, %d\n", x, y, width, height, angle1, angle2);
painter->setBrush(Qt::NoBrush); painter->setBrush(Qt::NoBrush);
painter->drawArc(x, y, width, height, angle1 * 16, angle2 * 16); painter->drawArc(x, y, width, height, angle1 * 16, angle2 * 16);
} }
...@@ -1142,7 +1137,6 @@ int GlowDrawQt::line_helper(GlowWind* wind, int painter_type, int size, int x1, ...@@ -1142,7 +1137,6 @@ int GlowDrawQt::line_helper(GlowWind* wind, int painter_type, int size, int x1,
painter->setPen(pen); painter->setPen(pen);
} }
// debug_print("line (%d, %d) (%d, %d)\n", x1, y1, x2, y2);
painter->drawLine(x1, y1, x2, y2); painter->drawLine(x1, y1, x2, y2);
return 1; return 1;
...@@ -1207,7 +1201,6 @@ int GlowDrawQt::polyline_helper(GlowWind* wind, int painter_type, int size, ...@@ -1207,7 +1201,6 @@ int GlowDrawQt::polyline_helper(GlowWind* wind, int painter_type, int size,
int cnt; int cnt;
unique_ptr<QPoint[]> qpoints = points_to_qt_points_curve(wind, points, point_cnt, &cnt); unique_ptr<QPoint[]> qpoints = points_to_qt_points_curve(wind, points, point_cnt, &cnt);
painter->setBrush(Qt::NoBrush); painter->setBrush(Qt::NoBrush);
// debug_print("polyline painter_type=%d, fill=%d, point_cnt=%d\n", painter_type, fill, point_cnt);
painter->drawPolyline(qpoints.get(), cnt); painter->drawPolyline(qpoints.get(), cnt);
} }
...@@ -1278,7 +1271,6 @@ int GlowDrawQt::text(GlowWind* wind, int x, int y, char* text, int len, ...@@ -1278,7 +1271,6 @@ int GlowDrawQt::text(GlowWind* wind, int x, int y, char* text, int len,
QRect rect QRect rect
= painter->fontMetrics().boundingRect(QString::fromLocal8Bit(text, len)); = painter->fontMetrics().boundingRect(QString::fromLocal8Bit(text, len));
// debug_print("text %s on %d,%d\n", text, x, y);
painter->drawText(x, y, rect.width(), rect.height(), Qt::TextDontClip, painter->drawText(x, y, rect.width(), rect.height(), Qt::TextDontClip,
QString::fromLocal8Bit(text, len)); QString::fromLocal8Bit(text, len));
...@@ -1310,7 +1302,6 @@ int GlowDrawQt::text_cursor(GlowWind* wind, int x, int y, char* text, int len, ...@@ -1310,7 +1302,6 @@ int GlowDrawQt::text_cursor(GlowWind* wind, int x, int y, char* text, int len,
set_clip(w, painter); set_clip(w, painter);
} }
// debug_print("cursor %d,%d to %d,%d\n", x + width, y + descent, x + width, y - height + descent);
painter->drawLine(x + width, y + descent, x + width, y - height + descent); painter->drawLine(x + width, y + descent, x + width, y - height + descent);
return 1; return 1;
...@@ -1352,7 +1343,6 @@ int GlowDrawQt::text_erase(GlowWind* wind, int x, int y, char* text, int len, ...@@ -1352,7 +1343,6 @@ int GlowDrawQt::text_erase(GlowWind* wind, int x, int y, char* text, int len,
QRect rect QRect rect
= painter->fontMetrics().boundingRect(QString::fromLocal8Bit(text, len)); = painter->fontMetrics().boundingRect(QString::fromLocal8Bit(text, len));
// debug_print("textErase %s on %d,%d\n", text, x, y);
painter->drawText(x, y, rect.width(), rect.height(), Qt::TextDontClip, painter->drawText(x, y, rect.width(), rect.height(), Qt::TextDontClip,
QString::fromLocal8Bit(text, len)); QString::fromLocal8Bit(text, len));
...@@ -1410,7 +1400,6 @@ int GlowDrawQt::image_helper(GlowWind* wind, int x, int y, int width, ...@@ -1410,7 +1400,6 @@ int GlowDrawQt::image_helper(GlowWind* wind, int x, int y, int width,
set_clip(w, painter); set_clip(w, painter);
} }
// debug_print("image [%d, %d, %d, %d]\n", x, y, width, height);
if (d) { if (d) {
painter->drawImage(QPoint(x, y), *((QImage*)image)); painter->drawImage(QPoint(x, y), *((QImage*)image));
} else { } else {
...@@ -1637,8 +1626,6 @@ void GlowDrawQt::copy_area(GlowWind* wind, int x, int y) ...@@ -1637,8 +1626,6 @@ void GlowDrawQt::copy_area(GlowWind* wind, int x, int y)
window_height = ctx->navw.window_height; window_height = ctx->navw.window_height;
} }
// debug_print("copy_area [%d, %d, %d, %d]\n", x, y, window_width, window_height);
unique_ptr<QPainter> painterBuffer unique_ptr<QPainter> painterBuffer
= get_painter(w->buffer, this, glow_eDrawType_Line, 3); = get_painter(w->buffer, this, glow_eDrawType_Line, 3);
if (x >= 0 && y >= 0) { if (x >= 0 && y >= 0) {
...@@ -1691,8 +1678,6 @@ void GlowDrawQt::clear_area( ...@@ -1691,8 +1678,6 @@ void GlowDrawQt::clear_area(
unique_ptr<QPainter> painter = new QPainter(w->buffer); unique_ptr<QPainter> painter = new QPainter(w->buffer);
painter->setBackground(QBrush(background)); painter->setBackground(QBrush(background));
// debug_print("clear_area [%d, %d, %d, %d], color=%s\n", ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, qPrintable(painter->background().color().name()));
painter->eraseRect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y); painter->eraseRect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y);
} }
...@@ -1780,8 +1765,6 @@ void GlowDrawQt::set_background(GlowWind* wind, glow_eDrawType drawtype, ...@@ -1780,8 +1765,6 @@ void GlowDrawQt::set_background(GlowWind* wind, glow_eDrawType drawtype,
delete w->background_pixmap; delete w->background_pixmap;
} }
// debug_print("set_background\n");
w->background_pixmap = new QPixmap(QPixmap::fromImage(*((QImage*)image))); w->background_pixmap = new QPixmap(QPixmap::fromImage(*((QImage*)image)));
w->background_pixmap_width = pixmap_width; w->background_pixmap_width = pixmap_width;
w->background_pixmap_height = pixmap_height; w->background_pixmap_height = pixmap_height;
...@@ -2256,8 +2239,6 @@ void GlowDrawQt::image_copy(glow_tImImage orig_image, glow_tImImage* image) ...@@ -2256,8 +2239,6 @@ void GlowDrawQt::image_copy(glow_tImImage orig_image, glow_tImImage* image)
delete ((QImage*)*image); delete ((QImage*)*image);
} }
// debug_print("image_copy\n");
*image = new QImage(((QImage*)orig_image)->copy()); *image = new QImage(((QImage*)orig_image)->copy());
} }
...@@ -2269,8 +2250,6 @@ void GlowDrawQt::image_rotate( ...@@ -2269,8 +2250,6 @@ void GlowDrawQt::image_rotate(
QTransform trans; QTransform trans;
trans.rotate(drot); trans.rotate(drot);
// debug_print("image_rotate\n");
QImage* im = new QImage(((QImage*)*image)->transformed(trans)); QImage* im = new QImage(((QImage*)*image)->transformed(trans));
delete ((QImage*)*image); delete ((QImage*)*image);
*image = (glow_tImImage)im; *image = (glow_tImImage)im;
...@@ -2278,8 +2257,6 @@ void GlowDrawQt::image_rotate( ...@@ -2278,8 +2257,6 @@ void GlowDrawQt::image_rotate(
void GlowDrawQt::image_flip_vertical(glow_tImImage* image) void GlowDrawQt::image_flip_vertical(glow_tImImage* image)
{ {
// debug_print("image_flip_vertical\n");
QImage* im = new QImage(((QImage*)*image)->mirrored()); QImage* im = new QImage(((QImage*)*image)->mirrored());
delete ((QImage*)*image); delete ((QImage*)*image);
*image = (glow_tImImage)im; *image = (glow_tImImage)im;
...@@ -2287,8 +2264,6 @@ void GlowDrawQt::image_flip_vertical(glow_tImImage* image) ...@@ -2287,8 +2264,6 @@ void GlowDrawQt::image_flip_vertical(glow_tImImage* image)
void GlowDrawQt::image_flip_horizontal(glow_tImImage* image) void GlowDrawQt::image_flip_horizontal(glow_tImImage* image)
{ {
// debug_print("image_flip_horizontal\n");
QImage* im = new QImage(((QImage*)*image)->mirrored(true, false)); QImage* im = new QImage(((QImage*)*image)->mirrored(true, false));
delete ((QImage*)*image); delete ((QImage*)*image);
*image = (glow_tImImage)im; *image = (glow_tImImage)im;
...@@ -2298,8 +2273,6 @@ int GlowDrawQt::image_scale(int width, int height, glow_tImImage orig_im, ...@@ -2298,8 +2273,6 @@ int GlowDrawQt::image_scale(int width, int height, glow_tImImage orig_im,
glow_tImImage* im, glow_tImData* im_data, glow_tPixmap* im_pixmap, glow_tImImage* im, glow_tImData* im_data, glow_tPixmap* im_pixmap,
glow_tPixmap* im_mask) glow_tPixmap* im_mask)
{ {
// debug_print("image_scale\n");
if (width == ((QImage*)*im)->width() && height == ((QImage*)*im)->height()) { if (width == ((QImage*)*im)->width() && height == ((QImage*)*im)->height()) {
return 0; return 0;
} }
...@@ -2372,8 +2345,6 @@ void GlowDrawQt::image_pixel_iter(glow_tImImage orig_image, ...@@ -2372,8 +2345,6 @@ void GlowDrawQt::image_pixel_iter(glow_tImImage orig_image,
int rgb_width; int rgb_width;
int rowstride; int rowstride;
// debug_print("image_pixel_iter\n");
if (orig_image) { if (orig_image) {
if (image && *image != orig_image) { if (image && *image != orig_image) {
delete ((QImage*)*image); delete ((QImage*)*image);
...@@ -2984,7 +2955,6 @@ int GlowDrawQt::text_qt(GlowWind* wind, int x, int y, char* text, int len, ...@@ -2984,7 +2955,6 @@ int GlowDrawQt::text_qt(GlowWind* wind, int x, int y, char* text, int len,
px = x; px = x;
py = (int)(y - (1.0 - FONT_DESCENT) * height); py = (int)(y - (1.0 - FONT_DESCENT) * height);
} }
// debug_print("textQt %s on %d,%d with color %s, painter_type=%d, color=%d\n", text, px, py, qPrintable(painter->pen().color().name()), painter_type, color);
painter->drawText(px, py, rect.width(), rect.height(), Qt::TextDontClip, str); painter->drawText(px, py, rect.width(), rect.height(), Qt::TextDontClip, str);
return 1; return 1;
...@@ -3053,7 +3023,6 @@ int GlowDrawQt::text_erase_qt(GlowWind* wind, int x, int y, char* text, int len, ...@@ -3053,7 +3023,6 @@ int GlowDrawQt::text_erase_qt(GlowWind* wind, int x, int y, char* text, int len,
set_clip(w, painter); set_clip(w, painter);
} }
// debug_print("textEraseQt %s on %d,%d\n", text, px, py);
painter->fillRect(px, py, pw, ph, painter->brush()); painter->fillRect(px, py, pw, ph, painter->brush());
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment