List Info

Thread: KDE/kdevelop/lib




KDE/kdevelop/lib
user name
2006-08-16 16:11:27
SVN commit 573550 by amantia:

Make this methods virtual, so one can override them (project
is even override in kdevgenericimporter, which is certainly
not good if it is not virtual).

CCMAIL: kdevelop-develkdevelop.org

 M  +3 -4      kdevfilemanager.h  


--- trunk/KDE/kdevelop/lib/kdevfilemanager.h #573549:573550
 -78,7
+78,7 
     Q_DECLARE_FLAGS( Features, Feature )
 
     /** return The current project. */
-    KDevProject *project() const;
+    virtual KDevProject *project() const;
 
     /**
      * This method initialize the model item arg dom
 -94,11
+94,10 
 
     /**
      * Return the top item in this heirachy, which
represents the root folder of the source
-     * heirachy.
+     * hierarchy.
      *
-     * \sa root()
      */
-    KDevProjectFolderItem* top();
+    virtual KDevProjectFolderItem* top();
 
     /**
      * Add a folder to the project

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
KDE/kdevelop/lib
user name
2006-08-16 23:57:15
On Wednesday 16 August 2006 11:11, Andras Mantia wrote:
> SVN commit 573550 by amantia:
>
> Make this methods virtual, so one can override them
(project is even
> override in kdevgenericimporter, which is certainly not
good if it is not
> virtual).
>
> CCMAIL: kdevelop-develkdevelop.org
>

Why do these methods need to be virtual? They shouldn't
need to be, but my 
idea of what the code should be and what it actually is at
this point may not 
match
--
Matt

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
KDE/kdevelop/lib
user name
2006-08-17 06:25:43
On Thursday 17 August 2006 02:57, Matt Rogers wrote:
> On Wednesday 16 August 2006 11:11, Andras Mantia wrote:
> > SVN commit 573550 by amantia:
> >
> > Make this methods virtual, so one can override
them (project is
> > even override in kdevgenericimporter, which is
certainly not good
> > if it is not virtual).
> >
> > CCMAIL: kdevelop-develkdevelop.org
>
> Why do these methods need to be virtual? They
shouldn't need to be,
> but my idea of what the code should be and what it
actually is at
> this point may not match

Well, when you create a filemanager implementation, you
would need to 
return the top item you created in import, not? So you have
to override 
"top" in your implementation.

For project, I don't care about being virtual or not, but
it was already 
overridden in the genericimporter, so I thought it makes
sense to make 
it virtual as well (but from the code I have the feeling
that the 
genericimporter method can be removed).

Andras
-- 
Quanta Plus developer - http://quanta.kdewebdev.o
rg
K Desktop Environment - http://www.kde.org
_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
KDE/kdevelop/lib
user name
2006-08-17 12:28:18
On Thursday 17 August 2006 01:25, Andras Mantia wrote:
> On Thursday 17 August 2006 02:57, Matt Rogers wrote:
> > On Wednesday 16 August 2006 11:11, Andras Mantia
wrote:
> > > SVN commit 573550 by amantia:
> > >
> > > Make this methods virtual, so one can
override them (project is
> > > even override in kdevgenericimporter, which
is certainly not good
> > > if it is not virtual).
> > >
> > > CCMAIL: kdevelop-develkdevelop.org
> >
> > Why do these methods need to be virtual? They
shouldn't need to be,
> > but my idea of what the code should be and what it
actually is at
> > this point may not match
>
> Well, when you create a filemanager implementation, you
would need to
> return the top item you created in import, not? So you
have to override
> "top" in your implementation.
>
> For project, I don't care about being virtual or not,
but it was already
> overridden in the genericimporter, so I thought it
makes sense to make
> it virtual as well (but from the code I have the
feeling that the
> genericimporter method can be removed).
>
> Andras

the generic importer method should be removed, you are
correct. I wonder if a 
setTop function or an m_top protected member should be used
here rather than 
making top() virtual. I have no preference as to which one
to use though.
--
Matt

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/
kdevelop-devel
[1-4]

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