]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiViewSource.cpp
do what the FIXME suggested
[lyx.git] / src / frontends / qt4 / GuiViewSource.cpp
index a856d549495816a0579660de3112cedc94837529..245dc71b18f54932f8fac89e85d7380ad8438f50 100644 (file)
@@ -29,7 +29,7 @@
 #include <QTextCursor>
 #include <QTextDocument>
 
-using std::string;
+using namespace std;
 
 namespace lyx {
 namespace frontend {
@@ -39,7 +39,6 @@ ViewSourceWidget::ViewSourceWidget(GuiViewSource & controller)
                highlighter_(new LaTeXHighlighter(document_))
 {
        setupUi(this);
-       setWindowTitle(qt_("LaTeX Source"));
 
        connect(viewFullSourceCB, SIGNAL(clicked()),
                this, SLOT(updateView()));
@@ -89,11 +88,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 +130,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());