Code tidying
Patrick Julien
freak at codepimps.org
Wed Oct 15 11:02:53 CEST 2003
On October 15, 2003 09:17 am, Boudewijn Rempt wrote:
> On Wednesday 15 October 2003 14:39, Patrick Julien wrote:
> > On October 15, 2003 06:44 am, Boudewijn Rempt wrote:
> > > Patrick,
> > >
> > > David Faure just remarked on the koffice mailing list that I was mixing
> > > spaces and tabs in Krita code. Would you, as the maintainer, mind if I
> > > replaced all existing tabs with four spaces?
> >
> > Well, yes an no, I like tabs better, but I haven't worked on Krita in a
> > while... I can review your patches if you want tho
>
> Well, tabs vs spaces is more or less a religious issue, so I won't argue
> it. It's just that, well, I haven't used tabs for ages, not since my first
> employer mandated spaces. So it's likely that the odd space-indented line
> will creep in here and there.
>
> The patch is at http://www.valdyas.org/~boud/krita-14-10-2003.diff.
Namespaces we're not available, among other things, in gcc when krita was
originally written.
I really wish koffice filters would be extended just a bit for Krita's usage.
The notion that krita would need it's own filters from every other KOffice
app makes me sad.
Composite pattern is used for paint devices, layers, channels, etc.
The plugin stuff has been there forever and should be removed really, it has
no value.
ImageMagick is for importing/exporting of foreign image formats, yes. The
goal is to put this in a filter proper. However, the koffice filter
interface would make it difficult to do anything with these filters other
than loading an entire image at a time.
Steal from the Gimp forever?
Code wise:
You should use Q_INT32 instead of int.
don't use //, if you want to comment out a large section of code, use #if 0
You actually have a huge memory leak in your new drawPolyline method. Check
out the destructor of KisPixelData.
Adding // ??? doesn't really do anything but add clout to the code.
Yeah, why did you reorder data members in KisView, KisPixelData, etc? They
look awful now (tab vs. spaces) and for no apparent reason either.
Also, if you want to start renaming classes, i.e. KisToolBrush to ToolBrush,
change the file name too.
More information about the kimageshop
mailing list