From kde-panel-devel Sun Jul 24 06:39:10 2011 From: "Aaron J. Seigo" Date: Sun, 24 Jul 2011 06:39:10 +0000 To: kde-panel-devel Subject: Re: Review Request: Plasmate:add a destructor and some changes to the Message-Id: <20110724063910.21657.87767 () vidsolbach ! de> X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=131148957916276 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1298660287==" --===============1298660287== Content-Type: multipart/alternative; boundary="===============4813910919905703210==" --===============4813910919905703210== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable > On July 11, 2011, 6:27 p.m., Giorgos Tsiapaliwkas wrote: > > projectmanager/projectmanager.cpp, lines 73-79 > > > > > > Why in general the destructors of plasmate doesn't do something lik= e that?? > = > Aaron J. Seigo wrote: > the more typical approach is to parent those items to something and l= et QObject handle it. > = > e.g. this: > = > m_loadButton =3D new KPushButton(i18n("Load Project")); > = > should become this: > = > m_loadButton =3D new KPushButton(i18n("Load Project"), this); > = > there's no need for a dtor then. > = > Giorgos Tsiapaliwkas wrote: > so,i will replace evething that is necessary with the "this". > Is that ok?? yep, that should work fine... parent the widgets and then commit :) - Aaron J. ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/101916/#review4605 ----------------------------------------------------------- On July 11, 2011, 6:12 p.m., Giorgos Tsiapaliwkas wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/101916/ > ----------------------------------------------------------- > = > (Updated July 11, 2011, 6:12 p.m.) > = > = > Review request for Plasma. > = > = > Summary > ------- > = > hello, > = > I was looking at the projectmanager.projectmanager.[h/cpp] and i noticed = that there wasn't no destructor. > The patch adds a destructor at projectmanager and changed a bit the mainw= indow.cpp. > = > I have some question in my next reply > = > = > Diffs > ----- > = > mainwindow.cpp e08581f = > projectmanager/projectmanager.h 53ef226 = > projectmanager/projectmanager.cpp 122e48d = > = > Diff: http://git.reviewboard.kde.org/r/101916/diff > = > = > Testing > ------- > = > compiles fine and no pointer error > = > = > Thanks, > = > Giorgos > = > --===============4813910919905703210== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
This is an automatically generated e-mail. To reply, visit: http://git.revie= wboard.kde.org/r/101916/

On July 11th, 2011, 6:27 p.m., Giorgos Tsia= paliwkas wrote:

= = =
projectmanager/projectmanager.cpp (Diff revision 1)
ProjectManager::ProjectManager(QWidget* parent)
73
ProjectManager::~ProjectManager()
74
{
75
    delete m_projectList;
76
    delete m_loadButton;
77
    delete m_removeMenu;
78
    delete m_removeMenuButton;
79
}
Why in ge=
neral the destructors of plasmate doesn't do something like that??

On July 12th, 2011, 3 p.m., Aaron J. Seigo wrote:

the more =
typical approach is to parent those items to something and let QObject hand=
le it.

e.g. this:

m_loadButton =3D new KPushButton(i18n("Load Project"));

should become this:

m_loadButton =3D new KPushButton(i18n("Load Project"), this);

there's no need for a dtor then.

On July 13th, 2011, 2:58 p.m., Giorgos Tsiapaliwkas wrote:

so,i will=
 replace evething that is necessary with the "this".
Is that ok??
yep, that should work fine... parent the widgets and then commit :)<=
/pre>

- Aaron J.


On July 11th, 2011, 6:12 p.m., Giorgos Tsiapaliwkas wrote:

Review request for Plasma.
By Giorgos Tsiapaliwkas.

Updated July 11, 2011, 6:12 p.m.

Descripti= on

hello,

I was looking at the projectmanager.projectmanager.[h/cpp] and i noticed th=
at there wasn't no destructor.
The patch adds a destructor at projectmanager and changed a bit the mainwin=
dow.cpp.

I have some question in my next reply

Testing <= /h1>
compiles fine and no pointer error

Diffs=

  • mainwindow.cpp (e08581f)
  • projectmanager/projectmanager.h (53ef226)<= /span>
  • projectmanager/projectmanager.cpp (122e48d= )

View Diff

--===============4813910919905703210==-- --===============1298660287== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============1298660287==--