Implementing shift delete in dolphin, some help would be nice.

Mark markg85 at gmail.com
Tue Sep 14 20:51:23 BST 2010


2010/9/14 Ingo Klöcker <kloecker at kde.org>

> On Tuesday 14 September 2010, Mark wrote:
> > On Mon, Sep 13, 2010 at 11:13 PM, Lubos Lunak <l.lunak at suse.cz> wrote:
> > > On Monday 13 of September 2010, Mark wrote:
> > > > On Mon, Sep 13, 2010 at 10:00 PM, Mark <markg85 at gmail.com> wrote:
> > > > > --- src/dolphincontextmenu.cpp (revision 1174907)
> > > > > +++ src/dolphincontextmenu.cpp (working copy)
> > > > > @@ -69,6 +69,9 @@
> > > > >
> > > > >      const DolphinView* view =
> > > > >
> > > > > m_mainWindow->activeViewContainer()->view(); m_selectedUrls =
> > > > > view->selectedUrls();
> > > > >
> > > > >      m_selectedItems = view->selectedItems();
> > > > >
> > > > > +    m_keyInfo = new KModifierKeyInfo();
> > >
> > >  And who deletes it?
> >
> > Not in the above patch, but the destructor now does that:
> > DolphinContextMenu::~DolphinContextMenu()
>
> Please use QScopedPointer<KModifierKeyInfo> for m_keyInfo instead of a
> raw pointer that you have to delete manually.
>
>
> Regards,
> Ingo
>

Oh wow, neat!
I didn't even know about that Qt class. I will use it from now on when i
need to make pointers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100914/fdaa4b3f/attachment.htm>


More information about the kde-core-devel mailing list