]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/GuiToc.cpp
reduce line noise
[features.git] / src / frontends / qt4 / GuiToc.cpp
index 07c5828654bebe8061f0e2daa52d6de12b32052b..27ac5d0601b3a872754c3f14359173740c919f0d 100644 (file)
@@ -29,8 +29,7 @@
 #include "FloatList.h"
 #include "FuncRequest.h"
 #include "gettext.h"
-
-#include "frontends/LyXView.h"
+#include "TextClass.h"
 
 #include "support/convert.h"
 
@@ -43,7 +42,7 @@ using std::string;
 namespace lyx {
 namespace frontend {
 
-GuiToc::GuiToc(GuiViewBase & parent, Qt::DockWidgetArea area, Qt::WindowFlags flags)
+GuiToc::GuiToc(GuiView & parent, Qt::DockWidgetArea area, Qt::WindowFlags flags)
        : DockView(parent, "toc", area, flags), params_(TOC_CODE)
 {
        widget_ = new TocWidget(*this);
@@ -72,14 +71,12 @@ QStandardItemModel * GuiToc::tocModel(int type)
                return 0;
 
        if (toc_models_.empty()) {
-               LYXERR(Debug::GUI) << "GuiToc::tocModel(): no types available " << endl;
+               LYXERR(Debug::GUI, "GuiToc::tocModel(): no types available ");
                return 0;
        }
 
-       LYXERR(Debug::GUI)
-               << "GuiToc: type " << type
-               << "  toc_models_.size() " << toc_models_.size()
-               << endl;
+       LYXERR(Debug::GUI, "GuiToc: type " << type
+               << "  toc_models_.size() " << toc_models_.size());
 
        BOOST_ASSERT(type >= 0 && type < int(toc_models_.size()));
        return toc_models_[type];
@@ -105,9 +102,7 @@ void GuiToc::goTo(int type, QModelIndex const & index)
 {
        if (type < 0 || !index.isValid()
                || index.model() != toc_models_[type]) {
-               LYXERR(Debug::GUI)
-                       << "GuiToc::goTo(): QModelIndex is invalid!"
-                       << endl;
+               LYXERR(Debug::GUI, "GuiToc::goTo(): QModelIndex is invalid!");
                return;
        }
 
@@ -115,7 +110,7 @@ void GuiToc::goTo(int type, QModelIndex const & index)
 
        TocIterator const it = toc_models_[type]->tocIterator(index);
 
-       LYXERR(Debug::GUI) << "GuiToc::goTo " << to_utf8(it->str()) << endl;
+       LYXERR(Debug::GUI, "GuiToc::goTo " << to_utf8(it->str()));
 
        string const tmp = convert<string>(it->id());
        lyxview().dispatch(FuncRequest(LFUN_PARAGRAPH_GOTO, tmp));
@@ -236,7 +231,7 @@ void GuiToc::dispatchParams()
 
 Dialog * createGuiToc(LyXView & lv)
 {
-       GuiViewBase & guiview = static_cast<GuiViewBase &>(lv);
+       GuiView & guiview = static_cast<GuiView &>(lv);
 #ifdef Q_WS_MACX
        // On Mac show as a drawer at the right
        return new GuiToc(guiview, Qt::RightDockWidgetArea, Qt::Drawer);