]> git.lyx.org Git - lyx.git/commitdiff
Remove some more debug
authorJohn Levon <levon@movementarian.org>
Thu, 27 Mar 2003 04:29:14 +0000 (04:29 +0000)
committerJohn Levon <levon@movementarian.org>
Thu, 27 Mar 2003 04:29:14 +0000 (04:29 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6592 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/QContentPane.C
src/frontends/qt2/QLImage.C
src/frontends/qt2/QLPainter.C
src/frontends/qt2/QLPopupMenu.C
src/frontends/qt2/QLyXKeySym.C

index ea1242f0d46c21b2f9896f2cd1f46b3bbc2e27a2..f53e4d9a47c2f495815fdc751db7b43254c6e8c9 100644 (file)
@@ -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);
index 3a542dece45ff30cbf72c5d1b40043ac2c47971a..acdf564901dd8805afe0177bdb46c4ccc948f7d4 100644 (file)
@@ -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);
index 6a97b6c84265db7e189504fd36bb7b53e9596dee..14b1ec97205b93a32aeb89a6cd97dc0e75c47244 100644 (file)
@@ -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;
index db023eb4a3bf9dddc0fb4a2a7312943279b01af3..557dfd399f3c17f261a578a5ea65a6408ec1a5ab 100644 (file)
@@ -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;
 }
index 2f3665a8170ab3004222603ac6a0984dea8949ae..c5a0c8e1b2c3af4a563f26810a97c3e2ebdb3145 100644 (file)
@@ -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;
 }