Monday, June 14, 2010

GSoC's Status Update: 2010-06-14

Since last week I've been working on the first version of the new package system, but this is more complicated than I expected.

This week I had progress in the code, but I could not finish it yet.

I will keep the task until I finish.


Done:


Next:
  • Finish coding the first version

Monday, June 7, 2010

GSoC's Status Update: 2010-06-07


This is my first status post for GSOC 2010. If you have any doubts or tips, just comment this post.

Done:
  • Found where to modify to add support for the new add-on packaging system
  • Start coding the first version of the support
Next:
  • Finish coding the first version
Sorry about the last week that I could not post, I was having internet problems. Anyway, These first weeks I was having trouble to found where to start coding to create the first support. I hope it will never happen again.

Monday, June 15, 2009

How to create a Qt Creator Plugin

In order to create a Qt Creator plugin we need to create two files: the project's file descriptor, ".pro"(This file is commonly used by all Qt projects), and the plugin specification file. The description file must contain all project files and the plugin's name, that must be specified in the Target variable. The specification file must be named as "PluginName.pluginspec", where PluginName is exactly the same as the value of the Target var in the description file.
The specification file is a XML file that has all necessary information to load the plugin and some description. This is an example of a specification file:

<plugin name="NAME" version="1.1.0" compatVersion="1.1.0">
<vendor>VENDOR</vendor>
<copyright>(C) 2009 COPYRIGHTED</copyright>
<license>LGPL</license>
<description>DESCRIPTION</description>
<url>URL</url>
<dependencyList>
<dependency name="Core" version="1.1.0"/>
</dependencyList>
</plugin>

After creating the initial files, we can start to implement the plugin. First of all, we need to create a class that extends IPlugin (present in the Extension System). To extend IPlugin we need to implement two methods: initialize and extensionsInitialized and add the command Q_EXPORT_PLUGIN(PluginName), where PluginName is the name defined in the target variable in the project description file. This class must initialize and register all main components of the plugin and deallocate and delete all the created objects.