reusability of GenericManager
Milian Wolff
mail at milianw.de
Tue Oct 19 00:16:44 UTC 2010
Hey there,
I'm trying to revive QMake support as I have to use that at work. To safe some
kittens I want to reuse the generic manager which is already possible with the
IGenericManager export.
This can be used with e.g. this code:
KDevelop::IGenericProjectManager* QMakeProjectManager::genericManager() const
{
KDevelop::IGenericProjectManager* manager = KDevelop::ICore::self()-
>pluginController()->
extensionForPlugin<KDevelop::IGenericProjectManager>(
"org.kdevelop.IGenericProjectManager" );
Q_ASSERT(manager);
return manager;
}
bool QMakeProjectManager::renameFolder( KDevelop::ProjectFolderItem*
oldFolder, const KUrl& newFolder )
{
return genericManager()->renameFolder( oldFolder, newFolder );
}
So far so good. But this actually shows the issue I have with this:
I cannot subclass the generic manager. Sure the above works and saves code
already, but I could save so much more! So I wonder: Could we not export the
generic manager in a "subclassable" way? This would also solve my "real"
problem with reusing it:
I cannot create custom Folder/File objects. And since the generic manager has
no idea of targets/build stuff it will never create ProjectBuildFolderItems for
example.
If I subclass the manager I could add something like:
virtual ProjectFolderItem* newFolder(const KUrl& url, ProjectFolderItem*
parent);
and in the QMake overload that and return ProjectBuilderFolderItems on demand.
So the real question of this mail is probably: How can I export something from
a plugin in a way that I link against it? Andreas, could you maybe help me
with the CMake magic required?
Bye
PS: I personally think this would involve creating and installing a new shared
library which would be linked into the genericmanager plugin as well. Correct?
Bye^2
--
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20101019/46f83ea4/attachment.sig>
More information about the KDevelop-devel
mailing list