On July 27, 2010, Aleix Pol wrote: > I've been looking into it and it's fine to use DataEngines. I have the > exact same problem though. I can create a kdevelop DataEngine with a > project DataContainer, but this is still created in the PluginLoader and I > can't have a reference to the Project.
here's an example of how you could create an engine that knows when the project changes: QWeakPointer<MyDataEngine *> m_engine; DataEngine *MyPluginLoader::loadDataEngine(const QString &name) { if (name == "org.kde.kdevelop.project") { m_engine = new MyDataEngine; connect(m_projectManager, SIGNAL(projectChanged(QString)), m_engine.data(), SLOT(projectChanged(QString))); return m_engine.data(); } return 0; } remember that DataEngineManager will delete the engine when it is no longer used, so be sure to use a QWeakPointer. similar approaches to the above should give you all the flexibility needed. -- Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Qt Development Frameworks
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel