From b5e31868dc0d4d5094752ab2dba127311434e66f Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 16 Sep 2008 06:36:17 +0000 Subject: [FIX] Refactored out some code to ObjectModel [FIX] Drag and drop now accepts URLs [FIX] The main window can now accept drops git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@265 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- sigmodr/models/MapWarpModel.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'sigmodr/models/MapWarpModel.cpp') diff --git a/sigmodr/models/MapWarpModel.cpp b/sigmodr/models/MapWarpModel.cpp index c01ef5bf..f61df5c0 100644 --- a/sigmodr/models/MapWarpModel.cpp +++ b/sigmodr/models/MapWarpModel.cpp @@ -31,9 +31,6 @@ // KDE includes #include -// Qt includes -#include - Sigmodr::MapWarpModel::MapWarpModel(BaseModel* parent, Sigmod::MapWarp* warp) : ObjectModel(parent, warp) { @@ -67,28 +64,6 @@ QVariant Sigmodr::MapWarpModel::data(int role) const return Sigmodr::ObjectModel::data(role); } -bool Sigmodr::MapWarpModel::setData(const QVariant& value, int role) -{ - if (role == Sigmodr::BaseModel::XmlRole) - { - if (value.canConvert()) - { - QFile file(value.toString()); - QDomDocument xml; - if ((file.open(QIODevice::ReadOnly) && xml.setContent(&file)) || xml.setContent(value.toString())) - { - if (xml.doctype().name() == m_object->className()) - { - m_object->load(xml.documentElement()); - return true; - } - file.close(); - } - } - } - return false; -} - void Sigmodr::MapWarpModel::deleteSelf() { qobject_cast(m_parent)->deleteObject(this); -- cgit