Thank you for your answer.
I guess that I need more details:

1) In the MOC_H_FILES (which present in each plugin under files.cmake)
should be the headers of each (like I did below) or both plugins ?

a/plugin/my.awesomeproject.exampleplugin/files.cmake
set(MOC_H_FILES
  src/internal/mitkPluginActivator.h
  src/internal/QmitkAwesomeView.h
)

a/plugin/SkullExtraction/files.cmake
set(MOC_H_FILES
  src/internal/mitkPluginActivator.h
  src/internal/QmitkSkullExtractionView.h
)

2) How should I check Q_OBJECT and Q_INTERFACES?

Here is a snapshot of my mitkPluginActivator.h (which is similar for both
plugins)

class PluginActivator :
  public QObject, public ctkPluginActivator
{
  Q_OBJECT
  Q_INTERFACES(ctkPluginActivator)

public:

  void start(ctkPluginContext* context);
  void stop(ctkPluginContext* context);

}; // PluginActivator

3) Why when I run the application, it's automatically viewing my first
plugin (without me pressing on the icon first)?


Any information would be very appreciated!
Miri


On Tue, Aug 30, 2011 at 2:31 PM, Miklos Espak <[email protected]> wrote:

> Then try the same solution! ;-)
> Check if the file name has been added to the MOC_H_FILES section of
> files.cmake and if the Q_OBJECT and Q_INTERFACES(here comes the other
> superclass) macros are added to the class definition.
>
> On Tue, Aug 30, 2011 at 2:18 PM, Miri Trope <[email protected]> wrote:
> > Hi,
> >
> > After I added another plugin (named "SkullExtraction") to my project
> (which
> > ran well with one plugin named "my.awesomeproject.exampleplugin"), I'm
> > getting the same error as you had:
> >
> > 52.39 blueberry.osgi.iconfigurationelement WARNING: The class
> > SkullExtractionView was not registered as an Extension Type using
> > BERRY_REGISTER_EXTENSION_CLASS(type, pluginContext) or you forgot to run
> > Qt's moc on the header file. Legacy BlueBerry bundles should use
> > CreateExecutableExtension<C>(propertyName, C::GetManifestName()) instead.
> > 52.41 blueberry.osgi.iconfigurationelement WARNING: Could not load
> > executable extension SkullExtractionView from SkullExtraction
> >
> > I attached my project tree and a snapshot to my files.
> >
> >
> >
> > Thanks!
> >
> >
> >
> >
> > On Thu, Jul 21, 2011 at 8:01 PM, Miklos Espak <[email protected]> wrote:
> >>
> >> Ohh, you're right again.
> >>
> >> Yes, I interpreted the error, and then added the header file name to
> >> the MOC_H_FILES section, but it was useless because I missed to add
> >> the Q_OBJECT and Q_INTERFACES macros. Basic Qt thing. My mistake.
> >>
> >> Thank you very much!
> >>
> >> Miklos
> >>
> >> On Thu, Jul 21, 2011 at 5:26 PM, Sascha Zelzer
> >> <[email protected]> wrote:
> >> > Hi Miklos,
> >> >
> >> > thanks for attatching the patch, this makes trouble shooting a lot
> >> > easier.
> >> >
> >> > Your perspective implementation should look like:
> >> >
> >> > class QmitkAwesomePerspective: public QObject, public
> >> > berry::IPerspectiveFactory
> >> > {
> >> >   Q_OBJECT
> >> >   Q_INTERFACES(berry::IPerspectiveFactory)
> >> >
> >> > public:
> >> >   ...
> >> > };
> >> >
> >> > and you must add the QmitkAwesomePerspective.h file to the MOC_H_FILES
> >> > list
> >> > in your files.cmake file.
> >> >
> >> > Here is a citation from the error output ;-)
> >> >
> >> > or you forgot to
> >> > run Qt's moc on the header file
> >> >
> >> > Best,
> >> > Sascha
> >> >
> >> > On 07/21/2011 05:04 PM, Miklos Espak wrote:
> >> >
> >> > Hi,
> >> >
> >> > for your suggestion I keep on flooding the mailing list. ;-)
> >> >
> >> > I created a perspective for my plugin. It worked well with BlueBerry
> >> > but after the migration to CTK I get an error at run-time. To make it
> >> > easy to reconstruct the situation, I remade all the changes on the
> >> > AwesomeProject.
> >> >
> >> > The error is the following:
> >> >
> >> > !2.080! [BlueBerry] WARNING: The class QmitkAwesomePerspective was not
> >> > registered as an Extension Type using
> >> > BERRY_REGISTER_EXTENSION_CLASS(type, pluginContext) or you forgot to
> >> > run Qt's moc on the header file. Legacy BlueBerry bundles should use
> >> > CreateExecutableExtension<C>(propertyName, C::GetManifestName())
> >> > instead.
> >> > !2.080! [BlueBerry] WARNING: Could not load executable extension
> >> > QmitkAwesomePerspective from my.awesomeproject.exampleplugin
> >> >
> >> > The perspective is registered in mitkPluginActivator.cpp with the
> >> > following command:
> >> >   BERRY_REGISTER_EXTENSION_CLASS(QmitkAwesomePerspective, context)
> >> >
> >> > Moreover, the src/internal/QmitkAwesomePerspective.h is added to the
> >> > MOC_H_FILES section of files.cmake.
> >> >
> >> > I attached the test as a patch on the project template. I hope the
> >> > format is correct.
> >> >
> >> > Is it a bug or I am doing something wrong?
> >> >
> >> > Thanks!
> >> > Miklos
> >> >
> >> >
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> 5 Ways to Improve & Secure Unified Communications
> >> Unified Communications promises greater efficiencies for business. UC
> can
> >> improve internal communications as well as offer faster, more efficient
> >> ways
> >> to interact with customers and streamline customer service. Learn more!
> >> http://www.accelacomm.com/jaw/sfnl/114/51426253/
> >> _______________________________________________
> >> mitk-users mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/mitk-users
> >
> >
>
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to