]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiLog.cpp
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / GuiLog.cpp
index 899e1d574371603349ae3243405480f52da89d24..f415c9af09694112778f7cbd59f3195f3b987426 100644 (file)
@@ -18,7 +18,6 @@
 #include "support/gettext.h"
 #include "Lexer.h"
 
-#include <QCloseEvent>
 #include <QTextBrowser>
 #include <QSyntaxHighlighter>
 #include <QClipboard>
 #include <sstream>
 
 using namespace std;
+using namespace lyx::support;
 
 namespace lyx {
 namespace frontend {
 
-using support::FileName;
-
 /////////////////////////////////////////////////////////////////////
 //
 // LogHighlighter
@@ -100,7 +98,7 @@ void LogHighlighter::highlightBlock(QString const & text)
 /////////////////////////////////////////////////////////////////////
 
 GuiLog::GuiLog(GuiView & lv)
-       : GuiDialog(lv, "log"), type_(LatexLog)
+       : GuiDialog(lv, "log", qt_("LaTeX Log")), type_(LatexLog)
 {
        setupUi(this);
 
@@ -121,18 +119,11 @@ GuiLog::GuiLog(GuiView & lv)
 }
 
 
-void GuiLog::closeEvent(QCloseEvent * e)
-{
-       slotClose();
-       e->accept();
-}
-
-
 void GuiLog::updateContents()
 {
-       setViewTitle(title());
+       setTitle(toqstr(title()));
 
-       std::ostringstream ss;
+       ostringstream ss;
        getContents(ss);
 
        logTB->setPlainText(toqstr(ss.str()));
@@ -142,7 +133,7 @@ void GuiLog::updateContents()
 bool GuiLog::initialiseParams(string const & data)
 {
        istringstream is(data);
-       Lexer lex(0,0);
+       Lexer lex;
        lex.setStream(is);
 
        string logtype, logfile;
@@ -194,9 +185,9 @@ docstring GuiLog::title() const
 }
 
 
-void GuiLog::getContents(std::ostream & ss) const
+void GuiLog::getContents(ostream & ss) const
 {
-       std::ifstream in(logfile_.toFilesystemEncoding().c_str());
+       ifstream in(logfile_.toFilesystemEncoding().c_str());
 
        bool success = false;