Code snippet review for plasmate

Shantanu Tushar Jha jhahoneyk at gmail.com
Thu May 28 08:43:47 CEST 2009


On Tue, May 26, 2009 at 10:12 PM, Aaron J. Seigo <aseigo at kde.org> wrote:

> On Tuesday 26 May 2009, Shantanu Tushar Jha wrote:
> > On Mon, May 25, 2009 at 8:16 PM, Aaron J. Seigo <aseigo at kde.org> wrote:
> > > On Monday 25 May 2009, Shantanu Tushar Jha wrote:
> > > > (line number 36) KParts::Part *newPart = KService::createInstance(
> > >
> > > offers.at
> > >
> > > > (0));
> > >
> > > offers.at(0).createInstance(parentWidget);
> >
> > Oops, I tried this
> >
> > KParts::Part *newPart = offers.at(0).createInstance(parentWidget);
> >
> > and now make says -
> >
> > playground/base/plasma/plasmate/editors/editpage.cpp:36: error: ‘const
> > class KSharedPtr<KService>’ has no member named ‘createInstance’
>
> sorry, should've been offers.at(0)->createInstance(parentWidget) (->
> rather
> than .)


I had already tried using offers.at(0)->createInstance(parentWidget). But
still make complained that -

playground/base/plasma/plasmate/editors/editpage.cpp:36: error: no matching
function for call to ‘KService::createInstance(<unresolved overloaded
function type>) const’

I tried a lot to find what the problem is, but couldn't get a solution. API
page on KService says -
*parentWidget* A parent widget for the service. This is used e. g. for parts
But, I'm not sure what do I have to pass as parentWidget ?


> --
> 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 Software
>
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
>


-- 
Shantanu Tushar    (GMT +0530)
http://www.shantanutushar.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20090528/1a622647/attachment.htm 


More information about the Plasma-devel mailing list