From: John Levon Date: Thu, 27 Mar 2003 04:29:14 +0000 (+0000) Subject: Remove some more debug X-Git-Tag: 1.6.10~17158 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9c01e98af7fefae5afaa31897070f26a1ec1c8c4;p=lyx.git Remove some more debug git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6592 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt2/QContentPane.C b/src/frontends/qt2/QContentPane.C index ea1242f0d4..f53e4d9a47 100644 --- a/src/frontends/qt2/QContentPane.C +++ b/src/frontends/qt2/QContentPane.C @@ -141,12 +141,6 @@ void QContentPane::wheelEvent(QWheelEvent * e) void QContentPane::keyPressEvent(QKeyEvent * e) { - lyxerr[Debug::KEY] << "Press key " << e->key() - << " text \"" - << (e->text().isEmpty() ? - "none" : - fromqstr(e->text())) - << "\", ascii \"" << e->ascii() << '"' << endl; QLyXKeySym * sym = new QLyXKeySym(); sym->set(e); wa_->workAreaKeyPress(LyXKeySymPtr(sym), q_key_state(e->state())); @@ -198,9 +192,6 @@ void QContentPane::paintEvent(QPaintEvent * e) QRect r(e->rect()); - lyxerr[Debug::GUI] << "repainting " << r.x() - << ',' << r.y() << ' ' << r.width() - << ',' << r.height() << endl; QPainter q(this); q.drawPixmap(QPoint(r.x(), r.y()), *pixmap_.get(), r); diff --git a/src/frontends/qt2/QLImage.C b/src/frontends/qt2/QLImage.C index 3a542dece4..acdf564901 100644 --- a/src/frontends/qt2/QLImage.C +++ b/src/frontends/qt2/QLImage.C @@ -60,7 +60,7 @@ Image::FormatList QLImage::loadableFormats() QStrListIterator it(qt_formats); for (; it.current(); ++it) { - lyxerr[Debug::GRAPHICS] << it.current() << endl; + lyxerr[Debug::GRAPHICS] << it.current() << endl; string ext = lowercase(it.current()); @@ -74,17 +74,19 @@ Image::FormatList QLImage::loadableFormats() fmts.push_back(fit->name()); } - lyxerr[Debug::GRAPHICS] - << "\nOf these, LyX recognises the following formats:\n"; - - FormatList::const_iterator fbegin = fmts.begin(); - FormatList::const_iterator fend = fmts.end(); - for (FormatList::const_iterator fit = fbegin; fit != fend; ++fit) { - if (fit != fbegin) - lyxerr[Debug::GRAPHICS] << ", "; - lyxerr[Debug::GRAPHICS] << *fit; + if (lyxerr.debugging()) { + lyxerr[Debug::GRAPHICS] + << "\nOf these, LyX recognises the following formats:\n"; + + FormatList::const_iterator fbegin = fmts.begin(); + FormatList::const_iterator fend = fmts.end(); + for (FormatList::const_iterator fit = fbegin; fit != fend; ++fit) { + if (fit != fbegin) + lyxerr[Debug::GRAPHICS] << ", "; + lyxerr[Debug::GRAPHICS] << *fit; + } + lyxerr[Debug::GRAPHICS] << '\n' << endl; } - lyxerr[Debug::GRAPHICS] << '\n' << endl; return fmts; } @@ -141,23 +143,16 @@ void QLImage::load(string const & filename) finishedLoading(false); return; } - lyxerr[Debug::GRAPHICS] << "just Loaded." << endl; xformed_pixmap_ = pixmap_; - lyxerr[Debug::GRAPHICS] << "pixmap isNull " << pixmap_.isNull() - << " xformed_pixmap_ isNull " << xformed_pixmap_.isNull() << endl; finishedLoading(true); } bool QLImage::setPixmap(Params const & params) { - lyxerr[Debug::GRAPHICS] << "pixmap isNull " << pixmap_.isNull() - << " xformed_pixmap_ isNull " << xformed_pixmap_.isNull() << endl; if (pixmap_.isNull() || params.display == NoDisplay) return false; - lyxerr[Debug::GRAPHICS] << "setPixmap()" << endl; - // FIXME: it's a fake kind of grayscale ! switch (params.display) { @@ -232,8 +227,6 @@ void QLImage::rotate(Params const & params) // The angle passed to flimage_rotate is the angle in one-tenth of a // degree units. - lyxerr[Debug::GRAPHICS] << "rotating image by " << params.angle << " degrees" << endl; - QWMatrix m; m.rotate(-params.angle); xformed_pixmap_ = xformed_pixmap_.xForm(m); @@ -252,10 +245,6 @@ void QLImage::scale(Params const & params) if (width == getWidth() && height == getHeight()) return; - lyxerr[Debug::GRAPHICS] << "resizing image to " << width << '(' - << (double(width)/getWidth()) << ")," - << height << '(' - << (double(height)/getHeight()) << ')' << endl; QWMatrix m; m.scale(double(width) / getWidth(), double(height) / getHeight()); xformed_pixmap_ = xformed_pixmap_.xForm(m); diff --git a/src/frontends/qt2/QLPainter.C b/src/frontends/qt2/QLPainter.C index 6a97b6c842..14b1ec9720 100644 --- a/src/frontends/qt2/QLPainter.C +++ b/src/frontends/qt2/QLPainter.C @@ -140,8 +140,6 @@ Painter & QLPainter::rectangle(int x, int y, line_style ls, line_width lw) { - //lyxerr << "rectangle " << x << ',' << y << ' ' - // << w << ',' << h << endl; setPen(col, ls, lw).drawRect(x, y, w, h); return *this; } @@ -151,8 +149,6 @@ Painter & QLPainter::fillRectangle(int x, int y, int w, int h, LColor::color col) { - //lyxerr << "fillRectangle " << x << ',' << y << ' ' - // << w << ',' << h << endl; qp_->fillRect(x, y, w, h, QColor(toqstr(lcolor.getX11Name(col)))); return *this; } @@ -184,9 +180,6 @@ Painter & QLPainter::arc(int x, int y, unsigned int w, unsigned int h, int a1, int a2, LColor::color col) { - lyxerr[Debug::GUI] << "arc: " << x << ',' << y - << ' ' << w << ',' << h << ", angles " - << a1 << " - " << a2 << endl; // LyX usings 1/64ths degree, Qt usings 1/16th setPen(col).drawArc(x, y, w, h, a1 / 4, a2 / 4); return *this; diff --git a/src/frontends/qt2/QLPopupMenu.C b/src/frontends/qt2/QLPopupMenu.C index db023eb4a3..557dfd399f 100644 --- a/src/frontends/qt2/QLPopupMenu.C +++ b/src/frontends/qt2/QLPopupMenu.C @@ -47,13 +47,7 @@ string const getLabel(MenuItem const & mi) if (!binding.empty()) { label += '\t' + binding; } - - lyxerr[Debug::GUI] << "Label: " << mi.label() - << " Shortcut: " << mi.shortcut() - << " Accel: " << binding << endl; - } else - lyxerr[Debug::GUI] << "Label: " << mi.label() - << " Shortcut: " << mi.shortcut() << endl; + } return label; } diff --git a/src/frontends/qt2/QLyXKeySym.C b/src/frontends/qt2/QLyXKeySym.C index 2f3665a817..c5a0c8e1b2 100644 --- a/src/frontends/qt2/QLyXKeySym.C +++ b/src/frontends/qt2/QLyXKeySym.C @@ -111,9 +111,8 @@ void QLyXKeySym::set(QKeyEvent * ev) return; } text_ = ev->text(); - if (lyxerr.debugging()) { + if (lyxerr.debugging()) lyxerr[Debug::KEY] << "Setting key to " << key_ << ", " << fromqstr(text_) << endl; - } } @@ -121,18 +120,16 @@ void QLyXKeySym::init(string const & symbolname) { key_ = string_to_qkey(symbolname); text_ = toqstr(symbolname); - if (lyxerr.debugging()) { + if (lyxerr.debugging()) lyxerr[Debug::KEY] << "Init key to " << key_ << ", " << fromqstr(text_) << endl; - } } bool QLyXKeySym::isOK() const { bool const ok(!(text_.isEmpty() && key_ == Qt::Key_unknown)); - if (lyxerr.debugging()) { + if (lyxerr.debugging()) lyxerr[Debug::KEY] << "isOK is " << ok << endl; - } return ok; } @@ -140,9 +137,8 @@ bool QLyXKeySym::isOK() const bool QLyXKeySym::isModifier() const { bool const mod(q_is_modifier(key_)); - if (lyxerr.debugging()) { + if (lyxerr.debugging()) lyxerr[Debug::KEY] << "isMod is " << mod << endl; - } return mod; }