Hello,
There is more "fun" with kdevplatform:
The following code:
KDevelop::IDocumentFactory * fact =
m_core->documentController()->factory("application/x-circuit");
qDebug() << "factory = " << fact ;
KUrl emptyDoc( i18n("Untitled") );
KDevelop::IDocument *mydoc = fact->create( emptyDoc, m_core);
qDebug() << "document: " << mydoc ;
qDebug() << "document mime comment: " << mydoc->mimeType()->patterns() ;
IComponentDocument *doc = dynamic_cast<IComponentDocument*>( mydoc );
ISimulator *sim = m_simManager->simulatorForDocument(doc, "transient");
produces the following output:
QDEBUG : KTechLab::AddComponentsTest::addResistor() factory = 0x88d6ba8
QDEBUG : KTechLab::AddComponentsTest::addResistor() document: 0x8ac5298
QDEBUG : KTechLab::AddComponentsTest::addResistor() document mime comment:
("*.bin")
QDEBUG : KTechLab::AddComponentsTest::addResistor() qttest(14918)
KTechLab::SimulationManager::simulatorForDocument: no factory found for
docoument type "application/octet-stream" and simulation type: "transient"
So an empty document created by the circuit factory has the mime-type of
application/octet-stream. This is very bad.
How should we create new circuit documents? Have to check temporary file
with .circuit extension.
Zoltan
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Ktechlab-devel mailing list
Ktechlab-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ktechlab-devel