diff options
Diffstat (limited to 'src/document.cpp')
-rw-r--r-- | src/document.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/document.cpp b/src/document.cpp index 40a38dd..97a5c5a 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -15,6 +15,7 @@ #include "mainwindow.h" // needed for calling fileSave() #include "collectionfactory.h" #include "translators/tellicoimporter.h" +#include "translators/tellicosaximporter.h" #include "translators/tellicozipexporter.h" #include "translators/tellicoxmlexporter.h" #include "collection.h" @@ -109,7 +110,12 @@ bool Document::openDocument(const KURL& url_) { } delete m_importer; +#ifdef SAX_SUPPORT + myLog() << "Document::openDocument() - using SAX loader" << endl; + m_importer = new Import::TellicoSaxImporter(url_, m_loadAllImages); +#else m_importer = new Import::TellicoImporter(url_, m_loadAllImages); +#endif CollPtr coll = m_importer->collection(); // delayed image loading only works for zip files @@ -146,6 +152,8 @@ bool Document::openDocument(const KURL& url_) { TQTimer::singleShot(500, this, TQT_SLOT(slotLoadAllImages())); } else { emit signalCollectionImagesLoaded(m_coll); + m_importer->deleteLater(); + m_importer = 0; } return true; } |