BuildLogViewer/Document.cpp
changeset 41 b56d7e268634
parent 40 edc0144719a1
child 42 b9716e8867f1
--- a/BuildLogViewer/Document.cpp	Thu Aug 26 14:34:34 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-#include <QFile>
-#include <QFileInfo>
-#include <QMessageBox>
-
-#include "Document.h"
-
-Document::Document(QWidget *parent, QString filename) : QTreeView (parent)
-{
-    setAttribute(Qt::WA_DeleteOnClose);
-
-    QFile file(filename);
-    QFileInfo fi(file);
-    this->setWindowTitle(fi.baseName());
-
-    if (!file.open(QIODevice::ReadOnly)) {
-        QMessageBox::warning(this, tr("Build Log Viewer"), tr("Cannot open log."));
-        return ;
-    }
-    QDomDocument *log = new QDomDocument("Build Log");
-    if (!log->setContent(&file)) {
-        QMessageBox::warning(this, tr("Build Log Viewer"), tr("Cannot set content."));
-        delete log;
-        file.close();
-        return ;
-    }
-    file.close();
-    model = new DomModel(log, this);
-    this->setModel(model);
-}