From b028ede1898fff38a30286a7799c9fd59ea9f735 Mon Sep 17 00:00:00 2001
From: Matthias Puchner <github@mpuchner.de>
Date: Tue, 30 Nov 2021 07:20:06 +0100
Subject: [PATCH] rm unused code

---
 GUI/Model/Session/SessionModel.cpp | 31 ------------------------------
 GUI/Model/Session/SessionModel.h   |  2 --
 2 files changed, 33 deletions(-)

diff --git a/GUI/Model/Session/SessionModel.cpp b/GUI/Model/Session/SessionModel.cpp
index 013ad4fee41..b00c6f03ddd 100644
--- a/GUI/Model/Session/SessionModel.cpp
+++ b/GUI/Model/Session/SessionModel.cpp
@@ -321,37 +321,6 @@ void SessionModel::clear()
     endResetModel();
 }
 
-void SessionModel::load(const QString& filename)
-{
-    beginResetModel();
-    QFile file(filename);
-    if (!file.open(QIODevice::ReadOnly))
-        throw Error(file.errorString());
-    clear();
-    m_root_item = GUI::Model::ItemFactory::CreateEmptyItem();
-    QXmlStreamReader reader(&file);
-    GUI::Session::XML::readItems(&reader, m_root_item);
-    if (reader.hasError())
-        throw Error(reader.errorString());
-    endResetModel();
-}
-
-void SessionModel::save(const QString& filename)
-{
-    QFile file(filename);
-    if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
-        throw Error(file.errorString());
-
-    QXmlStreamWriter writer(&file);
-    writer.setAutoFormatting(true);
-    writer.writeStartDocument();
-    writer.writeStartElement("BornAgain");
-    writer.writeAttribute("Version", GUI::Util::Path::getBornAgainVersionString());
-    GUI::Session::XML::writeItemAndChildItems(&writer, m_root_item);
-    writer.writeEndElement(); // BornAgain
-    writer.writeEndDocument();
-}
-
 SessionItem* SessionModel::itemForIndex(const QModelIndex& index) const
 {
     if (index.isValid())
diff --git a/GUI/Model/Session/SessionModel.h b/GUI/Model/Session/SessionModel.h
index b15bc201c51..579de599eda 100644
--- a/GUI/Model/Session/SessionModel.h
+++ b/GUI/Model/Session/SessionModel.h
@@ -88,8 +88,6 @@ public:
     QVector<QString> acceptableDefaultItemTypes(const QModelIndex& parent) const;
 
     virtual void clear();
-    void load(const QString& filename = "");
-    void save(const QString& filename = "");
 
     // Sets mimedata pointer of item being dragged
     void setDraggedItemType(const QString& type);
-- 
GitLab