List Info

Thread: Re: KDE/kdevelop/buildtools/managers/custommake




Re: KDE/kdevelop/buildtools/managers/customm ake
user name
2007-05-31 14:37:13
On 31.05.07 13:58:35, dukju ahn wrote:
> 2007/5/31, Andreas Pakulat <apakugmx.de>:
> > On 31.05.07 13:07:38, dukju ahn wrote:
> > > 2007/5/30, Andreas Pakulat <apakugmx.de>:
> > > > On 30.05.07 19:11:50, Dukju Ahn wrote:
> > > So, I'll add "virtual
Watcher::fileCreated( QString filePath,
> > > ProjectFolderItem* parent )"
> > > and each managers only have to reimplement
this small method.
> >
> > I don't see what you mean specifically, where do
you want to add this
> > method, from where would it be called?
> 
> Rather than emitting removedEntries(), having virtual
interface is more good.
> This virtual interface will be called instead of
emitting signal.
> And each managers just implement their own
removedEntries() and somthing.

But then the Watcher class is bound to the project manager,
I was saying
that it should be a more general-purpose wrapper around
QFileSystemWatcher to provide more fine-grained signals
(instead of
directoryChanged the user of the class is notified when
files are
added/deleted). This is something that will be used
elsewhere in
KDevelop.

Andreas

-- 
Bridge ahead.  Pay troll.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: KDE/kdevelop/buildtools/managers/customm ake
user name
2007-06-01 02:06:56
2007/6/1, Andreas Pakulat <apakugmx.de>:
> On 31.05.07 13:58:35, dukju ahn wrote:
> > Rather than emitting removedEntries(), having
virtual interface is more good.
> > This virtual interface will be called instead of
emitting signal.
> > And each managers just implement their own
removedEntries() and somthing.
>
> But then the Watcher class is bound to the project
manager, I was saying
> that it should be a more general-purpose wrapper
around
> QFileSystemWatcher to provide more fine-grained signals
(instead of
> directoryChanged the user of the class is notified when
files are
> added/deleted). This is something that will be used
elsewhere in
> KDevelop.

It can't be separated from projectmanager. It uses
Project*Items to determine
whether some file/dir was created/deleted or not. Thus, to
guarantee
proper operation, its signals(or virtual interfaces
whatever) should be
handled by projectmanager. For example, if one directory was
copied
by external action, the projectmanager should parse that
directory to create
proper ProjectFolderItem or FileItem.

Moreover, connecting its signal from other component is
unsafe. For ex.
when the files/dir are deleted,
QList<ProjectFileItem*> is given
as an argument. ProjectManager will delete that from model.
Then, other
component recevies already deleted pointer and it
segfaults.

If we need signal for other componenet than project manager,
we can
have each project manager emit signals inside that virtual
interface. Only
after proper operations are taken, the signals can be
emitted safely.
And other plugins get the pointer via IProject::watcher() or
something.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )