cosmetics

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24590 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-05-02 22:07:51 +00:00
parent b9c526aaa2
commit 7c8a7ef67c
6 changed files with 35 additions and 42 deletions

View File

@ -135,7 +135,7 @@ void Dialog::showData(string const & data)
return;
if (!initialiseParams(data)) {
LYXERR0("Dialog \"" << fromqstr(name())
LYXERR0("Dialog \"" << name()
<< "\" failed to translate the data string passed to show()");
return;
}

View File

@ -140,7 +140,7 @@ static bool isChosenFont(QFont & font, QString const & family)
// positions.
QFontInfo fi(font);
LYXERR(Debug::FONT, "got: " << fromqstr(fi.family()));
LYXERR(Debug::FONT, "got: " << fi.family());
if (fi.family().contains(family)) {
LYXERR(Debug::FONT, " got it ");
@ -313,7 +313,7 @@ GuiFontInfo::GuiFontInfo(FontInfo const & f)
else
LYXERR(Debug::FONT, "This font is NOT an exact match");
LYXERR(Debug::FONT, "XFLD: " << fromqstr(font.rawName()));
LYXERR(Debug::FONT, "XFLD: " << font.rawName());
font.setPointSizeF(convert<double>(lyxrc.font_sizes[f.size()])
* lyxrc.zoom / 100.0);

View File

@ -1526,8 +1526,8 @@ void TabWorkArea::updateTabTexts()
// final?
allFinal = allFinal && it->final();
LYXERR(Debug::GUI, "it = " << fromqstr(it->abs())
<< " => " << fromqstr(it->displayString()));
LYXERR(Debug::GUI, "it = " << it->abs()
<< " => " << it->displayString());
// still the same segment?
QString nextString;
@ -1551,23 +1551,18 @@ void TabWorkArea::updateTabTexts()
It sit = segStart;
QString dspString = sit->forecastPathString();
LYXERR(Debug::GUI, "first forecast found for "
<< fromqstr(sit->abs())
<< " => " << fromqstr(dspString));
<< sit->abs() << " => " << dspString);
++sit;
bool moreUnique = false;
for (; sit != next; ++sit) {
if (sit->forecastPathString() != dspString) {
LYXERR(Debug::GUI, "different forecast found for "
<< fromqstr(sit->abs())
<< " => "
<< fromqstr(sit->forecastPathString()));
<< sit->abs() << " => " << sit->forecastPathString());
moreUnique = true;
break;
}
LYXERR(Debug::GUI, "same forecast found for "
<< fromqstr(sit->abs())
<< " => "
<< fromqstr(dspString));
<< sit->abs() << " => " << dspString);
}
// if the path segment helped, add it. Otherwise add dots
@ -1575,9 +1570,8 @@ void TabWorkArea::updateTabTexts()
LYXERR(Debug::GUI, "using dots = " << dots);
for (sit = segStart; sit != next; ++sit) {
sit->shiftPathSegment(dots);
LYXERR(Debug::GUI, "shifting " << fromqstr(sit->abs())
<< " => "
<< fromqstr(sit->displayString()));
LYXERR(Debug::GUI, "shifting "
<< sit->abs() << " => " << sit->displayString());
}
// start new segment

View File

@ -565,17 +565,17 @@ void MenuDefinition::checkShortcuts() const
if (shortcut.isEmpty())
continue;
if (!it1->label().contains(shortcut))
lyxerr << "Menu warning: menu entry \""
<< fromqstr(it1->label())
LYXERR0("Menu warning: menu entry \""
<< it1->label()
<< "\" does not contain shortcut `"
<< fromqstr(shortcut) << "'." << endl;
<< shortcut << "'." << endl);
for (const_iterator it2 = begin(); it2 != it1 ; ++it2) {
if (!it2->shortcut().compare(shortcut, Qt::CaseInsensitive)) {
lyxerr << "Menu warning: menu entries "
<< '"' << fromqstr(it1->fulllabel())
<< "\" and \"" << fromqstr(it2->fulllabel())
LYXERR0("Menu warning: menu entries "
<< '"' << it1->fulllabel()
<< "\" and \"" << it2->fulllabel()
<< "\" share the same shortcut."
<< endl;
<< endl);
}
}
}
@ -595,8 +595,7 @@ bool MenuDefinition::searchMenu(FuncRequest const & func, vector<docstring> & na
names.push_back(qstring_to_ucs4(m->label()));
if (!m->hasSubmenu()) {
LYXERR(Debug::GUI, "Warning: non existing sub menu label="
<< fromqstr(m->label())
<< " name=" << fromqstr(m->submenuname()));
<< m->label() << " name=" << m->submenuname());
names.pop_back();
continue;
}
@ -1159,9 +1158,9 @@ static QString label(MenuItem const & mi)
void Menu::Impl::populate(QMenu & qMenu, MenuDefinition const & menu)
{
LYXERR(Debug::GUI, "populating menu " << fromqstr(menu.name()));
LYXERR(Debug::GUI, "populating menu " << menu.name());
if (menu.size() == 0) {
LYXERR(Debug::GUI, "\tERROR: empty menu " << fromqstr(menu.name()));
LYXERR(Debug::GUI, "\tERROR: empty menu " << menu.name());
return;
}
LYXERR(Debug::GUI, " ***** menu entries " << menu.size());
@ -1438,7 +1437,7 @@ MenuDefinition const & Menus::Impl::getMenu(QString const & name) const
const_iterator cit = find_if(menulist_.begin(), menulist_.end(),
MenuNamesEqual(name));
if (cit == menulist_.end())
lyxerr << "No submenu named " << fromqstr(name) << endl;
lyxerr << "No submenu named " << name << endl;
LASSERT(cit != menulist_.end(), /**/);
return (*cit);
}
@ -1449,7 +1448,7 @@ MenuDefinition & Menus::Impl::getMenu(QString const & name)
iterator it = find_if(menulist_.begin(), menulist_.end(),
MenuNamesEqual(name));
if (it == menulist_.end())
lyxerr << "No submenu named " << fromqstr(name) << endl;
lyxerr << "No submenu named " << name << endl;
LASSERT(it != menulist_.end(), /**/);
return (*it);
}
@ -1541,11 +1540,11 @@ void Menus::fillMenuBar(QMenuBar * qmb, GuiView * view, bool initial)
qmb->clear();
}
LYXERR(Debug::GUI, "populating menu bar" << fromqstr(d->menubar_.name()));
LYXERR(Debug::GUI, "populating menu bar" << d->menubar_.name());
if (d->menubar_.size() == 0) {
LYXERR(Debug::GUI, "\tERROR: empty menu bar"
<< fromqstr(d->menubar_.name()));
<< d->menubar_.name());
return;
}
LYXERR(Debug::GUI, "menu bar entries " << d->menubar_.size());
@ -1562,16 +1561,16 @@ void Menus::fillMenuBar(QMenuBar * qmb, GuiView * view, bool initial)
for (; m != end; ++m) {
if (m->kind() != MenuItem::Submenu) {
LYXERR(Debug::GUI, "\tERROR: not a submenu " << fromqstr(m->label()));
LYXERR(Debug::GUI, "\tERROR: not a submenu " << m->label());
continue;
}
LYXERR(Debug::GUI, "menu bar item " << fromqstr(m->label())
<< " is a submenu named " << fromqstr(m->submenuname()));
LYXERR(Debug::GUI, "menu bar item " << m->label()
<< " is a submenu named " << m->submenuname());
QString name = m->submenuname();
if (!d->hasMenu(name)) {
LYXERR(Debug::GUI, "\tERROR: " << fromqstr(name)
LYXERR(Debug::GUI, "\tERROR: " << name
<< " submenu has no menu!");
continue;
}
@ -1587,7 +1586,7 @@ void Menus::fillMenuBar(QMenuBar * qmb, GuiView * view, bool initial)
void Menus::updateMenu(Menu * qmenu)
{
LYXERR(Debug::GUI, "Triggered menu: " << fromqstr(qmenu->d->name));
LYXERR(Debug::GUI, "Triggered menu: " << qmenu->d->name);
qmenu->clear();
if (qmenu->d->name.isEmpty())
@ -1599,7 +1598,7 @@ void Menus::updateMenu(Menu * qmenu)
if (!d->hasMenu(qmenu->d->name)) {
qmenu->addAction(qt_("No action defined!"));
LYXERR(Debug::GUI, "\tWARNING: non existing menu: "
<< fromqstr(qmenu->d->name));
<< qmenu->d->name);
return;
}
@ -1614,10 +1613,10 @@ void Menus::updateMenu(Menu * qmenu)
Menu * Menus::menu(QString const & name, GuiView & view)
{
LYXERR(Debug::GUI, "Context menu requested: " << fromqstr(name));
LYXERR(Debug::GUI, "Context menu requested: " << name);
Menu * menu = d->name_map_[&view].value(name, 0);
if (!menu && !name.startsWith("context-")) {
LYXERR0("requested context menu not found: " << fromqstr(name));
LYXERR0("requested context menu not found: " << name);
return 0;
}

View File

@ -61,7 +61,7 @@ void PanelStack::addCategory(QString const & name, QString const & parent)
{
QTreeWidgetItem * item = 0;
LYXERR(Debug::GUI, "addCategory n= " << fromqstr(name) << " parent= ");
LYXERR(Debug::GUI, "addCategory n= " << name << " parent= ");
int depth = 1;

View File

@ -530,11 +530,11 @@ QStringList fileFilters(QString const & desc)
// we have: "*.{gif,png,jpg,bmp,pbm,ppm,tga,tif,xpm,xbm}"
// but need: "*.cpp;*.cc;*.C;*.cxx;*.c++"
FileFilterList filters(qstring_to_ucs4(desc));
LYXERR0("DESC: " << fromqstr(desc));
LYXERR0("DESC: " << desc);
QStringList list;
for (size_t i = 0; i != filters.filters_.size(); ++i) {
QString f = filters.filters_[i].toString();
LYXERR0("FILTER: " << fromqstr(f));
LYXERR0("FILTER: " << f);
list.append(f);
}
return list;