Skip to content
Snippets Groups Projects
Commit b028ede1 authored by Matthias Puchner's avatar Matthias Puchner
Browse files

rm unused code

parent a5d22de6
No related branches found
No related tags found
1 merge request!491Refactor parameter tuning tree
...@@ -321,37 +321,6 @@ void SessionModel::clear() ...@@ -321,37 +321,6 @@ void SessionModel::clear()
endResetModel(); 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 SessionItem* SessionModel::itemForIndex(const QModelIndex& index) const
{ {
if (index.isValid()) if (index.isValid())
......
...@@ -88,8 +88,6 @@ public: ...@@ -88,8 +88,6 @@ public:
QVector<QString> acceptableDefaultItemTypes(const QModelIndex& parent) const; QVector<QString> acceptableDefaultItemTypes(const QModelIndex& parent) const;
virtual void clear(); virtual void clear();
void load(const QString& filename = "");
void save(const QString& filename = "");
// Sets mimedata pointer of item being dragged // Sets mimedata pointer of item being dragged
void setDraggedItemType(const QString& type); void setDraggedItemType(const QString& type);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment