]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiViewSource.cpp
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / GuiViewSource.cpp
index 8f23234c8e2854677a01de4669934ad75a26f2e2..3f6a8158eae68b4ba69ad454f8d98147ccdc6ba7 100644 (file)
@@ -23,6 +23,7 @@
 #include "Paragraph.h"
 #include "TexRow.h"
 
+#include "support/assert.h"
 #include "support/docstream.h"
 #include "support/gettext.h"
 
@@ -39,7 +40,6 @@ ViewSourceWidget::ViewSourceWidget(GuiViewSource & controller)
                highlighter_(new LaTeXHighlighter(document_))
 {
        setupUi(this);
-       setWindowTitle(qt_("LaTeX Source"));
 
        connect(viewFullSourceCB, SIGNAL(clicked()),
                this, SLOT(updateView()));
@@ -89,11 +89,10 @@ void ViewSourceWidget::update(bool full_source)
 
 GuiViewSource::GuiViewSource(GuiView & parent,
                Qt::DockWidgetArea area, Qt::WindowFlags flags)
-       : DockView(parent, "view-source", area, flags)
+       : DockView(parent, "view-source", qt_("LaTeX Source"), area, flags)
 {
        widget_ = new ViewSourceWidget(*this);
        setWidget(widget_);
-       setWindowTitle(widget_->windowTitle());
 }
 
 
@@ -132,7 +131,7 @@ QString GuiViewSource::getContent(bool fullSource)
                par_end = view->cursor().selectionEnd().bottom().pit();
        }
        if (par_begin > par_end)
-               std::swap(par_begin, par_end);
+               swap(par_begin, par_end);
        odocstringstream ostr;
        view->buffer().getSourceCode(ostr, par_begin, par_end + 1, fullSource);
        return toqstr(ostr.str());
@@ -168,7 +167,7 @@ QString GuiViewSource::title() const
                case LITERATE:
                        return qt_("Literate Source");
        }
-       BOOST_ASSERT(false);
+       LASSERT(false, /**/);
        return QString();
 }