Author: schmitt
Date: Sun Apr 1 16:35:42 2007
New Revision: 17679
URL: http://www.lyx.org/trac/changeset/17679
Log:
remove redundant lyxerr.debugging checks; macro LYXERR already checks whether
the output is actually needed
Modified:
lyx-devel/trunk/src/frontends/WorkArea.C
lyx-devel/trunk/src/frontends/qt4/GuiClipboard.C
lyx-devel/trunk/src/frontends/qt4/GuiFontLoader.C
lyx-devel/trunk/src/frontends/qt4/QLPainter.C
lyx-devel/trunk/src/frontends/qt4/QLyXKeySym.C
Modified: lyx-devel/trunk/src/frontends/WorkArea.C
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/WorkArea.C?rev=17679
==============================================================================
--- lyx-devel/trunk/src/frontends/WorkArea.C (original)
+++ lyx-devel/trunk/src/frontends/WorkArea.C Sun Apr 1 16:35:42 2007
@@ -149,9 +149,8 @@
ViewMetricsInfo const & vi = buffer_view_->viewMetricsInfo();
greyed_out_ = false;
- if (lyxerr.debugging(Debug::WORKAREA)) {
- LYXERR(Debug::WORKAREA) << "WorkArea::redraw screen" << endl;
- }
+ LYXERR(Debug::WORKAREA) << "WorkArea::redraw screen" << endl;
+
int const ymin = std::max(vi.y1, 0);
int const ymax = vi.p2 < vi.size - 1 ? vi.y2 : height();
Modified: lyx-devel/trunk/src/frontends/qt4/GuiClipboard.C
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/GuiClipboard.C?rev=17679
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/GuiClipboard.C (original)
+++ lyx-devel/trunk/src/frontends/qt4/GuiClipboard.C Sun Apr 1 16:35:42 2007
@@ -55,8 +55,7 @@
// data from ourself or some other LyX instance
QByteArray const ar = source->data(mime_type);
string const s(ar.data(), ar.count());
- if (lyxerr.debugging(Debug::ACTION))
- LYXERR(Debug::ACTION) << s << "'" << endl;
+ LYXERR(Debug::ACTION) << s << "'" << endl;
return s;
}
LYXERR(Debug::ACTION) << "'" << endl;
@@ -68,9 +67,8 @@
{
// text data from other applications
QString const str = qApp->clipboard()->text(QClipboard::Clipboard);
- if (lyxerr.debugging(Debug::ACTION))
- LYXERR(Debug::ACTION) << "GuiClipboard::getAsText(): `"
- << fromqstr(str) << "'" << endl;
+ LYXERR(Debug::ACTION) << "GuiClipboard::getAsText(): `"
+ << fromqstr(str) << "'" << endl;
if (str.isNull())
return docstring();
@@ -80,9 +78,8 @@
void GuiClipboard::put(string const & lyx, docstring const & text)
{
- if (lyxerr.debugging(Debug::ACTION))
- LYXERR(Debug::ACTION) << "GuiClipboard::put(`" << lyx << "' `"
- << to_utf8(text) << "')" << endl;
+ LYXERR(Debug::ACTION) << "GuiClipboard::put(`" << lyx << "' `"
+ << to_utf8(text) << "')" << endl;
// We don't convert the encoding of lyx since the encoding of the
// clipboard contents is specified in the data itself
QMimeData * data = new QMimeData;
Modified: lyx-devel/trunk/src/frontends/qt4/GuiFontLoader.C
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/GuiFontLoader.C?rev=17679
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/GuiFontLoader.C (original)
+++ lyx-devel/trunk/src/frontends/qt4/GuiFontLoader.C Sun Apr 1 16:35:42 2007
@@ -261,10 +261,8 @@
break;
}
- if (lyxerr.debugging(Debug::FONT)) {
- LYXERR(Debug::FONT) << "Font '" << to_utf8(f.stateText(0))
- << "' matched by\n" << fromqstr(font.family()) << endl;
- }
+ LYXERR(Debug::FONT) << "Font '" << to_utf8(f.stateText(0))
+ << "' matched by\n" << fromqstr(font.family()) << endl;
// Is this an exact match?
if (font.exactMatch())
Modified: lyx-devel/trunk/src/frontends/qt4/QLPainter.C
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/QLPainter.C?rev=17679
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/QLPainter.C (original)
+++ lyx-devel/trunk/src/frontends/qt4/QLPainter.C Sun Apr 1 16:35:42 2007
@@ -247,10 +247,8 @@
// We need to draw the text as LTR as we use our own bidi code.
setLayoutDirection(Qt::LeftToRight);
if (isDrawingEnabled()) {
- if (lyxerr.debugging(Debug::PAINTING)) {
- LYXERR(Debug::PAINTING) << "draw " <<
std::string(str.toUtf8())
- << " at " << x << "," << y << std::endl;
- }
+ LYXERR(Debug::PAINTING) << "draw " <<
std::string(str.toUtf8())
+ << " at " << x << "," << y << std::endl;
// Qt4 does not display a glyph whose codepoint is the
// same as that of a soft-hyphen (0x00ad), unless it
// occurs at a line-break. As a kludge, we force Qt to
Modified: lyx-devel/trunk/src/frontends/qt4/QLyXKeySym.C
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/QLyXKeySym.C?rev=17679
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/QLyXKeySym.C (original)
+++ lyx-devel/trunk/src/frontends/qt4/QLyXKeySym.C Sun Apr 1 16:35:42 2007
@@ -88,14 +88,12 @@
{
key_ = ev->key();
if (ev->text().isNull()) {
- if (lyxerr.debugging())
- LYXERR(Debug::KEY) << "keyevent has isNull() text !" <<
endl;
+ LYXERR(Debug::KEY) << "keyevent has isNull() text !" << endl;
text_ = "";
return;
}
text_ = ev->text();
- if (lyxerr.debugging())
- LYXERR(Debug::KEY) << "Setting key to " << key_ << ", " <<
fromqstr(text_) << endl;
+ LYXERR(Debug::KEY) << "Setting key to " << key_ << ", " << fromqstr(text_)
<< endl;
}
@@ -103,16 +101,14 @@
{
key_ = string_to_qkey(symbolname);
text_ = toqstr(symbolname);
- if (lyxerr.debugging())
- LYXERR(Debug::KEY) << "Init key to " << key_ << ", " <<
fromqstr(text_) << endl;
+ 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())
- LYXERR(Debug::KEY) << "isOK is " << ok << endl;
+ LYXERR(Debug::KEY) << "isOK is " << ok << endl;
return ok;
}
@@ -120,8 +116,7 @@
bool QLyXKeySym::isModifier() const
{
bool const mod(q_is_modifier(key_));
- if (lyxerr.debugging())
- LYXERR(Debug::KEY) << "isMod is " << mod << endl;
+ LYXERR(Debug::KEY) << "isMod is " << mod << endl;
return mod;
}
@@ -182,8 +177,7 @@
bool QLyXKeySym::isText() const
{
if (text_.isEmpty()) {
- if (lyxerr.debugging())
- LYXERR(Debug::KEY) << "text_ empty, isText() == false"
<< endl;
+ LYXERR(Debug::KEY) << "text_ empty, isText() == false" << endl;
return false;
}
_______________________________________________
Cvslog mailing list
[EMAIL PROTECTED]
http://www.lyx.org/mailman/listinfo/cvslog